diff --git a/.jenkins.sh b/.jenkins.sh index 54e5a9f3e1b7838897c5801c36b7c2d120a1152f..260dfdf14eed7b6d525b5cb7c02352ef5b3b9f7a 100755 --- a/.jenkins.sh +++ b/.jenkins.sh @@ -10,8 +10,16 @@ cd $(dirname $0) run_dir=`pwd` # Docker version 2 -cd ./virtualization/docker +cd ./virtualization/docker-dev ./build.sh #--force-stfubuntu +ret_code=`echo $?` + +if [ $ret_code != 0 ] +then + cd $run_dir + exit -1 +fi + #./run.sh if [ "$1" == "--remove" ] @@ -19,4 +27,6 @@ then docker rmi --force mec_devel:latest fi -cd - +cd $run_dir + +exit 0 diff --git a/Makefile b/Makefile index 80b364a48da996aa9f7f37b4cd34713166cddbb8..62e6da4f7698ae7d5d7a89ad85b275e7987e2698 100644 --- a/Makefile +++ b/Makefile @@ -123,7 +123,7 @@ $(cc_objects) : $(outdir)/%.o : %.cc $(gen_sources): $(outdir)/.generate $(outdir)/.generate: Makefile $(tt_sources) - $(TTCN3_DIR)/bin/compiler -b -d -e -f -g -l -L -M -n -O -r -R -U none -x -X -o $(outdir) $(tt_sources) + $(TTCN3_DIR)/bin/compiler $(TTCN3_COMPILER_OPTIONS) -o $(outdir) $(tt_sources) touch $@ $(foreach S, $(ttcn_sources), $(eval $(outdir)/$(notdir $(patsubst %.ttcn, %.cc, $(S))): $(S))) diff --git a/README.md b/README.md index 2407730fc8a074c3f771ddba98174beafe30b6f1..7ae085f04eb39b5535f23bdc7df659f179df8014 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ $ ln -sf module_mec.mk module.mk ```sh $ cd ../../.. $ cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ -$ cp ./ttcn/patch_lib_common_titan/*.ttcn ./ttcn/LibCommon/ttcn +$ cp ./ttcn/patch_lib_common_titan/ttcn/*.ttcn ./ttcn/LibCommon/ttcn ``` - From the ETSI MEC Test System root directory, build the Docker image executing the following commands: @@ -301,7 +301,7 @@ $ ln -sf module_mec.mk module.mk ```sh $ cd /home/etsi/dev/gs032p3-ttcn-test-suite $ cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ -$ cp ./ttcn/patch_lib_common_titan/*.ttcn ./ttcn/LibCommon/ +$ cp ./ttcn/patch_lib_common_titan/ttcn/*.ttcn ./ttcn/LibCommon/ttcn ``` - Update your default environment with the content of the script $HOME/dev/gs032p3-ttcn-test-suite/scripts/devenv.bash.ubuntu diff --git a/ccsrc/Protocols/Http/http_codec_mec.cc b/ccsrc/Protocols/Http/http_codec_mec.cc index f6df151de9342675d518bc963e4556298b39756f..362bdaccee9a213e89969cc63c41946aa5e00070 100644 --- a/ccsrc/Protocols/Http/http_codec_mec.cc +++ b/ccsrc/Protocols/Http/http_codec_mec.cc @@ -28,13 +28,16 @@ bool http_codec_mec::decode_body_json(const OCTETSTRING &p_data, LibHttp__JsonMe loggers::get_instance().log(">>> http_codec_mec::decode_body_json"); if (_codecs["json"].get() != nullptr) { - loggers::get_instance().log("http_codec::decode_body: Call 'json_codec'"); + loggers::get_instance().log("http_codec::decode_body_json: Call 'json_codec'"); if (_codecs["json"]->decode(p_data, (Record_Type&)p_json_body, p_params) == -1) { - loggers::get_instance().warning("http_codec::decode_body: Failed to decode JSON message"); + loggers::get_instance().warning("http_codec::decode_body_json: Failed to decode JSON message"); p_json_body.raw() = CHARSTRING(p_data.lengthof(), (char*)static_cast(p_data)); } else { - loggers::get_instance().log_msg("http_codec::decode_body: Decoded message:", p_json_body); + loggers::get_instance().log_msg("http_codec::decode_body_json: Decoded message:", p_json_body); } + } else { + loggers::get_instance().error("http_codec::decode_body_json: Codec not found"); + return false; } return true; diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 230da83c85413db0c7d0fa067bbdc38987f55116..c117361edf82297d0c6d74ec1e2e76d229eb4ee6 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -20,26 +20,26 @@ int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTE const UEidentityAPI__TypesAndValues::UeIdentityTagInfo& ue_identity_tag_info = msg.ueIdentityTagInfo(); ue_identity_tag_info.encode(UEidentityAPI__TypesAndValues::UeIdentityTagInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()); - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userTrackingSubscription)) { - const LocationAPI__TypesAndValues::UserTrackingSubscription& user_tracking_subscription = msg.userTrackingSubscription(); - 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("}")); - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_periodicNotificationSubscription)) { - const LocationAPI__TypesAndValues::PeriodicNotificationSubscription& periodic_notification_subscription = msg.periodicNotificationSubscription(); - periodic_notification_subscription.encode(LocationAPI__TypesAndValues::PeriodicNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"periodicNotificationSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_zonalTrafficSubscription)) { - const LocationAPI__TypesAndValues::ZonalTrafficSubscription& zonal_traffic_subscription = msg.zonalTrafficSubscription(); - zonal_traffic_subscription.encode(LocationAPI__TypesAndValues::ZonalTrafficSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"zonalTrafficSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_circleNotificationSubscription)) { - const LocationAPI__TypesAndValues::CircleNotificationSubscription& notif = msg.circleNotificationSubscription(); - notif.encode(LocationAPI__TypesAndValues::CircleNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"circleNotificationSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_distanceNotificationSubscription)) { - const LocationAPI__TypesAndValues::DistanceNotificationSubscription& notif = msg.distanceNotificationSubscription(); - notif.encode(LocationAPI__TypesAndValues::DistanceNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"distanceNotificationSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userLocationEventSubscription)) { + const LocationAPI__TypesAndValues::UserLocationEventSubscription& user_location_event_subscription = msg.userLocationEventSubscription(); + user_location_event_subscription.encode(LocationAPI__TypesAndValues::UserLocationEventSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"userLocationEventSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userLocationPeriodicSubscription)) { + const LocationAPI__TypesAndValues::UserLocationPeriodicSubscription& user_location_periodic_subscription = msg.userLocationPeriodicSubscription(); + user_location_periodic_subscription.encode(LocationAPI__TypesAndValues::UserLocationPeriodicSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"userLocationPeriodicSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_zoneLocationEventSubscription)) { + const LocationAPI__TypesAndValues::ZoneLocationEventSubscription& zone_location_event_subscription = msg.zoneLocationEventSubscription(); + zone_location_event_subscription.encode(LocationAPI__TypesAndValues::ZoneLocationEventSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"zoneLocationEventSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userAreaSubscription)) { + const LocationAPI__TypesAndValues::UserAreaSubscription& notif = msg.userAreaSubscription(); + notif.encode(LocationAPI__TypesAndValues::UserAreaSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"userAreaSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_userDistanceSubscription)) { + const LocationAPI__TypesAndValues::UserDistanceSubscription& notif = msg.userDistanceSubscription(); + notif.encode(LocationAPI__TypesAndValues::UserDistanceSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"userDistanceSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); } else if (msg.ischosen(LibHttp__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); @@ -52,10 +52,22 @@ int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTE const EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo& service_info = msg.serviceInfo(); service_info.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = /*char2oct(CHARSTRING("{\"ServiceInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appInfo__regapps)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo& app_info = msg.appInfo__regapps(); + app_info.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"AppInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appTerminationNotificationSubscription)) { const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription& app = msg.appTerminationNotificationSubscription(); app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = /*char2oct(CHARSTRING("{\"AppTerminationNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appTerminationConfirmation)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationConfirmation& app = msg.appTerminationConfirmation(); + app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppTerminationConfirmation_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"AppTerminationConfirmation\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appReadyConfirmation)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::AppReadyConfirmation& app = msg.appReadyConfirmation(); + app.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppReadyConfirmation_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"AppTerminationConfirmation\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_dnsRule)) { const EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule& dns_rule = msg.dnsRule(); dns_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DnsRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); @@ -67,27 +79,49 @@ int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTE } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_trafficRule)) { const EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule& traffic_rule = msg.trafficRule(); traffic_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_bwInfo)) { const TrafficManagementAPI__TypesAndValues::BwInfo& bw_info = msg.bwInfo(); bw_info.encode(TrafficManagementAPI__TypesAndValues::BwInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + 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); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_predictedQos)) { const V2XInformationServiceAPI__TypesAndValues::PredictedQos& predicted_qos = msg.predictedQos(); predicted_qos.encode(V2XInformationServiceAPI__TypesAndValues::PredictedQos_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_v2xMsgDistributionServerInfo)) { + const V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo& v2x_msg_distribution_server_info = msg.v2xMsgDistributionServerInfo(); + v2x_msg_distribution_server_info.encode(V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo_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_provChgUuUniSubscription)) { + const V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniSubscription& prov_chg_uu_uni_subscription = msg.provChgUuUniSubscription(); + prov_chg_uu_uni_subscription.encode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniSubscription_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_provChgUuMbmsSubscription)) { + const V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsSubscription& prov_chg_uu_mbms_subscription = msg.provChgUuMbmsSubscription(); + prov_chg_uu_mbms_subscription.encode(V2XInformationServiceAPI__TypesAndValues::ProvChgUuMbmsSubscription_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_provChgPc5Subscription)) { + const V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Subscription& prov_chg_pc5_subscription = msg.provChgPc5Subscription(); + prov_chg_pc5_subscription.encode(V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Subscription_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_v2xMsgSubscription)) { + const V2XInformationServiceAPI__TypesAndValues::V2xMsgSubscription& v2x_msg_subscription = msg.v2xMsgSubscription(); + v2x_msg_subscription.encode(V2XInformationServiceAPI__TypesAndValues::V2xMsgSubscription_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_assocStaSubscription)) { const WlanInformationAPI__TypesAndValues::AssocStaSubscription& assoc_sta_subscription = msg.assocStaSubscription(); assoc_sta_subscription.encode(WlanInformationAPI__TypesAndValues::AssocStaSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_staDataRateSubscription)) { const WlanInformationAPI__TypesAndValues::StaDataRateSubscription& sta_data_rate_subscription = msg.staDataRateSubscription(); sta_data_rate_subscription.encode(WlanInformationAPI__TypesAndValues::StaDataRateSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = /*char2oct(CHARSTRING("{\"TrafficRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else { loggers::get_instance().error("json_codec::encode: Not supported"); } @@ -146,44 +180,44 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes LocationAPI__TypesAndValues::AccessPointList access_point_list; access_point_list.decode(LocationAPI__TypesAndValues::AccessPointList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.accessPointList() = access_point_list; - } else if (it->second.find("\"userTrackingSubscription\"") != std::string::npos) { + } else if (it->second.find("\"userLocationEventSubscription\"") != std::string::npos) { int idx_begin = it->second.find(":"); int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::UserTrackingSubscription user_tracking_subscription; - user_tracking_subscription.decode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.userTrackingSubscription() = user_tracking_subscription; + LocationAPI__TypesAndValues::UserLocationEventSubscription user_location_event_subscription; + user_location_event_subscription.decode(LocationAPI__TypesAndValues::UserLocationEventSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userLocationEventSubscription() = user_location_event_subscription; - } else if (it->second.find("\"periodicNotificationSubscription\"") != std::string::npos) { + } else if (it->second.find("\"userLocationPeriodicSubscription\"") != std::string::npos) { int idx_begin = it->second.find(":"); int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::PeriodicNotificationSubscription periodic_notification_subscription; - periodic_notification_subscription.decode(LocationAPI__TypesAndValues::PeriodicNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.periodicNotificationSubscription() = periodic_notification_subscription; - } else if (it->second.find("\"zonalTrafficSubscription\"") != std::string::npos) { + LocationAPI__TypesAndValues::UserLocationPeriodicSubscription user_location_periodic_subscription; + user_location_periodic_subscription.decode(LocationAPI__TypesAndValues::UserLocationPeriodicSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userLocationPeriodicSubscription() = user_location_periodic_subscription; + } else if (it->second.find("\"zoneLocationEventSubscription\"") != std::string::npos) { int idx_begin = it->second.find(":"); int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::ZonalTrafficSubscription zonal_traffic_subscription; - zonal_traffic_subscription.decode(LocationAPI__TypesAndValues::ZonalTrafficSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.zonalTrafficSubscription() = zonal_traffic_subscription; - } else if (it->second.find("\"periodicTrackingSubscription\"") != std::string::npos) { + LocationAPI__TypesAndValues::ZoneLocationEventSubscription zone_location_event_subscription; + zone_location_event_subscription.decode(LocationAPI__TypesAndValues::ZoneLocationEventSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.zoneLocationEventSubscription() = zone_location_event_subscription; + } else if (it->second.find("\"userLocationPeriodicSubscription\"") != std::string::npos) { int idx_begin = it->second.find(":"); int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::PeriodicTrackingSubscription periodic_tracking_subscription; - periodic_tracking_subscription.decode(LocationAPI__TypesAndValues::PeriodicTrackingSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.periodicTrackingSubscription() = periodic_tracking_subscription; + LocationAPI__TypesAndValues::UserLocationPeriodicSubscription periodic_tracking_subscription; + periodic_tracking_subscription.decode(LocationAPI__TypesAndValues::UserLocationPeriodicSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userLocationPeriodicSubscription() = periodic_tracking_subscription; } else if (it->second.find("\"accessPointId\"") != std::string::npos) { LocationAPI__TypesAndValues::UserInfo user_info; user_info.decode(LocationAPI__TypesAndValues::UserInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); @@ -201,17 +235,17 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::CircleNotificationSubscription notif; - notif.decode(LocationAPI__TypesAndValues::CircleNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.circleNotificationSubscription() = notif; - } else if (it->second.find("\"distanceNotificationSubscription\"") != std::string::npos) { + LocationAPI__TypesAndValues::UserAreaSubscription notif; + notif.decode(LocationAPI__TypesAndValues::UserAreaSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userAreaSubscription() = notif; + } else if (it->second.find("\"userDistanceSubscription\"") != std::string::npos) { int idx_begin = it->second.find(":"); int idx_end = it->second.rfind("}") - 1; // Remove the last '}' str = it->second.substr(idx_begin + 1, idx_end - idx_begin); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - LocationAPI__TypesAndValues::DistanceNotificationSubscription notif; - notif.decode(LocationAPI__TypesAndValues::DistanceNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.distanceNotificationSubscription() = notif; + LocationAPI__TypesAndValues::UserDistanceSubscription notif; + notif.decode(LocationAPI__TypesAndValues::UserDistanceSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.userDistanceSubscription() = notif; } else if (it->second.find("\"ueIdentityTagInfo\"") != std::string::npos) { UEidentityAPI__TypesAndValues::UeIdentityTagInfo ue_identity_tag_info; ue_identity_tag_info.decode(UEidentityAPI__TypesAndValues::UeIdentityTagInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); @@ -226,7 +260,11 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes std::size_t it_stop = it_start + 4; loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop); loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str()); - str = str.substr(0, it_start) + "{}" + str.substr(it_stop); + if ((str[it_start - 3] == 'n') || (str[it_start - 3] == 's')) { // fqdn or uris or addresses + str = str.substr(0, it_start) + "[]" + str.substr(it_stop); + } else { + str = str.substr(0, it_start) + "{}" + str.substr(it_stop); + } loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str()); } // End of 'while' statement decoding_buffer.clear(); @@ -329,19 +367,23 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes RnisAPI__TypesAndValues::RabRelSubscription rab_rel_subscription; rab_rel_subscription.decode(RnisAPI__TypesAndValues::RabRelSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.rabRelSubscription() = rab_rel_subscription; - } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions") != std::string::npos)) { // SubscriptionLinkList + } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions\"") != std::string::npos)) { // SubscriptionLinkList // FIXME Conflict with MEC-028 SubscriptionLinkList data type RnisAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; subscription_link_list.decode(RnisAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.subscriptionLinkList() = subscription_link_list; - } else if (it->second.find("\"AppContext\"") != std::string::npos) { + } else if (it->second.find("\"associateDevAppId\"") != std::string::npos) { UEAppInterfaceAPI__TypesAndValues::AppContext appContext; appContext.decode(UEAppInterfaceAPI__TypesAndValues::AppContext_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.appContext() = appContext; - } else if (it->second.find("\"AppInfo\"") != std::string::npos) { + } else if (it->second.find("\"appInfo\"") != std::string::npos) { UEAppInterfaceAPI__TypesAndValues::AppInfo appInfo; appInfo.decode(UEAppInterfaceAPI__TypesAndValues::AppInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.appInfo() = appInfo; + } else if (it->second.find("\"appName\"") != std::string::npos) { + 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("\"bwInfo\"") != std::string::npos) || (it->second.find("\"fixedBWPriority\"") != std::string::npos)) { // Need to change some enumerated string not supported by TTCN-3 language while (true) { @@ -413,6 +455,11 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); prov_chg_pc5_subscription.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Subscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.provChgPc5Subscription() = prov_chg_pc5_subscription; + } else if (it->second.find("\"V2xMsgSubscription\"") != std::string::npos) { + V2XInformationServiceAPI__TypesAndValues::V2xMsgSubscription v2x_msg_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + v2x_msg_subscription.decode(V2XInformationServiceAPI__TypesAndValues::V2xMsgSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.v2xMsgSubscription() = v2x_msg_subscription; } else if (it->second.find("\"ProvChgUuUniNotification\"") != std::string::npos) { @@ -430,7 +477,11 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); prov_chg_pc5_notification.decode(V2XInformationServiceAPI__TypesAndValues::ProvChgPc5Notification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.provChgPc5Notification() = prov_chg_pc5_notification; - + } else if (it->second.find("\"v2xMsgDistributionServer\"") != std::string::npos) { + V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo v2x_msg_distribution_server_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + v2x_msg_distribution_server_info.decode(V2XInformationServiceAPI__TypesAndValues::V2xMsgDistributionServerInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.v2xMsgDistributionServerInfo() = v2x_msg_distribution_server_info; } else if (it->second.find("\"AssocStaSubscription\"") != std::string::npos) { if (it->second.find("\"subscription\"") != std::string::npos) { // SubscriptionLinkList diff --git a/config.mk b/config.mk index 66a73807f16c416aa16a09be412990b667df3f65..b8bb114ece97625875e41809bc6749f51dad9b7f 100644 --- a/config.mk +++ b/config.mk @@ -1,4 +1,5 @@ -#TTCN3_DIR := /cygdrive/c/Tools/Titan +TTCN3_COMPILER_OPTIONS := -b -d -e -f -g -l -L -M -n -O -r -R -U none -x -X +#TTCN3_DIR := $(HOME)/frameworks/titan/titan.core/Install #WPCAP_DLL_PATH := /cygdrive/c/windows/system32/npcap/wpcap.dll #NPCAP_INCLUDE := /cygdrive/c/PROGRA~1/Npcap/sdk/include T3Q_PATH=./tools/t3q-v2.0.0b30 diff --git a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg b/etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ similarity index 65% rename from etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg rename to etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ index c79eb24f970a83a71a9af2719d0f347a25d3a07f..a53911e2829335a8808c346e2a852d5035c41214 100644 --- a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg +++ b/etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ @@ -8,25 +8,26 @@ 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 := "sandbox-mec.etsi.org" #"192.168.1.39" +LibHttp_Pics.PICS_HEADER_HOST := "try-mec.etsi.org" #"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_Pics.PICS_ROOT_API := "/sbx8tunqyy/mep1" # Need to sign in on https://sandbox-mec.etsi.org/, section 'Try-it from your MEC application' +LibMec_Pics.PICS_ROOT_API := "/sbx1y8q0x9/mep1" # Need to sign in on https://try-mec.etsi.org/, section 'Try-it from your MEC application' + +# LibMec_Pixits -LibMec_Pics.PICS_MEC_PLAT := true [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_V2XInformationService/%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 -ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT +LogFile := "../logs/AtsMec/%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 @@ -34,8 +35,10 @@ LogEventTypes:= Yes [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=sandbox-mec.etsi.org,port=443,use_ssl=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" -system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1,mutual_auth=1,mutual_tls=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" +#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.39,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=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, @@ -60,7 +63,8 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server [EXECUTE] # In this section you can specify what parts of your test suite you want to execute. -AtsMec_TestControl.control +#AtsMec_TestControl.control + [GROUPS] # In this section you can specify groups of hosts. These groups can be used inside the diff --git a/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ b/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ new file mode 100644 index 0000000000000000000000000000000000000000..a53911e2829335a8808c346e2a852d5035c41214 --- /dev/null +++ b/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ @@ -0,0 +1,81 @@ +[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 := "try-mec.etsi.org" #"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_Pics.PICS_ROOT_API := "/sbx1y8q0x9/mep1" # Need to sign in on https://try-mec.etsi.org/, section 'Try-it from your MEC application' + +# 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/%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.39,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=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 + + +[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/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ b/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ index 4255964e90f64361213ad7068c054172971196fc..384e475d44bbab49006718e8a2e3371d9164b9b0 100644 --- a/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ +++ b/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ @@ -17,8 +17,8 @@ LibHttp_Pics.PICS_USE_TOKEN_HEADER := true LibMec_Pics.PICS_ROOT_API := "etsi-013" # LibMex_Pixits -LibMec_Pixits.PX_ME_APP_Q_ZONE_ID_URI := "/location/v2/zones" -LibMec_Pixits.PX_ME_APP_Q_USERS_LIST_URI := "/location/v2/users" +LibMec_Pixits.PX_ME_APP_Q_ZONE_ID_URI := "/location/v3/zones" +LibMec_Pixits.PX_ME_APP_Q_USERS_LIST_URI := "/location/v3/users" LibMec_Pixits.PX_RNIS_SUBSCRITIONS_URI := "/rni/v1/subscriptions" LibMec_Pixits.PX_RNIS_QUERIES_URI := "/rni/v1/queries" LibMec_Pixits.PX_MEC_SVC_MGMT_APPS_URI := "/mec_service_mgmt/v1/applications" diff --git a/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ b/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ index 7909087a3fbe785dfb3474fed8e2536b53a23ee6..292a40d6850fd22323c979dbff2467a686e691b5 100644 --- a/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ +++ b/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ @@ -63,9 +63,9 @@ LocationAPI_Pixits.PX_USER := "4005C0A640001" LocationAPI_Pixits.PX_IP_ADDRESS := "10.100.0.1" LocationAPI_Pixits.PX_CLIENT_ID := "0123" LocationAPI_Pixits.PX_SUBSCRIPTION_ID := "1" -LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } LocationAPI_Pixits.PX_UE_COORD_LAT := 43.729538 LocationAPI_Pixits.PX_UE_COORD_LONG := 7.413819 @@ -313,16 +313,16 @@ AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_0 #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_BR # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_NF -# Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the location changes -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK_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_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01 # Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_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_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_NF -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_001_OK +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02 # Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the UE changes location #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_001_BR # Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application @@ -335,7 +335,7 @@ AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_0 #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_BR # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_NF -# Check that the IUT acknowledges the UE information change subscription request when commanded by a MEC Application and notifies it when the location changes +# Check that the IUT responds with a list zones when queried by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_001_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_001_BR @@ -348,7 +348,7 @@ AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_0 # 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_LocationAPI_TestCases.TC_MEC_MEC013_SRV_RLOCLOOK_001_NF # Check that the IUT acknowledges the UE area change subscription request when commanded by a MEC Application and notifies it when the UE enters the specified circle -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_OK +#AtsMec_LocationAPI_TestCases.TP_MEC_MEC013_SRV_UEAREASUB_001_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_BR # Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application diff --git a/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ b/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ index 094c53d3a9fa24b622e7dfea7870e774a00a35b4..8de3d45222296df0da3023c56a76bdd98f272f21 100644 --- a/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ +++ b/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ @@ -26,9 +26,9 @@ LocationAPI_Pixits.PX_USER := "4005C0A640001" LocationAPI_Pixits.PX_IP_ADDRESS := "10.100.0.1" LocationAPI_Pixits.PX_CLIENT_ID := "0123" LocationAPI_Pixits.PX_SUBSCRIPTION_ID := "1" -LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } -LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v2/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_CALLBACK_REF_URL := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } +LocationAPI_Pixits.PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://yanngarcia.ddns.net/location/v3/notif/1", callbackData := omit, notificationFormat := omit } LocationAPI_Pixits.PX_UE_COORD_LAT := 43.729538 LocationAPI_Pixits.PX_UE_COORD_LONG := 7.413819 @@ -82,16 +82,16 @@ AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_OK #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_BR # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_NF -# Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the location changes +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR +# 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_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01 # Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_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_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_002_NF -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_001_OK +# Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic +#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02 # Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the UE changes location #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_001_BR # Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application @@ -104,7 +104,7 @@ AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_OK #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_BR # Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_001_NF -# Check that the IUT acknowledges the UE information change subscription request when commanded by a MEC Application and notifies it when the location changes +# Check that the IUT responds with a list zones when queried by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_001_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_001_BR @@ -117,7 +117,7 @@ AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_001_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_LocationAPI_TestCases.TC_MEC_MEC013_SRV_RLOCLOOK_001_NF # Check that the IUT acknowledges the UE area change subscription request when commanded by a MEC Application and notifies it when the UE enters the specified circle -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_OK +#AtsMec_LocationAPI_TestCases.TP_MEC_MEC013_SRV_UEAREASUB_001_OK # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_001_BR # Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application diff --git a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ new file mode 100644 index 0000000000000000000000000000000000000000..9ea10db5d8a0efa098f893c2e65c4f31ad3c1fca --- /dev/null +++ b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ @@ -0,0 +1,178 @@ +[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 := "mec-platform.etsi.org" #"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_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in on https://mec-platform.etsi.org/, section 'Try-it from your MEC application' + +LibMec_Pics.PICS_MEC_PLAT := true + +# 5g-small-cell-1 +V2XInformationServiceAPI_Pixits.PX_V2X_ECGI := "268804901557" +V2XInformationServiceAPI_Pixits.PX_V2X_CELL_ID := "101010101" +V2XInformationServiceAPI_Pixits.PX_V2X_ECGI_LAT := 43.730846 +V2XInformationServiceAPI_Pixits.PX_V2X_ECGI_LONG := 7.415385 + +# Callbacks +V2XInformationServiceAPI_Pixits.PX_PROV_UU_UNI_SUB_CALLBACK := "https://yanngarcia.ddns.net:36001/vis/v2/" +V2XInformationServiceAPI_Pixits.PX_PROV_V2X_SUB_CALLBACK := "https://yanngarcia.ddns.net:36001/vis/v2/" + +[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_V2XInformationService/%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 +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT +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=mec-platform.etsi.org,port=443,use_ssl=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1,mutual_auth=1,mutual_tls=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)" + +[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_V2XInformationServiceAPI_TestControl.control + +# Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_01 +# Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_NF + +# Check that the IUT responds with a configured provisioning information over Uu MBMS when queried by a MEC Application +AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_NF + +# Check that the IUT processes properly a request to information of V2X Message Distribution servers +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_004_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_OK +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_OK +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_BR + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_03 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_04 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_05 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_BR + +# Check that the IUT responds with the requested to create a subscription - ProvChgUuUniSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_01 +# Check that the IUT responds with the requested to create a subscription - ProvChgUuMbmsSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_02 +# Check that the IUT responds with the requested to create a subscription - ProvChgPc5Subscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_03 +# Check that the IUT responds with the requested to create a subscription - V2xMsgSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_04 +# Check that the IUT responds with the requested to create a subscription - PredQosSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_05 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Wrong SubscriptionType +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_BR_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - No Callback neitheir WebSocket +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_BR_02 + +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuUniSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_01 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuMbmsSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_02 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgPc5Subscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_03 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - V2xMsgSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_04 +# Check that the IUT responds with the requested of subscription information when queried by a MEC Application - PredQosSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_05 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_NF + +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_02 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_03 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_04 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_05 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_BR +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_NF + +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgUuUniSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_01 +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgUuMbmsSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_02 +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgPc5Subscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_03 +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - V2xMsgSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_04 +# Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - PredQosSubscription +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_OK_05 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_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 diff --git a/gs032p3-ttcn-test-suite.code-workspace b/gs032p3-ttcn-test-suite.code-workspace index 90c9d36a137b5f8474b2babcc1cfb3e3ccd348e1..da72d480c358cfb1541f9bcd29e4f1e911530ceb 100644 --- a/gs032p3-ttcn-test-suite.code-workspace +++ b/gs032p3-ttcn-test-suite.code-workspace @@ -2,6 +2,12 @@ "folders": [ { "path": "." + }, + { + "path": "../gs032p2-test-purposes" + }, + { + "path": "../eurecom" } ], "settings": { diff --git a/install.sh b/install.sh new file mode 100755 index 0000000000000000000000000000000000000000..c8048c944363e79c8c8f17320cfb98d3d726fdf2 --- /dev/null +++ b/install.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +#set -e +set -vx + +BASE_PATH=`pwd` + +git submodule update --init --recursive --remote + +if [ ! -d ./titan-test-system-framework ] +then + git clone --recurse-submodules --branch devel https://labs.etsi.org/rep/cti-tools/titan-test-system-framework.git + cd ./titan-test-system-framework +else + cd ./titan-test-system-framework + git checkout devel +fi +cd ./ttcn/LibHttp +ln -f module_mec.mk module.mk + +cd $BASE_PATH +ln -f ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ + +exit 0 diff --git a/plantuml/__main__.py b/plantuml/__main__.py index a3f73cf262acf39cceeb46e32be848c49d8e5642..5589e4015276637724c63d9d8a8c6567fc6dca93 100644 --- a/plantuml/__main__.py +++ b/plantuml/__main__.py @@ -171,7 +171,11 @@ def main(): # End of 'with' statement # End of 'with' statement - os.system('java -DPLANTUML_LIMIT_SIZE=8192 -jar ./plantuml.jar -svg {}'.format(OUT_FILE_PATH)) + # Check if file is not empty + if os.path.getsize(OUT_FILE_PATH) == 0: + logger.error(f'Empty result, please check that FileMask is properly set: ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TIMEROP | TESTCASE') + else: + os.system('java -DPLANTUML_LIMIT_SIZE=8192 -jar ./plantuml.jar -svg {}'.format(OUT_FILE_PATH)) # End of main function if __name__ == "__main__": diff --git a/scripts/generate_png.sh b/scripts/generate_png.sh index 7c73718dc96a14fca9f3e76cba9e917204909942..37b46baa5ad5a4e0bba0dc0e876c0bfb1d1bd736 100755 --- a/scripts/generate_png.sh +++ b/scripts/generate_png.sh @@ -1,6 +1,6 @@ #!/bin/bash #set -e -set -vx +#set -vx clear diff --git a/titan-test-system-framework b/titan-test-system-framework index 07e483b6f5f83ea55de07fe84eaa924c7f401724..6959b8be419f3755de6f888e24bfdc8de07383a7 160000 --- a/titan-test-system-framework +++ b/titan-test-system-framework @@ -1 +1 @@ -Subproject commit 07e483b6f5f83ea55de07fe84eaa924c7f401724 +Subproject commit 6959b8be419f3755de6f888e24bfdc8de07383a7 diff --git a/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestCases.ttcn b/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestCases.ttcn deleted file mode 100644 index 4778a5ecb35898cbe642a07c1ccb8544938102e4..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestCases.ttcn +++ /dev/null @@ -1,1733 +0,0 @@ -/** -* @author ETSI / STF569 -* @version $URL:$ -* $ID:$ -* @desc This module provides the MEC test cases. -* @copyright ETSI Copyright Notification -* No part may be reproduced except as authorized by written permission. -* The copyright and the foregoing restriction extend to reproduction in all media. -* All rights reserved. -* @see ETSI GS MEC 003, Draft ETSI GS MEC 021 V2.1.1 -*/ - module AtsMec_Ams_TestCases { - - // Libcommon - import from LibCommon_BasicTypesAndValues 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_LocationAPI - import from Ams_Templates all; - import from Ams_Pics all; - import from Ams_Pixits all; - - // LibMec - import from LibMec_TypesAndValues all; - import from LibMec_Templates all; - import from LibMec_Functions all; - import from LibMec_Pics all; - import from LibMec_Pixits all; - - group appMobilityServices { - - /** - * @desc Check that the AMS service returns information about the registered application mobility services when requested - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info( - { - mw_app_mobility_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - PX_MEP_ID - ) - ) - } - )))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(valueof(v_response.response.header)) == true) { - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] 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_MEC012_SRV_AMS_001_OK - - /** - * @desc Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "?appMobilityService=" & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, - -, - 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_001_BR - - - /** - * @desc Check that the AMS service creates a new application mobility services when requested - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request( - m_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info( - mw_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ), - PX_APP_MOBILITY_SERVICE_ID - ) - ) - ) - ) - ) - ) - - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo and status code set to 201 Created ***"); - 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_MEC012_SRV_AMS_002_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed request to create a new application mobility service - * @see ETSI GS MEC 021 2.1.1, clause 8.3.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI, - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request_error( - m_service_consumer_error( - PX_APP_INS_ID, - - - ) - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details when bad request is performed ***"); - 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_MEC012_SRV_AMS_002_BR - } // End of group appMobilityServices - - - group individualAppMobilityService{ - - /** - * @desc Check that the AMS service returns information about this individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_011_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info( - -, - PX_APP_MOBILITY_SERVICE_ID - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_011_OK - - /** - * @desc Check that the AMS service sends an error when receives a query about a not existing individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_011_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_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 - - } // End of testcase TC_MEC_MEC012_SRV_AMS_011_NF - - - - /** - * @desc Check that the AMS service modifies the individual application mobility service when requested - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_012_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request( - m_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info({ - *, - mw_app_mobility_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ), - *}, - - - ) - ) - ) - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_OK - - /** - * @desc Check that the AMS service sends an error when receives a request to modify a not existing individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_012_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request( - m_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ))); - 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 - - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_NF - - /** - * @desc Check that the AMS service sends an error when receives a request to modify a individual application mobility service using bad parameters - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_012_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request_with_error( - m_registration_request_with_error( - m_service_consumer_id_with_error( - PX_APP_INS_ID, - - - ), - -, - - - ) - ) - ) - ))); - 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 successfully responds with a 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_BR - - - /** - * @desc Check that the AMS service de-register the individual application mobility service and delete the resource - * that represents the individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_013_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content( - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 204 No Content ***"); - 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_MEC012_SRV_AMS_013_OK - - /** - * @desc Check that the AMS service sends an error when is requested to delete the resource - * that represents the individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.4.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_013_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_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 - - } // End of testcase TC_MEC_MEC012_SRV_AMS_013_NF - - } - - group appMobilityServiceDeregisterTask { - - /** - * @desc Check that the AMS service deregister an individual application mobility service on expiry of the timer associated with the service - * @see ETSI GS MEC 021 2.0.10, clause 8.5.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_014_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_mobility_service_info( - mw_app_mobility_service_info({ - *, - mw_app_mobility_registration_info( - mw_service_consumer_id( - PX_APP_INS_ID, - - - ), - -, - - - ), - *}, - - - ) - ) - ) - ))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - } // End of testcase TC_MEC_MEC012_SRV_AMS_014_OK - - /** - * @desc Check that the AMS service send an error when is requested to deregister a not existent individual application mobility service - * @see ETSI GS MEC 021 2.0.10, clause 8.5.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_014_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", - 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( - ))) -> value v_response { - 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 - } // End of testcase TC_MEC_MEC012_SRV_AMS_012_OK - - - } - - group appMobilityServicesSubscriptions { - - /** - * @desc Check that the AMS service returns information about the available subscriptions when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - //@TODO: How can we convert enums in strings? - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=" & int2str(enum2int(PX_SUBSCRIPTION_TYPE)), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription( - PX_SUBSCRIPTION_TYPE, - -, - -, - -, - - - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // END TC_MEC_MEC012_SRV_AMS_003_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed query about the available subscriptions - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_003_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionTyp=" & int2str(enum2int(PX_SUBSCRIPTION_TYPE)), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // END of TC_MEC_MEC012_SRV_AMS_003_BR - - /** - * @desc Check that the AMS service creates a notification subscriptions when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_004_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS, - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AMS Subscription and 201 Created status 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 TC_MEC_MEC012_SRV_AMS_004_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed request to create a notification subscription - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.6.3.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS, - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription_error( - PX_SUBSCRIPTION_TYPE, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details and 400 Bad request status 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 TC_MEC_MEC012_SRV_AMS_004_BR - - /** - * @desc Check that the AMS service returns information about a given subscription when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_005_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_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_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription(PX_SUBSCRIPTION_TYPE, -, -, -, -) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_005_OK - - /** - * @desc Check that the AMS service returns an error when receives a query about a not existing subscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.1 - */ - testcase TC_MEC_MEC012_SRV_AMS_005_NF() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_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( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - ) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 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 - - } // End of TC_MEC_MEC012_SRV_AMS_005_NF - - /** - * @desc Check that the AMS service deletes a given subscription when requested - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_006_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_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_204_no_content - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content on deletion request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_006_OK - - /** - * @desc Check that the AMS service sends an error when it receives a delete request for a not existing subscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.5 - */ - testcase TC_MEC_MEC012_SRV_AMS_006_NF() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_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( - mw_http_message_body_json( - mw_body_json_problem_details( - ) - ) - ) - ) - ) - { - 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 - - } // End of TC_MEC_MEC012_SRV_AMS_006_NF - - /** - * @desc Check that the AMS service modifies a given subscription when requested. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_007_OK() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, -, -, - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_ams_subscriptions( - mw_ams_subscription(PX_SUBSCRIPTION_TYPE, -, -, -, -) - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_007_OK - - /** - * @desc Check that the AMS service sends an error when it receives a malformed modify request for a given subscription. - * Permitted SUBSCRIPTION_TYPE are: - * - MobilityProcedureSubscription - * - AdjacentAppInfoSubscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_007_BR() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_registration_request( - m_registration_request( - m_service_consumer_error(PX_APP_INS_ID, -), - -, - - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - ) - ) - ) - ) - ) - { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - } // End of TC_MEC_MEC012_SRV_AMS_007_BR - - /** - * @desc Check that the AMS service sends an error when it receives a modify request for a not existing subscription - * @see ETSI GS MEC 021 2.1.1, clause 8.7.3.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_007_NF() runs on HttpComponent system HttpTestAdapter { - var Headers v_headers; - if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ - log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - - // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_ams_subscriptions( - m_ams_subscription( - PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, -, -, - - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - ) - ) - ) - ) - ) - { - 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 - - } // End of TC_MEC_MEC012_SRV_AMS_007_NF - - - } // End of group appMobilityServicesSubscriptions - - group ams_notifications { - - /** - * @desc Check that the AMS service sends an AMS notification about a mobility procedure if the AMS service has an associated subscription and the event is generated - * @see ETSI GS MEC 021 2.1.1, clause 7.4.2 - */ - testcase TC_MEC_MEC012_SRV_AMS_008_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { - log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - action("Trigger a mobility procedure event"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - PX_CALLBACK_URI, - -, - mw_http_message_body_json( - mw_body_json_mobility_procedure_notification( - mw_mobility_procedure_notification( - -, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ) { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: IUT successfully sends mobility procedure notification ***"); - - // Send 204 No Content - httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); - - log("*** " & testcasename() & ": PASS: IUT successfully sends mobility procedure notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_notif_down(); - } // End of TC_MEC_MEC012_SRV_AMS_008_OK - - /** - * @desc Check that the AMS service sends an AMS notification about adjacent application instances if the AMS service has an associated subscription and the event is generated - * @see ETSI GS MEC 021 2.1.1, clause 7.4.3 - */ - testcase TC_MEC_MEC012_SRV_AMS_009_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { - log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - action("Trigger a adjacent application info event"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - PX_CALLBACK_URI, - -, - mw_http_message_body_json( - mw_body_json_adjacent_application_info_notification( - mw_adjacent_application_info_notification( - -, - PX_CALLBACK_REFERENCE, - -, - -, - - - ) - ) - ) - ) - ) - ) { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: IUT successfully sends adjacent application info notification ***"); - - // Send 204 No Content - httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); - - log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent application info notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_notif_down(); - } - - - /** - * @desc Check that the AMS service sends an AMS notification on subscription expiration if the AMS service has an associated subscription and the event is generated - * @see ETSI GS MEC 021 2.1.1, clause 7.4.4 - */ - testcase TC_MEC_MEC012_SRV_AMS_010_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var UInt64 v_timestamp; - - // Test control - if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { - log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_notif_up(); - - // Test adapter configuration - - // Preamble - f_init_default_headers_list(-, -, v_headers); - action("Trigger a expire notification event"); - v_timestamp := f_get_current_timestamp_utc(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - PX_CALLBACK_URI, - -, - mw_http_message_body_json( - mw_body_json_expire_notification( - mw_expire_notification( - -, - -, - { seconds := v_timestamp / 1000, nanoSeconds := 1000 * v_timestamp mod 1000 } - ) - ) - ) - ) - ) - ) { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: IUT successfully sends adjacent application info notification ***"); - - // Send 204 No Content - httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); - - log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent applicationinfo notification ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_notif_down(); - } - - - - } // End of group ams_notifications - -} // End of module AtsMec_Ams_TestCases - - - - - - - diff --git a/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestControl.ttcn b/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestControl.ttcn deleted file mode 100644 index 4c747361eaddfb23a600476d43a2462f78889fbc..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_Ams/AtsMec_Ams_TestControl.ttcn +++ /dev/null @@ -1,126 +0,0 @@ -module AtsMec_TestControl { - - // LibMec/LocationAPI - import from LocationAPI_Pics all; - // LibMec/UEidentityAPI - import from UEidentityAPI_Pics all; - // LibMec/RnisAPI - import from RnisAPI_Pics all; - // LibMec/TrafficManagementAPI - import from TrafficManagementAPI_Pics all; - // LibMec/AppEnablementAPI - import from EdgePlatformApplicationEnablementAPI_Pics all; - // LibMec/UEAppInterfaceAPI - import from UEAppInterfaceAPI_Pics all; - - // LibMec - import from LibMec_Pics all; - - // AtsMec - import from AtsMec_LocationAPI_TestCases all; - import from AtsMec_UEidentityAPI_TestCases all; -// import from AtsMec_RadioNodeLocationAPI_TestCases all; - import from AtsMec_RnisAPI_TestCases all; - import from AtsMec_TrafficManagementAPI_TestCases all; - import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all; - import from AtsMec_UEAppInterfaceAPI_TestCases all; - - control { - - if (PICS_MEC_PLAT and PICS_SERVICES) { - if (PICS_UE_IDENTITY_API_SUPPORTED) { - execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); - execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); - } - if (PICS_LOCATION_API_SUPPORTED) { - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF()); - -// execute(TC_MEC_PLAT_RLOC_001_OK()); -// execute(TC_MEC_PLAT_RLOC_001_NF()); - } - - if (PICS_APP_ENABLEMENT_API_SUPPORTED) { - /*execute(TC_MEC_SRV_TRANS_001_OK()); - execute(TC_MEC_SRV_TRAF_001_OK()); - execute(TC_MEC_SRV_TRAF_002_OK()); - execute(TC_MEC_SRV_TRAF_003_OK()); - execute(TC_MEC_SRV_TRAF_001_NF());*/ - } - - if (PICS_ENABLE_UE_APP_CTX) { - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF()); - } - } - - /*if (PICS_RNIS) { - if (PICS_RNIS_NOTIFICATIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_001_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_002_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_003_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_004_OK()); - } - if (PICS_RNIS_ALL_SUBSCRIPTIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_011_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_012_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_011_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_012_BR()); - } - if (PICS_RNIS_QUERY) { - execute(TC_MEC_MEC012_SRV_RNIS_016_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_016_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_016_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_017_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_017_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_017_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_018_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_018_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_018_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_019_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_019_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_019_NF()); - } - }*/ - - if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) { - execute(TC_MEC_MEC015_SRV_TM_001_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_BR()); - execute(TC_MEC_MEC015_SRV_TM_002_NF()); - } - } // End of 'control' statement - -} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec/AtsMec_Ams/module.mk b/ttcn/AtsMec/AtsMec_Ams/module.mk deleted file mode 100644 index 449db40a7e63125a4fdc5c5a0eaba38174f7566c..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_Ams/module.mk +++ /dev/null @@ -1,48 +0,0 @@ -suite := AtsMec - -sources := \ - AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \ - AtsMec_TrafficManagementAPI_TestCases.ttcn \ - AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ - AtsMec_LocationAPI_TestCases.ttcn \ - AtsMec_RnisAPI_TestCases.ttcn \ - AtsMec_TestControl.ttcn \ - AtsMec_UEAppInterfaceAPI_TestCases.ttcn \ - AtsMec_UEidentityAPI_TestCases.ttcn \ - AtsMec_V2XInformationServiceAPI_TestCases.ttcn \ - AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \ - AtsMec_WlanInformationAPI_TestCases.ttcn \ - AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \ -# AtsMec_Ams_TestCases.ttcn \ -# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \ -# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \ - -modules := ../LibCommon \ - ../LibIts \ - ../LibIts/ttcn/Http \ - ../LibMec \ - ../LibMec/EdgePlatformApplicationEnablementAPI \ - ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ - ../LibMec/TrafficManagementAPI \ - ../LibMec/LocationAPI \ - ../LibMec/RnisAPI \ - ../LibMec/UEAppInterfaceAPI \ - ../LibMec/UEidentityAPI \ - ../LibMec/V2XInformationServiceAPI \ - ../LibMec/DeviceApplicationInterfaceAPI \ - ../LibMec/WlanInformationAPI \ - ../LibMec/ApplicationMobilityServiceAPI \ - ../LibMec/FixedAccessInformationAPI \ - ../../ccsrc/Ports/LibHttp \ - ../../ccsrc/EncDec/LibHttp \ - ../../ccsrc/EncDec/LibMec \ - ../../ccsrc/Framework \ - ../../ccsrc/externals \ - ../../ccsrc/loggers \ - ../../ccsrc/Protocols/ETH \ - ../../ccsrc/Protocols/Http \ - ../../ccsrc/Protocols/Json \ - ../../ccsrc/Protocols/Pcap \ - ../../ccsrc/Protocols/Tcp \ - ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ - diff --git a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn b/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn deleted file mode 100644 index 4c747361eaddfb23a600476d43a2462f78889fbc..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn +++ /dev/null @@ -1,126 +0,0 @@ -module AtsMec_TestControl { - - // LibMec/LocationAPI - import from LocationAPI_Pics all; - // LibMec/UEidentityAPI - import from UEidentityAPI_Pics all; - // LibMec/RnisAPI - import from RnisAPI_Pics all; - // LibMec/TrafficManagementAPI - import from TrafficManagementAPI_Pics all; - // LibMec/AppEnablementAPI - import from EdgePlatformApplicationEnablementAPI_Pics all; - // LibMec/UEAppInterfaceAPI - import from UEAppInterfaceAPI_Pics all; - - // LibMec - import from LibMec_Pics all; - - // AtsMec - import from AtsMec_LocationAPI_TestCases all; - import from AtsMec_UEidentityAPI_TestCases all; -// import from AtsMec_RadioNodeLocationAPI_TestCases all; - import from AtsMec_RnisAPI_TestCases all; - import from AtsMec_TrafficManagementAPI_TestCases all; - import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all; - import from AtsMec_UEAppInterfaceAPI_TestCases all; - - control { - - if (PICS_MEC_PLAT and PICS_SERVICES) { - if (PICS_UE_IDENTITY_API_SUPPORTED) { - execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); - execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); - } - if (PICS_LOCATION_API_SUPPORTED) { - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF()); - -// execute(TC_MEC_PLAT_RLOC_001_OK()); -// execute(TC_MEC_PLAT_RLOC_001_NF()); - } - - if (PICS_APP_ENABLEMENT_API_SUPPORTED) { - /*execute(TC_MEC_SRV_TRANS_001_OK()); - execute(TC_MEC_SRV_TRAF_001_OK()); - execute(TC_MEC_SRV_TRAF_002_OK()); - execute(TC_MEC_SRV_TRAF_003_OK()); - execute(TC_MEC_SRV_TRAF_001_NF());*/ - } - - if (PICS_ENABLE_UE_APP_CTX) { - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF()); - } - } - - /*if (PICS_RNIS) { - if (PICS_RNIS_NOTIFICATIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_001_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_002_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_003_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_004_OK()); - } - if (PICS_RNIS_ALL_SUBSCRIPTIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_011_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_012_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_011_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_012_BR()); - } - if (PICS_RNIS_QUERY) { - execute(TC_MEC_MEC012_SRV_RNIS_016_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_016_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_016_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_017_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_017_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_017_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_018_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_018_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_018_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_019_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_019_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_019_NF()); - } - }*/ - - if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) { - execute(TC_MEC_MEC015_SRV_TM_001_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_BR()); - execute(TC_MEC_MEC015_SRV_TM_002_NF()); - } - } // End of 'control' statement - -} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_UEAppInterfaceAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_UEAppInterfaceAPI_TestCases.ttcn deleted file mode 100644 index 7952f357c04004b3945b9833409bcb1956e01cb8..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_UEAppInterfaceAPI_TestCases.ttcn +++ /dev/null @@ -1,641 +0,0 @@ -/** - * @author ETSI / STF569 - * @version $URL:$ - * $ID:$ - * @desc This module provides the MEC test cases. - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * @see ETSI GS MEC 003, Draft ETSI GS MEC 013 V2.0.3 (2018-10) - */ -module AtsMec_UEAppInterfaceAPI_TestCases { - - // Libcommon - 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/UEAppInterfaceAPI - import from UEAppInterfaceAPI_Templates all; - import from UEAppInterfaceAPI_Functions all; - import from UEAppInterfaceAPI_Pics all; - import from UEAppInterfaceAPI_Pixits all; - - // LibMec - import from LibMec_Functions all; - import from LibMec_Pics all; - import from LibMec_Pixits all; - - group ue_app_ctx { - - /** - * @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/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX 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_UE_APP_CTX_URI, - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_app_context( - mw_app_context( - -, - -, - mw_required_app_info( - PX_APP_NAME - ))))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(v_response.response.header) == true) { - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppContext ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] 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_MEC016_MEO_UEAPPCTX_001_OK - - /** - * @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/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_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_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX 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_UE_APP_CTX_URI, - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ))))))); - 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 successfully responds with a AppTerminationNotificationSubscription ***"); - 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_MEC016_MEO_UEAPPCTX_001_BR - - /** - * @desc Check that the IUT updates the application callback reference when commanded by an UE Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_OK() 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_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_post( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)), - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ), - PX_CALLBACK_REF - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // 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 responds with a AppContext ***"); - 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_ue_app_ctx(); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_OK - - /** - * @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/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_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_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX 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_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)), - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ), - PX_CALLBACK_REF - )))))); - 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 successfully responds with a AppContext ***"); - 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_MEC016_MEO_UEAPPCTX_002_BR - - /** - * @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/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_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_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX 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_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)), - v_headers, - m_http_message_body_json( - m_body_json_app_context( - m_app_context( - PX_NON_EXISTENT_CONTEXT_ID, - PX_ASSOCIATE_UE_APP_ID, - m_required_app_info( - PX_APP_NAME, - PX_APP_PROVIDER, - PX_REFERENCE_URL - ), - PX_CALLBACK_REF - )))))); - 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 AppContext ***"); - 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_MEC016_MEO_UEAPPCTX_002_NF - - /** - * @desc Check that the IUT deletes the application context when commanded by an UE Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_OK() 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_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_CONTEXT_ID)), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // 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 delete AppContext ***"); - 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_MEC016_MEO_UEAPPCTX_003_OK - - /** - * @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/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPCTX/SysUeAppsContext.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPCTX_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_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - "/" & PICS_ROOT_API & PX_UE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_CONTEXT_ID)), - 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 delete AppContext ***"); - 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_MEC016_MEO_UEAPPCTX_003_NF - - } // End of group ue_app_ctx - - group ue_apps { - - /** - * @desc Check that the IUT responds with the list of user applications available when requested by an UE Application - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPS/SysUeApplications.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPS_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_UE_APPS_URI & "&appName=" & oct2char(unichar2oct(PX_APP_NAME)), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_info( - { *, mw_appInfo_list(PX_APP_NAME), *} - ))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); - 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_create_ue_app_ctx(); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPS_001_OK - - /** - * @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/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPS/SysUeApplications.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPS_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_ue_app_ctx(); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - "/" & PICS_ROOT_API & PX_UE_APPS_URI & "&appName=" & oct2char(unichar2oct(PX_APP_NAME)) & "&serviceCont=unknown", // Wrong URI - 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 successfully responds with a AppInfo ***"); - 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_create_ue_app_ctx(); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC016_MEO_UEAPPS_001_BR - - /** - * @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/gs032p2-test-purposes/blob/master/Test%20Purposes/MEO/UEAPPS/SysUeApplications.tplan2 - */ - testcase TC_MEC_MEC016_MEO_UEAPPS_001_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_ENABLE_UE_APP_CTX)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_ENABLE_UE_APP_CTX 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_UE_APPS_URI & "&appName=" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_NAME)), - 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 AppInfo ***"); - 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_MEC016_MEO_UEAPPS_001_NF - - } // End of group ue_apps - -} // End of module AtsMec_UEAppInterfaceAPI_TestCases diff --git a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/module.mk b/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/module.mk deleted file mode 100644 index 449db40a7e63125a4fdc5c5a0eaba38174f7566c..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/module.mk +++ /dev/null @@ -1,48 +0,0 @@ -suite := AtsMec - -sources := \ - AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \ - AtsMec_TrafficManagementAPI_TestCases.ttcn \ - AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ - AtsMec_LocationAPI_TestCases.ttcn \ - AtsMec_RnisAPI_TestCases.ttcn \ - AtsMec_TestControl.ttcn \ - AtsMec_UEAppInterfaceAPI_TestCases.ttcn \ - AtsMec_UEidentityAPI_TestCases.ttcn \ - AtsMec_V2XInformationServiceAPI_TestCases.ttcn \ - AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \ - AtsMec_WlanInformationAPI_TestCases.ttcn \ - AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \ -# AtsMec_Ams_TestCases.ttcn \ -# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \ -# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \ - -modules := ../LibCommon \ - ../LibIts \ - ../LibIts/ttcn/Http \ - ../LibMec \ - ../LibMec/EdgePlatformApplicationEnablementAPI \ - ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ - ../LibMec/TrafficManagementAPI \ - ../LibMec/LocationAPI \ - ../LibMec/RnisAPI \ - ../LibMec/UEAppInterfaceAPI \ - ../LibMec/UEidentityAPI \ - ../LibMec/V2XInformationServiceAPI \ - ../LibMec/DeviceApplicationInterfaceAPI \ - ../LibMec/WlanInformationAPI \ - ../LibMec/ApplicationMobilityServiceAPI \ - ../LibMec/FixedAccessInformationAPI \ - ../../ccsrc/Ports/LibHttp \ - ../../ccsrc/EncDec/LibHttp \ - ../../ccsrc/EncDec/LibMec \ - ../../ccsrc/Framework \ - ../../ccsrc/externals \ - ../../ccsrc/loggers \ - ../../ccsrc/Protocols/ETH \ - ../../ccsrc/Protocols/Http \ - ../../ccsrc/Protocols/Json \ - ../../ccsrc/Protocols/Pcap \ - ../../ccsrc/Protocols/Tcp \ - ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ - diff --git a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn deleted file mode 100644 index 4c747361eaddfb23a600476d43a2462f78889fbc..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn +++ /dev/null @@ -1,126 +0,0 @@ -module AtsMec_TestControl { - - // LibMec/LocationAPI - import from LocationAPI_Pics all; - // LibMec/UEidentityAPI - import from UEidentityAPI_Pics all; - // LibMec/RnisAPI - import from RnisAPI_Pics all; - // LibMec/TrafficManagementAPI - import from TrafficManagementAPI_Pics all; - // LibMec/AppEnablementAPI - import from EdgePlatformApplicationEnablementAPI_Pics all; - // LibMec/UEAppInterfaceAPI - import from UEAppInterfaceAPI_Pics all; - - // LibMec - import from LibMec_Pics all; - - // AtsMec - import from AtsMec_LocationAPI_TestCases all; - import from AtsMec_UEidentityAPI_TestCases all; -// import from AtsMec_RadioNodeLocationAPI_TestCases all; - import from AtsMec_RnisAPI_TestCases all; - import from AtsMec_TrafficManagementAPI_TestCases all; - import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all; - import from AtsMec_UEAppInterfaceAPI_TestCases all; - - control { - - if (PICS_MEC_PLAT and PICS_SERVICES) { - if (PICS_UE_IDENTITY_API_SUPPORTED) { - execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); - execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); - } - if (PICS_LOCATION_API_SUPPORTED) { - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF()); - -// execute(TC_MEC_PLAT_RLOC_001_OK()); -// execute(TC_MEC_PLAT_RLOC_001_NF()); - } - - if (PICS_APP_ENABLEMENT_API_SUPPORTED) { - /*execute(TC_MEC_SRV_TRANS_001_OK()); - execute(TC_MEC_SRV_TRAF_001_OK()); - execute(TC_MEC_SRV_TRAF_002_OK()); - execute(TC_MEC_SRV_TRAF_003_OK()); - execute(TC_MEC_SRV_TRAF_001_NF());*/ - } - - if (PICS_ENABLE_UE_APP_CTX) { - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF()); - } - } - - /*if (PICS_RNIS) { - if (PICS_RNIS_NOTIFICATIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_001_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_002_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_003_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_004_OK()); - } - if (PICS_RNIS_ALL_SUBSCRIPTIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_011_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_012_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_011_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_012_BR()); - } - if (PICS_RNIS_QUERY) { - execute(TC_MEC_MEC012_SRV_RNIS_016_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_016_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_016_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_017_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_017_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_017_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_018_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_018_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_018_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_019_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_019_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_019_NF()); - } - }*/ - - if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) { - execute(TC_MEC_MEC015_SRV_TM_001_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_BR()); - execute(TC_MEC_MEC015_SRV_TM_002_NF()); - } - } // End of 'control' statement - -} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/module.mk b/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/module.mk deleted file mode 100644 index 449db40a7e63125a4fdc5c5a0eaba38174f7566c..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/module.mk +++ /dev/null @@ -1,48 +0,0 @@ -suite := AtsMec - -sources := \ - AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \ - AtsMec_TrafficManagementAPI_TestCases.ttcn \ - AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ - AtsMec_LocationAPI_TestCases.ttcn \ - AtsMec_RnisAPI_TestCases.ttcn \ - AtsMec_TestControl.ttcn \ - AtsMec_UEAppInterfaceAPI_TestCases.ttcn \ - AtsMec_UEidentityAPI_TestCases.ttcn \ - AtsMec_V2XInformationServiceAPI_TestCases.ttcn \ - AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \ - AtsMec_WlanInformationAPI_TestCases.ttcn \ - AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \ -# AtsMec_Ams_TestCases.ttcn \ -# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \ -# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \ - -modules := ../LibCommon \ - ../LibIts \ - ../LibIts/ttcn/Http \ - ../LibMec \ - ../LibMec/EdgePlatformApplicationEnablementAPI \ - ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ - ../LibMec/TrafficManagementAPI \ - ../LibMec/LocationAPI \ - ../LibMec/RnisAPI \ - ../LibMec/UEAppInterfaceAPI \ - ../LibMec/UEidentityAPI \ - ../LibMec/V2XInformationServiceAPI \ - ../LibMec/DeviceApplicationInterfaceAPI \ - ../LibMec/WlanInformationAPI \ - ../LibMec/ApplicationMobilityServiceAPI \ - ../LibMec/FixedAccessInformationAPI \ - ../../ccsrc/Ports/LibHttp \ - ../../ccsrc/EncDec/LibHttp \ - ../../ccsrc/EncDec/LibMec \ - ../../ccsrc/Framework \ - ../../ccsrc/externals \ - ../../ccsrc/loggers \ - ../../ccsrc/Protocols/ETH \ - ../../ccsrc/Protocols/Http \ - ../../ccsrc/Protocols/Json \ - ../../ccsrc/Protocols/Pcap \ - ../../ccsrc/Protocols/Tcp \ - ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ - diff --git a/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn deleted file mode 100644 index 4c747361eaddfb23a600476d43a2462f78889fbc..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn +++ /dev/null @@ -1,126 +0,0 @@ -module AtsMec_TestControl { - - // LibMec/LocationAPI - import from LocationAPI_Pics all; - // LibMec/UEidentityAPI - import from UEidentityAPI_Pics all; - // LibMec/RnisAPI - import from RnisAPI_Pics all; - // LibMec/TrafficManagementAPI - import from TrafficManagementAPI_Pics all; - // LibMec/AppEnablementAPI - import from EdgePlatformApplicationEnablementAPI_Pics all; - // LibMec/UEAppInterfaceAPI - import from UEAppInterfaceAPI_Pics all; - - // LibMec - import from LibMec_Pics all; - - // AtsMec - import from AtsMec_LocationAPI_TestCases all; - import from AtsMec_UEidentityAPI_TestCases all; -// import from AtsMec_RadioNodeLocationAPI_TestCases all; - import from AtsMec_RnisAPI_TestCases all; - import from AtsMec_TrafficManagementAPI_TestCases all; - import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all; - import from AtsMec_UEAppInterfaceAPI_TestCases all; - - control { - - if (PICS_MEC_PLAT and PICS_SERVICES) { - if (PICS_UE_IDENTITY_API_SUPPORTED) { - execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); - execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); - } - if (PICS_LOCATION_API_SUPPORTED) { - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF()); - -// execute(TC_MEC_PLAT_RLOC_001_OK()); -// execute(TC_MEC_PLAT_RLOC_001_NF()); - } - - if (PICS_APP_ENABLEMENT_API_SUPPORTED) { - /*execute(TC_MEC_SRV_TRANS_001_OK()); - execute(TC_MEC_SRV_TRAF_001_OK()); - execute(TC_MEC_SRV_TRAF_002_OK()); - execute(TC_MEC_SRV_TRAF_003_OK()); - execute(TC_MEC_SRV_TRAF_001_NF());*/ - } - - if (PICS_ENABLE_UE_APP_CTX) { - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR()); - execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF()); - } - } - - /*if (PICS_RNIS) { - if (PICS_RNIS_NOTIFICATIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_001_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_002_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_003_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_004_OK()); - } - if (PICS_RNIS_ALL_SUBSCRIPTIONS) { - execute(TC_MEC_MEC012_SRV_RNIS_011_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_012_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_011_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_012_BR()); - } - if (PICS_RNIS_QUERY) { - execute(TC_MEC_MEC012_SRV_RNIS_016_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_016_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_016_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_017_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_017_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_017_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_018_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_018_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_018_NF()); - execute(TC_MEC_MEC012_SRV_RNIS_019_OK()); - execute(TC_MEC_MEC012_SRV_RNIS_019_BR()); - execute(TC_MEC_MEC012_SRV_RNIS_019_NF()); - } - }*/ - - if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) { - execute(TC_MEC_MEC015_SRV_TM_001_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_BR()); - execute(TC_MEC_MEC015_SRV_TM_002_NF()); - } - } // End of 'control' statement - -} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec/AtsMec_LcRRm/module.mk b/ttcn/AtsMec/AtsMec_LcRRm/module.mk deleted file mode 100644 index 449db40a7e63125a4fdc5c5a0eaba38174f7566c..0000000000000000000000000000000000000000 --- a/ttcn/AtsMec/AtsMec_LcRRm/module.mk +++ /dev/null @@ -1,48 +0,0 @@ -suite := AtsMec - -sources := \ - AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \ - AtsMec_TrafficManagementAPI_TestCases.ttcn \ - AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ - AtsMec_LocationAPI_TestCases.ttcn \ - AtsMec_RnisAPI_TestCases.ttcn \ - AtsMec_TestControl.ttcn \ - AtsMec_UEAppInterfaceAPI_TestCases.ttcn \ - AtsMec_UEidentityAPI_TestCases.ttcn \ - AtsMec_V2XInformationServiceAPI_TestCases.ttcn \ - AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \ - AtsMec_WlanInformationAPI_TestCases.ttcn \ - AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \ -# AtsMec_Ams_TestCases.ttcn \ -# AtsMec_FixedAccessInfoAPI_TestCases.ttcn \ -# AtsMec_RadioNodeLocationAPI_TestCases.ttcn \ - -modules := ../LibCommon \ - ../LibIts \ - ../LibIts/ttcn/Http \ - ../LibMec \ - ../LibMec/EdgePlatformApplicationEnablementAPI \ - ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ - ../LibMec/TrafficManagementAPI \ - ../LibMec/LocationAPI \ - ../LibMec/RnisAPI \ - ../LibMec/UEAppInterfaceAPI \ - ../LibMec/UEidentityAPI \ - ../LibMec/V2XInformationServiceAPI \ - ../LibMec/DeviceApplicationInterfaceAPI \ - ../LibMec/WlanInformationAPI \ - ../LibMec/ApplicationMobilityServiceAPI \ - ../LibMec/FixedAccessInformationAPI \ - ../../ccsrc/Ports/LibHttp \ - ../../ccsrc/EncDec/LibHttp \ - ../../ccsrc/EncDec/LibMec \ - ../../ccsrc/Framework \ - ../../ccsrc/externals \ - ../../ccsrc/loggers \ - ../../ccsrc/Protocols/ETH \ - ../../ccsrc/Protocols/Http \ - ../../ccsrc/Protocols/Json \ - ../../ccsrc/Protocols/Pcap \ - ../../ccsrc/Protocols/Tcp \ - ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ - diff --git a/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..931930f2bbd9ac84c9bba12cd32988dcd4c8e5b0 --- /dev/null +++ b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn @@ -0,0 +1,1956 @@ +/** +* @author ETSI / STF569 +* @version $URL:$ +* $ID:$ +* @desc This module provides the MEC test cases. +* @copyright ETSI Copyright Notification +* No part may be reproduced except as authorized by written permission. +* The copyright and the foregoing restriction extend to reproduction in all media. +* All rights reserved. +* @see ETSI GS MEC 003, Draft ETSI GS MEC 021 V2.1.1 +*/ + module AtsMec_ApplicationMobiltyServiceAPI_TestCases { + + // JSON + import from Json all; + + // Libcommon + import from LibCommon_BasicTypesAndValues 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_ApplicationMobiltyServiceAPI + import from ApplicationMobilityServiceAPI_TypesAndValues all; + import from ApplicationMobilityServiceAPI_Templates all; + import from ApplicationMobilityServiceAPI_Functions all; + import from ApplicationMobilityServiceAPI_Pics all; + import from ApplicationMobilityServiceAPI_Pixits all; + + // LibMec + import from LibMec_TypesAndValues all; + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + group appMobilityServices { + + /** + * @desc Check that the AMS service returns information about the registered application mobility services when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + v_registration_info_1, + v_registration_info_2, + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + 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_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_01 + + /** + * @desc Check that the AMS service returns information about the a specific registered application mobility service when requested - filter + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,appMobilityServiceId," & v_registration_info_1.appMobilityServiceId & ")", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + v_registration_info_1, + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + 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_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_02 + + /** + * @desc Check that the AMS service returns information about the a specific registered application mobility service when requested - filter + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,serviceConsumerId[appInstanceId]," & PX_APP_INS_ID_2 & ")", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + v_registration_info_2, + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + 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_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_03 + + /** + * @desc Check that the AMS service returns information about the a specific registered application mobility service when requested - exclude_fields + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,appMobilityServiceId," & v_registration_info_1.appMobilityServiceId & "&exclude_fields=[deviceInformation])", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + mw_registration_info( + v_registration_info_1.appMobilityServiceId, + mw_service_consumer_id( + PX_APP_INS_ID, + PX_MEP_ID + )), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + 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_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_OK_04 + + /** + * @desc Check that the AMS service returns information about the registered application mobility services when requested - No registered application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_001_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok_no_body + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an empty body ***"); + 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_MEC021_SRV_AMS_001_OK_05 + + /** + * @desc Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters + */ + testcase TC_MEC_MEC021_SRV_AMS_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(-, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?appMobilityService=" & "?filter=(appMobilityServiceId,eq," & v_registration_info_1.appMobilityServiceId & ")", // Wrong syntax + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, + -, + 400 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_001_BR + + /** + * @desc Check that the AMS service creates a new application mobility services when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var Json.String v_app_mobility_service_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + -, + m_service_consumer_id( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_registration_info( + mw_registration_info( + ?, + mw_service_consumer_id( + PX_APP_INS_ID + ))))))) -> value v_response { + tc_ac.stop; + + v_app_mobility_service_id := v_response.response.body.json_body.registrationInfo.appMobilityServiceId; + log("*** " & testcasename() & ": PASS: IUT successfully responds with a v_app_mobility_service_id ", v_app_mobility_service_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_application_mobility_services(v_app_mobility_service_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_002_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed request to create a new application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var Json.String v_app_mobility_service_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + PX_APP_INS_ID, // Wrong field value: Shall be absent in POST requests, and present otherwise + m_service_consumer_id( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details when bad request is performed ***"); + 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_MEC021_SRV_AMS_002_BR + + } // End of group appMobilityServices + + group appMobilityServicesSubscriptions { + + /** + * @desc Check that the AMS service returns information about the available subscriptions when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_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_APP_AMS_SUBS & "?subscriptionType=" & v_mobility_procedure_subscription.subscriptionType, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_subscriptions( + mw_subscription_link_list( + v_mobility_procedure_subscription.links, + mw_subscription( + -, + v_mobility_procedure_subscription.subscriptionType + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // END TC_MEC_MEC021_SRV_AMS_003_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed query about the available subscriptions + */ + testcase TC_MEC_MEC021_SRV_AMS_003_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=info_app_adj", // Wrong parameter + 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 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_cf_01_http_down(); + } // END TC_MEC_MEC021_SRV_AMS_003_BR + + /** + * @desc Check that the AMS service creates a notification subscriptions when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_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_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_mobility_procedure_subscription( + mw_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + mw_filter_criteria, + mw_links + )))))) -> 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 Area subscription ***"); + 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_APP_AMS_SUBS & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AMS Subscription and 201 Created status code, 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_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_004_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed request to create a notification subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription_error( + PX_CALLBACK_REFERENCE, + m_filter_criteria + )))))); + 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 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_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_004_BR + + /** + * @desc Check that the AMS service returns information about a given subscription when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_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_APP_AMS_SUBS & "/" & 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_ams_mobility_procedure_subscription( + v_mobility_procedure_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct subscription ***"); + 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_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_005_OK + + /** + * @desc Check that the AMS service returns an error when receives a query about a not existing subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_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_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + 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 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_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_005_NF + + /** + * @desc Check that the AMS service deletes a given subscription when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_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_APP_AMS_SUBS & "/" & 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_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct 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 TC_MEC_MEC021_SRV_AMS_006_OK + + /** + * @desc Check that the AMS service sends an error when it receives a delete request for a not existing subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_006_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_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_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + 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 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_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_006_NF + + /** + * @desc Check that the AMS service modifies a given subscription when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_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_APP_AMS_SUBS & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria( + PX_APP_INS_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria( + PX_APP_INS_ID + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates successfully the subscription ***"); + 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_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_007_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed modify request for a given subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_007_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_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_APP_AMS_SUBS & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription_error( + PX_CALLBACK_REFERENCE, + m_filter_criteria( + PX_APP_INS_ID + ))))))); + 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 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_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_007_BR + + /** + * @desc Check that the AMS service sends an error when it receives a modify request for a not existing subscription + */ + testcase TC_MEC_MEC021_SRV_AMS_007_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_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_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria( + PX_APP_INS_ID + ))))))); + 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 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_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of TC_MEC_MEC021_SRV_AMS_007_NF + + } // End of group appMobilityServicesSubscriptions + + group ams_notifications { + + /** + * @desc Check that the AMS service sends an AMS notification about a mobility procedure if the AMS service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC021_SRV_AMS_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + action("Trigger a mobility procedure event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_mobility_procedure_notification( + mw_mobility_procedure_notification( + v_mobility_procedure_subscription.links + )))))) { + tc_wait.stop; + + // Send 204 No Content + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends mobility procedure notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of TC_MEC_MEC021_SRV_AMS_008_OK + + /** + * @desc Check that the AMS service sends an AMS notification about adjacent application instances if the AMS service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC021_SRV_AMS_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AdjacentAppInfoSubscription v_adjacent_appInfo_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Preamble + f_create_adjacent_appInfo_subscription(v_adjacent_appInfo_subscription, v_subscription_id); + action("Trigger a mobility procedure event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_adjacent_app_info_notification( + mw_adjacent_app_info_notification( + v_adjacent_appInfo_subscription.links + )))))) { + tc_wait.stop; + + // Send 204 No Content + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent appInfo notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_adjacent_appInfo_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of TC_MEC_MEC021_SRV_AMS_009_OK + + /** + * @desc Check that the AMS service sends an AMS notification on subscription expiration if the AMS service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC021_SRV_AMS_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var MobilityProcedureSubscription v_mobility_procedure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Preamble + f_create_mobility_procedure_subscription(v_mobility_procedure_subscription, v_subscription_id); + action("Trigger a mobility procedure event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_mobility_procedure_notification( + mw_mobility_procedure_notification( + v_mobility_procedure_subscription.links + )))))) { + tc_wait.stop; + + // Send 204 No Content + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": INFO: IUT successfully sends mobility procedure notification ***"); + repeat; + } + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_expire_notification( + mw_expire_notification + ))))) { + tc_wait.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully sends expiry notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_mobility_procedure_subscription(v_subscription_id); + } // End of TC_MEC_MEC021_SRV_AMS_009_OK + + } // End of group ams_notifications + + group individualAppMobilityService { + + /** + * @desc Check that the AMS service returns information about this individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_011_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info( + v_registration_info_1 + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a the correct RegistrationInfo ***"); + 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_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_011_OK + + /** + * @desc Check that the AMS service sends an error when receives a query about a not existing individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_011_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_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_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_011_NF + + /** + * @desc Check that the AMS service modifies the individual application mobility service when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_012_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + v_registration_info_1.serviceConsumerId.appInstanceId := PX_APP_INS_ID_NEW; + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + v_registration_info_1 + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info( + v_registration_info_1 + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates with a the correct RegistrationInfo ***"); + 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_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_012_OK + + /** + * @desc Check that the AMS service sends an error when receives a request to modify a individual application mobility service using bad parameters + */ + testcase TC_MEC_MEC021_SRV_AMS_012_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + var Json.String v_appMobilityServiceId; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + v_appMobilityServiceId := v_registration_info_1.appMobilityServiceId; + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + v_registration_info_1 + ))))); + 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 successfully updates with a 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_application_mobility_services(v_appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_012_BR + + /** + * @desc Check that the AMS service sends an error when receives a request to modify a not existing individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_012_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info_1; + var RegistrationInfo v_registration_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info_1); + f_create_application_mobility_services(PX_APP_INS_ID_2, v_registration_info_2); + v_registration_info_1.serviceConsumerId.appInstanceId := PX_APP_INS_ID_NEW; + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + v_registration_info_1 + ))))); + 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 updates with a 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_application_mobility_services(v_registration_info_1.appMobilityServiceId); + f_delete_application_mobility_services(v_registration_info_2.appMobilityServiceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_012_NF + + /** + * @desc Check that the AMS service de-register the individual application mobility service and delete the resource that represents the individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_013_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info.appMobilityServiceId, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // 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 deletes the RegistrationInfo ***"); + 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_MEC021_SRV_AMS_013_OK + + /** + * @desc Check that the AMS service sends an error when is requested to delete the resource that represents the individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_013_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully de-registers the RegistrationInfo ***"); + 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_MEC021_SRV_AMS_013_NF + + } // End of group individualAppMobilityService + + group appMobilityServiceDeregisterTask { + + /** + * @desc Check that the AMS service deregister an individual application mobility service on expiry of the timer associated with the service + */ + testcase TC_MEC_MEC021_SRV_AMS_014_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(v_registration_info.appMobilityServiceId, "UTF-8")) & "/deregisterTask", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ams_registration_info_list( + { + *, + v_registration_info, + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully deregisters the registerInfo ***"); + 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_MEC021_SRV_AMS_014_OK + + /** + * @desc Check that the AMS service send an error when is requested to deregister a not existent individual application mobility service + */ + testcase TC_MEC_MEC021_SRV_AMS_014_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var RegistrationInfo v_registration_info; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_application_mobility_services(PX_APP_INS_ID, v_registration_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID, "UTF-8")) & "/deregisterTask", + 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 deregisters the registerInfo ***"); + 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_MEC021_SRV_AMS_014_NF + + } // End of group appMobilityServiceDeregisterTask + + group adjacentApplicationInstances { + + /** + * @desc Check that the AMS service returns information about the registered application mobility services when requested + */ + testcase TC_MEC_MEC021_SRV_AMS_015_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AdjacentAppInstanceInfo v_adjacent_app_instance_info_1; + var AdjacentAppInstanceInfo v_adjacent_app_instance_info_2; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_adjacent_app_instance_info(-, -, m_communication_interface({{ host := PX_HOST, port_ := PX_PORT }}), v_adjacent_app_instance_info_1); + f_create_adjacent_app_instance_info(PX_APP_INS_ID_2, PX_APP_ID_2, m_communication_interface({{ host := PX_HOST, port_ := PX_PORT }}), v_adjacent_app_instance_info_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_APP_AMS_QUERIES_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_ams_adjacent_app_instance_info_list( + { + *, + v_adjacent_app_instance_info_1, + v_adjacent_app_instance_info_2, + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of RegistrationInfo ***"); + 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_adjacent_app_instance_info(v_adjacent_app_instance_info_1.appInstanceId); + f_delete_adjacent_app_instance_info(v_adjacent_app_instance_info_2.appInstanceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC021_SRV_AMS_015_OK_01 + + } // End of group adjacentApplicationInstances + +} // End of module AtsMec_ApplicationMobiltyServiceAPI_TestCases + + + + + + + diff --git a/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..afa12b3887c449c30a7820a3260672063fc0397d --- /dev/null +++ b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn @@ -0,0 +1,66 @@ +module AtsMec_ApplicationMobiltyServiceAPI_TestControl { + + // LibMec_ApplicationMobiltyServiceAPI + import from ApplicationMobilityServiceAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_ApplicationMobiltyServiceAPI_TestCases all; + + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + execute(TC_MEC_MEC021_SRV_AMS_001_OK_01()); + execute(TC_MEC_MEC021_SRV_AMS_001_OK_02()); + execute(TC_MEC_MEC021_SRV_AMS_001_OK_03()); + execute(TC_MEC_MEC021_SRV_AMS_001_OK_04()); + execute(TC_MEC_MEC021_SRV_AMS_001_OK_05()); + execute(TC_MEC_MEC021_SRV_AMS_001_BR()); + + execute(TC_MEC_MEC021_SRV_AMS_002_OK()); + execute(TC_MEC_MEC021_SRV_AMS_002_BR()); + + execute(TC_MEC_MEC021_SRV_AMS_003_OK()); + execute(TC_MEC_MEC021_SRV_AMS_003_BR()); + + execute(TC_MEC_MEC021_SRV_AMS_004_OK()); + execute(TC_MEC_MEC021_SRV_AMS_004_BR()); + + execute(TC_MEC_MEC021_SRV_AMS_005_OK()); + execute(TC_MEC_MEC021_SRV_AMS_005_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_006_OK()); + execute(TC_MEC_MEC021_SRV_AMS_006_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_007_OK()); + execute(TC_MEC_MEC021_SRV_AMS_007_BR()); + execute(TC_MEC_MEC021_SRV_AMS_007_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_008_OK()); + + execute(TC_MEC_MEC021_SRV_AMS_009_OK()); + + execute(TC_MEC_MEC021_SRV_AMS_009_OK()); + + execute(TC_MEC_MEC021_SRV_AMS_011_OK()); + execute(TC_MEC_MEC021_SRV_AMS_011_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_012_OK()); + execute(TC_MEC_MEC021_SRV_AMS_012_BR()); + execute(TC_MEC_MEC021_SRV_AMS_012_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_013_OK()); + execute(TC_MEC_MEC021_SRV_AMS_013_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_014_OK()); + execute(TC_MEC_MEC021_SRV_AMS_014_NF()); + + execute(TC_MEC_MEC021_SRV_AMS_015_OK_01()); + } + + } // End of 'control' statement + +} // End of module AtsMec_ApplicationMobiltyServiceAPI_TestControl diff --git a/ttcn/AtsMec_ApplicationMobiltyService/module.mk b/ttcn/AtsMec_ApplicationMobiltyService/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..3f0d27376530381cd2deea94ebb6556b6c267e2f --- /dev/null +++ b/ttcn/AtsMec_ApplicationMobiltyService/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_ApplicationMobiltyService + +sources := \ + AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn \ + AtsMec_ApplicationMobiltyServiceAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/IoTAPI \ + ../LibMec/FederationEnablementAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn similarity index 52% rename from ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn rename to ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index 3e2235a4615944c016c6288f4ac3a493745ce920..12ea8f68a797a8a32ef1bc79816a68298d1d73dc 100644 --- a/ttcn/AtsMec/AtsMec_LcRRm/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -25,7 +25,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { import from LibHttp_TestSystem all; // LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Functions all; import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pics all; import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all; @@ -35,7 +37,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { import from LibMec_Pixits all; group granting { - + /** * @desc Check that MEO sends a synchronous grant response when a grant request is requested - INSTANTIATE */ @@ -45,7 +47,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -69,9 +71,23 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_ID, INSTANTIATE, m_grant_request_link( - m_link_type(""), // TODO - m_link_type("") // TODO - ))))))); + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) + ), + { + m_resource_definition( + "", // TODO + -, + { "" }, // TODO + m_resource_definition_resource( + m_vim_connection_info( + "", // TODO + "" // TODO + ), + "" // TODO + )) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -85,7 +101,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_grant ))))) -> value v_response { tc_ac.stop; - + if (f_check_headers(valueof(v_response.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); @@ -99,6 +115,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_001_OK /** @@ -109,7 +128,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var Headers v_headers; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -131,11 +150,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_INSTANCE_ID, PX_APP_LCM_OP_OCC_ID, PX_APP_ID, - INVALID_OPERATE, + INSTANTIATE, m_grant_request_link( - m_link_type(""), // TODO - m_link_type("") // TODO - ))))))); + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) + ) + // addResources not set + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -146,7 +167,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_400_bad_request( ))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Bad response ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -155,6 +176,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_001_BR /** @@ -166,7 +190,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -190,8 +214,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_ID, PX_APP_OPERATION, m_grant_request_link( - m_link_type(""), // TODO - m_link_type("") // TODO + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -206,7 +230,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_grant ))))) -> value v_response { tc_ac.stop; - + if (f_check_headers(valueof(v_response.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); @@ -220,6 +244,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_002_OK /** @@ -232,7 +259,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response_2; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -256,8 +283,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_APP_ID, PX_APP_OPERATION, m_grant_request_link( - m_link_type(""), // TODO - m_link_type("") // TODO + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -285,7 +312,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_grant ))))) -> value v_response_2 { tc_ac.stop; - + if (not(isbound(v_response_1)) or f_check_headers(valueof(v_response_2.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Didn't receive 202 accepted or Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); @@ -299,10 +326,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_003_OK /** - * @desc Check that MEO sends the status of a grant request when a query on a granting ID is performed + * @desc Check that MEO sends a asynchronous grant response when a grant request is requested */ testcase TC_MEC_MEC010p2_MEO_GRANT_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -310,7 +340,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -323,33 +353,64 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_ID, "UTF-8")), - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + m_http_request_post( + PICS_ROOT_API & PX_MEO_GRANT_URI, + v_headers, + m_http_message_body_json( + m_body_json_grant_request( + m_grant_request( + PX_APP_INSTANCE_ID, + PX_APP_LCM_OP_OCC_ID, + PX_APP_ID, + INSTANTIATE, + m_grant_request_link( + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) + ), + { + m_resource_definition( + "", // TODO + -, + { "" }, // TODO + m_resource_definition_resource( + m_vim_connection_info( + "", // TODO + "" // TODO + ), + "" // TODO + )) + } + )))))); + 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_grant_response( - mw_grant( - PX_APP_INSTANCE_ID - )))))) -> value v_response { + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_grant_response( + mw_grant + ))))) -> value v_response { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + if (f_check_headers(valueof(v_response.response.header), -, PX_MEO_GRANT_URI & "/" & oct2char(unichar2oct(v_response.response.body.json_body.grantResponse.id))) == false) { + log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Grant Response and cirrect Location header ***"); + 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_MEC010p2_MEO_GRANT_004_OK /** @@ -359,9 +420,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var Grant v_grant; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -371,11 +433,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_grant_request(v_grant); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(v_grant.id, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -383,36 +446,29 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_202_accepted - )) -> value v_response { - repeat; - } [] httpPort.receive( mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_grant_response( mw_grant( + v_grant.id, PX_APP_INSTANCE_ID - ) - ))))) { + )))))) -> value v_response { tc_ac.stop; - if (isbound(v_response)) { - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: IUT successfully didn't respond with a 202 accepted status code ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status 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_grant_request(v_grant.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_005_OK /** @@ -422,9 +478,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var Grant v_grant; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -434,11 +491,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_grant_request(v_grant); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(v_grant.id, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -446,12 +504,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Test Body tc_ac.start; alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) -> value v_response { + repeat; + } [] httpPort.receive( mw_http_response( mw_http_response_ok( mw_http_message_body_json( mw_body_json_grant_response( mw_grant( + v_grant.id, PX_APP_INSTANCE_ID )))))) { tc_ac.stop; @@ -469,6 +534,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_delete_grant_request(v_grant.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_006_OK /** @@ -479,7 +548,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var Headers v_headers; // Test control - if (not(PICS_GRANTS_MANAGEMENT)){ + if (not(PICS_GRANTS_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_GRANTS_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -515,12 +584,15 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_GRANT_006_NF } // End of group granting group meo_pkgmgt { - + /** * @desc Check that MEO creates a new App Package when requested */ @@ -530,7 +602,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -549,12 +621,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_http_message_body_json( m_body_json_create_package_management( m_create_package_management( - "appPkgName", + PX_APP_PKG_NAME, PX_APP_PKG_VERSION, m_checksum(-, PX_CHECKSUM), PX_APP_PKG_PATH )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -565,19 +636,15 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_201_created( 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, - PX_OPERATIONAL_STATE, - PX_USAGE_STATE - )*/ - ))))) -> value v_response { + mw_app_pkg_info( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum + )))))) -> value v_response { tc_ac.stop; - // TODO Chek Location header - log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -586,18 +653,20 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_001_OK - + /** - * @desc Check that MEO creates a new App Package when requested + * @desc Check that MEO responds with an error when it receives a malformed request for creating a new App Package */ testcase TC_MEC_MEC010p2_MEO_PKGM_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -621,7 +690,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_checksum(-, PX_CHECKSUM), PX_APP_PKG_PATH )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -641,9 +709,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_001_BR - + /** * @desc Check that MEO returns the list of App Packages when requested - Note 3 */ @@ -651,9 +721,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -663,6 +734,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -670,7 +742,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_URI, v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -680,8 +751,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_pkg_info_list - )))) -> value v_response { + mw_body_json_app_pkg_info_list( + { + *, + mw_app_pkg_info( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum + ), + * + } + ))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); @@ -692,19 +774,23 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_01_OK - + /** - * @desc Check that MEO returns the list of App Packages when requested - Note 3 + * @desc Check that MEO returns the list of on-boarded packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEO_PKGM_002_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -714,6 +800,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -731,8 +818,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_pkg_info_list - )))) -> value v_response { + mw_body_json_app_pkg_info_list( + { + *, + mw_app_pkg_info( + -, -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum + ), + * + } + ))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); @@ -743,19 +841,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_02_OK - + /** - * @desc Check that MEO responds with an error when it receives - * a malformed request for retrieving the list of existing App Packages + * @desc Check that MEO responds with an error when it receives a malformed request for retrieving the list of existing App Packages */ testcase TC_MEC_MEC010p2_MEO_PKGM_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -792,9 +892,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_002_BR - + /** * @desc Check that MEO returns the an App Package when requested - Note 3 */ @@ -802,9 +904,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -814,11 +917,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); @@ -833,7 +937,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - PX_APP_PKG_ID + v_app_pkg_info.id )))))) -> value v_response { tc_ac.stop; @@ -845,9 +949,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_01_OK - + /** * @desc Check that MEO returns the an App Package when requested - Note 3 */ @@ -855,9 +962,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -867,11 +975,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); @@ -898,12 +1007,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_02_OK - + /** - * @desc Check that MEO responds with an error when it receives - * a request for retrieving a App Package referred with a wrong ID + * @desc Check that MEO responds with an error when it receives a request for retrieving a App Package referred with a wrong ID */ testcase TC_MEC_MEC010p2_MEO_PKGM_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -911,7 +1022,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -925,7 +1036,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")), v_headers ))); @@ -948,9 +1059,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_003_NF - + /** * @desc Check that MEO deletes an App Package when requested */ @@ -958,9 +1071,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -970,11 +1084,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); @@ -997,9 +1112,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_004_OK - + /** * @desc Check that MEO responds with an error when it receives * a request for deleting an App Package referred with a wrong ID @@ -1010,7 +1128,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1024,7 +1142,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")), v_headers ))); @@ -1047,9 +1165,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_004_NF - + /** * @desc Check that MEO updates the operational state of an individual application package resource */ @@ -1057,9 +1177,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1069,18 +1190,18 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_patch( - PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_app_pkg_info_modification( m_app_pkg_info_modification( DISABLED )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1092,7 +1213,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info_modification( mw_app_pkg_info_modification( - DISABLED + DISABLED )))))) -> value v_response { tc_ac.stop; @@ -1104,12 +1225,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_OK - + /** - * @desc Check that MEO sends an error when it receives a malformed request to modify - * the operational state of an application package + * @desc Check that MEO sends an error when it receives a malformed request to modify the operational state of an application package */ testcase TC_MEC_MEC010p2_MEO_PKGM_005_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1117,7 +1240,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1136,9 +1259,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_http_message_body_json( m_body_json_app_pkg_info_modification( m_app_pkg_info_modification( - UNKNOWN + ERROR_BAD_REQUEST // Should be DISABLED )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1158,9 +1280,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_BR - + /** * @desc Check that MEO responds with an error when it receives * a request for updating an App Package referred with a wrong ID @@ -1171,7 +1295,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1212,9 +1336,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_NF - + /** * @desc Check that MEO service returns an application package subscription when requested */ @@ -1224,7 +1350,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1245,7 +1371,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_app_pkg_info_subscription( PX_CALLBACK_URI )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1271,12 +1396,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_response.response.body.json_body.appPkgSubscriptionInfo.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_006_OK - + /** - * @desc Check that MEO service sends an error when it receives a - * malformed request for creating a new subscription on AppPackages + * @desc Check that MEO service sends an error when it receives a malformed request for creating a new subscription on AppPackages */ testcase TC_MEC_MEC010p2_MEO_PKGM_006_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1284,7 +1411,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1306,7 +1433,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_CALLBACK_URI, "Invalid_field" )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1326,19 +1452,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_006_BR - + /** * @desc Check that MEO service returns the list of Application Package Subscriptions when requested */ - testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1348,6 +1477,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -1355,7 +1485,67 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS, 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_pkgm_subscription_link_list( + mw_app_pkg_ubscription_link_list( + mw_app_pkg_subscription_link_list_link( + -, + { + *, + mw_app_pkg_subscription_link_list_link_subscription(v_app_pkg_subscription_info.links.self_.href) , + * + } + ))))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info 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_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_01 + + /** + * @desc Check that MEO service returns an empty list of Application Package Subscriptions when requested + */ + testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEO_PKGM_SUBS, + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1365,8 +1555,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_pkgm_subscription_link_list // TODO - )))) -> value v_response { + mw_body_json_pkgm_subscription_link_list( + mw_app_pkg_ubscription_link_list( + mw_app_pkg_subscription_link_list_link( + -, + omit + ))))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info list ***"); @@ -1377,9 +1571,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK - + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK_02 + /** * @desc Check that MEO service returns an Application Package Subscription when requested */ @@ -1387,9 +1583,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1399,14 +1596,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1433,9 +1630,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_008_OK - + /** * @desc Check that MEO service returns an Application Package Subscription when requested */ @@ -1445,7 +1645,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1462,7 +1662,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1482,9 +1681,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_008_NF - + /** * @desc Check that MEO service deletes an Application Package Subscription when requested */ @@ -1492,9 +1693,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1504,14 +1706,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1531,9 +1733,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_OK - + /** * @desc Check that MEO service sends an error when it receives a deletion request for a subscription on AppPackages * with a wrong identifier @@ -1544,7 +1748,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1561,7 +1765,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1581,57 +1784,74 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_NF - + /** - * @desc Check that the MEO service sends a application package notification - * if the MEO service has an associated subscription and the event is generated + * @desc Check that the MEO service sends a application package notification if the MEO service has an associated subscription and the event is generated */ testcase TC_MEC_MEC010p2_MEO_PKGM_010_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + if (not(PICS_APP_PACKAGE_NOTIFICATIONS)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_NOTIFICATIONS required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration - f_cf_01_http_up(); + f_cf_01_http_notif_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info); f_init_default_headers_list(-, -, v_headers); + action("Trigger application package notification"); // TODO To be reviewed f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_request( - mw_http_request_post( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO To be changed - v_headers, - mw_http_message_body_json( - mw_body_json_app_package_notification( - mw_app_pkg_notification // TODO To be refined - ))))) -> value v_response { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), // TODO To be changed + v_headers, + mw_http_message_body_json( + mw_body_json_app_package_notification( + mw_app_pkg_notification // TODO To be refined + ))))) { tc_ac.stop; + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification info ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } + [] httpPort_notif.receive { + tc_ac.stop; + + httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers))); + + log("*** " & testcasename() & ": FAIL: Expected message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_010_OK - + /** * @desc Check that MEO reads the content of the AppD of on-boarded individual application package resources when requested */ @@ -1641,7 +1861,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1680,9 +1900,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_011_OK - + /** * @desc Check that MEO reads the content of the AppD of on-boarded individual application package resources when requested */ @@ -1692,7 +1914,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1730,9 +1952,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_011_NF - + /** * @desc Check that MEO fetches the on-boarded application package content identified by appPkgId when requested */ @@ -1742,7 +1966,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1781,9 +2005,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_OK - + /** * @desc Check that MEO fetches the on-boarded application package content identified by appDId when requested */ @@ -1793,7 +2019,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1832,9 +2058,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_OK - + /** * @desc Check that MEO fetches the on-boarded application package content identified by appPkgId when requested */ @@ -1844,7 +2072,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1881,9 +2109,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_NG - + /** * @desc Check that MEO service sends an error when it receives a request refering a wrong on-boarded appPkgId */ @@ -1893,7 +2123,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1930,23 +2160,25 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_NG - + } // End of group meo_pkgmgt - + group mepm_pkgmgt { - + /** * @desc Check that MEPM returns the list of App Packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -1956,6 +2188,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -1963,7 +2196,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEPM_PKGM_URI, v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1973,8 +2205,17 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_pkg_info_list - )))) -> value v_response { + mw_body_json_app_pkg_info_list( + { + *, + mw_app_pkg_info( + v_app_pkg_info.id, + v_app_pkg_info.appDId + ) + , + * + } + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); @@ -1985,19 +2226,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // 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 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2007,6 +2251,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -2014,7 +2259,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED, // FIXME Rename into PX_PKGM_URI_ONBOARDED v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2024,8 +2268,19 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_pkg_info_list - )))) -> value v_response { + mw_body_json_app_pkg_info_list( + { + *, + mw_app_pkg_info( + v_app_pkg_info.id, + v_app_pkg_info.appDId, + -, -, -, -, -, + ONBOARDED + ) + , + * + } + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); @@ -2036,19 +2291,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK - + /** - * @desc Check that MEPM responds with an error when it receives - * a malformed request for retrieving the list of existing App Packages + * @desc Check that MEPM responds with an error when it receives a malformed request for retrieving the list of existing App Packages */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2065,7 +2322,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEPM_PKGM_URI & "?filter()", v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2085,19 +2341,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_BR - + /** * @desc Check that MEPM returns the an App Package when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2107,14 +2365,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2126,8 +2384,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - PX_APP_PKG_ID - )))))) -> value v_response { + v_app_pkg_info.id, + v_app_pkg_info.appDId + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); @@ -2138,19 +2397,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK - + /** * @desc Check that MEPM returns the an App Package when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2160,14 +2422,14 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2179,8 +2441,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - PX_APP_PKG_ID - )))))) -> value v_response { + v_app_pkg_info.id, + v_app_pkg_info.appDId, + -, -, -, -, -, + ONBOARDED + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); @@ -2191,20 +2456,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK - + /** - * @desc Check that MEPM responds with an error when it receives - * a request for retrieving a App Package referred with a wrong ID + * @desc Check that MEPM responds with an error when it receives a request for retrieving a App Package referred with a wrong ID */ testcase TC_MEC_MEC010p2_MEPM_PKGM_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2218,10 +2484,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2230,7 +2495,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); @@ -2241,9 +2506,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_002_NF - + /** * @desc Check that MEPM service returns an application package subscription when requested */ @@ -2253,7 +2520,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2274,7 +2541,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_app_pkg_info_subscription( PX_CALLBACK_URI )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2300,20 +2566,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_response.response.body.json_body.appPkgSubscriptionInfo.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_003_OK - + /** - * @desc Check that MEPM service sends an error when it receives a - * malformed request for creating a new subscription on AppPackages + * @desc Check that MEPM service sends an error when it receives a malformed request for creating a new subscription on AppPackages */ testcase TC_MEC_MEC010p2_MEPM_PKGM_003_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2335,7 +2602,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PX_CALLBACK_URI, "Invalid_field" )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2344,7 +2610,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); @@ -2355,19 +2621,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_003_BR - + /** * @desc Check that MEPM service returns the list of Application Package Subscriptions when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2377,6 +2645,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info, PX_MEPM_PKGM_SUBS); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -2384,7 +2653,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEPM_PKGM_SUBS, v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2394,8 +2662,16 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_pkgm_subscription_link_list // TODO - )))) -> value v_response { + mw_body_json_pkgm_subscription_link_list( + mw_app_pkg_ubscription_link_list( + mw_app_pkg_subscription_link_list_link( + -, + { + *, + mw_app_pkg_subscription_link_list_link_subscription(v_app_pkg_subscription_info.links.self_.href) , + * + } + ))))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info list ***"); @@ -2406,19 +2682,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_004_OK - + /** * @desc Check that MEPM service returns an Application Package Subscription when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2428,11 +2707,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info, PX_MEPM_PKGM_SUBS); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_pkg_subscription_info.id, "UTF-8")), v_headers ))); @@ -2447,11 +2727,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_pkgm_subscription_info( mw_app_pkg_subscription_info( - PX_APP_PKG_ID, + v_app_pkg_subscription_info.id, -, PX_CALLBACK_URI, m_app_pkg_link("") // TODO - )))))) -> value v_response { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***"); @@ -2462,19 +2742,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_005_OK - + /** - * @desc Check that MEPM service returns an Application Package Subscription when requested + * @desc Check that MEPM service sends an error when it receives a query for a subscription on AppPackages with a wrong identifier */ testcase TC_MEC_MEC010p2_MEPM_PKGM_005_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2500,7 +2782,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); @@ -2511,19 +2793,21 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_005_NF - + /** * @desc Check that MEPM service deletes an Application Package Subscription when requested */ testcase TC_MEC_MEC010p2_MEPM_PKGM_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2533,6 +2817,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_app_pkg_subscription(v_app_pkg_subscription_info, PX_MEPM_PKGM_SUBS); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -2540,7 +2825,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2549,7 +2833,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***"); @@ -2560,20 +2844,20 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_006_OK - + /** - * @desc Check that MEPM service sends an error when it receives a deletion request for a subscription on AppPackages - * with a wrong identifier + * @desc Check that MEPM service sends an error when it receives a deletion request for a subscription on AppPackages with a wrong identifier */ testcase TC_MEC_MEC010p2_MEPM_PKGM_006_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2590,7 +2874,6 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2599,7 +2882,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); @@ -2610,44 +2893,52 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_006_NF - + /** - * @desc Check that the MEPM service sends a application package notification - * if the MEPM service has an associated subscription and the event is generated + * @desc Check that the MEPM service sends a application package notification if the MEPM service has an associated subscription and the event is generated */ testcase TC_MEC_MEC007p2_MEPM_PKGM_007_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgSubscriptionInfo v_app_pkg_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration - f_cf_01_http_up(); + f_cf_01_http_notif_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); + f_create_app_pkg_subscription(v_app_pkg_subscription_info); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")) & "/appd", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_request( - mw_http_request_post( - PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO To be changed - v_headers, - mw_http_message_body_json( - mw_body_json_app_package_notification( - mw_app_pkg_notification // TODO To be refined - ))))) -> value v_response { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO To be changed + v_headers, + mw_http_message_body_json( + mw_body_json_app_package_notification( + mw_app_pkg_notification // TODO To be refined + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully sends notification info ***"); @@ -2658,19 +2949,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + + // Postamble + f_delete_app_pkg_subscription(v_app_pkg_subscription_info.id); + f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC007p2_MEPM_PKGM_007_OK - + /** * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested */ - testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_008_NA() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2680,12 +2974,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")) & "/appd", + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/appd", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2695,9 +2990,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - ? // TODO To be refined - ))) -> value v_response { + mw_http_response_405_not_applicable + )) { tc_ac.stop; // TODO Check HTTP message body @@ -2709,19 +3003,22 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_008_NA + /** * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested */ - testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); setverdict(inconc); stop; @@ -2731,12 +3028,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_cf_01_http_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); - // TODO Set accept filed to application/zip... + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/appd", + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/appd", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2746,12 +3043,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { + mw_http_response_ok( + ? // TODO To be refined + ))) { tc_ac.stop; // TODO Check HTTP message body - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2759,26 +3057,24 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF - - } // End of group mepm_pkgmgt - - group mepm_lifcyclemgt { - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_OK + /** - * @desc Check that MEC API provider has created the configuration information in AppD to the MEPM-V + * @desc Check that MEPM reads the content of the AppD of on-boarded individual application package resources when requested */ - testcase TC_MEC_MEC010p2_MEPM_LCM_01_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration @@ -2786,17 +3082,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); + // TODO Set accept filed to application/zip... httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", - v_headers, - m_http_message_body_json( - m_body_json_config_platform_for_app_request( - m_config_platform_for_app_request( - m_service_dependency( - "", "" // TODO Add PIXITs - ))))))); + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")) & "/appd", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2804,10 +3096,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_202_accepted - )) -> value v_response { + mw_http_response_404_not_found + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2815,41 +3109,39 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_OK - + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_009_NF + /** - * @desc Check that MEC API provider sends an error when it receives a malformed request - * for the configuration information in AppD to the MEPM-V + * @desc Check that MEPM responds with an error when it receives a PUT request referring an application descriptor AppD */ - testcase TC_MEC_MEC010p2_MEPM_LCM_01_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_010_FO() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble + f_create_package_management(v_app_pkg_info, true); f_init_default_headers_list(-, -, v_headers); + // TODO Set accept filed to application/zip... httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", - v_headers, - m_http_message_body_json( - m_body_json_config_platform_for_app_request( - m_config_platform_for_app_request( - m_service_dependency( - "", "" // TODO Add PIXITs - ))))))); + m_http_request_put( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/appd", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2857,9 +3149,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { + mw_http_response_403_forbidden + )) { tc_ac.stop; + + // TODO Check HTTP message body log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -2868,41 +3162,39 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_BR - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_010_FO + /** - * @desc Check that MEC API provider sends an error when it receives a request - * for the configuration information in AppD to the MEPM-V with not valid app instance ID + * @desc Check that MEPM responds with an error when it receives a DELETE request referring an application descriptor AppD */ - testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_011_NA() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", - v_headers, - m_http_message_body_json( - m_body_json_config_platform_for_app_request( - m_config_platform_for_app_request( - m_service_dependency( - "", "" // TODO Add PIXITs - ))))))); + m_http_request_delete( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/appd", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2910,9 +3202,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { + mw_http_response_405_not_applicable + )) { tc_ac.stop; + + // TODO Check HTTP message body log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -2921,43 +3215,39 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF - - } // End of group mepm_lifcyclemgt - - group mex_lifcyclemgt { - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_011_NA + /** - * @desc Check that MEC API provider retrieves the list of App instances when requested + * @desc Check that MEPM fetches the on-boarded application package content identified by appPkgId when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_01_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI, - v_headers, - m_http_message_body_json( - m_body_json_create_app_instance_request( - m_create_app_instance_request( - PX_APP_ID - )))))); + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/package_content", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2965,15 +3255,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_app_instance_info( - mw_app_instance_info( - -, - PX_APP_ID - )))))) -> value v_response { + mw_http_response_ok( + ? // TODO To be refined + ))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2981,40 +3269,39 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_01_OK - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_OK + /** - * @desc Check that MEC API provider sends an error when it receives a malformed request - * for the creation of a new App Instance + * @desc Check that MEPM fetches the on-boarded application package content identified by appDId when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_01_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); + f_create_package_management(v_app_pkg_info, true); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_APP_LCM_URI, - v_headers, - m_http_message_body_json( - m_body_json_create_app_instance_request( - m_create_app_instance_request( - "" - )))))); + m_http_request_get( + PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(v_app_pkg_info.id, "UTF-8")) & "/package_content", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3022,10 +3309,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { + mw_http_response_ok( + ? // TODO To be refined + ))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -3033,34 +3323,36 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_01_OK - + + // Postamble + f_delete_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK + /** - * @desc Check that MEC API provider retrieves the list of App instances when requested + * @desc Check that MEPM fetches the on-boarded application package content identified by appPkgId when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_02_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble - f_init_default_headers_list(-, -, v_headers); + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_APP_LCM_URI, - v_headers + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")) & "/package_content", + v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -3069,14 +3361,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_app_instance_info_list/*( - (*, mw_app_instance_info(-, PX_APP_ID), *) -*/ - )))) -> value v_response { + mw_http_response_404_not_found + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -3084,35 +3374,1513 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_02_OK - + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF + /** - * @desc Check that MEC API provider retrieves an App Package when requested + * @desc Check that MEPM service sends an error when it receives a query with an application package with a wrong identifier */ - testcase TC_MEC_MEC010p2_MEX_LCM_03_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; - } - + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); // TODO Set accept filed to application/zip... + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/package_content", + 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; + + // TODO Check HTTP message body + log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***"); + 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_MEC010p2_MEPM_PKGM_012_02_NF + + } // End of group mepm_pkgmgt + + group mepm_lifcyclemgt { + + /** + * @desc Check that MEC API provider has created the configuration information in AppD to the MEPM-V + */ + testcase TC_MEC_MEC010p2_MEPM_LCM_01_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", + v_headers, + m_http_message_body_json( + m_body_json_config_platform_for_app_request( + m_config_platform_for_app_request( + { + m_service_dependency( + "", + "" // TODO Add PIXITs + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct 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_MEC010p2_MEPM_LCM_01_OK + + /** + * @desc Check that MEC API provider sends an error when it receives a malformed request for the configuration information in AppD to the MEPM-V + */ + testcase TC_MEC_MEC010p2_MEPM_LCM_01_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", + v_headers, + m_http_message_body_json( + m_body_json_config_platform_for_app_request( + m_config_platform_for_app_request( + { + m_service_dependency( + "", + "" // TODO Add PIXITs + ) + } + )))))); + 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 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_MEC010p2_MEPM_LCM_01_BR + + /** + * @desc Check that MEC API provider sends an error when it receives a request for the configuration information in AppD to the MEPM-V with not valid app instance ID + */ + testcase TC_MEC_MEC010p2_MEPM_LCM_01_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_APP_PACKAGE_MANAGEMENT)) { + log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID, "UTF-8")) & "/configure_platform_for_app", + v_headers, + m_http_message_body_json( + m_body_json_config_platform_for_app_request( + m_config_platform_for_app_request( + { + m_service_dependency( + "", + "" // TODO Add PIXITs + ) + } + )))))); + 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 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_MEC010p2_MEPM_LCM_01_NF + + } // End of group mepm_lifcyclemgt + + group mex_app_instance_mgt { + + /** + * @desc Check that MEC API provider creates a new App Package when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_package_management(v_app_pkg_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI, + v_headers, + m_http_message_body_json( + m_body_json_create_app_instance_request( + m_create_app_instance_request( + v_app_pkg_info.appDId, + v_app_pkg_info.appName & "_1" + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_instance_info( + mw_app_instance_info( + -, + v_app_pkg_info.appDId + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); + 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_app_instance(v_app_pkg_info.id, v_response.response.body.json_body.appInstanceInfo.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_001_OK + + /** + * @desc Check that MEC API provider sends an error when it receives a malformed request for the creation of a new App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI, + v_headers, + m_http_message_body_json( + m_body_json_create_app_instance_request( + m_create_app_instance_request( + PX_NON_EXISTENT_APP_PKG_ID, + "PX_NON_EXISTENT_APP_PKG_ID_1" + )))))); + 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 successfully responds with an error cocde ***"); + 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_MEC010p2_MEX_LCM_001_BR + + /** + * @desc Check that MEC API provider retrieves the list of App instances when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_APP_LCM_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_instance_info_list( + { + *, + mw_app_instance_info( + v_app_instance_info.id, + v_app_instance_info.appDId, + v_app_instance_info.appProvider + ), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of app instance ***"); + 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_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_002_OK + + /** + * @desc Check that MEC API provider retrieves an App Package when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.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_app_instance_info( + mw_app_instance_info( + v_app_instance_info.id, + v_app_instance_info.appDId, + v_app_instance_info.appProvider + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct app instance ***"); + 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_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_003_OK + + /** + * @desc Check that MEC API provider fails on retrieving an App Instance when requested using wrong appInstanceId + */ + testcase TC_MEC_MEC010p2_MEX_LCM_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)), + 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 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_MEC010p2_MEX_LCM_003_NF + + /** + * @desc Check that MEC API provider service deletes an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // 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 responds with the correct 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_package_management(v_app_pkg_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_004_OK + + /** + * @desc Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId + */ + testcase TC_MEC_MEC010p2_MEX_LCM_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)), + 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 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_MEC010p2_MEX_LCM_004_NF + + /** + * @desc Check that MEC API provider service instantiates an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_instantiate_app_request( + m_instantiate_app_request( + m_selected_mec_host_info( + { + { key_name := PX_ONBOARD_HOSTID_NAME, key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } } + } + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) -> value v_response { + tc_ac.stop; + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": PASS: FAIL successfully responds with the correct app instance ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + var charstring v_app_lcm_op_occ_id := regexp( + v_header_value[0], + PX_MEX_LCM_OP_OCC_URI & "/(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct header Location ", v_app_lcm_op_occ_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_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_OK + + /** + * @desc Check that MEC API provider service fails to instantiate an App Instance when it receives a malformed request + */ + testcase TC_MEC_MEC010p2_MEX_LCM_005_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_instantiate_app_request( + m_instantiate_app_request( + m_selected_mec_host_info( + { + { key_name := "", key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } } + } + ))))))); + 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 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_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_BR + + /** + * @desc Check that MEC API provider service fails to instantiate an App Instance when it receives a request related to a not existing App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_instantiate_app_request( + m_instantiate_app_request( + m_selected_mec_host_info( + { + { key_name := "", key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } } + } + ))))))); + 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 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_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_005_NF + + /** + * @desc Check that MEC API provider service terminates an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "terminate", + v_headers, + m_http_message_body_json( + m_body_json_terminate_app_request( + m_terminate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) -> value v_response { + tc_ac.stop; + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": PASS: FAIL does not respond with the correct app instance ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + var charstring v_retrived_app_lcm_op_occ_id := regexp( + v_header_value[0], + PX_MEX_LCM_OP_OCC_URI & "/(?*)", + 0 + ); + if (not(match(v_retrived_app_lcm_op_occ_id, v_app_lcm_op_occ_id))) { + log("*** " & testcasename() & ": PASS: FAIL APP_LCM_OP_OCC_ID mismatched ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct header Location", v_response.response.header, " ***"); + 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_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_OK + + /** + * @desc Check that MEC API provider service fails to terminate an App Instance when it receives a malformed request + */ + testcase TC_MEC_MEC010p2_MEX_LCM_006_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instanicate", // Worng URL + v_headers, + m_http_message_body_json( + m_body_json_terminate_app_request( + m_terminate_app_request + ))))); + 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 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_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_006_BR + + /** + * @desc Check that MEC API provider service fails to terminate an App Instance when it receives a request related to a not existing App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_006_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)) & "terminate", + v_headers, + m_http_message_body_json( + m_body_json_terminate_app_request( + m_terminate_app_request + ))))); + 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 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_MEC010p2_MEX_LCM_006_NF + + /** + * @desc Check that MEC API provider service changes the status of an App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "operate", + v_headers, + m_http_message_body_json( + m_body_json_operate_app_request( + m_operate_app_request + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted( + mw_http_message_body_json( + mw_body_json_operate_app_request( + mw_operate_app_request + + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct 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_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_OK + + /** + * @desc Check that MEC API provider service fails to operate on an App Instance when it receives a malformed request + */ + testcase TC_MEC_MEC010p2_MEX_LCM_007_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "operated", // Wrong URL + v_headers, + m_http_message_body_json( + m_body_json_operate_app_request( + m_operate_app_request + ))))); + 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 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_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_007_BR + + /** + * @desc Check that MEC API provider service fails to change the status of an App Instance when it receives a request related to a not existing App Instance + */ + testcase TC_MEC_MEC010p2_MEX_LCM_007_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID)) & "operate", + v_headers, + m_http_message_body_json( + m_body_json_operate_app_request( + m_operate_app_request + ))))); + 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 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_MEC010p2_MEX_LCM_007_NF + + } // End of group mex_app_instance_mgt + + group mex_lifcyclemgt { + + /** + * @desc Check that MEC API provider service retrieves info about LCM Operation Occurrence on App Instances when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_lcm_op_occ_list( + { + *, + mw_app_lcm_op_occ( + v_app_lcm_op_occ_id + ), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of AppLcmOpOcc ***"); + 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_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_008_OK + + /** + * @desc Check that MEC API provider service retrieves info about LCM Operation Occurrence on an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(v_app_lcm_op_occ_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_app_lcm_op_occ( + mw_app_lcm_op_occ( + v_app_lcm_op_occ_id, + -, -, -, -, + mw_app_lcm_op_occ_link( + PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(v_app_lcm_op_occ_id)) + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); + 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_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_009_OK + + /** + * @desc Check that MEC API provider service retrieves info about LCM Operation Occurrence on an App Instance when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(PX_APP_NON_EXISTANT_LCM_OP_OCC_ID)), + 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 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_MEC010p2_MEX_LCM_009_NF + + /** + * @desc Check that MEC API provider service creates a LCM Subscription when requested, where the subscription request can + * have SUBSCRIPTION_TYPE AppInstanceStateChangeSubscription or AppLcmOpOccStateChangeSubscription + */ + testcase TC_MEC_MEC010p2_MEX_LCM_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_app_inst_subscription_request( + m_app_inst_subscription_request( + PX_APP_INST_SUBSCRIPTION_REQUEST, + PX_CALLBACK_URI + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_inst_subscription_info( + mw_app_inst_subscription_info( + -, + PX_APP_INST_SUBSCRIPTION_REQUEST, + PX_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); + 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_app_instance_subscription(v_response.response.body.json_body.appInstSubscriptionInfo.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_010_OK + + /** + * @desc Check that MEC API provider service creates a LCM Subscription when requested, where the subscription request can + * have SUBSCRIPTION_TYPE AppInstanceStateChangeSubscription or AppLcmOpOccStateChangeSubscription + */ + testcase TC_MEC_MEC010p2_MEX_LCM_010_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_app_inst_subscription_request( + m_app_inst_subscription_request( + "PX_APP_INST_SUBSCRIPTION_REQUEST", // Wrong subscription request + PX_CALLBACK_URI + )))))); + 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 successfully responds with orrect 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_MEC010p2_MEX_LCM_010_BR + + /** + * @desc Check that MEC API provider service sends the list of LCM Subscriptions when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_011_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + var AppInstSubscriptionInfo v_app_inst_subscription_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_create_app_instance_subscription(v_app_inst_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEX_LCM_SUBS, v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3122,17 +4890,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_app_instance_info( - mw_app_instance_info( - -, - PX_APP_ID, - -, -, -, -, -, -, - mw_link( - mw_link_type( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8"))) - ))))))) -> value v_response { + mw_body_json_app_instance_subscription_link_list( + mw_app_instance_subscription_link_list + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -3140,35 +4903,101 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_03_OK - + + // Postamble + f_delete_app_instance_subscription(v_app_inst_subscription_info.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_011_OK + /** - * @desc Check that MEC API provider fails on retrieving an App Instance when requested using wrong appInstanceId + * @desc Check that MEC API provider service sends the information about an existing LCM subscription when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_03_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_012_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + var AppInstSubscriptionInfo v_app_inst_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_create_app_instance_subscription(v_app_inst_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(v_app_inst_subscription_info.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_app_inst_subscription_info( + mw_app_inst_subscription_info( + v_app_inst_subscription_info.id, + PX_APP_INST_SUBSCRIPTION_REQUEST, + PX_CALLBACK_URI + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct AppInstSubscriptionInfo ***"); + 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_app_instance_subscription(v_app_inst_subscription_info.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_012_OK + + /** + * @desc Check that MEC API provider service sends an error when it receives a query for a not existing LCM Subscription + */ + testcase TC_MEC_MEC010p2_MEX_LCM_012_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID)), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3177,9 +5006,10 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -3187,35 +5017,42 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_03_NF - + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_012_NF + /** - * @desc Check that MEC API provider service deletes an App Instance when requested + * @desc Check that MEC API provider service delete an existing LCM Subscription when requested */ - testcase TC_MEC_MEC010p2_MEX_LCM_04_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_013_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + var AppInstSubscriptionInfo v_app_inst_subscription_info; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration f_cf_01_http_up(); // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_create_app_instance_subscription(v_app_inst_subscription_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(v_app_inst_subscription_info.id)), v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3224,8 +5061,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) -> value v_response { + )) { tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -3234,22 +5072,24 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_04_OK - + + // Postamble + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_013_OK + /** - * @desc Check that MEC API provider fails on deletion of an App Instance when requested using wrong appInstanceId + * @desc Check that MEC API provider service sends an error when it receives a deletion request for a not existing LCM Subscription */ - testcase TC_MEC_MEC010p2_MEX_LCM_04_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC010p2_MEX_LCM_013_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_APP_PACKAGE_MANAGEMENT)){ - log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration @@ -3260,9 +5100,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_APP_LCM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID)), v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -3271,8 +5111,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) -> value v_response { + )) { tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -3281,9 +5122,252 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - - } // End of testcase TC_MEC_MEC010p2_MEX_LCM_04_NF - + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_013_NF + + /** + * @desc Check that MEC API provider service cancels an on going LCM Operation + */ + testcase TC_MEC_MEC010p2_MEX_LCM_014_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(v_app_lcm_op_occ_id)) & "/cancel", + v_headers, + m_http_message_body_json( + m_body_json_cancel_mode( + FORCEFUL + ))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppLcmOpOcc ***"); + 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_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_014_OK + + /** + * @desc Check that MEC API provider service fails to cancel an on going LCM Operation when it receives a malformed request + */ + testcase TC_MEC_MEC010p2_MEX_LCM_014_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(v_app_lcm_op_occ_id)) & "/cancel", + v_headers, + m_http_message_body_json( + m_body_json_cancel_mode( + ERROR_CASE + ))))); + 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 successfully responds with a AppLcmOpOcc ***"); + 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_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_014_BR + + /** + * @desc Check that MEC API provider service fails to cancel an on going LCM Operation when it receives a request related to a not existing application LCM Operation + */ + testcase TC_MEC_MEC010p2_MEX_LCM_014_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_MEX_LCM_OP_OCC_URI & oct2char(unichar2oct(PX_APP_NON_EXISTANT_LCM_OP_OCC_ID)) & "/cancel", + v_headers, + m_http_message_body_json( + m_body_json_cancel_mode( + ERROR_CASE + ))))); + 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 AppLcmOpOcc ***"); + 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_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_014_NF + + // TODO 15 & 16, how to achieve operationStates indicating value FAILED_TEMP + + /** + * @desc Check that MEC API provider service sends the information about an existing LCM subscription when requested + */ + testcase TC_MEC_MEC010p2_MEX_LCM_017_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + var charstring v_app_lcm_op_occ_id; + var AppInstSubscriptionInfo v_app_inst_subscription_info; + + // Test control + if (not(PIC_APP_LCM_MANAGEMENT)) { + log("*** " & testcasename() & ": PIC_APP_LCM_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Preamble + f_instanciate_app_instance(v_app_pkg_info, v_app_instance_info, v_app_lcm_op_occ_id); + f_create_app_instance_subscription(v_app_inst_subscription_info); + f_init_default_headers_list(-, -, v_headers); + action("Trigger notification"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(v_app_inst_subscription_info.id, "UTF-8")), // TODO To be changed + v_headers, + mw_http_message_body_json( + mw_body_json_app_inst_notification( + mw_app_inst_notification // TODO To be refined + ))))) { + tc_ac.stop; + + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct AppInstSubscriptionInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] httpPort_notif.receive { + tc_ac.stop; + + httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers))); + + log("*** " & testcasename() & ": FAIL: Expected message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_app_instance_subscription(v_app_inst_subscription_info.id); + f_terminate_app_instance(v_app_pkg_info.id, v_app_instance_info.id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC010p2_MEX_LCM_017_OK + + } // End of group mex_lifcyclemgt - + } // End of module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..07d3737fa6516f31bf567a295901a8074710eea3 --- /dev/null +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn @@ -0,0 +1,163 @@ +module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl { + + // LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT) { + if (PICS_APP_PACKAGE_MANAGEMENT) { + + if (PICS_IUT_MEO) { + if (PICS_GRANTS_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEO_GRANT_001_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_001_BR()); + execute(TC_MEC_MEC010p2_MEO_GRANT_002_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_003_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_004_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_005_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_006_OK()); + execute(TC_MEC_MEC010p2_MEO_GRANT_006_NF()); + } + + if (PICS_APP_PACKAGE_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEO_PKGM_001_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_001_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_01()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_02()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_NF()); + + execute(TC_MEC_MEC010p2_MEO_PKGM_011_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_011_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_NF()); + } + + if (PICS_APP_PACKAGE_NOTIFICATIONS) { + execute(TC_MEC_MEC010p2_MEO_PKGM_010_OK()); + } + } + + if (PICS_IUT_MEPM) { + if (PICS_APP_PACKAGE_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEO_PKGM_001_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_001_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_002_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_003_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_004_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_005_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_006_BR()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_01()); + execute(TC_MEC_MEC010p2_MEO_PKGM_007_OK_02()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_008_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_009_NF()); + + execute(TC_MEC_MEC010p2_MEO_PKGM_011_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_011_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_OK()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_01_NF()); + execute(TC_MEC_MEC010p2_MEO_PKGM_012_02_NF()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_001_BR()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_002_01_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_002_02_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_002_NF()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_003_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_003_BR()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_004_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_005_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_006_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_006_NF()); + execute(TC_MEC_MEC007p2_MEPM_PKGM_007_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_008_NA()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_011_NA()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_012_01_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_012_02_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_012_01_NF()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_012_02_NF()); + execute(TC_MEC_MEC010p2_MEPM_LCM_01_OK()); + execute(TC_MEC_MEC010p2_MEPM_LCM_01_BR()); + + if (PICS_APP_PACKAGE_NOTIFICATIONS) { + execute(TC_MEC_MEC010p2_MEPM_PKGM_009_OK()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_009_NF()); + execute(TC_MEC_MEC010p2_MEPM_PKGM_010_FO()); + } + } + } + + if (PICS_IUT_MEX) { + if (PIC_APP_LCM_MANAGEMENT) { + execute(TC_MEC_MEC010p2_MEX_LCM_001_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_001_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_002_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_003_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_003_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_004_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_004_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_005_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_005_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_005_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_006_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_006_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_006_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_007_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_007_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_007_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_008_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_009_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_009_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_010_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_010_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_011_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_012_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_012_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_013_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_013_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_014_OK()); + execute(TC_MEC_MEC010p2_MEX_LCM_014_BR()); + execute(TC_MEC_MEC010p2_MEX_LCM_014_NF()); + execute(TC_MEC_MEC010p2_MEX_LCM_017_OK()); + } + } + } + } + } // End of 'control' statement + +} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..9b2aa7c42141e6b3cece25b5ad4d464448546b41 --- /dev/null +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk @@ -0,0 +1,38 @@ +suite := AtsMec_ApplicationPackageLifecycleAndOperationGranting + +sources := \ + AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn \ + AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/LocationAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ diff --git a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn similarity index 99% rename from ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn rename to ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn index 2f39915d6e40eaa0d26106731e71db5ca1419db3..904a4d0c1ce16efe2f47058c39d34713cc21b43b 100644 --- a/ttcn/AtsMec/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn @@ -11,7 +11,6 @@ */ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { - // JSON import from Json all; diff --git a/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0a20c8d96c9ee3adcb31bf8447b597b5f9c35183 --- /dev/null +++ b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn @@ -0,0 +1,30 @@ +module AtsMec_DeviceApplicationInterfaceAPI_TestControl { + + // LibMec/DeviceApplicationInterfaceAPI + import from DeviceApplicationInterfaceAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec + import from AtsMec_DeviceApplicationInterfaceAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + // if (PICS_ENABLE_UE_APP_CTX) { + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_OK()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_001_BR()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_OK()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_BR()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_002_NF()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_OK()); + // execute(TC_MEC_MEC016_MEO_UEAPPCTX_003_NF()); + // execute(TC_MEC_MEC016_MEO_UEAPPS_001_OK()); + // execute(TC_MEC_MEC016_MEO_UEAPPS_001_BR()); + // execute(TC_MEC_MEC016_MEO_UEAPPS_001_NF()); + // } + } + } // End of 'control' statement + +} // End of module AtsMec_TestControl diff --git a/ttcn/AtsMec_DeviceApplicationInterface/module.mk b/ttcn/AtsMec_DeviceApplicationInterface/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..a3bfbe021d0c3e235c69cc240c76e62ff60dd35a --- /dev/null +++ b/ttcn/AtsMec_DeviceApplicationInterface/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_DeviceApplicationInterface + +sources := \ + AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn \ + AtsMec_DeviceApplicationInterfaceAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn similarity index 68% rename from ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn rename to ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn index e00b0ff5dab3d9cea9dbaccfb0413191feb54864..bf99ea17806d40746352fa57f90824b7107afc7f 100644 --- a/ttcn/AtsMec/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_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, Draft ETSI GS MEC 011 V2.2.1 + * @see ETSI GS MEC 003, Draft ETSI GS MEC 011 V3.2.1 */ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { @@ -29,6 +29,9 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { import from EdgePlatformApplicationEnablementAPI_Pics all; import from EdgePlatformApplicationEnablementAPI_Pixits all; + // LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; + // LibMec import from LibMec_TypesAndValues all; import from LibMec_Templates all; @@ -45,11 +48,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with a list of available MEC services for a given application instance when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -64,15 +68,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -82,11 +85,18 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_service_info_list - )))) { + mw_body_json_service_info_list( + { + *, + mw_service_info( + v_service_info.serName + ), + * + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfoList ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with to the service creation ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -96,19 +106,22 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_001_OK /** * @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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var HttpMessage v_response; + var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control - if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -120,15 +133,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services?instance_id=" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID)), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services?instance_id=" & oct2char(unichar2oct(v_service_info.serInstanceId)), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -137,10 +149,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -150,18 +162,70 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_001_BR /** - * @desc Check that the IUT notifies the authorised relevant (subscribed) application instances when a new service for a given application instance is registered. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 + * @desc Check that the IUT responds with an error when a request with an unknown service is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_APPSAQ_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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services?ser_instance_id=" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_NAME)), + 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 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_MEC011_SRV_APPSAQ_001_NF + + /** + * @desc Check that the IUT notifies the authorised relevant (subscribed) application instances when a new service for a given application instance is registered */ testcase TC_MEC_MEC011_SRV_APPSAQ_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; var universal charstring v_service_name; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not (PICS_NOTIFICATIONS) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -181,31 +245,22 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers, m_http_message_body_json( m_body_json_service_info( m_service_info( v_service_name, - -, -, -, - m_service_info_link("m_service_info_link"), - -, - -, + -, -, -, -, -, -, m_transport_info( "transportId1", "TC_MEC_MEC011_SRV_APPSAQ_002_OK", REST_HTTP, "HTTP", "2.0", - m_end_point_uris({"/meMp1/service/MyEntryPoint"}), + m_end_point_uris({PX_APP_ENDPOINT_URI}), m_security_info - ) - ) - ) - ) - ) - ) - ); + ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -218,31 +273,25 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_body_json_service_info( mw_service_info( v_service_name //serName - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; - if (f_check_headers(valueof(v_response.response.header)) == true) { -/* TODO how to test this as the notification is for another MEC Application? - and - // MEC 011, clause 6.4.2 - the IUT entity sends a notification_message containing - body containing - notificationType set to "SerAvailabilityNotification", - services containing - serName set to SERVICE_NAME - _links containing - subscription set to MP1_SUBSCRIPTION_A - ; - ; - ; - ; - to the MEC_APP_Subscriber entity -*/ + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in creating service ***"); + 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_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services" & "/(?*)", + 0 + ); + + // TODO how to test this as the notification is for another MEC Application? log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo and set notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } } [] tc_ac.timeout { @@ -252,12 +301,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_002_OK /** * @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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -282,7 +331,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers, m_http_message_body_json( m_body_json_service_info( @@ -291,13 +340,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { -, SUSPENDED, RAW, - m_service_info_link("m_service_info_link") - ) - ) - ) - ) - ) - ); + m_service_info_link("m_service_info_link") // Shall not be present in the request + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -306,10 +350,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -324,7 +368,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -347,7 +390,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers, m_http_message_body_json( m_body_json_service_info( @@ -372,7 +415,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -387,11 +430,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific service for a given application instance when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var HttpMessage v_response; + var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -406,15 +451,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_SERVICE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serInstanceId, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -426,9 +470,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_message_body_json( mw_body_json_service_info( mw_service_info( - -, -, -, -, -, - PX_SERVICE_ID - )))))) { + v_service_info.serName, + -, -, -, -, + v_service_info.serInstanceId + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo ***"); @@ -441,12 +486,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_003_OK /** - * @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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application# */ testcase TC_MEC_MEC011_SRV_APPSAQ_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -469,11 +514,9 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -482,10 +525,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found() - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -500,13 +543,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT updates a service information for a given application instance when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring_list v_etag; var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -521,35 +564,21 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_service_info(v_service_info, v_headers); - if (f_check_headers(v_headers, c_etag_http_header) == false) { - log("*** " & testcasename() & ": INCONC: 'ETag' HTTP header not set ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_get_header(v_headers, c_etag_http_header, v_etag); // TODO Check headers - // If-Match header needs to have a PROPER_ETAG + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); - f_set_headers_list({ "If-Match" }, v_etag, v_headers); httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serName, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & v_subscription_id, v_headers, m_http_message_body_json( m_body_json_service_info( m_service_info( v_service_info.serName, PX_NEW_SERVICE_INFO_VERSION, - -, -, - m_service_info_link("m_service_info_link"), - -, -, + -, -, -, -, -, v_service_info.transportInfo - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -562,11 +591,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_body_json_service_info( mw_service_info( v_service_info.serName, - PX_NEW_SERVICE_INFO_VERSION - )))))) { + PX_NEW_SERVICE_INFO_VERSION, + -, -, -, -, -, + v_service_info.transportInfo + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a modified ServiceInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -576,19 +607,19 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_service_info(v_service_info); + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_004_OK /** * @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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_004_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring_list v_etag; var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -603,38 +634,21 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_service_info(v_service_info, v_headers); - if (f_check_headers(v_headers, c_etag_http_header) == false) { - log("*** " & testcasename() & ": INCONC: 'ETag' HTTP header not set ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_get_header(v_headers, c_etag_http_header, v_etag); // TODO Check headers - if (f_check_headers(v_headers, c_etag_http_header) == false) { - log("*** " & testcasename() & ": INCONC: 'ETag' HTTP header not set ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_get_header(v_headers, c_etag_http_header, v_etag); // TODO Check headers - // If-Match header needs to have a PROPER_ETAG + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); - f_set_headers_list({ "If-Match" }, v_etag, v_headers); httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serName, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_service_info( - m_service_info( - v_service_info.serName & char(0, 0, 1, 111), - PX_NEW_SERVICE_INFO_VERSION, - -, -, - m_service_info_link("m_service_info_link") - ) - ) - ) - ) - ) - ); + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_service_info( + m_service_info( + v_service_info.serName, + PX_NEW_SERVICE_INFO_VERSION, + -, -, + m_service_info_link("m_service_info_link") + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -643,10 +657,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -656,13 +670,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_service_info(v_service_info); + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_004_BR /** * @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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -686,7 +699,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_service_info( @@ -695,12 +708,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { PX_NEW_SERVICE_INFO_VERSION, -, -, m_service_info_link("m_service_info_link") - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -709,10 +717,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -727,13 +735,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppServices.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSAQ_004_PF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring_list v_etag; var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -748,7 +756,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - f_create_service_info(v_service_info, v_headers); + f_create_service_info(v_service_info, v_subscription_id); if (f_check_headers(v_headers, c_etag_http_header) == false) { log("*** " & testcasename() & ": INCONC: 'ETag' HTTP header not set ***"); f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); @@ -760,7 +768,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serName, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(v_service_info.serName, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_service_info( @@ -798,10 +806,115 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_service_info(v_service_info); + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSAQ_004_PF + /** + * @desc Check that the IUT executes the deletion of a service for a given application instance when requested by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_APPSAQ_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_service_info(v_service_info, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & 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_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds successfully to the service delation ***"); + 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_MEC011_SRV_APPSAQ_005_OK + + /** + * @desc Check that the IUT responds with an error when a request for deletion of a unknown service is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_APPSAQ_005_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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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_delete( + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & PX_NON_EXISTENT_SERVICE_NAME, + 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 successfully 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_MEC011_SRV_APPSAQ_005_NF + } // End of group app_saq /* @@ -811,7 +924,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -868,7 +980,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -922,12 +1033,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on service availability events. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_002_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_APP_ENABLEMENT_API_SUPPORTED)) { @@ -943,7 +1054,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - //TODO Create a subsciption (see TC_MEC_MEC011_SRV_APPSUB_001_OK); httpPort.send( m_http_request( m_http_request_post( @@ -953,16 +1063,9 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_body_json_app_termination_notif_subscription( m_app_termination_notif_subscription( PX_APP_TERM_NOTIF_CALLBACK_URI, - -/*m_self( - { href := PX_HREF } - )*/, - "ID1"/*PX_APP_INSTANCE_ID*/ - ) - ) - ) - ) - ) - ); + -, + PX_APP_INSTANCE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -974,16 +1077,26 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_message_body_json( mw_body_json_app_termination_notif_subscription( mw_app_termination_notif_subscription( - PX_APP_TERM_NOTIF_CALLBACK_URI - )))))) -> value v_response { + PX_APP_TERM_NOTIF_CALLBACK_URI, + mw_self, + PX_APP_INSTANCE_ID + )))))) -> value v_response { tc_ac.stop; - if (f_check_headers(valueof(v_response.response.header)) == true) { - log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { + if (f_check_headers(v_response.response.header) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); 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_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } [] tc_ac.timeout { @@ -993,12 +1106,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_app_termination_notif_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSUB_002_OK /** * @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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1032,12 +1145,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { { href := PX_HREF } ), PX_APP_INSTANCE_ID - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1046,10 +1154,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1064,11 +1172,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific subscription when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppTerminationNotificationSubscription v_app_termination_notification_subscription; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -1083,15 +1192,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_app_termination_notif_subscription(v_app_termination_notification_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_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1102,8 +1210,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_app_termination_notif_subscription( - mw_app_termination_notif_subscription - ))))) { + v_app_termination_notification_subscription + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); @@ -1116,12 +1224,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_app_termination_notif_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSUB_003_OK /** * @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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1146,9 +1254,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1157,7 +1263,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -1175,11 +1281,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT acknowledges the unsubscribe from service availability event notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppTerminationNotificationSubscription v_app_termination_notification_subscription; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -1194,15 +1301,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_app_termination_notif_subscription(v_app_termination_notification_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_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1211,7 +1317,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); @@ -1229,7 +1335,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @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 - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/APPSAQ/PlatAppSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_APPSUB_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1255,9 +1360,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_delete( PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1266,10 +1369,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1284,12 +1387,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group app_sub - group conf_task { /** * @desc Check that the IUT responds that it has completed the application level termination - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/CONFTASK/ConfirmTasks.tplan2 */ testcase TC_MEC_MEC011_SRV_CONFTASK_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1317,11 +1418,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_message_body_json( m_body_json_app_termination_confirmation( { operationAction := TERMINATING } - ) - ) - ) - ) - ); + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1330,7 +1427,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationConf ***"); @@ -1348,7 +1445,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an operationAction is sent to an unknown application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/CONFTASK/ConfirmTasks.tplan2 */ testcase TC_MEC_MEC011_SRV_CONFTASK_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1376,11 +1472,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_message_body_json( m_body_json_app_termination_confirmation( { operationAction := TERMINATING } - ) - ) - ) - ) - ); + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1389,7 +1481,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] 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 ***"); @@ -1407,7 +1499,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds that the MEC application is up and running - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/CONFTASK/ConfirmTasks.tplan2 */ testcase TC_MEC_MEC011_SRV_CONFTASK_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1435,11 +1526,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_message_body_json( m_body_json_app_ready_confirmation( { indication := "READY" } - ) - ) - ) - ) - ); + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1448,7 +1535,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppReadyConf ***"); @@ -1466,7 +1553,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an indication is sent to an unknown application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/CONFTASK/ConfirmTasks.tplan2 */ testcase TC_MEC_MEC011_SRV_CONFTASK_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1494,11 +1580,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_message_body_json( m_body_json_app_ready_confirmation( { indication := "READY" } - ) - ) - ) - ) - ); + ))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1507,7 +1589,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] 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 ***"); @@ -1532,7 +1614,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with a list of active DNS rules when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1586,9 +1667,61 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_DNS_001_OK + /** + * @desc Check that the IUT responds with a list of active DNS rules when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_DNS_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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules", + 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 DnsRuleList ***"); + 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_MEC011_SRV_DNS_001_NF + /** * @desc Check that the IUT responds with the information on a specific DNS rule when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1646,7 +1779,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 */ testcase TC_MEC_MEC011_SRV_DNS_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1696,18 +1828,996 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_DNS_002_NF + } // End of testcase TC_MEC_MEC011_SRV_DNS_002_NF + + /** + * @desc Check that the IUT updates a specific DNS rule when commanded by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_DNS_003_OK() 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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + // TODO If-Match header needs to have a PROPER_ETAG + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_DNS_RULE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_dns_rule( + m_dns_rule( + PX_DNS_RULE_ID + ) + ) + ) + ) + ) + ); + 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_dns_rule( + mw_dns_rule( + PX_DNS_RULE_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DnsRule ***"); + 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_MEC011_SRV_DNS_003_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_MEC011_SRV_DNS_003_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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + // TODO If-Match header needs to have a PROPER_ETAG + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_DNS_RULE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_dns_rule( + m_dns_rule( + PX_DNS_RULE_ID, + -, -, -, -, + PX_DNS_INVALID_STATE + ) + ) + ) + ) + ) + ); + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_DNS_003_BR + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_DNS_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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + // TODO If-Match header needs to have a PROPER_ETAG + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_NON_EXISTENT_DNS_RULE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_dns_rule( + m_dns_rule( + PX_DNS_RULE_ID, + -, -, + PX_INVALID_IP_ADDRESS + ) + ) + ) + ) + ) + ); + 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 ProblemDetails set to 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_MEC011_SRV_DNS_003_NF + + /** + * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition + */ + testcase TC_MEC_MEC011_SRV_DNS_003_PF() 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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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); + // If-Match header needs to have an INVALID_ETAG + f_set_headers_list({ "If-Match" }, { int2str(f_get_current_timestamp_utc()) }, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_DNS_RULE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_dns_rule( + m_dns_rule( + PX_DNS_RULE_ID, + -, -, + PX_IP_ADDRESS + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_412_precondition_failed + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***"); + 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_MEC011_SRV_DNS_003_PF + + } // End of group app_dns + + group msl { + + /** + * @desc Check that the IUT responds with the liveness of a MEC service instance when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MSL_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_service_info(v_service_info, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LINK_LIV, + 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_srv_liveness_info( + mw_service_liveness_info( + ACTIVE + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceLivenessInfo ***"); + 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_service_info(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MSL_001_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_MEC011_SRV_MSL_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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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_LINK_LIV, + 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 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_MEC011_SRV_APPSUB_002_OK + + /** + * @desc Check that the IUT updates the liveness of a MEC service instance when requested by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MSL_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_service_info(v_service_info, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_LINK_LIV, + v_headers, + m_http_message_body_json( + m_body_json_srv_liveness_info( + m_service_liveness_info( + ACTIVE, + m_time_stamp( + f_get_current_timestamp_utc() + ), + 10 + )))))); + 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_srv_liveness_info( + mw_service_liveness_info( + ACTIVE + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a new ServiceLivenessInfo ***"); + 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_service_info(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MSL_002_OK + + /** + * @desc Check that the IUT responds with an error when incorrect parameters were sent by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MSL_002_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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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_patch( + PICS_ROOT_API & PX_LINK_LIV, + v_headers, + m_http_message_body_json( + m_body_json_srv_liveness_info( + m_service_liveness_info( + INACTIVE, + m_time_stamp( + f_get_current_timestamp_utc() + ), + 10 + )))))); + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MSL_002_BR + + } // End of group msl + + group reg_apps { + + /** + * @desc Check that the IUT acknowledges the registration by a MEC Application to the MEC platform + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, -, + -, + m_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + mw_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: Location header not present ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); + 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_app_deletion(v_response.response.body.json_body.appInfo_regapps.appInstanceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_01 + + /** + * @desc Check that the IUT acknowledges the registration by a MEC Application to the MEC platform + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + m_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + mw_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: Location header not present ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); + 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_app_deletion(v_response.response.body.json_body.appInfo_regapps.appInstanceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_02 + + /** + * @desc Check that the IUT acknowledges the registration by a MEC Application instanciated by the MEC platform + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + m_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + mw_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: Location header not present ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_value; + f_get_header(v_response.response.header, "Location", v_header_value); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppInfo ***"); + 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_app_deletion(v_response.response.body.json_body.appInfo_regapps.appInstanceId); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_OK_03 + + /** + * @desc Check that the IUT responds with an error message when the IUT received a registration with missing fields from a MEC Application instanciated by the MEC platform + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, -, + -, // appInstanceId shall be provided as isInsByMec is set to true + -, -, -, -, -, + true + )))))); + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_01 + + /** + * @desc Check that the IUT responds with an error message when the IUT received a registration with missing fields from a MEC Application instanciated by the MEC platform + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, -, -, -, -, + false + + )))))); + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_03 + + /** + * @desc Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appServiceRequired + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, + { + m_service_dependency( + PX_NON_EXISTENT_SERVICE_ID, + PX_SERVICE_INFO_VERSION + ) + } + + + )))))); + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_03 + + /** + * @desc Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appServiceOptional + */ + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_04() 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_APP_ENABLEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_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_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, + -, + { + m_service_dependency( + PX_NON_EXISTENT_SERVICE_ID, + PX_SERVICE_INFO_VERSION + ) + } + + + )))))); + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_04 /** - * @desc Check that the IUT updates a specific DNS rule when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 + * @desc Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appFeatureRequired */ - testcase TC_MEC_MEC011_SRV_DNS_003_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_05() 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_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -1719,23 +2829,29 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - // TODO If-Match header needs to have a PROPER_ETAG f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_DNS_RULE_ID, "UTF-8")), + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, v_headers, m_http_message_body_json( - m_body_json_dns_rule( - m_dns_rule( - PX_DNS_RULE_ID - ) - ) - ) - ) - ) - ); + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, + -, + -, + { + m_feature_dependency( + "", + "" + ) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1743,15 +2859,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_dns_rule( - mw_dns_rule( - PX_DNS_RULE_ID - )))))) { + mw_http_response_400_bad_request + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a DnsRule ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1762,13 +2874,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_DNS_003_OK + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_05 /** - * @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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 + * @desc Check that the IUT responds with an error message when the IUT received by a MEC Application registration with unexpected appFeatureOptional + */ - testcase TC_MEC_MEC011_SRV_DNS_003_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_06() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; @@ -1785,26 +2897,30 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - // TODO If-Match header needs to have a PROPER_ETAG f_init_default_headers_list(-, -, v_headers); - httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_DNS_RULE_ID, "UTF-8")), + m_http_request_post( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI, v_headers, m_http_message_body_json( - m_body_json_dns_rule( - m_dns_rule( - PX_DNS_RULE_ID, - -, -, -, -, - PX_DNS_INVALID_STATE - ) - ) - ) - ) - ) - ); + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, + PX_APP_D_ID, + PX_APP_INSTANCE_ID, + -, + -, + -, + -, + { + m_feature_dependency( + "", + "" + ) + } + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1812,11 +2928,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_400_bad_request + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1827,18 +2943,18 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_DNS_003_BR + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_001_BR_06 /** - * @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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 + * @desc Check that the IUT responds with the AppInfo description when queried by a MEC Application */ - testcase TC_MEC_MEC011_SRV_DNS_003_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppInfo v_app_info; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -1850,25 +2966,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble - // TODO If-Match header needs to have a PROPER_ETAG + f_app_registration(v_app_info, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_NON_EXISTENT_DNS_RULE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_dns_rule( - m_dns_rule( - PX_DNS_RULE_ID, - -, -, - PX_INVALID_IP_ADDRESS - ) - ) - ) - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(v_app_info.appInstanceId, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1876,11 +2981,18 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + v_app_info/*mw_app_info( + v_app_info.appName, + -, -, + v_app_info.appDId, + v_app_info.appInstanceId*/ + ))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct AppInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1890,19 +3002,19 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_app_deletion(v_app_info.appInstanceId); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_DNS_003_NF + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_002_OK /** - * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/DNS/PlatDnsRules.tplan2 + * @desc Check that the IUT responds with an error when when it receives a request for returning an AppInfo with a wrong ID */ - testcase TC_MEC_MEC011_SRV_DNS_003_PF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_002_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_APP_ENABLEMENT_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; @@ -1915,25 +3027,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - // If-Match header needs to have an INVALID_ETAG - f_set_headers_list({ "If-Match" }, { int2str(f_get_current_timestamp_utc()) }, v_headers); httpPort.send( m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/dns_rules/" & oct2char(unichar2oct(PX_DNS_RULE_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_dns_rule( - m_dns_rule( - PX_DNS_RULE_ID, - -, -, - PX_IP_ADDRESS - ) - ) - ) - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1941,11 +3040,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_412_precondition_failed - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1956,19 +3055,15 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_DNS_003_PF - - } // End of group app_dns - - group liv { + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_002_NF /** - * @desc Check that the IUT responds with the liveness of a MEC service instance when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/Liveness.tplan2 + * @desc Check that the IUT responds with 204 No Content when queried to update MEC Application registration */ - testcase TC_MEC_MEC011_SRV_MSL_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppInfo v_app_info; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -1983,15 +3078,23 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_app_registration(v_app_info, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & "/" & PX_LINK_LIV, - v_headers - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(v_app_info.appInstanceId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + v_app_info.appName, + v_app_info.appProvider, + -, + v_app_info.appDId, + v_app_info.appInstanceId, + v_app_info.endpoint + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2001,13 +3104,18 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_srv_liveness_info( - mw_service_liveness_info( - ACTIVE - )))))) { + mw_body_json_app_info_regapps( + mw_app_info( + v_app_info.appName, + v_app_info.appProvider, + -, + v_app_info.appDId, + v_app_info.appInstanceId, + v_app_info.endpoint + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceLivenessInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2017,16 +3125,17 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_app_deletion(v_app_info.appInstanceId); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_MSL_001_OK + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_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 - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/Liveness.tplan2 + * @desc Check that the IUT responds with an error when queried to update MEC Application registration with a wrong ID */ - testcase TC_MEC_MEC011_SRV_MSL_001_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppInfo v_app_info; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2041,15 +3150,22 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_app_registration(v_app_info, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & "/" & PX_LINK_LIV, - v_headers - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + v_app_info.appName, + v_app_info.appProvider, + -, + v_app_info.appDId, + v_app_info.appInstanceId + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2057,8 +3173,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); @@ -2071,16 +3187,17 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_app_deletion(v_app_info.appInstanceId); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_APPSUB_002_OK + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_003_NF /** - * @desc Check that the IUT updates the liveness of a MEC service instance when requested by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/Liveness.tplan2 + * @desc Check that the IUT responds with 204 No Content when queried to delete an existing MEC Application registration */ - testcase TC_MEC_MEC011_SRV_MSL_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var AppInfo v_app_info; // Test control if (not(PICS_MEC_PLAT) or not (PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2095,26 +3212,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_app_registration(v_app_info, v_headers); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_patch( - PICS_ROOT_API & "/" & PX_LINK_LIV, - v_headers, - m_http_message_body_json( - m_body_json_srv_liveness_info( - m_service_liveness_info( - ACTIVE, - m_time_stamp( - f_get_current_timestamp_utc() - ), - 10 - ) - ) - ) - ) - ) - ); + m_http_request_delete( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(v_app_info.appInstanceId, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2122,15 +3227,11 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_srv_liveness_info( - mw_service_liveness_info( - ACTIVE - )))))) { + mw_http_response_204_no_content + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a new ServiceLivenessInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2141,13 +3242,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_MSL_002_OK + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_004_OK /** - * @desc Check that the IUT responds with an error when incorrect parameters were sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/Liveness.tplan2 + * @desc Check that the IUT responds with an error when queried to delete an unknown MEC Application registration */ - testcase TC_MEC_MEC011_SRV_MSL_002_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC011_SRV_REGAPPS_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; @@ -2167,23 +3267,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_patch( - PICS_ROOT_API & "/" & PX_LINK_LIV, - v_headers, - m_http_message_body_json( - m_body_json_srv_liveness_info( - m_service_liveness_info( - INACTIVE, - m_time_stamp( - f_get_current_timestamp_utc() - ), - 10 - ) - ) - ) - ) - ) - ); + m_http_request_delete( + PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2191,8 +3278,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); @@ -2206,9 +3293,9 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC011_SRV_MSL_002_BR + } // End of testcase TC_MEC_MEC011_SRV_REGAPPS_004_NF - } // End of group liv + } // End of group reg_apps /* * Service Availability Query (SAQ) @@ -2217,7 +3304,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with a list of available MEC services when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SAQ/PlatServices.tplan2 */ testcase TC_MEC_MEC011_SRV_SAQ_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2242,9 +3328,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2255,7 +3339,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_service_info_list - )))) { + )))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfoList ***"); @@ -2273,7 +3357,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SAQ/PlatServices.tplan2 */ testcase TC_MEC_MEC011_SRV_SAQ_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2299,9 +3382,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "?instance_id=" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2310,10 +3391,10 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request() - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2328,11 +3409,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific service when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SAQ/PlatServices.tplan2 */ testcase TC_MEC_MEC011_SRV_SAQ_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2347,11 +3429,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_service_info(v_service_info, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & oct2char(unichar2oct(PX_SERVICE_ID, "UTF-8")), + PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & v_subscription_id, v_headers ) ) @@ -2366,9 +3449,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_service_info( - mw_service_info( - PX_SERVICE_ID - )))))) { + v_service_info + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo ***"); @@ -2381,12 +3463,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_service_info(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_SAQ_002_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 - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SAQ/PlatServices.tplan2 */ testcase TC_MEC_MEC011_SRV_SAQ_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2411,9 +3493,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_MEC_SVC_MGMT_SVC_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2422,7 +3502,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -2440,19 +3520,19 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group saq - /* - * Service Subscriptions (SRVSUB) - */ + /* + * Service Subscriptions (SRVSUB) + */ group srv_sub { /** * @desc Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var SerAvailabilityNotificationSubscription v_ser_availability_notification_subscription; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2468,15 +3548,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); + f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription, v_subscription_id); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2488,7 +3566,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_message_body_json( mw_body_json_subscription_link_list( mw_subscription_link_list - ))))) { + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a Mp1SubscriptionLinkList ***"); @@ -2501,13 +3579,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_ser_availability_notification_subscription(v_ser_availability_notification_subscription); + f_delete_ser_availability_notification_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_SRVSUB_001_OK /** * @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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2530,7 +3607,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers ) ) @@ -2561,12 +3638,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on service availability events - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_002_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_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2585,18 +3662,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers, m_http_message_body_json( m_body_json_srv_avail_notif_subscription( m_srv_avail_notif_subscription( PX_SRV_AVAIL_NOTIF_CALLBACK_URI - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2609,15 +3681,25 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_body_json_srv_avail_notif_subscription( mw_srv_avail_notif_subscription( PX_SRV_AVAIL_NOTIF_CALLBACK_URI - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; - if (f_check_headers(valueof(v_response.response.header)) == true) { + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in creating service ***"); + 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_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); + + // TODO how to test this as the notification is for another MEC Application? log("*** " & testcasename() & ": PASS: IUT successfully responds with a SerAvailabilityNotificationSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } } [] tc_ac.timeout { @@ -2627,13 +3709,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_ser_availability_notification_subscription(v_response.response.body.json_body.serAvailabilityNotificationSubscription); + f_delete_ser_availability_notification_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_APPSUB_002_OK /** * @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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2657,7 +3738,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers, m_http_message_body_json( m_body_json_srv_avail_notif_subscription( @@ -2680,7 +3761,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2695,13 +3776,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific subscription when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var SerAvailabilityNotificationSubscription v_ser_availability_notification_subscription; - var charstring v_uri; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2716,21 +3796,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); - f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_ser_availability_notification_subscription.links.self_.href)), - "?+(" & PX_MEC_SVC_MGMT_APPS_URI & "/?*)", - 0 - ); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & v_uri, + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; @@ -2740,9 +3813,8 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_srv_avail_notif_subscription( - mw_srv_avail_notif_subscription( - v_ser_availability_notification_subscription.callbackReference - )))))) { + v_ser_availability_notification_subscription + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a SerAvailabilityNotificationSubscription ***"); @@ -2755,13 +3827,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_ser_availability_notification_subscription(v_ser_availability_notification_subscription); + f_delete_ser_availability_notification_subscription(v_subscription_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC011_SRV_SRVSUB_003_OK /** * @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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2784,7 +3855,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) @@ -2815,13 +3886,12 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT acknowledges the unsubscribe from service availability event notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var SerAvailabilityNotificationSubscription v_ser_availability_notification_subscription; - var charstring v_uri; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) { @@ -2836,19 +3906,14 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { // Test adapter configuration // Preamble + f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); - f_create_ser_availability_notification_subscription(v_ser_availability_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_ser_availability_notification_subscription.links.self_.href)), - "?+(" & PX_MEC_SVC_MGMT_APPS_URI & "/?*)", - 0 - ); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & v_uri, + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2857,7 +3922,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); @@ -2875,7 +3940,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @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 - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/SRVSUB/PlatSrvSubscriptions.tplan2 */ testcase TC_MEC_MEC011_SRV_SRVSUB_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2899,7 +3963,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) @@ -2912,7 +3976,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -2930,14 +3994,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group srv_sub - /* - * Timing capabilities (TIME) - */ + /* + * Timing capabilities (TIME) + */ group timing { /** * @desc Check that the IUT responds with timing capabilities when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TIME/PlatTiming.tplan2 */ testcase TC_MEC_MEC011_SRV_TIME_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2997,7 +4060,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with current time when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TIME/PlatTiming.tplan2 */ testcase TC_MEC_MEC011_SRV_TIME_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3057,14 +4119,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group timing - /* - * Traffic rules (TRAF) - */ + /* + * Traffic rules (TRAF) + */ group traffic_rules { /** * @desc Check that the IUT responds with a list of available traffic rules when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3121,7 +4182,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3175,7 +4235,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with the information on a specific traffic rule when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/TrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3233,7 +4292,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT updates a specific traffic rule when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/TrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3302,7 +4360,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_003_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3351,7 +4408,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -3366,7 +4423,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_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/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3430,7 +4486,6 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2 */ testcase TC_MEC_MEC011_SRV_TRAF_003_PF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3495,14 +4550,13 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group traffic_rules - /* - * Transport (TRANS) - */ + /* + * Transport (TRANS) + */ group transport_rules { /** * @desc Check that the IUT responds with a list of available transports when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRANS/PlatTransport.tplan2 */ testcase TC_MEC_MEC011_SRV_TRANS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..56fdf43e234effd09aa21f07cc3546cf3490def9 --- /dev/null +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn @@ -0,0 +1,106 @@ +module AtsMec_EdgePlatformApplicationEnablementAPI_TestControl { + + // LibMec/AppEnablementAPI + import from EdgePlatformApplicationEnablementAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_EdgePlatformApplicationEnablementAPI + import from AtsMec_EdgePlatformApplicationEnablementAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + if (PICS_APP_ENABLEMENT_API_SUPPORTED) { + execute(TC_MEC_MEC011_SRV_APPSAQ_001_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_001_BR()); + execute(TC_MEC_MEC011_SRV_APPSAQ_001_NF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_002_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_002_BR()); + execute(TC_MEC_MEC011_SRV_APPSAQ_002_NF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_003_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_003_NF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_004_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_004_BR()); + execute(TC_MEC_MEC011_SRV_APPSAQ_004_NF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_004_PF()); + execute(TC_MEC_MEC011_SRV_APPSAQ_005_OK()); + execute(TC_MEC_MEC011_SRV_APPSAQ_005_NF()); + + execute(TC_MEC_MEC011_SRV_APPSUB_001_OK()); + execute(TC_MEC_MEC011_SRV_APPSUB_001_NF()); + execute(TC_MEC_MEC011_SRV_APPSUB_002_OK()); + execute(TC_MEC_MEC011_SRV_APPSUB_002_BR()); + execute(TC_MEC_MEC011_SRV_APPSUB_003_OK()); + execute(TC_MEC_MEC011_SRV_APPSUB_003_NF()); + execute(TC_MEC_MEC011_SRV_APPSUB_004_OK()); + execute(TC_MEC_MEC011_SRV_APPSUB_004_NF()); + + execute(TC_MEC_MEC011_SRV_CONFTASK_001_OK()); + execute(TC_MEC_MEC011_SRV_CONFTASK_001_NF()); + execute(TC_MEC_MEC011_SRV_CONFTASK_002_OK()); + execute(TC_MEC_MEC011_SRV_CONFTASK_002_NF()); + + execute(TC_MEC_MEC011_SRV_DNS_001_OK()); + execute(TC_MEC_MEC011_SRV_DNS_001_NF()); + execute(TC_MEC_MEC011_SRV_DNS_002_OK()); + execute(TC_MEC_MEC011_SRV_DNS_002_NF()); + execute(TC_MEC_MEC011_SRV_DNS_003_OK()); + execute(TC_MEC_MEC011_SRV_DNS_003_BR()); + execute(TC_MEC_MEC011_SRV_DNS_003_NF()); + execute(TC_MEC_MEC011_SRV_DNS_003_PF()); + + execute(TC_MEC_MEC011_SRV_MSL_001_OK()); + execute(TC_MEC_MEC011_SRV_MSL_001_NF()); + execute(TC_MEC_MEC011_SRV_MSL_002_OK()); + execute(TC_MEC_MEC011_SRV_MSL_002_BR()); + + execute(TC_MEC_MEC011_SRV_REGAPPS_001_OK_01()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_OK_02()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_OK_03()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_01()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_02()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_03()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_04()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_05()); + execute(TC_MEC_MEC011_SRV_REGAPPS_001_BR_06()); + execute(TC_MEC_MEC011_SRV_REGAPPS_002_OK()); + execute(TC_MEC_MEC011_SRV_REGAPPS_002_NF()); + execute(TC_MEC_MEC011_SRV_REGAPPS_003_OK()); + execute(TC_MEC_MEC011_SRV_REGAPPS_003_NF()); + execute(TC_MEC_MEC011_SRV_REGAPPS_004_OK()); + execute(TC_MEC_MEC011_SRV_REGAPPS_004_NF()); + + execute(TC_MEC_MEC011_SRV_SAQ_001_OK()); + execute(TC_MEC_MEC011_SRV_SAQ_001_BR()); + execute(TC_MEC_MEC011_SRV_SAQ_002_OK()); + execute(TC_MEC_MEC011_SRV_SAQ_002_NF()); + + execute(TC_MEC_MEC011_SRV_SRVSUB_001_OK()); + execute(TC_MEC_MEC011_SRV_SRVSUB_001_NF()); + execute(TC_MEC_MEC011_SRV_SRVSUB_002_OK()); + execute(TC_MEC_MEC011_SRV_SRVSUB_002_BR()); + execute(TC_MEC_MEC011_SRV_SRVSUB_003_OK()); + execute(TC_MEC_MEC011_SRV_SRVSUB_003_NF()); + execute(TC_MEC_MEC011_SRV_SRVSUB_004_OK()); + execute(TC_MEC_MEC011_SRV_SRVSUB_004_NF()); + + execute(TC_MEC_MEC011_SRV_TIME_001_OK()); + execute(TC_MEC_MEC011_SRV_TIME_002_OK()); + + execute(TC_MEC_MEC011_SRV_TRAF_001_OK()); + execute(TC_MEC_MEC011_SRV_TRAF_001_NF()); + execute(TC_MEC_MEC011_SRV_TRAF_002_OK()); + execute(TC_MEC_MEC011_SRV_TRAF_003_OK()); + execute(TC_MEC_MEC011_SRV_TRAF_003_BR()); + execute(TC_MEC_MEC011_SRV_TRAF_003_NF()); + execute(TC_MEC_MEC011_SRV_TRAF_003_PF()); + + execute(TC_MEC_MEC011_SRV_TRANS_001_OK()); + } + } + + } // End of 'control' statement + +} // End of module AtsMec_EdgePlatformApplicationEnablementAPI_TestControl diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..25ab67bd3a7ece1378b4497d7575085a840112ef --- /dev/null +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_EdgePlatformApplicationEnablement + +sources := \ + AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn \ + AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cda5f3b6074b6082a95648a0c7660da401cd52b6 --- /dev/null +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn @@ -0,0 +1,1927 @@ +module AtsMec_FederationEnablementAPI_TestCases { + + // Libcommon + 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/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_Templates all; + + // LibMec/FederationEnablementAPI + import from FederationEnablementAPI_TypesAndValues all; + import from FederationEnablementAPI_Templates all; + import from FederationEnablementAPI_Functions all; + import from FederationEnablementAPI_Pics all; + import from FederationEnablementAPI_Pixits all; + + // LibMec + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + group lookup { + + /** + * @desc Check that the IUT responds with a list of all available systemInfo when requested by a MEC Orchestrator - No query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO, + 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_fed_system_info_list( + { + *, + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_01 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemId query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_02 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemId query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")) & "&systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_03 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemId query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=", + 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_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_04 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemName query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_1, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_05 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemName query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_06() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_1, "UTF-8")) & "&systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_2, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_06 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemName query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_07() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=", + 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_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_07 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - systemProvider query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_08() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_1, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_08 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple systemProvider query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_09() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_1, "UTF-8")) & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_2, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_09 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty systemProvider query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_10() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=", + 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_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_10 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_001_OK_11() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")) & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_3, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info_list( + { + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + ), + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_11 + + /** + * @desc Check that the IUT responds with an error when selection is not applicable - SystemId + */ + testcase TC_MEC_MEC040_SRV_MEF_001_NF_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_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_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_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_UNKNOWN, "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 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_MEC040_SRV_MEF_001_NF_01 + + /** + * @desc Check that the IUT responds with an error when selection is not applicable - SystemName + */ + testcase TC_MEC_MEC040_SRV_MEF_001_NF_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_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_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_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(PX_FED_SYSTEM_NAME_UNKNOWN, "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 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_MEC040_SRV_MEF_001_NF_02 + + /** + * @desc Check that the IUT responds with an error when selection is not applicable - SystemProvider + */ + testcase TC_MEC_MEC040_SRV_MEF_001_NF_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_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_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_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_UNKNOWN, "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 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_MEC040_SRV_MEF_001_NF_03 + + /** + * @desc Check that the IUT responds with an error when request is malformed + */ + testcase TC_MEC_MEC040_SRV_MEF_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_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_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_FED_API_LIST_SYSTEM_INFO & "?system=" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")), // system instead of systemId + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_BR + + } // End of group lookup + + group subscription { + + /** + * @desc Check that the IUT creates a new systemInfo when requested by a MEC Orchestrator + */ + testcase TC_MEC_MEC040_SRV_MEF_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_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_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info( + m_system_info( + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_PROVIDER_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds the success 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_system_info(v_response.response.body.json_body.systemInfo); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_002_OK + + /** + * @desc Check that the IUT responds with an error on creating an existing systemInfo + */ + testcase TC_MEC_MEC040_SRV_MEF_002_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var SystemInfo v_system_info := valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info(v_system_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info( + m_system_info( // Already created + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_PROVIDER_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with yhe 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_system_info(v_system_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_002_BR_01 + + /** + * @desc Check that the IUT responds with an error on creating an existing systemInfo + */ + testcase TC_MEC_MEC040_SRV_MEF_002_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var SystemInfo v_system_info := valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info(v_system_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info( + m_system_info( + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_ID_1 // Shall be omitted + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with yhe 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_system_info(v_system_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_002_BR_02 + + /** + * @desc Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator + */ + testcase TC_MEC_MEC040_SRV_MEF_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_2, + PX_FED_SYSTEM_ID_2 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct SystemInfo entry ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_003_OK + + /** + * @desc Check that the IUT responds with an error when it receives a request for returning a systemInfo referred with a wrong systemId + */ + testcase TC_MEC_MEC040_SRV_MEF_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_3, "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 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_003_NF + + /** + * @desc Check that the IUT responds with an error when it receives a request with an inconsistant URI + */ + testcase TC_MEC_MEC040_SRV_MEF_003_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB_WRONG & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")), // Inconsistent 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 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_003_BR + + } // End of group subscription + + group patch { + + /** + * @desc Check that the IUT updates the systemInfo when requested by a MEC Orchestrator + */ + testcase TC_MEC_MEC040_SRV_MEF_004_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + -, + m_end_point_uris( + { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } + ))))))); + 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_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_2 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_OK_01 + + /** + * @desc Check that the IUT updates the systemInfo when requested by a MEC Orchestrator + */ + testcase TC_MEC_MEC040_SRV_MEF_004_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + PX_FED_SYSTEM_NAME_1 & "_patched" + )))))); + 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_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_1 & "_patched", + PX_FED_SYSTEM_ID_2 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_OK_02 + + /** + * @desc Check that the IUT updates the systemInfo when requested by a MEC Orchestrator + */ + testcase TC_MEC_MEC040_SRV_MEF_004_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + PX_FED_SYSTEM_NAME_1 & "_patched", + m_end_point_uris( + { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } + ))))))); + 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_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_2, + PX_FED_SYSTEM_NAME_1 & "_patched", + PX_FED_SYSTEM_ID_2 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***"); + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_OK_03 + + /** + * @desc Check that the IUT responds with an error when requested to update an unknown systemInfo + */ + testcase TC_MEC_MEC040_SRV_MEF_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + -, + m_end_point_uris( + { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } + ))))))); + 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 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_NF + + /** + * @desc Check that the IUT responds with an error when requested to update with an inconsistant URI + */ + testcase TC_MEC_MEC040_SRV_MEF_004_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB_WRONG & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), // v10 instead of v1 + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update( + -, + m_end_point_uris( + { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } + ))))))); + 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 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_BR_01 + + /** + * @desc Check that the IUT responds with an error when requested to update with no data provided + */ + testcase TC_MEC_MEC040_SRV_MEF_004_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info_update( + m_system_info_update // No data provided + ))))); + 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 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_BR_02 + + } // End of group patch + + group delete { + + /** + * @desc Check that the IUT deletes the systemInfo when requested by a MEC Orchestrator + */ + testcase TC_MEC_MEC040_SRV_MEF_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2)), + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_ID_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // 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 responds with 204 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_005_OK + + /** + * @desc Check that the IUT responds with an error when requested to delete an unknown systemInfo + */ + testcase TC_MEC_MEC040_SRV_MEF_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_system_info_list(v_system_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "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 the correct error code ***"); + v_system_info_list[1].systemId := omit; + 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_system_info_list(v_system_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_005_NF + + } // End of group delete + +} // End of module AtsMec_FederationEnablementAPI_TestCases diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f5634c795278c1732c8ee773905bbda0d62a6861 --- /dev/null +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn @@ -0,0 +1,59 @@ +module AtsMec_FederationEnablementAPI_TestControl { + + // LibMec/FederationEnablementAPI + import from FederationEnablementAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_FederationEnablementAPI + import from AtsMec_FederationEnablementAPI_TestCases all; + + control { + + if (PICS_FED_API_SUPPORTED) { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + execute(TC_MEC_MEC040_SRV_MEF_001_OK_01()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_02()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_03()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_04()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_05()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_06()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_07()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_08()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_09()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_10()); + execute(TC_MEC_MEC040_SRV_MEF_001_OK_11()); + + execute(TC_MEC_MEC040_SRV_MEF_001_NF_01()); + execute(TC_MEC_MEC040_SRV_MEF_001_NF_02()); + execute(TC_MEC_MEC040_SRV_MEF_001_NF_03()); + + execute(TC_MEC_MEC040_SRV_MEF_001_BR()); + + execute(TC_MEC_MEC040_SRV_MEF_002_OK()); + execute(TC_MEC_MEC040_SRV_MEF_002_BR_01()); + execute(TC_MEC_MEC040_SRV_MEF_002_BR_02()); + + execute(TC_MEC_MEC040_SRV_MEF_003_OK()); + execute(TC_MEC_MEC040_SRV_MEF_003_NF()); + execute(TC_MEC_MEC040_SRV_MEF_003_BR()); + + execute(TC_MEC_MEC040_SRV_MEF_004_OK_01()); + execute(TC_MEC_MEC040_SRV_MEF_004_OK_02()); + execute(TC_MEC_MEC040_SRV_MEF_004_OK_03()); + + execute(TC_MEC_MEC040_SRV_MEF_004_NF()); + execute(TC_MEC_MEC040_SRV_MEF_004_BR_01()); + execute(TC_MEC_MEC040_SRV_MEF_004_BR_02()); + + execute(TC_MEC_MEC040_SRV_MEF_005_OK()); + execute(TC_MEC_MEC040_SRV_MEF_005_NF()); + } + + } + + } // End of 'control' statement + +} // End of module AtsMec_FederationEnablementAPI_TestControl diff --git a/ttcn/AtsMec_FederationEnablement/module.mk b/ttcn/AtsMec_FederationEnablement/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..2310374076a61668e17a2595a3bddfb382e5cbb4 --- /dev/null +++ b/ttcn/AtsMec_FederationEnablement/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_FederationEnablement + +sources := \ + AtsMec_FederationEnablementAPI_TestCases.ttcn \ + AtsMec_FederationEnablementAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/IoTAPI \ + ../LibMec/FederationEnablementAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn index 8655817e4f184f7bf4ee9370bf62d46f3976d2ce..9a328e877c935df4781261ed3a03e7914cc2cdbd 100644 --- a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn @@ -7,64 +7,64 @@ * 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 029 V2.1.1 + * @see ETSI GS MEC 003, ETSI GS MEC 029 V2.2.1 */ module AtsMec_FixedAccessInformationServiceAPI_TestCases { - + // 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_FixedAccessInformationServiceAPI + import from FixedAccessInformationServiceAPI_TypesAndValues all; import from FixedAccessInformationServiceAPI_Templates all; + import from FixedAccessInformationServiceAPI_Functions all; import from FixedAccessInformationServiceAPI_Pics all; import from FixedAccessInformationServiceAPI_Pixits all; - + // LibMec + import from LibMec_Templates all; import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; - + /* * Fixed Access Information Service (FAIS) */ group fixedAccessInfoService { - + /** * @desc Check that the IUT responds with the current status of the fixed access information when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } + testcase TC_MEC_MEC029_SRV_FAIS_001_OK() 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_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } // Preamble f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( + m_http_request_get( PX_FAI_FA_INFO_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -74,9 +74,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_fai_fa_info( mw_fa_info - ))))) { + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a FaInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -85,82 +85,79 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_001_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_001_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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( - PX_FAI_FA_INFO_URI & "?interface=1", - 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 - )) { + testcase TC_MEC_MEC029_SRV_FAIS_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_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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( + PX_FAI_FA_INFO_URI & "?if=1", + 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 successfully responds with a ProblemDetails set to 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } + } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_001_BR - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_001_BR + /** * @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 TP_MEC_MEC029_SRV_FAIS_001_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC029_SRV_FAIS_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_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration // Preamble @@ -168,22 +165,20 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_FA_INFO_URI & "?interface=999", + PICS_ROOT_API & PX_FAI_FA_INFO_URI & "?interface=666", 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() - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -192,43 +187,40 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_001_NF - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_001_NF + /** * @desc Check that the IUT responds with the current status of the device information when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_002_OK() 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_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_DEVICE_INFO_URI, - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI, + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -238,9 +230,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_fai_device_info( mw_device_info - ))))) { + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -249,53 +241,50 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_002_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_002_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_002_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_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_DEVICE_INFO_URI & "?device=__any_value__", - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?dev=__any_value__", + 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 successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -304,28 +293,28 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_002_BR - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_002_BR + /** * @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 TP_MEC_MEC029_SRV_FAIS_002_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC029_SRV_FAIS_002_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_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration // Preamble @@ -333,22 +322,20 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?gwId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_GW_ID[0], "UTF-8")), + PICS_ROOT_API & PX_FAI_DEVICE_INFO_URI & "?gwId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_GW_ID[0], "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 ProblemDetails set to 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -357,56 +344,53 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_002_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_002_NF /** * @desc CCheck that the IUT responds with the current status of the cable line information when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_003_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_003_OK() 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_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_CABLE_LINE_INFO_URI, + PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_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_fai_cable_line_info( - mw_cable_line_info - ))))) { - + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_fai_cable_line_info( + mw_cable_line_info + ))))) { + tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a CableLineInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -415,53 +399,50 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_003_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_003_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_003_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_003_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_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_CABLE_LINE_INFO_URI & "?cm=__any_value__", - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cm=__any_value__", + 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 successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -470,52 +451,49 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_003_BR + } // End of testcase TC_MEC_MEC029_SRV_FAIS_003_BR /** * @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 TP_MEC_MEC029_SRV_FAIS_003_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_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_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_CABLE_LINE_INFO_URI & "?cmId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_CM_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_FAI_CABLE_LINE_INFO_URI & "?cmId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_CM_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 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -524,43 +502,40 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_003_NF - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_003_NF + /** * @desc Check that the IUT responds with the current status of the optical network information when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_004_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_004_OK() 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_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_OPTICAL_NW_INFO_URI, + PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -570,9 +545,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_fai_pon_info( mw_pon_info - ))))) { + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a PonInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -581,60 +556,50 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_004_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_004_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_004_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_004_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_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_OPTICAL_NW_INFO_URI & "?onu=__any_value__", + PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onu=__any_value__", 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 successfully responds with a 400 bad request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -643,59 +608,49 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_004_BR + } // End of testcase TC_MEC_MEC029_SRV_FAIS_004_BR /** * @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 TP_MEC_MEC029_SRV_FAIS_004_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_OPTICAL_NW_INFO_URI & "?onuId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_ONU_ID, "UTF-8")), - v_headers - ) - ) - ); + PICS_ROOT_API & PX_FAI_OPTICAL_NW_INFO_URI & "?onuId=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_ONU_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() - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -704,43 +659,40 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_004_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_004_NF /** * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_005_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration + testcase TC_MEC_MEC029_SRV_FAIS_005_OK() 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_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_SUB_URI, + PICS_ROOT_API & PX_FAI_SUB_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -750,9 +702,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_fai_subscription_link_list( mw_subscription_link_list - ))))) { + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SubscriptionLinkList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -761,52 +713,50 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_005_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_005_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_005_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_005_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_SUB_URI & "?subscription=__any_value", + PICS_ROOT_API & PX_FAI_SUB_URI & "?subscription=__any_value", 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 successfully responds with a 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -815,43 +765,40 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_005_BR + } // End of testcase TC_MEC_MEC029_SRV_FAIS_005_BR /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_005_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_005_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_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_SUB_URI & "?subscription_type=" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_SUB_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTING_FAI_SUB_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -859,9 +806,9 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { 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); } @@ -870,51 +817,48 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_SRV_UEINFOLOOK_001_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_005_NF /** * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on Optical Network Unit alarm events */ - testcase TP_MEC_MEC029_SRV_FAIS_006_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_SUB_URI, + PICS_ROOT_API & PX_FAI_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, // callbackReference - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -922,85 +866,84 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_fai_onu_alarm_subscription_link_list( - mw_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI - )))))) { - // TODO how to send this? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test? - // MEC 029, clause 7.7.3.4 -// the IUT entity sends a vPOST containing -// uri indicating value CALLBACK_URL -// body containing -// OnuAlarmNotification containing -// notificationType set to "OnuAlarmSubscription" -// ; -// ; -// ; -// to the MEC_APP entity + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a OnuAlarmSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + 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_FAI_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a onuAlarmSubscription, 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_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_006_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_006_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_006_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_006_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_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_UE_ZONAL_TRAF_SUB_URI, + PICS_ROOT_API & PX_FAI_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription_bad_request( - PX_ONU_ALARM_SUB_CALLBACK_URI, // callbackReference - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription_bad_request( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); 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 successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1009,43 +952,45 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_006_BR - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_006_BR + /** * @desc Check that the IUT responds with the information on a given subscription when queried by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_007_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1053,11 +998,11 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_fai_onu_alarm_subscription_link_list( - mw_onu_alarm_subscription - ))))) { + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a OnuAlarmSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1066,52 +1011,50 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_007_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_007_OK + /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_007_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_007_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_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_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); } @@ -1120,52 +1063,48 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_007_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_007_NF /** * @desc Check that the IUT updates an existing subscription when commanded by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_008_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - // TODO If-Match header needs to have a PROPER_ETAG + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1173,11 +1112,11 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_fai_onu_alarm_subscription_link_list( - mw_onu_alarm_subscription - ))))) { + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userTrackingSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1186,61 +1125,58 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_008_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_008_OK + /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_008_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_008_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - // TODO If-Match header needs to have a PROPER_ETAG + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, v_headers, m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription_bad_request( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription_bad_request( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); 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 successfully responds with 400 Bad Request ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1249,61 +1185,58 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_008_BR - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_008_BR + /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_008_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_008_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - // TODO If-Match header needs to have a PROPER_ETAG + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers, m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); 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 HTTP error 404 ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1312,59 +1245,56 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_008_NF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_008_NF /** * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition */ - testcase TP_MEC_MEC029_SRV_FAIS_008_PF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_008_PF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - // TODO If-Match header needs to have an INVALID_ETAG + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), - v_headers, - m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm - ) - ) - ) - ) - ) - ); + PICS_ROOT_API & PX_FAI_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_412_precondition_failed - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***"); @@ -1375,52 +1305,53 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_008_PF + } // End of testcase TC_MEC_MEC029_SRV_FAIS_008_PF /** * @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_009_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_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_204_no_content - )) { + )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1429,50 +1360,45 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_009_OK - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_009_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 TP_MEC_MEC029_SRV_FAIS_009_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - "/" & PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + PICS_ROOT_API & PX_FAI_SUB_URI & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1481,7 +1407,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_http_response_404_not_found )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with no 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1490,148 +1416,133 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_onu_alarm_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TP_MEC_MEC029_SRV_FAIS_009_NF - + } // End of testcase TC_MEC_MEC029_SRV_FAIS_009_NF + /** * @desc Check that the IUT sends notification on expiry of Fixed Access Information event subscription to a MEC Application */ - testcase TP_MEC_MEC029_SRV_FAIS_010_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DevInfoSubscription v_dev_info_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration - f_cf_01_http_up(); - + f_cf_01_http_notif_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_FAI_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_fai_onu_alarm_subscription_link_list( - m_onu_alarm_subscription( - PX_ONU_ALARM_SUB_CALLBACK_URI, - m_filter_criteria_onu_alarm, - -, - m_time_stamp(1577836800) - ) - ) - ) - ) - ) - ); + f_create_dev_info_subscription(v_dev_info_subscription, v_subscription_id); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body - tc_ac.start; + tc_wait.start; alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_fai_onu_alarm_subscription_link_list( - mw_onu_alarm_subscription - ))))) { - // TODO Need to check Location header - - // TODO: how to wait for a timeout of (NOW_PLUS_X_SECONDS - guard time)? which guard time value to use? - // MEC 029, clause 5.2.6.2 -// the IUT entity sends a vPOST containing -// uri indicating value CALLBACK_URL -// body containing -// ExpiryNotification containing -// expiryDeadline indicating value NOW_PLUS_X_SECONDS // TODO: how to set this? -// ; -// ; -// ; -// to the MEC_APP entity - tc_ac.stop; + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_FAI_SUB_URI, + -, + mw_http_message_body_json( + mw_body_json_fai_dev_info_subscription( + mw_dev_info_subscription( + PX_DEV_ALARM_SUB_CALLBACK_URI + )))))) { + 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 responds with a DevInfoSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_ac.timeout { + [] tc_wait.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_MEC029_SRV_FAIS_010_OK - + f_delete_dev_info_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC029_SRV_FAIS_010_OK + /** * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications on Optical Network Unit alarm events */ - testcase TP_MEC_MEC029_SRV_FAIS_011_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - + testcase TC_MEC_MEC029_SRV_FAIS_011_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var OnuAlarmSubscription v_onu_alarm_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FAI_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FAI_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); - -// TODO how to generate an event? -// Initial conditions with { -// the IUT entity being_in idle_state and -// the IUT entity having a subscriptions containing, -// subscriptionType indicating value "OnuAlarmSubscription" -// callbackReference indicating value CALLBACK_URL -// ; -// } -// -// // MEC 029, clause 5.2.7 -// Expected behaviour -// ensure that { -// when { -// the IUT entity generates a onu_alarm_event -// } -// then { -// // // MEC 029, clause 5.2.7 -// the IUT entity sends a vPOST containing -// Uri set to CALLBACK_URL -// body containing -// OnuAlarmSubscription containing -// notificationType set to "OnuAlarmSubscription" -// ; -// ; -// ; -// to the MEC_APP entity -// } -// } + f_create_onu_alarm_subscription(v_onu_alarm_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_FAI_SUB_URI, + -, + mw_http_message_body_json( + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_DEV_ALARM_SUB_CALLBACK_URI + )))))) { + 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 responds with a DevInfoSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.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_MEC029_SRV_FAIS_011_OK - + f_delete_onu_alarm_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC029_SRV_FAIS_011_OK + } // End of group fixedAccessInfoService - + } // End of module AtsMec_FixedAccessInformationServiceAPI_TestCases diff --git a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestControl.ttcn b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestControl.ttcn index 8aba18e4c89bf7093e2558af04ae277fa4cda1f8..710a3e45738010e9e05401934af615c47817b688 100644 --- a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestControl.ttcn +++ b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestControl.ttcn @@ -11,8 +11,44 @@ module AtsMec_FixedAccessInformationServiceAPI_TestControl { control { - if (PICS_MEC_PLAT and PICS_FAI_API_SUPPORTED) { - execute(TP_MEC_MEC029_SRV_FAIS_001_OK()); + if (PICS_MEC_PLAT and PICS_FAI_API_SUPPORTED and PICS_FAI_API_SUPPORTED) { + execute(TC_MEC_MEC029_SRV_FAIS_001_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_001_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_001_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_002_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_002_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_002_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_003_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_003_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_003_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_004_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_004_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_004_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_005_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_005_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_005_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_006_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_006_BR()); + + execute(TC_MEC_MEC029_SRV_FAIS_007_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_007_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_008_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_008_BR()); + execute(TC_MEC_MEC029_SRV_FAIS_008_NF()); + execute(TC_MEC_MEC029_SRV_FAIS_008_PF()); + + execute(TC_MEC_MEC029_SRV_FAIS_009_OK()); + execute(TC_MEC_MEC029_SRV_FAIS_009_NF()); + + execute(TC_MEC_MEC029_SRV_FAIS_010_OK()); + + execute(TC_MEC_MEC029_SRV_FAIS_011_OK()); } } // End of 'control' statement diff --git a/ttcn/AtsMec_FixedAccessInformationService/module.mk b/ttcn/AtsMec_FixedAccessInformationService/module.mk index 0d841e45d837c6bab9d3e91e157d03a8de29c85b..5b3e010564ae3ccf6e5b8dd75b34bdd9e6a5918c 100644 --- a/ttcn/AtsMec_FixedAccessInformationService/module.mk +++ b/ttcn/AtsMec_FixedAccessInformationService/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -14,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ @@ -22,10 +22,13 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..60301b6674ddef518e5996ac079cc122b3e0a9b0 --- /dev/null +++ b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn @@ -0,0 +1,1881 @@ +module AtsMec_IoTAPI_TestCases { + + // Libcommon + 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/LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_Templates all; + + // LibMec/IoTAPI + import from IoTAPI_TypesAndValues all; + import from IoTAPI_Templates all; + import from IoTAPI_Functions all; + import from IoTAPI_Pics all; + import from IoTAPI_Pixits all; + + // LibMec + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + group iotdev { + + group lookup { + + /** + * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO, + 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_iot_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + ), + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + -, + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + ), + mw_device_info( + PX_IOT_DEVICE_ID_3, + PX_IOT_DEVICE_AUTH_3, + -, + PX_IOT_DEVICE_SUPI_3, + PX_IOT_DEVICE_IMSI_3 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + 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_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01 + + /** + * @desc Check that the IUT responds with the list of registered IoT devices when queried using a filter by a Service Consumer + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?filter=(eq,enabled,false)", + 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_iot_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + -, + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + 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_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02 + + /** + * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer filtering one field + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?fields=deviceId", + 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_iot_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_3, + PX_IOT_DEVICE_AUTH_3, + -, + PX_IOT_DEVICE_SUPI_3, + PX_IOT_DEVICE_IMSI_3 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + 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_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03 + + /** + * @desc Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer filtering the number of fields and applying a filter to a specific field + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_DEVICE_INFO & "?fields=deviceId&filter=(eq,enabled,false)", + 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_iot_device_info_list( + { + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + -, + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + 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_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04 + + } // End of group lookup + + group subscription { + + /** + * @desc Check that the IUT registers the information of an IoT device when requested by a Service Consumer + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_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_IOT_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_iot_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(valueof(v_response.response.header)) == false) { + log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: IUT successfully create DeviceInfo entry ***"); + 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_device_info(v_response.response.body.json_body.deviceInfo_iot); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK + + /** + * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_002_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_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_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_IOT_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))); + 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_MEC033_IOTS_IOTDEV_002_BR + + /** + * @desc Check that the IUT returns the IoT device information when requested by Service Consumer specifying the device identifier + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_2, + PX_IOT_DEVICE_AUTH_2, + true, // According to Note 3 of 6.2.2-1 table, it cannot be set directly by the service consumer + PX_IOT_DEVICE_SUPI_2, + PX_IOT_DEVICE_IMSI_2 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct DeviceInfo entry ***"); + 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_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_003_OK + + /** + * @desc Check that the IUT returns the IoT device information when requested by Service Consumer specifying the device identifier + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "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 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_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_003_NF + + } // End of group subscribe + + group patch { + + /** + * @desc Check that the IUT updates the information about a registered IoT device when requested by a Service Consumer + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( + m_traffic_rule_descriptor( + PX_TRAFFIC_RULE_ID, + PX_TRAFFIC_FILTERTYPE, + PX_TRAFFIC_RULE_PRIORITY, + m_traffic_filter( + PX_TRAFFIC_FILTER_SRC_ADDRESS, + PX_TRAFFIC_FILTER_DST_ADDRESS, + PX_TRAFFIC_FILTER_SRC_PORT, + PX_TRAFFIC_FILTER_DST_PORT, + PX_TRAFFIC_FILTER_PROTOCOL + ), + PX_TRAFFIC_RULE_ACTION + )); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_1, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))); + 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_iot_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates DeviceInfo entry ***"); + 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_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_OK + + /** + * @desc Check that the IUT returns an error when a Service Consumer requests to update a not registered IoT device + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( + m_traffic_rule_descriptor( + PX_TRAFFIC_RULE_ID, + PX_TRAFFIC_FILTERTYPE, + PX_TRAFFIC_RULE_PRIORITY, + m_traffic_filter( + PX_TRAFFIC_FILTER_SRC_ADDRESS, + PX_TRAFFIC_FILTER_DST_ADDRESS, + PX_TRAFFIC_FILTER_SRC_PORT, + PX_TRAFFIC_FILTER_DST_PORT, + PX_TRAFFIC_FILTER_PROTOCOL + ), + PX_TRAFFIC_RULE_ACTION + )); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + -, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))); + 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 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_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_NF + + /** + * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + var TrafficRuleDescriptor v_traffic_rule_descriptor := valueof( + m_traffic_rule_descriptor( + PX_TRAFFIC_RULE_ID, + PX_TRAFFIC_FILTERTYPE, + PX_TRAFFIC_RULE_PRIORITY, + m_traffic_filter( + PX_TRAFFIC_FILTER_SRC_ADDRESS, + PX_TRAFFIC_FILTER_DST_ADDRESS, + PX_TRAFFIC_FILTER_SRC_PORT, + PX_TRAFFIC_FILTER_DST_PORT, + PX_TRAFFIC_FILTER_PROTOCOL + ), + PX_TRAFFIC_RULE_ACTION + )); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + true, // According to Note 3 of 6.2.2-1 table, it cannot be set directly by the service consumer + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1, + PX_REQUESTED_PLTF_ID, + {v_traffic_rule_descriptor} + )))))); + 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 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_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_004_BR + + } // End of group patch + + group delete { + + /** + * @desc Check that the IUT deregisters an IoT device information when requested by a Service Consumer specifying the IoT registered device identifier + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // 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 responds with 204 code ***"); + v_device_info_list[1].deviceId := ""; + 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_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_005_OK + + /** + * @desc Check that the IUT deregisters an IoT device information when requested by a Service Consumer specifying the IoT registered device identifier + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var DeviceInfoList v_device_info_list := { + valueof(m_device_info(PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, PX_IOT_DEVICE_IMSI_1)), + valueof(m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2)), + valueof(m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_device_info_list(v_device_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "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 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_device_info_list(v_device_info_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_005_NF + + } // End of group delete + + } // End of group iotdev + + group iotpltf { + + group lookup { + + /** + * @desc Check that the IUT responds with the list of registered IoT platforms when queried by a Service Consumer + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_INFO, + 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_iot_iot_platform_info_list( + v_iot_platform_list + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfoList ***"); + 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_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK + + } // End of group lookup + + group subscribe { + + /** + * @desc Check that the IUT registers the information of a new IoT platform when requested by a Service Consumer + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_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_IOT_API_LIST_PLTF_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info( + mw_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + mw_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + mw_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + mw_security_info, + mw_impl_specific_info + ) + } + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a IotPlatformInfoList ***"); + 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_iot_platform_info(v_response.response.body.json_body.iotPlatformInfo); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK + + /** + * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_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_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_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_IOT_API_LIST_PLTF_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info_error( + PX_IOT_PLTF_ID_1 + )))))); + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR + + /** + * @desc Check that the IUT returns the IoT platform information when requested by Service Consumer specifying the IoT platform identifier + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct IotPlatformInfo entry ***"); + 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_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK + + /** + * @desc Check that the IUT returns error when Service Consumer request to retrieve a not registered IoT platform + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_UNKNOWN, "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 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_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF + + } // End of group subscribe + + group patch { + + /** + * @desc Check that the IUT updates the information about a registered IoT platform when requested by a Service Consumer + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_2, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1 & "_patch", + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1, PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )))))); + 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_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1 & "_patch", + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1, PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct IotPlatformInfo entry ***"); + 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_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK + + /** + * @desc Check that the IUT returns an error when a Service Consumer requests to update a not registered IoT platform + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_UNKNOWN, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1 & "_patch", + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1, PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )))))); + 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 the correct IotPlatformInfo entry ***"); + 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_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF + + } // End of group patch + + group delete { + + /** + * @desc Check that the IUT deregisters an IoT platform information when requested by a Service Consumer specifying the registered IoT platform identifier + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_2, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // 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 responds with the correct success code ***"); + v_iot_platform_list[1].iotPlatformId := ""; + 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_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK + + /** + * @desc Check that the IUT returns an error when a Service Consumer request to deregister an IoT platform using incorrect parameters + */ + testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var IotPlatformInfoList v_iot_platform_list := { + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_2, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_2, + PX_MB_TRANSPORTINFO_NAME_2, + PX_MB_TRANSPORTINFO_TYPE_2, + PX_MB_TRANSPORTINFO_PROTOCOL_2, + PX_MB_TRANSPORTINFO_VERSION_2, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_2 }), + m_security_info, + m_impl_specific_info + ) + } + )), + valueof(m_iot_platform_info(PX_IOT_PLTF_ID_3, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_3, + PX_MB_TRANSPORTINFO_NAME_3, + PX_MB_TRANSPORTINFO_TYPE_3, + PX_MB_TRANSPORTINFO_PROTOCOL_3, + PX_MB_TRANSPORTINFO_VERSION_3, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_3 }), + m_security_info, + m_impl_specific_info + ) + } + )) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_IOT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_iot_platform_info_list(v_iot_platform_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(PX_IOT_PLTF_ID_UNKNOWN, "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 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_iot_platform_info_list(v_iot_platform_list); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF + + } // End of group delete + + } // End of group iotpltf + +} // End of module AtsMec_IoTAPI_TestCases diff --git a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..70941a0c912b294507c98a31114d540c13b7b3ea --- /dev/null +++ b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn @@ -0,0 +1,53 @@ +module AtsMec_IoTAPI_TestControl { + + // LibMec/IoTAPI + import from IoTAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_IoTAPI + import from AtsMec_IoTAPI_TestCases all; + + control { + + if (PICS_IOT_API_SUPPORTED) { + + if (PICS_MEC_PLAT and PICS_SERVICES) { + execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04()); + + execute(TC_MEC_MEC033_IOTS_IOTDEV_002_OK()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_002_BR()); + + execute(TC_MEC_MEC033_IOTS_IOTDEV_003_OK()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_003_NF()); + + execute(TC_MEC_MEC033_IOTS_IOTDEV_004_OK()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_004_NF()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_004_BR()); + + execute(TC_MEC_MEC033_IOTS_IOTDEV_005_OK()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_005_NF()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK()); + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK()); + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK()); + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF()); + + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK()); + execute(TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_NF()); + } + } + + } // End of 'control' statement + +} // End of module AtsMec_IoTAPI_TestControl diff --git a/ttcn/AtsMec_IoT/module.mk b/ttcn/AtsMec_IoT/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..36152a9c0d348614edd3513af12eb479fbf1ac10 --- /dev/null +++ b/ttcn/AtsMec_IoT/module.mk @@ -0,0 +1,39 @@ +suite := AtsMec_IoT + +sources := \ + AtsMec_IoTAPI_TestCases.ttcn \ + AtsMec_IoTAPI_TestControl.ttcn + +modules := ../LibCommon \ + ../../titan-test-system-framework/ttcn/LibHelpers \ + ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ + ../../titan-test-system-framework/ttcn/LibJson \ + ../patch_lib_http \ + ../LibMec \ + ../LibMec/LocationAPI \ + ../LibMec/EdgePlatformApplicationEnablementAPI \ + ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ + ../LibMec/TrafficManagementAPI \ + ../LibMec/UEAppInterfaceAPI \ + ../LibMec/UEidentityAPI \ + ../LibMec/V2XInformationServiceAPI \ + ../LibMec/DeviceApplicationInterfaceAPI \ + ../LibMec/WlanInformationAPI \ + ../LibMec/FixedAccessInformationServiceAPI \ + ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/IoTAPI \ + ../LibMec/FederationEnablementAPI \ + ../../titan-test-system-framework/ccsrc/Framework \ + ../../titan-test-system-framework/ccsrc/loggers \ + ../../titan-test-system-framework/ccsrc/Protocols/Http \ + ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ + ../../titan-test-system-framework/ccsrc/Helpers \ + ../../ccsrc/Ports/LibHttp \ + ../../ccsrc/EncDec/LibMec \ + ../../ccsrc/externals \ + ../../ccsrc/Protocols/Http \ + ../../ccsrc/Protocols/Json \ + ../modules/titan.TestPorts.Common_Components.Abstract_Socket \ + diff --git a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn index 58ee7f9ead60d6a69faff5c984863afd4129e9e3..e4f57625f8626fe4d4c703b1992dafced151097a 100644 --- a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn +++ b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / STF569 + * @author ETSI / STF569 / TTF T027 * @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 013 V2.0.3 (2018-10) + * @see ETSI GS MEC 003, Draft ETSI GS MEC 013 V3.1.1 (2018-10) */ module AtsMec_LocationAPI_TestCases { @@ -30,44 +30,42 @@ module AtsMec_LocationAPI_TestCases { // LibMec import from LibMec_Functions all; + import from LibMec_Templates all; import from LibMec_Pics all; import from LibMec_Pixits all; - group ueLocationLookup { - + group radioNodeLocationLookup { + /** - * @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2 - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo + * @desc Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node when queried by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var HttpMessage v_response; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -75,20 +73,13 @@ module AtsMec_LocationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_user_list( - mw_user_list( - ?/*{mw_user_info( - PX_USER, - PX_ACCESS_POINT_ID, - PX_ZONE_ID, - -, - PX_RESOURCE_URL - )}*/, - ? - )))))) { + mw_body_json_access_point_list( + mw_access_point_list( + PX_ZONE_ID + )))))) -> value v_response { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ZoneId ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AccessPoint list containing a ZoneId ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -96,54 +87,106 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK - + } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_OK + /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2 - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo + * @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_MEC013_SRV_RLOCLOOK_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints", + 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 ProblemDetails set to 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_MEC013_SRV_RLOCLOOK_001_NF + + /** + * @desc Check that the IUT responds with the radio nodes when queried by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_RLOCLOOK_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var HttpMessage v_response; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_LIST_URI & "?areaId=" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")), // areaId instead of zoneId + PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints/" & oct2char(unichar2oct(PX_ACCESS_POINT_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_access_point_info( + mw_access_point_info( + PX_ACCESS_POINT_ID + )))))) -> value v_response { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AccessPointInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -151,54 +194,120 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_BR - + } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_002_OK + /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UELOC/PlatUeLocationLookup.tplan2 - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/UserInfo + * @desc Check that the IUT responds with an error when the radio nodes does not exist + */ + testcase TC_MEC_MEC013_SRV_RLOCLOOK_002_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_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 ProblemDetails set to 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_MEC013_SRV_RLOCLOOK_002_NF + + } // End of group radioNodeLocationLookup + + group ueAreaLookup { + + /** + * @desc Check that the IUT responds with a list of UE area subscriptions when queried by a MEC Application - No filter */ - testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LIST_URI & "?zoneId=" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")), + PICS_ROOT_API & PX_LOC_API_AREA_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 - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "UserAreaSubscription", + v_user_area_notification.links_.self_.href + ), + * + } + )))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of UserAreaSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -206,73 +315,67 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_user_area_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_NF - - } // End of group ueLocationLookup - - group ueLocSub { - + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_01 + /** - * @desc Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the location changes - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 + * @desc Check that the IUT responds with a list of UE area subscriptions when queried by a MEC Application - Event filter */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; - + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_user_tracking_subscription( - m_user_tracking_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_USER - ) - ) - ) - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "?event", + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_user_tracking_subscription( - mw_user_tracking_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_USER - )))))) -> value v_response { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "UserAreaSubscription", + v_user_area_notification.links_.self_.href + ), + * + } + )))))) -> value v_response { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of UserAreaSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -280,63 +383,54 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_delete_user_tracking_subscription(v_response.response.body.json_body.userTrackingSubscription); + f_delete_user_area_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK - + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_02 + /** - * @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/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid filter */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "_Invalid", - v_headers, - m_http_message_body_json( - m_body_json_user_tracking_subscription( - m_user_tracking_subscription( - PX_CLIENT_ID_UNKNOWN, - PX_CALLBACK_REF_URL, - PX_USER_UNKNOWN - ) - ) - ) - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "?filter(dummy, "")", + 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 successfully responds with 400 Bad Request ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -344,313 +438,57 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_user_area_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR - + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_001_BR + /** - * @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 + * @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREALOOK_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables - var UserTrackingSubscription v_user_tracking_subscription; var Headers v_headers; - var charstring v_uri; - + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble - f_create_user_tracking_subscription(v_user_tracking_subscription); - v_uri :=regexp( - oct2char(unichar2oct(v_user_tracking_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/(?*)", - 0 - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & v_uri, - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_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_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content ***"); - 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_MEC013_SRV_UELOCSUB_002_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 - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UELOCSUB/PlatUeLocationSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UELOCSUB_002_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_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_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 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_MEC013_SRV_UELOCSUB_002_NF - - } // End of group ueLocSub - - group ueTrackSub { - - /** - * @desc Check that the IUT acknowledges the UE location change subscription request when commanded by a MEC Application and notifies it when the UE changes location - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UETRACKSUB_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_TRACK_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_periodic_notification_subscription( - m_periodic_notification_subscription( - { PX_IP_ADDRESS }, - PX_CALLBACK_REF_URL, - -, -, - PX_USER - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_periodic_notification_subscription( - mw_periodic_notification_subscription( - { PX_IP_ADDRESS }, - PX_CALLBACK_REF_URL, - -, -, - PX_USER, - ? - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***"); - 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_periodic_notification_subscription(v_response.response.body.json_body.periodicNotificationSubscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_001_OK - - /** - * @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/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UETRACKSUB_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_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_TRACK_SUB_URI & "_Invalid", - v_headers, - m_http_message_body_json( - m_body_json_user_tracking_subscription( - m_user_tracking_subscription( - PX_CLIENT_ID_UNKNOWN, - PX_CALLBACK_REF_URL, - PX_USER - ) - ) - ) - ) - ) - ); - 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 successfully responds with 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_001_BR - - /** - * @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 - */ - testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var PeriodicNotificationSubscription v_position_notification_subscription; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_periodic_notification_subscription(v_position_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_position_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/(?*)", - 0 - ); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & v_uri, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_user_area_notification( + v_user_area_notification + ))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds 204 No Content ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct UserAreaNotification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -658,53 +496,51 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_user_area_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_OK - + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_002_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 - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UETRACKSUB/PlatUeTrackingSubscription.tplan2 */ - testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREALOOK_002_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_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + 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 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -712,47 +548,267 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UETRACKSUB_002_NF - - } // End of group ueTrackSub - - group ueInfLook { + } // End of testcase TC_MEC_MEC013_SRV_UEAREALOOK_002_NF + + } // End of group ueAreaLookup + + group ueAreaSubscribe { /** - * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 + * @desc Check that the IUT acknowledges the creation of UE area subscription request when commanded by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01() 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_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_LIST_URI, - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_AREA_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { + m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) + }, + PX_RADIUS + ), + PX_TRACKIMNG_ACCURACY, + PX_CLIENT_ID //clientCorrelator + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_area_notification( + mw_user_area_notification // FIXME To be refined + ))))) -> 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 Area subscription ***"); + 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_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userAreaNotification, 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_user_area_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01 + + /** + * @desc Check that the IUT acknowledges the creation of UE area subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_user_area_subscription(v_user_area_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_user_area_notification( + mw_user_area_notification // FIXME To be refined + ))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + 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 responds with a userAreaNotification ***"); + 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_user_area_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02 + + /** + * @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_MEC013_SRV_UEAREASUB_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_LOC_API_AREA_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + "", // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { + m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) + } + // No radius + ), + PX_TRACKIMNG_ACCURACY, + PX_CLIENT_ID //clientCorrelator + )))))); + 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 successfully responds with 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_BR + + /** + * @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) }, + PX_RADIUS + ), // AreaInfo + PX_TRACKIMNG_ACCURACY // TrackingAccuracy + + + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Test Body tc_ac.start; alt { @@ -760,12 +816,13 @@ module AtsMec_LocationAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_user_list( - mw_user_list(-, ?) - ))))) { + mw_body_json_user_area_subscription( + mw_user_area_subscription(PX_UE_NEW_SUB_CALLBACK_URI + )))))) { + tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with updated subscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -773,53 +830,117 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK - + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK + /** - * @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/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 + * @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_MEC013_SRV_UEINFLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREASUB_002_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_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_LIST_URI & "/invalid/" & oct2char(unichar2oct(PX_USER, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) }, + PX_RADIUS + ), // AreaInfo + PX_TRACKIMNG_ACCURACY // TrackingAccuracy + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request + mw_http_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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_002_NF + + /** + * @desc Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEAREASUB_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserAreaNotification v_user_area_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_area_subscription(v_user_area_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_AREA_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_204_no_content )) { + tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds 400 Bad Request ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -827,43 +948,42 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_BR - + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_003_OK + /** - * @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/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFLOOK/PlatUeInformationLookup.tplan2 + * @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_MEC013_SRV_UEINFLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEAREASUB_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_LOCATION_API_SUPPORTED)) { + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_LIST_URI & "/" & oct2char(unichar2oct(PX_USER_UNKNOWN, "UTF-8")), - v_headers - ) + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -872,8 +992,8 @@ module AtsMec_LocationAPI_TestCases { mw_http_response_404_not_found )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -881,23 +1001,1938 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_001_NF - - } // End of group ueInfLook - - group ueInfSub { + } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_003_NF + + } // End of group ueAreaSubscribe + + group ueDistanceLookup { + + /** + * @desc Check that the IUT responds with the list of UE distance subscriptions to a UE when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserDistanceNotification v_user_distance_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_DISTANCE_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_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "UserDistanceSubscription", + v_user_distance_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 200 OK ***"); + 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_user_distance_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid filter + */ + testcase TC_MEC_MEC013_SRV_UEDISTLOOK_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_LOC_API_DISTANCE_SUB_URI & "?event", + 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 successfully responds with a 200 OK ***"); + 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_MEC013_SRV_UEDISTLOOK_001_BR + + /** + * @desc Check that the IUT responds with the distance to a UE when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTLOOK_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserDistanceNotification v_user_distance_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_DISTANCE_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_user_distance_notification( + v_user_distance_notification + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct UserDistanceNotification ***"); + 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_user_distance_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_002_OK + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTLOOK_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserDistanceNotification v_user_distance_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + 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 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_user_distance_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_002_NF + + } // End of group ueDistanceLookup + + group ueDistanceSubscribe { + + /** + * @desc Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_01() 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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_LOC_API_DISTANCE_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_distance_subscription( + m_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + PX_USER, + { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddress + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + AllWithinDistance, + -, // checkImmediate + PX_CLIENT_ID //clientCorrelator + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_distance_subscription( + mw_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + -, + PX_USER, + { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddressPX_CLIENT_ID, //clientCorrelator + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + AllWithinDistance, + -, // checkImmediate + PX_CLIENT_ID //clientCorrelator + )))))) -> 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 Distance subscription ***"); + 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_LOC_API_DISTANCE_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userDistanceSubscription, 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_user_distance_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_01 + + /** + * @desc Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var UserDistanceNotification v_user_distance_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_user_distance_subscription(v_user_distance_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_user_distance_notification( + v_user_distance_notification + ))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + 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 responds with a userDistanceNotification ***"); + 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_user_distance_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_02 + + /** + * @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_MEC013_SRV_UEDISTSUB_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_LOC_API_DISTANCE_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_distance_subscription( + m_user_distance_subscription( + "", // callbackReference + PX_USER, + { }, // monitoredAddress is empty + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY, + AllWithinDistance, + -, // checkImmediate + PX_CLIENT_ID //clientCorrelator + )))))); + 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 successfully responds with 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_BR + + /** + * @desc Check that the IUT acknowledges the cancellation of UE distance notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserDistanceNotification v_user_distance_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_distance_subscription(v_user_distance_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_DISTANCE_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_204_no_content + )) { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); + 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_MEC013_SRV_UEDISTSUB_002_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_MEC013_SRV_UEDISTSUB_002_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_delete( + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_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 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_MEC013_SRV_UEDISTSUB_002_NF + + } // End of group ueDistanceSubscribe + + group ueInfLook { + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - No Filter + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_LIST_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_user_list( + mw_user_list(-, ?) + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + 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_MEC013_SRV_UEINFLOOK_001_OK_01 + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with one address + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_LIST_URI & "?address=" & PX_IP_ADDRESS, + 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_user_list( + mw_user_list( + { + *, + mw_user_info(PX_IP_ADDRESS), + * + }, + ?) + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + 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_MEC013_SRV_UEINFLOOK_001_OK_02 + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with several addresses + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_LIST_URI & "?address=[" & PX_IP_ADDRESS & "," & PX_IP_ADDRESS_1 & "]", + 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_user_list( + mw_user_list( // FIXME Use superset? + { + *, + mw_user_info(PX_IP_ADDRESS), + mw_user_info(PX_IP_ADDRESS_1), + * + }, + ?) + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + 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_MEC013_SRV_UEINFLOOK_001_OK_03 + + /** + * @desc Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application - Filter with several zoneIds + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_04() 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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLATand PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_LIST_URI & "?zoneId=[" & PX_ZONE_ID & "," & PX_ZONE_ID_1 & "]", + 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_user_list( + mw_user_list( // FIXME Use superset? + { + *, + mw_user_info(-, -, PX_ZONE_ID), + mw_user_info(-, -, PX_ZONE_ID_1), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UserList ***"); + 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_MEC013_SRV_UEINFLOOK_001_OK_04 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_LIST_URI & "?addr=" & PX_IP_ADDRESS, // Wrong name should trigger an error response. + 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 successfully responds 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEINFLOOK_001_BR + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEINFLOOK_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_USERS_LIST_URI & "?address=" & PX_ACR_UNKNOWN_IP, + 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 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_MEC013_SRV_UEINFLOOK_001_OK_001_NF + + } // End of group ueInfLook + + group ueLocationLookup { + + /** + * @desc Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_001_OK() 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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_LOC_API_USERS_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_notification_subscription_list( + mw_notification_subscription_list // FIXME + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of notification subscriptions ***"); + 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_MEC013_SRV_UELOCLOOK_001_OK + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event", + 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_notification_subscription_list( + mw_notification_subscription_list( + -, // FIXME + { + *, + mw_subscription( + v_user_location_event_notification.notificationType, + v_user_location_event_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of notification subscriptions ***"); + 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_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_01 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Periodic + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?periodic", + 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_notification_subscription_list( + mw_notification_subscription_list( + -, // FIXME + { + *, + mw_subscription( + v_user_location_periodic_notification.notificationType, + v_user_location_periodic_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of notification subscriptions ***"); + 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_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_02 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event and address + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification_1; + var charstring v_user_location_event_subscription_id_1; + var UserLocationEventNotification v_user_location_event_notification_2; + var charstring v_user_location_event_subscription_id_2; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification_1, v_user_location_event_subscription_id_1); + f_create_user_location_event_subscription(v_user_location_event_notification_2, v_user_location_event_subscription_id_2, PX_USER_2); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event&adress=" & PX_USER_2, + 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_notification_subscription_list( + mw_notification_subscription_list( + -, // FIXME + { + *, + mw_subscription( + v_user_location_periodic_notification.notificationType, + v_user_location_periodic_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of notification subscriptions ***"); + 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_user_location_event_subscription(v_user_location_event_subscription_id_1); + f_delete_user_location_event_subscription(v_user_location_event_subscription_id_2); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03 + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application - Invalid filter + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?dummy", + 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 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_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_BR + + /** + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event&adress=" & PX_USER_2, + 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 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_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_002_NF + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_user_location_event_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_user_location_event_subscription( + mw_user_location_event_subscription( + v_user_location_event_notification.links_.self_.href + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct userLocationEventSubscription ***"); + 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_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Periodoc + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_user_location_event_subscription_id; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_user_location_periodic_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_user_location_event_subscription_id); + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_user_location_periodic_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_user_location_periodic_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_user_location_periodic_subscription( + mw_user_location_periodic_subscription( + v_user_location_periodic_notification.links_.self_.href + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct userLocationEventSubscription ***"); + 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_user_location_event_subscription(v_user_location_event_subscription_id); + f_delete_user_location_periodic_subscription(v_user_location_periodic_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event + */ + testcase TC_MEC_MEC013_SRV_UELOCLOOK_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_LOC_API_USERS_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + 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 the correct userLocationEventSubscription ***"); + 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_MEC013_SRV_UELOCLOOK_003_NF + + } // End of group ueLocationLookup + + group ueLocSub { + + /** + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_01() 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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + PX_CLIENT_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID + )))))) -> 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 Distance subscription ***"); + 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_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userLocationEventSubscription, 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_user_location_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_01 + + /** + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location event + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_user_location_event_subscription(v_user_location_event_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_user_location_event_notification( + mw_user_location_event_notification( + -, -, + v_user_location_event_notification.links_ + )))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + 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 responds with a userLocationEventNotification ***"); + 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_user_location_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_02 + + /** + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_01() 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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + PX_CLIENT_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_location_periodic_subscription( + mw_user_location_periodic_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID + )))))) -> 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 Distance subscription ***"); + 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_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userLocationPeriodicSubscription, 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_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_01 + + /** + * @desc Check that the IUT acknowledges the subscription by a MEC Application to notifications user location periodic + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_user_location_periodic_subscription(v_user_location_periodic_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_user_location_periodic_notification( + mw_user_location_periodic_notification( + -, -, + v_user_location_periodic_notification.links_ + )))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + 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 responds with a userLocationPeriodicNotification ***"); + 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_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_02 + + /** + * @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_MEC013_SRV_UELOCSUB_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + "", + PX_USER, + PX_CLIENT_ID + )))))); + 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 successfully responds with 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01 + + /** + * @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_MEC013_SRV_UELOCSUB_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + "", + PX_USER, + PX_CLIENT_ID + )))))); + 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 successfully responds with 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_001_BR_02 + + /** + * @desc Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content ***"); + 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_MEC013_SRV_UELOCSUB_002_OK /** - * @desc Check that the IUT acknowledges the UE information change subscription request when commanded by a MEC Application and notifies it when the location changes - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2 + * @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_MEC013_SRV_UEINFSUB_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { @@ -915,21 +2950,10 @@ module AtsMec_LocationAPI_TestCases { f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_zonal_traffic_subscription( - m_zonal_traffic_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - ) - ) - ) - ) - ) - ); + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -937,17 +2961,11 @@ module AtsMec_LocationAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_zonal_traffic_subscription( - mw_zonal_traffic_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - )))))) -> value v_response { + mw_http_response_404_not_found + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a callbackURL ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -957,17 +2975,17 @@ module AtsMec_LocationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_zonal_traffic_subscription(v_response.response.body.json_body.zonalTrafficSubscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFSUB_001_OK + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_002_NF /** - * @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/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2 + * @desc Check that the IUT acknowledges a request to modify an existing subscription by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEINFSUB_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { @@ -982,269 +3000,1093 @@ module AtsMec_LocationAPI_TestCases { // Test adapter configuration // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & "/invilad/" & PX_ME_APP_Q_USERS_INF_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_zonal_traffic_subscription( - m_zonal_traffic_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - ) - ) - ) - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_USER, + PX_CLIENT_ID + )))))); + 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_user_location_event_subscription( + mw_user_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_USER, + -, + PX_CLIENT_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates userLocationPeriodicSubscription, 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_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_01 + + /** + * @desc Check that the IUT acknowledges a request to modify an existing subscription by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_USER, + PX_CLIENT_ID + )))))); + 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_user_location_periodic_subscription( + mw_user_location_periodic_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_USER, + -, + PX_CLIENT_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates userLocationPeriodicSubscription, 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_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02 + + /** + * @desc Check that the IUT responds with an error when received an inconsistent request + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationEventNotification v_user_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_event_subscription(v_user_location_event_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + "", + PX_USER, + PX_CLIENT_ID + )))))); + 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 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_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01 + + /** + * @desc Check that the IUT responds with an error when received an inconsistent request + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var UserLocationPeriodicNotification v_user_location_periodic_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_user_location_periodic_subscription(v_user_location_periodic_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + "", + PX_USER, + PX_CLIENT_ID + )))))); + 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 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_user_location_periodic_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02 + + /** + * @desc Check that the IUT acknowledges a request to modify a not existing subscription by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_USER, + PX_CLIENT_ID + )))))); + 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 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_MEC013_SRV_UELOCSUB_003_NF_01 + + /** + * @desc Check that the IUT responds with an error when received an inconsistent request + */ + testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_put( + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_USER, + PX_CLIENT_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response( + mw_http_response_404_not_found + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + 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_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEINFSUB_001_BR + } // End of testcase TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02 + + } // End of group ueLocSub + + group ueTestNot { + + /** + * @desc Check that the IUT provides a test notification when requested by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UETESTNOT_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_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_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + PX_CLIENT_ID, + true + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID, + true + )))))) -> 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 Distance subscription ***"); + 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_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": INFO: IUT successfully responds with a userLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + repeat; // Wait for test notification + } + } + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_test_notification( + mw_test_notification( + v_response.response.body.json_body.userLocationEventNotification.links_ + )))))) { + tc_ac.stop; + + // Send response + 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 responds with a userAreaNotification ***"); + 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_user_location_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UETESTNOT_001_OK + + /** + * @desc Check that the IUT terminates notifications after time expiration + */ + testcase TC_MEC_MEC013_SRV_UETESTNOT_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + var boolean v_notification_received_after_expiry := false; + timer tc_expiry := PX_NOTIF_EXPIRY; + timer tc_expiry_guard := PX_NOTIF_EXPIRY / 2.0; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_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_LOC_API_USERS_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + PX_CLIENT_ID, + -, -, -, -, + m_time_stamp( + float2int(PX_NOTIF_EXPIRY) + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + tc_expiry.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_location_event_subscription( + mw_user_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_USER, + -, + PX_CLIENT_ID + )))))) -> 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 Distance subscription ***"); + 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_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": INFO: IUT successfully responds with a userLocationEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + tc_ac.start; + repeat; // Wait for test notification + } + } + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_test_notification( + mw_test_notification( + v_response.response.body.json_body.userLocationEventNotification.links_ + )))))) { + tc_ac.stop; + + // Send response + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); + + log("*** " & testcasename() & ": INFO: Receive new notification ***"); + + v_notification_received_after_expiry := true; + tc_ac.start; + repeat; + } + [] tc_expiry.timeout { + v_notification_received_after_expiry := false; + tc_expiry_guard.start; + repeat; + } + [] tc_expiry_guard.timeout { + if (v_notification_received_after_expiry) { + log("*** " & testcasename() & ": FAIL: Received notification after expiration time ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + log("*** " & testcasename() & ": PASS: No more notification received ***"); + 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_user_location_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UETESTNOT_002_OK + + } // End of group ueTestNot + + group ueZoneLook { + + /** + * @desc Check that the IUT responds with a list zones when queried by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_001_OK() 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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_LOC_API_ZONES_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_notification_subscription_list( + mw_notification_subscription_list + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + 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_MEC013_SRV_UEZONELOOK_001_OK + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - Zone location Event + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?event", + 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_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneLocationEventSubscription", + v_zone_location_event_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + 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_zone_location_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_01 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - Zone Status + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?status", + 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_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneStatusSubscription", + v_zone_status_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + 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_zone_status_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_02 + + /** + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - UE location Event and address + */ + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification_1, v_zone_location_event_notification_2; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id_event_1, v_subscription_id_event_2; + var charstring v_subscription_id_status; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification_1, v_subscription_id_event_1); + f_create_zone_location_event_subscription(v_zone_location_event_notification_2, v_subscription_id_event_2, PX_USER_2); + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id_status); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?event&address=" & PX_USER_2, + 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_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneLocationEventSubscription.", + v_zone_location_event_notification_2.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ZoneSubscription ***"); + 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_zone_location_event_subscription(v_subscription_id_event_1); + f_delete_zone_location_event_subscription(v_subscription_id_event_2); + f_delete_zone_status_subscription(v_subscription_id_status); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_03 /** - * @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2 + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application - Invalid filter */ - testcase TC_MEC_MEC013_SRV_UEINFSUB_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var ZonalTrafficSubscription v_zonal_traffic_subscription; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification_1, v_zone_location_event_notification_2; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id_event_1, v_subscription_id_event_2; + var charstring v_subscription_id_status; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification_1, v_subscription_id_event_1); + f_create_zone_location_event_subscription(v_zone_location_event_notification_2, v_subscription_id_event_2, PX_USER_2); + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id_status); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?event&address", // Invalid filter + 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 successfully responds with a list of ZoneSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_zonal_traffic_subscription(v_zonal_traffic_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_zonal_traffic_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_INF_SUB_URI & "/(?*)", - 0 - ); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI & "/" & v_uri, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // 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 responds with 204 No Content ***"); - 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_MEC013_SRV_UEINFSUB_002_OK + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id_event_1); + f_delete_zone_location_event_subscription(v_subscription_id_event_2); + f_delete_zone_status_subscription(v_subscription_id_status); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_BR /** - * @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/UEINFSUB/PlatUeInformationSubscription.tplan2 + * @desc Check that the IUT responds with an error when inconsistent request was sent by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEINFSUB_002_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_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI & "/" & oct2char(unichar2oct(PX_USER_UNKNOWN, "UTF-8")), - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( + testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id_event; + var charstring v_subscription_id_status; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id_event); + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id_status); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "?event&address=" & PX_USER_2, + 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 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_MEC013_SRV_UEINFSUB_002_NF + )) { + 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_zone_location_event_subscription(v_subscription_id_event); + f_delete_zone_status_subscription(v_subscription_id_status); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_002_NF - } // End of group ueInfSub - - /* - * Radio Node Location Lookup (RLOCLOOK) - */ - - group radioNodeLocationLookup { - /** - * @desc Check that the IUT responds with the list of radio nodes currently associated with the MEC host and the location of each radio node when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs013-location-api/blob/master/LocationAPI.yaml#/definitions/AccessPointList + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - Zone location Event */ - testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_ZONE_ID, "UTF-8")) & "/accessPoints", + testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_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_access_point_list( - mw_access_point_list( - PX_ZONE_ID - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AccessPoint list containing a ZoneId ***"); - 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_MEC013_SRV_RLOCLOOK_001_OK - + ))); + 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_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneLocationEventSubscription.", + v_zone_location_event_notification.links_.self_.href + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct ZoneSubscription ***"); + 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_zone_location_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_01 + /** - * @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 + * @desc Check that the IUT responds with the subscription when queried by a MEC Application - Zone status Event */ - testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_APP_Q_ZONE_ID_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ZONE_ID, "UTF-8")) & "/accessPoints", - v_headers - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_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_404_not_found() - )) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_notification_subscription_list( + mw_notification_subscription_list( + -, + { + *, + mw_subscription( + "ZoneLocationEventSubscription.", + v_zone_status_notification.links_.self_.href + ), + * + } + )))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct ZoneSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1252,87 +4094,51 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_zone_status_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_RLOCLOOK_001_NF - - } // End of group radioNodeLocationLookup - - - - /* - * UE Area Subscribe (UEAREASUB) - */ - group ueAreaSubscribe { + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_02 /** - * @desc Check that the IUT acknowledges the UE area change subscription request when commanded by a MEC Application and notifies it when the UE enters the specified circle + * @desc Check that the IUT responds with an error when the non existing subscription is queried by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; - + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_AREA_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_circle_notification_subscription( - m_circle_notification_subscription( - PX_CLIENT_ID, //clientCorrelator - PX_AREA_SUB_CALLBACK_URI, // callbackReference - { PX_IP_ADDRESS } // address - ) - ) - ) - ) - ) - ); + m_http_request_get( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; - alt { + alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_circle_notification_subscription( - mw_circle_notification_subscription( - PX_CLIENT_ID )))))) -> value v_response { - // TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test? -// // MEC 013, clause 7.3.11.3 -// the IUT entity sends a vPOST containing, -// uri indicating value CALLBACK_URL -// body containing -// subscriptionNotification containing -// terminalLocation containing -// address set to IP_ADDRESS -// ; -// ; -// ; -// ; -// to the MEC_APP entity + mw_http_response_404_not_found + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a circleNotificationSubscription ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1340,124 +4146,138 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_delete_circle_notification_subscription(v_response.response.body.json_body.circleNotificationSubscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_OK + } // End of testcase TC_MEC_MEC013_SRV_UEZONELOOK_003_NF + + } // End of group ueZoneLook + + group ueZoneSub { /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01() 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_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_AREA_SUB_URI, - v_headers, - m_http_message_body_json( - m_body_json_circle_notification_subscription( - m_circle_notification_subscription( - PX_CLIENT_ID_UNKNOWN, //clientCorrelator - PX_AREA_SUB_CALLBACK_URI, // callbackReference - { PX_IP_ADDRESS } // address - ) - ) - ) - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + PX_CALLBACK_REF_URL, + PX_CLIENT_ID, + PX_ZONE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_zone_location_event_notification( + mw_zone_location_event_notification( + // FIXME + )))))) -> 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 Distance subscription ***"); + 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_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); - log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventSubscription, 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_zone_location_event_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_001_BR + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01 /** - * @desc Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02() runs on HttpComponent system HttpTestAdapter { // Local variables - var Headers v_headers; - var CircleNotificationSubscription v_circle_notification_subscription; - var charstring v_uri; - + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration - f_cf_01_http_up(); - + f_cf_01_http_notif_up(); + // Test adapter configuration - + // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_circle_notification_subscription(v_circle_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_circle_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_AREA_SUB_URI & "/(?*)", - 0 - ); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI & "/" & v_uri, - v_headers - ) - ) - ); + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_204_no_content - )) { - + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_zone_location_event_notification( + mw_zone_location_event_notification( + -, + v_zone_location_event_notification.links_ + )))))) { tc_ac.stop; + + // Send response + var Headers v_headers; + 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 responds with no content ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventNotification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1465,170 +4285,269 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_002_OK - + f_delete_zone_location_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02 + /** - * @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 + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - OperationStatus constraint */ - testcase TC_MEC_MEC013_SRV_UEAREASUB_002_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_01() 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_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_delete( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_zone_status_subscription( + m_zone_status_subscription( + PX_AREA_SUB_CALLBACK_URI, + -, + PX_ZONE_ID, + -, -, -, -, -, -, -, + Serviceable + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) { + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_zone_status_notification( + mw_zone_status_notification( + -, -, + Serviceable + )))))) -> 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 Distance subscription ***"); + 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_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); - log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventSubscription, 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_zone_status_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEAREASUB_002_NF - - } // End of group ueAreaSubscribe + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_01 + + /** + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - OperationStatus constraint + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_zone_status_subscription(v_zone_status_notification, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_zone_status_notification( + mw_zone_status_notification( + v_zone_status_notification.links_ + )))))) { + tc_ac.stop; + + // Send response + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_ok_no_body(v_headers))); - /* - * UE Distance Lookup (UEDISTLOOK) - */ - group ueDistanceLookup { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventNotification ***"); + 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_zone_status_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_02 /** - * @desc Check that the IUT responds with the distance to a UE when queried by a MEC Application + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - UserNumEvent constraint */ - testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_01() 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_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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 & oct2char(unichar2oct(PX_UE_LOC_QRY_URI, "UTF-8")) & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&latitude=" & float2str(PX_UE_COORD_LAT) & "&longitude=" & float2str(PX_UE_COORD_LONG), - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_zone_status_subscription( + m_zone_status_subscription( + PX_AREA_SUB_CALLBACK_URI, + -, + PX_ZONE_ID, + -, -, -, + PX_UPPER_NUM_USER_THRESHOLD, + PX_LOWER_NUM_USER_THRESHOLD + )))))); 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_terminal_distance( - mw_terminal_distance - ))))) { - + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_zone_status_notification( + mw_zone_status_notification( + // FIXME + )))))) -> 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 Distance subscription ***"); + 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_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 200 OK ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventSubscription, 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_zone_status_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK - + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_01 + /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + * @desc Check that the IUT acknowledges the creation of UE zone subscription request when commanded by a MEC Application - UserNumEvent constraint */ - testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_02() runs on HttpComponent system HttpTestAdapter { // Local variables - var Headers v_headers; - + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration - f_cf_01_http_up(); - + f_cf_01_http_notif_up(); + // Test adapter configuration - + // Preamble - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & oct2char(unichar2oct(PX_UE_LOC_QRY_URI, "UTF-8")) & "?address=" & oct2char(unichar2oct(PX_IP_ADDRESS, "UTF-8")) & "&lat=" & float2str(PX_UE_COORD_LAT) & "&longitude=" & float2str(PX_UE_COORD_LONG), - v_headers - ) - ) - ); + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id, omit, PX_UPPER_NUM_USER_THRESHOLD, PX_LOWER_NUM_USER_THRESHOLD); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) { - + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, -, + mw_http_message_body_json( + mw_body_json_zone_status_notification( + v_zone_status_notification + ))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 bad request ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a zoneLocationEventNotification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1636,90 +4555,57 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_zone_status_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR - - } // End of group ueDistanceLookup - - /* - * UE Distance Subscribe (UEDISTSUB) - */ - group ueDistanceSubscribe { - + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_02 + /** - * @desc Check that the IUT acknowledges the UE distance subscription request when commanded by a MEC Application and notifies it when (all) the requested UE(s) is (are) within the specified distance + * @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_MEC013_SRV_UEDISTSUB_001_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; - + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_APP_Q_DIST_URI, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_distance_notification_subscription( - m_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, // checkImmediate - PX_CLIENT_ID, //clientCorrelator - -, // criteria - 10.0, // distance - -, - { PX_UE_MONITORED_IP_ADDRESS } // monitoredAddress - )))))); + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + "", + PX_CLIENT_ID, + PX_ZONE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_distance_notification_subscription( - mw_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, - PX_CLIENT_ID, //clientCorrelator - -, -, -, - { PX_UE_MONITORED_IP_ADDRESS } // monitoredAddress - )))))) -> value v_response { - // TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test? -// - // MEC 013, clause 7.3.11.3 -// the IUT entity sends a vPOST containing, // uri indicating value CALLBACK_URL -// body containing -// subscriptionNotification containing -// terminalLocation containing -// address set to IP_ADDRESS -// ; -// ; -// ; -// ; -// to the MEC_APP entity - + mw_http_response_400_bad_request + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a circleNotificationSubscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1727,70 +4613,65 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_delete_distance_notification_subscription(v_response.response.body.json_body.distanceNotificationSubscription); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_OK - + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_001_BR + /** - * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + * @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI & "_INVALID", + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & v_subscription_id, v_headers, m_http_message_body_json( - m_body_json_distance_notification_subscription( - // TODO the TP uses a wrong field name to trigger an error response. Do we create a new data structure just for this or - // change the test to use another trigger (e.g.: invalid IP address)? - m_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, // checkImmediate - PX_CLIENT_ID, //clientCorrelator - -, // criteria - 10.0, // distance - -, // frequency - { PX_UE_MONITORED_IP_ADDRESS }, // monitoredAddress - { PX_IP_ADDRESS } // referenceAddress - ) - ) - ) - ) - ) - ); + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_CLIENT_ID, + PX_ZONE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { - + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_zone_location_event_subscription( + mw_zone_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_CLIENT_ID, + PX_ZONE_ID + )))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 400 Bad Request ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully updates the zoneLocationEventSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1798,61 +4679,66 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_zone_location_event_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_001_BR - + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01 + /** - * @desc Check that the IUT acknowledges the cancellation of UE distance notifications when commanded by a MEC Application + * @desc Check that the IUT acknowledges the change of UE area subscription request when commanded by a MEC Application */ - testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var DistanceNotificationSubscription v_distance_notification_subscription; - var charstring v_uri; - + var ZoneStatusNotification v_zone_status_notification; + var charstring v_subscription_id; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } - + // Test component configuration f_cf_01_http_up(); - + // Test adapter configuration - + // Preamble + f_create_zone_status_subscription(v_zone_status_notification, v_subscription_id); f_init_default_headers_list(-, -, v_headers); - f_create_distance_notification_subscription(v_distance_notification_subscription); - v_uri := regexp( - oct2char(unichar2oct(v_distance_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_DIST_URI & "/(?*)", - 0 - ); httpPort.send( m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI & "/" & v_uri, - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_zone_status_subscription( + m_zone_status_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + -, + PX_ZONE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_204_no_content - )) { - + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_zone_status_subscription( + mw_zone_status_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + -, + PX_ZONE_ID + )))))) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with no content ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully updates with a zoneStatusSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1860,53 +4746,57 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble + f_delete_zone_status_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_OK - + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_002_OK_02 + /** * @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_MEC013_SRV_UEDISTSUB_002_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC013_SRV_UEZONESUB_002_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_LOCATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_delete( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), - v_headers - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + PX_UE_NEW_SUB_CALLBACK_URI, + PX_CLIENT_ID, + PX_ZONE_ID + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found() - )) { - + mw_http_response_404_not_found + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 404 Not Found ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1914,11 +4804,118 @@ module AtsMec_LocationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC013_SRV_UEDISTSUB_002_NF - - } // End of group ueDistanceSubscribe + } // End of testcase TC_MEC_MEC013_SRV_UEZONESUB_002_NF + /** + * @desc Check that the IUT acknowledges the cancellation of UE area change notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ZoneLocationEventNotification v_zone_location_event_notification; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_zone_location_event_subscription(v_zone_location_event_notification, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_LOC_API_ZONES_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_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 No Content ***"); + 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_MEC013_SRV_UEZONESUB_003_OK + + /** + * @desc Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application + */ + testcase TC_MEC_MEC013_SRV_UEZONESUB_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_LOCATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_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_delete( + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + 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 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_MEC013_SRV_UEZONESUB_003_NF + + } // End of group ueZoneSub + } // End of module AtsMec_LocationAPI_TestCases diff --git a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn index aef4802da3f840623f8987a2a85d0e7076fe180c..81b4e68ca76053656e9ed1b7f3879bb11a04f882 100644 --- a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn +++ b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn @@ -13,28 +13,93 @@ module AtsMec_LocationAPI_TestControl { if (PICS_MEC_PLAT and PICS_SERVICES) { if (PICS_LOCATION_API_SUPPORTED) { - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_NF()); - - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UETRACKSUB_002_NF()); - - execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_RLOCLOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_RLOCLOOK_001_NF()); + execute(TC_MEC_MEC013_SRV_RLOCLOOK_002_OK()); + execute(TC_MEC_MEC013_SRV_RLOCLOOK_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UEAREALOOK_001_OK_02()); + execute(TC_MEC_MEC013_SRV_UEAREALOOK_001_BR()); + execute(TC_MEC_MEC013_SRV_UEAREALOOK_002_OK()); + execute(TC_MEC_MEC013_SRV_UEAREALOOK_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEAREASUB_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_001_OK_02()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_001_BR()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_002_OK()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_002_NF()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_003_OK()); + execute(TC_MEC_MEC013_SRV_UEAREASUB_003_NF()); + + execute(TC_MEC_MEC013_SRV_UEDISTLOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_UEDISTLOOK_001_BR()); + execute(TC_MEC_MEC013_SRV_UEDISTLOOK_002_OK()); + execute(TC_MEC_MEC013_SRV_UEDISTLOOK_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UEDISTSUB_001_OK_02()); + execute(TC_MEC_MEC013_SRV_UEDISTSUB_001_BR()); + execute(TC_MEC_MEC013_SRV_UEDISTSUB_002_OK()); + execute(TC_MEC_MEC013_SRV_UEDISTSUB_002_NF()); + + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_01()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_02()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_03()); + execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_OK_04()); execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_001_BR()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_OK()); - execute(TC_MEC_MEC013_SRV_UEINFSUB_002_NF()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_01()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_02()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_OK_03()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_BR()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_002_NF()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_01()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_OK_02()); + execute(TC_MEC_MEC013_SRV_UELOCLOOK_003_NF()); + + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_01_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_OK_02_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_001_BR_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_002_OK()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_002_NF()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_OK_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_OK_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_BR_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_BR_02()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_NF_01()); + execute(TC_MEC_MEC013_SRV_UELOCSUB_003_NF_02()); + + execute(TC_MEC_MEC013_SRV_UETESTNOT_001_OK()); + execute(TC_MEC_MEC013_SRV_UETESTNOT_002_OK()); + + execute(TC_MEC_MEC013_SRV_UEZONELOOK_001_OK()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_01()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_02()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_03()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_BR()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_002_NF()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_01()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_003_OK_02()); + execute(TC_MEC_MEC013_SRV_UEZONELOOK_003_NF()); + + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_01()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_01_02()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_01()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_01_02()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_01()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_OK_02_02_02()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_001_BR()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_002_OK_01()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_002_OK_02()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_002_NF()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_003_OK()); + execute(TC_MEC_MEC013_SRV_UEZONESUB_003_NF()); } } } // End of 'control' statement diff --git a/ttcn/AtsMec_Location/module.mk b/ttcn/AtsMec_Location/module.mk index f40c553ce3d0c713b7af5ef7c4743e5218b5d4c6..a60174076397598ea5e84d6ace87d6aaa1aa49cb 100644 --- a/ttcn/AtsMec_Location/module.mk +++ b/ttcn/AtsMec_Location/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -14,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ @@ -22,10 +22,13 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn index 15150a3b1b0d725de1efe713453ff78bc7e75c13..7fd34ac954231c1db79ef38cd5c5974274dcda10 100644 --- a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn +++ b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn @@ -65,8 +65,7 @@ module AtsMec_RnisAPI_TestCases { group rnis_notifications { /** - * @desc Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 + * @desc Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated */ testcase TC_MEC_MEC012_SRV_RNIS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -101,7 +100,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -166,7 +165,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about RAB establishment if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -227,7 +225,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about RAB modification if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -289,7 +286,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about RAB release if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -351,7 +347,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about UE measurement report if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -411,7 +406,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about UE timing advance if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -447,9 +441,9 @@ module AtsMec_RnisAPI_TestCases { mw_meas_ta_subscription( PX_CALLBACK_REFERENCE, PX_LINKS_SELF, - mw_filter_criteria_ho( - PX_APP_INS_ID, - -//TODO PX_E_RAB_ID + mw_filter_criteria( + PX_APP_INS_ID, + -//TODO PX_E_RAB_ID ))))))) { tc_wait.stop; @@ -471,7 +465,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about UE carrier aggregation reconfiguration if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_007_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -531,7 +524,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about S1-U bearer if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_008_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -589,7 +581,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service sends an RNIS notification about 5G NR UE measurement report if the RNIS service has an associated subscription and the event is generated. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisNotifications.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_009_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -645,6 +636,59 @@ module AtsMec_RnisAPI_TestCases { f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC012_SRV_RNIS_009_OK + /** + * @desc Check that the RNIS service sends an RNIS notification on subscription expiration if the RNIS service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC012_SRV_RNIS_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_RNIS) or not(PICS_RNIS_NOTIFICATIONS)) { + log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_NOTIFICATIONS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + action("Wait for subscription expiration"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_CALLBACK_URI, + -, + mw_http_message_body_json( + mw_body_json_expiry_notification_rnis + )))) { + tc_wait.stop; + + // Send 204 No Content + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends RAB release notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC012_SRV_RNIS_010_OK + } // End of group rnis_notifications group all_subscriptions { @@ -660,8 +704,7 @@ module AtsMec_RnisAPI_TestCases { * - MeasTaSubscription * - CaReconfSubscription * - S1BearerSubscription - * - NrMeasRepUeSubscription" - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + * - NrMeasRepUeSubscription */ testcase TC_MEC_MEC012_SRV_RNIS_011_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -729,8 +772,7 @@ module AtsMec_RnisAPI_TestCases { * - MeasTaSubscription * - CaReconfSubscription * - S1BearerSubscription - * - NrMeasRepUeSubscription" - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + * - NrMeasRepUeSubscription */ testcase TC_MEC_MEC012_SRV_RNIS_012_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -767,7 +809,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ))))))); @@ -812,7 +854,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions with a wrong subscription type - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_011_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -870,7 +911,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with an error when it receives a request to create a new RNIS subscription with a wrong format - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_012_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -905,7 +945,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ))))))); @@ -952,8 +992,7 @@ module AtsMec_RnisAPI_TestCases { * - MeasTaSubscription * - CaReconfSubscription * - S1BearerSubscription - * - NrMeasRepUeSubscription" - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + * - NrMeasRepUeSubscription */ testcase TC_MEC_MEC012_SRV_RNIS_013_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -989,7 +1028,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1041,7 +1080,7 @@ module AtsMec_RnisAPI_TestCases { { mw_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1076,8 +1115,7 @@ module AtsMec_RnisAPI_TestCases { * - MeasTaSubscription * - CaReconfSubscription * - S1BearerSubscription - * - NrMeasRepUeSubscription" - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + * - NrMeasRepUeSubscription */ testcase TC_MEC_MEC012_SRV_RNIS_014_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1113,7 +1151,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1153,10 +1191,11 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ), + -, -, v_json_body.cellChangeSubscription.links ) ) @@ -1183,7 +1222,7 @@ module AtsMec_RnisAPI_TestCases { { mw_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1209,7 +1248,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service deletes a RNIS subscription when requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_015_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1245,7 +1283,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1306,7 +1344,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with error when a not existing RNIS subscription is requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_013_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1360,7 +1397,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with error when a modification for a not existing RNIS subscription is requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_014_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1396,7 +1432,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1436,7 +1472,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1476,7 +1512,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with error when a modification for a not existing RNIS subscription is requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_014_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1511,7 +1546,7 @@ module AtsMec_RnisAPI_TestCases { { m_ecgi( m_plmn("001", "001"), - PX_CELL_ID + PX_V2X_CELL_ID ) } ) @@ -1547,7 +1582,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service responds with error when the deletion of a not existing RNIS subscription is requested - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_015_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1626,7 +1660,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -1647,7 +1681,7 @@ module AtsMec_RnisAPI_TestCases { { *, mw_cell_user_info( mw_ecgi( mw_plmn, - PX_CELL_ID + PX_V2X_CELL_ID ), ? ), @@ -1770,7 +1804,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -1792,7 +1826,7 @@ module AtsMec_RnisAPI_TestCases { -, // TODO use superset instead of { mw_associate_id }, mw_ecgi( mw_plmn, - PX_CELL_ID + PX_V2X_CELL_ID ) ) }, @@ -1838,7 +1872,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -1911,7 +1945,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info_invalid?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info_invalid?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -1965,7 +1999,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_UNKNOWN_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/rab_info?cell_id=" & oct2char(unichar2oct(PX_V2X_UNKNOWN_CELL_ID, "UTF-8")), v_headers ) ) @@ -2127,7 +2161,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info_invalid?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info_invalid?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -2181,7 +2215,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_UNKNOWN_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/s1_bearer_info?cell_id=" & oct2char(unichar2oct(PX_V2X_UNKNOWN_CELL_ID, "UTF-8")), v_headers ) ) @@ -2235,7 +2269,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas_invalid?cell_id=" & oct2char(unichar2oct(PX_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas_invalid?cell_id=" & oct2char(unichar2oct(PX_V2X_CELL_ID, "UTF-8")), v_headers ) ) @@ -2289,7 +2323,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_UNKNOWN_CELL_ID, "UTF-8")), + PICS_ROOT_API & PX_RNIS_QUERIES_URI & "/layer2_meas?cell_id=" & oct2char(unichar2oct(PX_V2X_UNKNOWN_CELL_ID, "UTF-8")), v_headers ) ) diff --git a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestControl.ttcn b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestControl.ttcn index 20cc6fb6e1567677f16739aa2d07f8e49abb33dd..02c7634bc92bb2df8da5e53504c403a3bee174fc 100644 --- a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestControl.ttcn +++ b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestControl.ttcn @@ -17,13 +17,31 @@ module AtsMec_RnisAPI_TestControl { execute(TC_MEC_MEC012_SRV_RNIS_002_OK()); execute(TC_MEC_MEC012_SRV_RNIS_003_OK()); execute(TC_MEC_MEC012_SRV_RNIS_004_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_005_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_006_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_006_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_007_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_007_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_010_OK()); } + if (PICS_RNIS_ALL_SUBSCRIPTIONS) { execute(TC_MEC_MEC012_SRV_RNIS_011_OK()); execute(TC_MEC_MEC012_SRV_RNIS_012_OK()); execute(TC_MEC_MEC012_SRV_RNIS_011_BR()); execute(TC_MEC_MEC012_SRV_RNIS_012_BR()); } + + if (PICS_RNIS_SPECIFIC_SUBSCRIPTION) { + execute(TC_MEC_MEC012_SRV_RNIS_013_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_013_NF()); + execute(TC_MEC_MEC012_SRV_RNIS_014_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_014_BR()); + execute(TC_MEC_MEC012_SRV_RNIS_014_NF()); + execute(TC_MEC_MEC012_SRV_RNIS_015_OK()); + execute(TC_MEC_MEC012_SRV_RNIS_015_NF()); + } + if (PICS_RNIS_QUERY) { execute(TC_MEC_MEC012_SRV_RNIS_016_OK()); execute(TC_MEC_MEC012_SRV_RNIS_016_BR()); diff --git a/ttcn/AtsMec_Rnis/module.mk b/ttcn/AtsMec_Rnis/module.mk index 6402c879fc5044c032fd3c62374f9879271e90e6..5889511f550046f813715f03a50b68a311471a38 100644 --- a/ttcn/AtsMec_Rnis/module.mk +++ b/ttcn/AtsMec_Rnis/module.mk @@ -4,10 +4,10 @@ sources := \ AtsMec_RnisAPI_TestCases.ttcn \ AtsMec_RnisAPI_TestControl.ttcn - modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -15,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ ../LibMec/LocationAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ @@ -23,10 +22,13 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn index 03ec39793308290808e8598c281251bf5e20c965..1026770d48daa8a45ed0539dcb05974e0a5b9316 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn @@ -43,17 +43,14 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { /** * @desc Check that the IUT responds with the Multi-access Traffic Steering information when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -68,11 +65,9 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_INFO_URI, + PICS_ROOT_API & PX_ME_MTS_INFO_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -84,7 +79,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_http_message_body_json( mw_body_json_mts_capability_info( mw_mts_capability_info - ))))) -> value v_response { + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of MtsCapabilityInfo ***"); @@ -101,18 +96,17 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of testcase TC_MEC_MEC015_SRV_MTS_001_OK /** - * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - none */ - testcase TC_MEC_MEC015_SRV_MTS_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_002_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var charstring v_mts_session_id_1, v_mts_session_id_2; + var MtsSessionInfo v_mts_session_info_1, v_mts_session_info_2; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -123,15 +117,89 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id_1, v_mts_session_info_1); + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID_2, v_mts_session_id_2, v_mts_session_info_2); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_MTS_SESSIONS_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_mts_session_info_list( + { + *, + mw_mts_session_info( + v_mts_session_info_1.appInsId, + v_mts_session_info_1.requestType, + -, -, -, + v_mts_session_info_1.sessionId + ), + mw_mts_session_info( + v_mts_session_info_2.appInsId, + v_mts_session_info_2.requestType, + -, -, -, + v_mts_session_info_2.sessionId + ), + * + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo 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_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id_1); + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID_2, v_mts_session_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_01 + + /** + * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_instance_id + */ + testcase TC_MEC_MEC015_SRV_MTS_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_mts_session_id + var MtsSessionInfo v_mts_session_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?app_instance_id=" & oct2char(unichar2oct(v_mts_session_info.appInsId, "UTF-8")), + v_headers + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -141,8 +209,13 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_mts_session_info_list - )))) -> value v_response { + mw_body_json_mts_session_info( + mw_mts_session_info( + v_mts_session_info.appInsId, + v_mts_session_info.requestType, + -, -, -, + v_mts_session_id + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list ***"); @@ -155,21 +228,146 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK + } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_02 + + /** + * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_name + */ + testcase TC_MEC_MEC015_SRV_MTS_002_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_mts_session_id + var MtsSessionInfo v_mts_session_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?app_name=" & oct2char(unichar2oct(v_mts_session_info.appName, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + v_mts_session_info.appInsId, + v_mts_session_info.requestType, + -, -, -, + v_mts_session_id, + v_mts_session_info.appName + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo 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_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_03 + + /** + * @desc Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - sessionId + */ + testcase TC_MEC_MEC015_SRV_MTS_002_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_mts_session_id + var MtsSessionInfo v_mts_session_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?session_id=" & oct2char(unichar2oct(v_mts_session_info.sessionId, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + v_mts_session_info.appInsId, + v_mts_session_info.requestType, + -, -, -, + v_mts_session_info.sessionId, + v_mts_session_info.appName + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo 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_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_04 /** * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -184,11 +382,9 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/app_instance_id=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'app_instance_id=' is a wrong parameter + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?appInsId=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'appInsId=' is a wrong parameter v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -201,10 +397,10 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - )))))) { + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -219,16 +415,16 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; + var charstring v_mts_session_id + var MtsSessionInfo v_mts_session_info; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -239,15 +435,14 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "?app_instance_id=" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -259,11 +454,11 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_http_message_body_json( mw_body_json_problem_details( mw_problem_details( - -, -, 404 - )))))) { + -, -, 404 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -273,22 +468,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_002_NF /** - * @desc Check that the IUT responds with a registration and initialisation approval for the requested MTS session requirements sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT creates a MTS session when queried by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_003_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_003_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var charstring v_mts_session_id; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -303,29 +498,98 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PX_ME_MTS_SESSIONS_URI, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type + m_qosd, // QoS + LowCost, // MtsMode + Downlink // TrafficDirection + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + PX_APP_INSTANCE_ID + )))))) -> value v_response { + tc_ac.stop; + + if (f_check_headers(valueof(v_response.response.header)) == false) { + log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(valueof(v_response.response.header), "Location", v_header_location); + v_mts_session_id := regexp( + v_header_location[0], + "?+" & PX_ME_MTS_SESSIONS_URI & "/(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a MtsSessionInfo, v_mts_session_id: ", v_mts_session_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_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_MTS_003_OK_01 + + /** + * @desc Check that the IUT creates a MTS session when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_MTS_003_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_mts_session_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_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_MTS_SESSIONS_URI, + v_headers, + m_http_message_body_json( + m_body_json_mts_session_info( + m_mts_session_info( + PX_APP_INSTANCE_ID, + FLOW_SPECIFIC_MTS_SESSION, // Request type m_qosd, // QoS LowCost, // MtsMode Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter + -, -, + { m_flow_filter("10.10.10.10", 1010) } // FIXME Use PIXITs - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -337,17 +601,23 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_http_message_body_json( mw_body_json_mts_session_info( mw_mts_session_info( - PX_APP_INSTANCE_ID - )))))) -> value v_response { + PX_APP_INSTANCE_ID, + FLOW_SPECIFIC_MTS_SESSION + )))))) -> value v_response { tc_ac.stop; if (f_check_headers(valueof(v_response.response.header)) == false) { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } else { - var charstring_list v_mts_session_id; - f_get_header(valueof(v_response.response.header), "Location", v_mts_session_id); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a MtsSessionInfo, MtsSessionInfoId: ", v_mts_session_id[0], " ***"); + var charstring_list v_header_location; + f_get_header(valueof(v_response.response.header), "Location", v_header_location); + v_mts_session_id := regexp( + v_header_location[0], + "?+" & PX_ME_MTS_SESSIONS_URI & "/(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a MtsSessionInfo, v_mts_session_id: ", v_mts_session_id, " ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } @@ -358,21 +628,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_003_OK + } // End of testcase TC_MEC_MEC015_SRV_MTS_003_OK_02 /** * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml */ testcase TC_MEC_MEC015_SRV_MTS_003_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -387,29 +656,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PX_ME_MTS_SESSIONS_URI, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd, // QoS LowCost, // MtsMode Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"10.10"} // Invalid port number - ) - } // FlowFilter + -, -, + { m_flow_filter("10.10.10.10", 1010) } // // MEC015 Clause 7.2.5 Type: MtsSessionInfo Table 7.2.5-1: Elements of MtsSessionInfo, flowFilter shall be omit - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -417,15 +677,11 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_http_response_400_bad_request + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -439,21 +695,17 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of testcase TC_MEC_MEC015_SRV_MTS_003_BR /** - * @desc Check that the IUT responds with a configured Multi-access Traffic Steering when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with a configured Multi-access Traffic Steering session when queried by a MEC Application */ testcase TC_MEC_MEC015_SRV_MTS_004_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -464,37 +716,32 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, v_headers - ) - ) - ); + ))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - PX_APP_INSTANCE_ID - )))))) -> value v_response { + mw_body_json_mts_session_info( + mw_mts_session_info( + v_mts_session_info.appInsId, + v_mts_session_info.requestType, + -, -, -, + v_mts_session_info.sessionId + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***"); - f_delete_mts_session_info_resource(v_app_instance_id, v_mts_session_id); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -504,24 +751,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_004_OK /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @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_MTS_004_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_004_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -532,6 +777,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -539,7 +785,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_ME_MTS_SESSIONS_URI & "/Unknown_bw_allocation_id", + PICS_ROOT_API & "mts/v0/mts_sessions/" & PX_UNKNOWN_APP_INSTANCE_ID, // Wrong version number v_headers ) ) @@ -556,7 +802,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -566,25 +812,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_004_NF + } // End of testcase TC_MEC_MEC015_SRV_MTS_004_BR /** - * @desc - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_005_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_004_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -595,37 +838,16 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body httpPort.send( m_http_request( - m_http_request_put( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, - v_headers, - m_http_message_body_json( - m_body_json_mts_session_info( - m_mts_session_info( - PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type - m_qosd_1, // QoS - LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter - ) - ) - ) + m_http_request_get( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & PX_UNKNOWN_APP_INSTANCE_ID, + v_headers ) ) ); @@ -633,26 +855,15 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_mts_session_info( - mw_mts_session_info( - PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type - mw_qosd_1, // QoS - LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter - )))))) -> value v_response { + mw_http_response_404_not_found( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 404 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated MtsSessionInfo ***"); - f_delete_mts_session_info_resource(v_app_instance_id, v_mts_session_id); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -662,24 +873,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_005_OK + } // End of testcase TC_MEC_MEC015_SRV_MTS_004_NF /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT updates the information about an individual MTS session when commanded by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_005_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -690,54 +899,41 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_put( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd_1, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"10.10"} // Invalid port - ) - } // FlowFilter - ) - ) - ) - ) - ) - ); + Downlink // TrafficDirection + )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_mts_session_info( + mw_mts_session_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_MTS_SESSION, // Request type + mw_qosd_1, // QoS + LowCost, // MtsMode + Downlink // TrafficDirection + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_delete_mts_session_info_resource(v_app_instance_id, v_mts_session_id); + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated MtsSessionInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -747,22 +943,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_005_BR + } // End of testcase TC_MEC_MEC015_SRV_MTS_005_OK /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @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_MTS_005_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_005_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("003")); + var charstring v_mts_session_id; + var MtsSessionInfo v_mts_session_info; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -773,48 +969,37 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body httpPort.send( m_http_request( m_http_request_put( - PX_ME_MTS_SESSIONS_URI & "/InvalidAllocationId", + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, v_headers, m_http_message_body_json( m_body_json_mts_session_info( - m_mts_session_info( + m_mts_session_info( // MEC015 Clause 7.2.5 Type: MtsSessionInfo Table 7.2.5-1: Elements of MtsSessionInfo, flowFilter shall be omit PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + FLOW_SPECIFIC_MTS_SESSION, // Request type m_qosd_1, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter - ) - ) - ) - ) - ) - ); + Downlink // TrafficDirection + )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -824,24 +1009,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_005_NF + } // End of testcase TC_MEC_MEC015_SRV_MTS_005_BR /** - * @desc Check that the IUT deregisters a MTS session when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @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_MTS_006_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_005_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var charstring v_mts_session_id; - var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -853,31 +1034,36 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body httpPort.send( m_http_request( - m_http_request_delete( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, - v_headers - ) - ) - ); + m_http_request_put( + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/PX_UNKNOWN_APP_INSTANCE_ID", + v_headers, + m_http_message_body_json( + m_body_json_mts_session_info( + m_mts_session_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_MTS_SESSION, // Request type + m_qosd_1, // QoS + LowCost, // MtsMode + Downlink // TrafficDirection + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_204_no_content - )) { + mw_http_response_404_not_found( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 404 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -888,23 +1074,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_006_OK + } // End of testcase TC_MEC_MEC015_SRV_MTS_005_NF /** - * @desc Check that the IUT responds with an error when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT deregisters a MTS session when commanded by a MEC Application */ - testcase TC_MEC_MEC015_SRV_MTS_006_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_MTS_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -915,29 +1098,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_delete( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, v_headers - ) - ) - ); + ))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request - )) { + mw_http_response_204_no_content + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); @@ -951,23 +1127,20 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_MTS_006_BR + } // End of testcase TC_MEC_MEC015_SRV_MTS_006_OK /** - * @desc Check that the IUT deregisters a MTS session when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/MultiAccessTrafficSteering.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application */ testcase TC_MEC_MEC015_SRV_MTS_006_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_mts_session_id; var MtsSessionInfo v_mts_session_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005")); // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -978,29 +1151,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { // Test adapter configuration // Preamble + f_create_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id, v_mts_session_info); f_init_default_headers_list(-, -, v_headers); - f_create_mts_session_info_resource(v_app_instance_id, v_mts_session_id, v_mts_session_info); - if (v_mts_session_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_delete( - PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & PX_UNKNOWN_APP_INSTANCE_ID, 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 successfully responds to deletion ***"); @@ -1013,6 +1179,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, v_mts_session_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_006_NF diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn index 2d66097cc1a0b43bdb9f4f23aeb9f0c042851b18..f3b601d76972bdb8b9851b73a9e21f774ad69631 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.1.1 (2020-06) + * @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V2.2.1 (2020-06) */ module AtsMec_TrafficManagementAPI_TestCases { @@ -42,692 +42,387 @@ module AtsMec_TrafficManagementAPI_TestCases { group me_app_role { /** - * @desc Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application - none */ - testcase TC_MEC_MEC015_SRV_TM_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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( - PX_ME_BWM_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_info_list - )))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of BwInfo ***"); - 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_TM_001_OK - - /** - * @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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( - PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_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_ok( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - PX_APP_INSTANCE_ID - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***"); - 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_TM_002_OK - - /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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( - PX_ME_BWM_URI & "/app_instance_id=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), // 'app_instance_id=' is a wrong parameter - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - 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_TM_002_BR - - /** - * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC015_SRV_TM_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_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_info_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // 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( - PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_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( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - 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_TM_002_NF - - /** - * @desc Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_003_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // 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( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id - )))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(valueof(v_response.response.header)) == false) { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } else { - var charstring_list v_bw_allocation_id; - f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, BWAllocationID: ", v_bw_allocation_id[0], " ***"); - 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_TM_003_OK_01 + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK /** - * @desc Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_instance_id */ - testcase TC_MEC_MEC015_SRV_TM_003_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC015_SRV_TM_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_URI & "?app_instance_id=" & PX_APP_INSTANCE_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_info( + mw_bw_info( + PX_APP_INSTANCE_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // 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( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - SESSION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink, // AllocationDirection - { m_session_filter("10.10.10.10", { "1010" }) } - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id, - SESSION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink, // AllocationDirection - { mw_session_filter } - )))))) -> value v_response { - tc_ac.stop; - - if (f_check_headers(valueof(v_response.response.header)) == false) { - log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } else { - var charstring_list v_bw_allocation_id; - f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id); - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, BWAllocationID: ", v_bw_allocation_id[0], " ***"); - 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_TM_003_OK_02 - - /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_003_BR_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // 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( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "Invalid", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - 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_TM_003_BR_01 + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_02 /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_name */ - testcase TC_MEC_MEC015_SRV_TM_003_BR_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC015_SRV_TM_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_URI & "?app_name=" & PX_APP_NAME, + 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_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + PX_APP_NAME + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // 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( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink, // AllocationDirection - { m_session_filter("10.10.10.10", { "1010" }) } // MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be omit - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - 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_TM_003_BR_02 - - /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_003_BR_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // 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( - PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - PX_APP_INSTANCE_ID, - SESSION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink // AllocationDirection - // MEC015 Clause 7.2.2 Type: BwInfo Table 7.2.2-1: Elements of BwInfo, sessionFilter shall be present - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - 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_TM_003_BR_03 + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_OK_03 /** - * @desc Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - session_id */ - testcase TC_MEC_MEC015_SRV_TM_004_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); - if (v_bw_allocation_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + testcase TC_MEC_MEC015_SRV_TM_001_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_URI & "?session_id=" & PX_APP_ALLOCATION_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_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + PX_APP_NAME, + PX_APP_ALLOCATION_ID + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test Body - httpPort.send( - m_http_request( - m_http_request_get( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_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_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_004_OK + [] 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_TM_001_OK_04 /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - app_instance_id */ - testcase TC_MEC_MEC015_SRV_TM_004_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_TM_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_URI & "?appInstId=" & PX_APP_INSTANCE_ID, + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_001_BR + + /** + * @desc 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 + */ + testcase TC_MEC_MEC015_SRV_TM_001_NF_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_URI & "?app_instance_id=" & PX_UNKNOWN_APP_INSTANCE_ID, + 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 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_TM_001_NF_01 + + /** + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_name + */ + testcase TC_MEC_MEC015_SRV_TM_001_NF_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_URI & "?app_name=" & PX_UNKNOWN_APP_NAME, + 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 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_TM_001_NF_02 + + /** + * @desc Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - session_id + */ + testcase TC_MEC_MEC015_SRV_TM_001_NF_03() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("001")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -743,30 +438,24 @@ module AtsMec_TrafficManagementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body httpPort.send( m_http_request( m_http_request_get( - PX_ME_BWM_URI & "/Unknown_bw_allocation_id", + PICS_ROOT_API & PX_ME_BWM_URI & "?session_id=" & PX_UNKNOWN_APP_ALLOCATION_ID, 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( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + mw_http_response_404_not_found + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -777,20 +466,586 @@ module AtsMec_TrafficManagementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_004_NF + } // End of testcase TC_MEC_MEC015_SRV_TM_001_NF_03 + + /** + * @desc Check that the IUT acknowledges a creation of a bandwidthAllocation resource + */ + testcase TC_MEC_MEC015_SRV_TM_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_bw_allocation_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, + "1024", + Downlink, + PX_APP_NAME, + PX_APP_ALLOCATION_ID + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + PX_APP_NAME, + PX_APP_ALLOCATION_ID + )))))) -> 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 Area subscription ***"); + 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_bw_allocation_id := regexp( + v_header_location[0], + "?+" & PX_ME_BWM_URI & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo, CreationID: ", v_bw_allocation_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_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_002_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted + */ + testcase TC_MEC_MEC015_SRV_TM_002_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, + "1024", + Downlink, + PX_APP_NAME, + PX_APP_ALLOCATION_ID, + { m_session_filter("10.10.10.10", 1010) } // FIXME Use PIXITs + )))))); + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_002_BR_01 + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present + */ + testcase TC_MEC_MEC015_SRV_TM_002_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + SESSION_SPECIFIC_BW_ALLOCATION, + "1024", + Downlink, + PX_APP_NAME, + PX_APP_ALLOCATION_ID, + - // Session shall be present + )))))); + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_002_BR_02 + + /** + * @desc Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_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_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + v_bw_allocation_id + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct BwInfo ***"); + 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_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_003_OK + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, + 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 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_TM_003_NF + /** * @desc Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + */ + testcase TC_MEC_MEC015_SRV_TM_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type + "2048", // FixedAllocation + Downlink // AllocationDirection + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_info( + mw_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type + "2048", // FixedAllocation + Downlink // AllocationDirection + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwInfo ***"); + 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_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_004_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted + */ + testcase TC_MEC_MEC015_SRV_TM_004_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + v_bw_info.sessionFilter := { valueof(m_session_filter("10.10.10.10", 1010)) }; // FIXME Use PIXITs + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + v_bw_info + ))))); + + // 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 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_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_004_BR_01 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present + */ + testcase TC_MEC_MEC015_SRV_TM_004_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_bw_allocation_id; + var BwInfo v_bw_info; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_init_default_headers_list(-, -, v_headers); + v_bw_info.requestType := SESSION_SPECIFIC_BW_ALLOCATION; + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + v_bw_info + ))))); + + // 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 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_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_004_BR_02 + + /** + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_TM_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, + v_headers, + m_http_message_body_json( + m_body_json_bw_info( + m_bw_info( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, + "2048", // FixedAllocation + Downlink + )))))); + + // 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_TM_004_NF + + /** + * @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application */ testcase TC_MEC_MEC015_SRV_TM_005_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var charstring v_bw_allocation_id; var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -805,33 +1060,24 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); if (v_bw_allocation_id == "") { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); } - - // Test Body + f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_put( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "2048", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); + m_http_request_patch( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info_deltas( + m_bw_info_deltas( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION + )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( @@ -840,15 +1086,14 @@ module AtsMec_TrafficManagementAPI_TestCases { mw_http_message_body_json( mw_body_json_bw_info( mw_bw_info( - v_app_instance_id, + PX_APP_INSTANCE_ID, APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "2048", // FixedAllocation + "5096", // FixedAllocation Downlink // AllocationDirection - )))))) -> value v_response { + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwInfo ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -858,20 +1103,18 @@ module AtsMec_TrafficManagementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_TM_005_OK /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted */ - testcase TC_MEC_MEC015_SRV_TM_005_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_TM_005_BR_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_bw_allocation_id; var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("002")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -886,33 +1129,26 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); if (v_bw_allocation_id == "") { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); } - - // Test Body - httpPort.send( + f_init_default_headers_list(-, -, v_headers); + httpPort.send( m_http_request( - m_http_request_put( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "Invalid", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); + m_http_request_patch( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_info_deltas( + m_bw_info_deltas( + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION, + v_bw_info.allocationId, + { m_session_filter("10.10.10.10", 1010) } // FIXME Use PIXITs + )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( @@ -922,81 +1158,10 @@ module AtsMec_TrafficManagementAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_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_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_005_BR - - /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml - */ - testcase TC_MEC_MEC015_SRV_TM_005_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("003")); - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_BWMANAGEMENT_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); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - httpPort.send( - m_http_request( - m_http_request_put( - PX_ME_BWM_URI & "/InvalidAllocationId", - v_headers, - m_http_message_body_json( - m_body_json_bw_info( - m_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "2048", // FixedAllocation - Downlink // AllocationDirection - ) - ) - ) - ) - ) - ); - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error message ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1006,21 +1171,18 @@ module AtsMec_TrafficManagementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_005_NF + } // End of testcase TC_MEC_MEC015_SRV_TM_005_BR_01 /** - * @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present */ - testcase TC_MEC_MEC015_SRV_TM_006_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_TM_005_BR_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var charstring v_bw_allocation_id; var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -1035,50 +1197,39 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); if (v_bw_allocation_id == "") { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); } - - // Test Body - httpPort.send( + f_init_default_headers_list(-, -, v_headers); + httpPort.send( m_http_request( m_http_request_patch( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, v_headers, m_http_message_body_json( m_body_json_bw_info_deltas( m_bw_info_deltas( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - -, - "5096" - ) - ) - ) - ) - ) - ); + PX_APP_INSTANCE_ID, + SESSION_SPECIFIC_BW_ALLOCATION, + v_bw_info.allocationId + //{ m_session_filter("10.10.10.10", 1010) } sessionFilter shall be present + )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "5096", // FixedAllocation - Downlink // AllocationDirection - )))))) -> value v_response { + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error message ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1088,20 +1239,16 @@ module AtsMec_TrafficManagementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_006_OK + } // End of testcase TC_MEC_MEC015_SRV_TM_005_BR_02 /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application */ - testcase TC_MEC_MEC015_SRV_TM_006_BR() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_TM_005_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var charstring v_bw_allocation_id; - var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -1117,46 +1264,28 @@ module AtsMec_TrafficManagementAPI_TestCases { // Preamble f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); - if (v_bw_allocation_id == "") { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body httpPort.send( m_http_request( m_http_request_patch( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, + PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, v_headers, m_http_message_body_json( m_body_json_bw_info_deltas( m_bw_info_deltas( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - -, - "Invalid" - ) - ) - ) - ) - ) - ); + PX_APP_INSTANCE_ID, + APPLICATION_SPECIFIC_BW_ALLOCATION + )))))); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_400_bad_request( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_http_response_404_not_found + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); - f_delete_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched BwInfo ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1167,19 +1296,16 @@ module AtsMec_TrafficManagementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_006_BR + } // End of testcase TC_MEC_MEC015_SRV_TM_005_NF /** - * @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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application */ - testcase TC_MEC_MEC015_SRV_TM_006_NF() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_TM_006_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_bw_allocation_id; var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("004")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -1194,41 +1320,30 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); + if (v_bw_allocation_id == "") { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } f_init_default_headers_list(-, -, v_headers); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body httpPort.send( m_http_request( - m_http_request_patch( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, - v_headers, - m_http_message_body_json( - m_body_json_bw_info_deltas( - m_bw_info_deltas( - v_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - -, - "5096" - ) - ) - ) - ) + m_http_request_delete( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & v_bw_allocation_id, + v_headers + ) ) ); + + // Test Body tc_ac.start; alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found( - mw_http_message_body_json( - mw_body_json_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + mw_http_response_204_no_content + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1239,19 +1354,16 @@ module AtsMec_TrafficManagementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_006_NF + } // End of testcase TC_MEC_MEC015_SRV_TM_006_OK /** - * @desc Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/Plat/Mp1/Bandwidth/TrafficManagement.tplan2 - * @see hhttps://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/gitlab/mec/gs015-bandwith-mgmt-api/raw/master/BwManagementApi.yaml + * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application */ - testcase TC_MEC_MEC015_SRV_TM_007_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC015_SRV_TM_006_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var charstring v_bw_allocation_id; var BwInfo v_bw_info; - var Json.String v_app_instance_id := PX_APP_INSTANCE_ID & oct2unichar(char2oct("005")); // Test control if (not(PICS_MEC_PLAT) or not(PICS_BWMANAGEMENT_API_SUPPORTED)) { @@ -1266,29 +1378,25 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble - f_init_default_headers_list(-, -, v_headers); - f_create_bw_allocation_resource(v_app_instance_id, v_bw_allocation_id, v_bw_info); + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); if (v_bw_allocation_id == "") { f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); } - - // Test Body + f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PX_ME_BWM_URI & "/" & v_bw_allocation_id, + PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_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 responds to deletion ***"); @@ -1301,8 +1409,9 @@ module AtsMec_TrafficManagementAPI_TestCases { } // End of 'alt' statement // Postamble + f_delete_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC015_SRV_TM_007_OK + } // End of testcase TC_MEC_MEC015_SRV_TM_006_NF } // End of group me_app_role diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn index 430b9650c821e0a72867ff88f7a4186899e1f148..842fd6f4f7ab4614a5f20d835d06cf00df3dc81f 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn @@ -12,10 +12,59 @@ module AtsMec_TrafficManagementAPI_TestControl { control { if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) { - execute(TC_MEC_MEC015_SRV_TM_001_OK()); + execute(TC_MEC_MEC015_SRV_TM_001_OK_01()); + execute(TC_MEC_MEC015_SRV_TM_001_OK_02()); + execute(TC_MEC_MEC015_SRV_TM_001_OK_03()); + execute(TC_MEC_MEC015_SRV_TM_001_OK_04()); + execute(TC_MEC_MEC015_SRV_TM_001_BR()); + execute(TC_MEC_MEC015_SRV_TM_001_NF_01()); + execute(TC_MEC_MEC015_SRV_TM_001_NF_02()); + execute(TC_MEC_MEC015_SRV_TM_001_NF_03()); + execute(TC_MEC_MEC015_SRV_TM_002_OK()); - execute(TC_MEC_MEC015_SRV_TM_002_BR()); - execute(TC_MEC_MEC015_SRV_TM_002_NF()); + execute(TC_MEC_MEC015_SRV_TM_002_BR_01()); + execute(TC_MEC_MEC015_SRV_TM_002_BR_02()); + + execute(TC_MEC_MEC015_SRV_TM_003_OK()); + execute(TC_MEC_MEC015_SRV_TM_003_NF()); + + execute(TC_MEC_MEC015_SRV_TM_004_OK()); + execute(TC_MEC_MEC015_SRV_TM_004_BR_01()); + execute(TC_MEC_MEC015_SRV_TM_004_BR_02()); + execute(TC_MEC_MEC015_SRV_TM_004_NF()); + + execute(TC_MEC_MEC015_SRV_TM_005_OK()); + execute(TC_MEC_MEC015_SRV_TM_005_BR_01()); + execute(TC_MEC_MEC015_SRV_TM_005_BR_02()); + execute(TC_MEC_MEC015_SRV_TM_005_NF()); + + execute(TC_MEC_MEC015_SRV_TM_006_OK()); + execute(TC_MEC_MEC015_SRV_TM_006_NF()); + } + if (PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED) { + execute(TC_MEC_MEC015_SRV_MTS_001_OK()); + + execute(TC_MEC_MEC015_SRV_MTS_002_OK_01()); + execute(TC_MEC_MEC015_SRV_MTS_002_OK_02()); + execute(TC_MEC_MEC015_SRV_MTS_002_OK_03()); + execute(TC_MEC_MEC015_SRV_MTS_002_OK_04()); + execute(TC_MEC_MEC015_SRV_MTS_002_BR()); + execute(TC_MEC_MEC015_SRV_MTS_002_NF()); + + execute(TC_MEC_MEC015_SRV_MTS_003_OK_01()); + execute(TC_MEC_MEC015_SRV_MTS_003_OK_02()); + execute(TC_MEC_MEC015_SRV_MTS_003_BR()); + + execute(TC_MEC_MEC015_SRV_MTS_004_OK()); + execute(TC_MEC_MEC015_SRV_MTS_004_BR()); + execute(TC_MEC_MEC015_SRV_MTS_004_NF()); + + execute(TC_MEC_MEC015_SRV_MTS_005_OK()); + execute(TC_MEC_MEC015_SRV_MTS_005_BR()); + execute(TC_MEC_MEC015_SRV_MTS_005_NF()); + + execute(TC_MEC_MEC015_SRV_MTS_006_OK()); + execute(TC_MEC_MEC015_SRV_MTS_006_NF()); } } // End of 'control' statement diff --git a/ttcn/AtsMec_TrafficManagement/module.mk b/ttcn/AtsMec_TrafficManagement/module.mk index 514accbaa48b5f21149310374a9c2dcb4b68ec44..b24f6e67199837784cd80a079844a37c172c6c5c 100644 --- a/ttcn/AtsMec_TrafficManagement/module.mk +++ b/ttcn/AtsMec_TrafficManagement/module.mk @@ -2,12 +2,13 @@ suite := AtsMec_TrafficManagement sources := \ AtsMec_TrafficManagementAPI_TestCases.ttcn \ - AtsMec_TrafficManagementAPI_TestCases.ttcn \ + AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ AtsMec_TrafficManagementAPI_TestControl modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -15,7 +16,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ @@ -23,10 +23,13 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn index 9ef86435c76bce6262fe73246e49df9bea6a7cbf..7c4418c71fdd841f97470fe31f351dcfe844e597 100644 --- a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn +++ b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / STF569 + * @author ETSI / STF569 / TTF T027 * @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, ETSI GS MEC 014 V2.1.1 + * @see ETSI GS MEC 003, ETSI GS MEC 014 V3.1.1 */ module AtsMec_UEidentityAPI_TestCases { @@ -38,7 +38,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with the information on a UE Identity tag when queried by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/UETAG/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -61,11 +60,9 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -78,7 +75,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_ue_identity_tag_info( mw_ue_identity_tag_info( { *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG), * } - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a UeIdentityTag ***"); @@ -96,7 +93,6 @@ module AtsMec_UEidentityAPI_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/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -119,11 +115,9 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/invalid/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/invalid/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -136,7 +130,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); @@ -154,7 +148,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @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 - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -177,11 +170,9 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueIdentityTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -194,7 +185,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 404 - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -212,15 +203,14 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT registers a tag (representing a UE) or a list of tags when commanded by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_UE_IDENTITY_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_UE_IDENTITY_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_LOCATION_API_SUPPORTED required for executing the TC ***"); setverdict(inconc); stop; } @@ -240,7 +230,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", v_headers, m_http_message_body_json( m_body_json_ue_identity_tag_info( @@ -251,12 +241,7 @@ module AtsMec_UEidentityAPI_TestCases { REGISTERED ) } - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -269,7 +254,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_ue_identity_tag_info( mw_ue_identity_tag_info( { *, mw_ue_identity_tag_item(PX_UE_IDENTITY_TAG, REGISTERED), * } - )))))) { + )))))) { tc_ac.stop; if (f_check_user_register_state(-, v_headers) == 1) { @@ -292,7 +277,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with an error when an unauthorised request is sent by a MEC Application - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -320,7 +304,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", v_headers, m_http_message_body_json( m_body_json_ue_identity_tag_info( @@ -331,12 +315,7 @@ module AtsMec_UEidentityAPI_TestCases { INVALID_STATE ) } - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -349,7 +328,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - ))))*/)) { + ))))*/)) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 403 Forbidden ***"); @@ -367,7 +346,6 @@ module AtsMec_UEidentityAPI_TestCases { /** * @desc Check that the IUT responds with ProblemDetails on information an invalid URI - * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2 */ testcase TC_MEC_MEC014_SRV_UETAG_002_PF() runs on HttpComponent system HttpTestAdapter { // FIXME Which IE protocol should be invalid? // Local variables @@ -390,7 +368,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", + PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", v_headers, m_http_message_body_json( m_body_json_ue_identity_tag_info( @@ -401,12 +379,7 @@ module AtsMec_UEidentityAPI_TestCases { UNREGISTERED ) } - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -419,7 +392,7 @@ module AtsMec_UEidentityAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 412 - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***"); @@ -465,7 +438,7 @@ module AtsMec_UEidentityAPI_TestCases { // httpPort.send( // m_http_request( // m_http_request_post( -// "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", +// PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", // v_headers, // m_http_message_body_json( // m_body_json_ue_identity_tag_info( @@ -543,7 +516,7 @@ module AtsMec_UEidentityAPI_TestCases { // httpPort.send( // m_http_request( // m_http_request_post( -// "/" & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", +// PICS_ROOT_API & PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info", // v_headers, // m_http_message_body_json( // m_body_json_ue_identity_tag_info( diff --git a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestControl.ttcn b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestControl.ttcn index f324d068a17790601a64bfcd4e37157eb0f481da..97dcc2ee81c5bd9b46a35a0df852b4225d929004 100644 --- a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestControl.ttcn +++ b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestControl.ttcn @@ -11,15 +11,14 @@ module AtsMec_UEidentityAPI_TestControl { control { - if (PICS_MEC_PLAT and PICS_SERVICES) { - if (PICS_UE_IDENTITY_API_SUPPORTED) { - execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); - execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); - execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); - execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); - } + if (PICS_MEC_PLAT and PICS_SERVICES and PICS_UE_IDENTITY_API_SUPPORTED) { + execute(TC_MEC_MEC014_SRV_UETAG_001_OK()); + execute(TC_MEC_MEC014_SRV_UETAG_001_BR()); + execute(TC_MEC_MEC014_SRV_UETAG_001_NF()); + + execute(TC_MEC_MEC014_SRV_UETAG_002_OK()); + execute(TC_MEC_MEC014_SRV_UETAG_002_BR()); + execute(TC_MEC_MEC014_SRV_UETAG_002_PF()); } } // End of 'control' statement diff --git a/ttcn/AtsMec_UEidentity/module.mk b/ttcn/AtsMec_UEidentity/module.mk index ce0a0eecccda4480d5574b4077d51cedfc67d2c1..9fc9bb454415f9b78dfe7158153937db9a87784a 100644 --- a/ttcn/AtsMec_UEidentity/module.mk +++ b/ttcn/AtsMec_UEidentity/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -14,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ @@ -22,10 +22,13 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn index ca8f28e66d8bdb6c2cf060ce3746a692ed109672..f94289ef1de39b9bcc46037d96384bb94f66922f 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn @@ -43,193 +43,1342 @@ module AtsMec_V2XInformationServiceAPI_TestCases { /** * @desc Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_001_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=ecgi," & PX_V2X_ECGI, + 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_uu_unicast_provisioning_info( + mw_uu_unicast_provisioning_info( + { + mw_proInfoUuUnicast( + mw_location_info( + mw_ecgi( + PX_V2X_CELL_ID, + mw_plmn( + PX_MCC, + PX_MNC + )), + mw_location_info_geo_area( + PX_V2X_ECGI_LAT, + PX_V2X_ECGI_LONG + )), + mw_v2x_application_server( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT) + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // 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_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_ECGI, - 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_uu_unicast_provisioning_info( - mw_uu_unicast_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); - 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(); + [] 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_MEC030_SRV_V2X_001_OK_01 /** * @desc Check that the IUT responds with a configured provisioning information over Uu unicast when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_001_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_LATITUDE, + 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_uu_unicast_provisioning_info( + mw_uu_unicast_provisioning_info( + { + mw_proInfoUuUnicast( + mw_location_info( + mw_ecgi( + PX_V2X_CELL_ID, + mw_plmn( + PX_MCC, + PX_MNC + )), + mw_location_info_geo_area( + PX_V2X_ECGI_LAT, + PX_V2X_ECGI_LONG + )), + mw_v2x_application_server( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT) + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // 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_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_LATITUDE, - 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_uu_unicast_provisioning_info( - mw_uu_unicast_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuUnicastProvisioningInfo ***"); - 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(); + [] 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_MEC030_SRV_V2X_001_OK_02 /** * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_001_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?info=" & PX_V2X_LATITUDE, + 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 successfully responds with correct error message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // 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_V2X_QUERIES_URI & "/invalid_uu_unicast_provisioning_info?location_info=" & PX_V2X_LATITUDE, - 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 - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - 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(); + [] 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_MEC030_SRV_V2X_001_BR /** * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 */ testcase TC_MEC_MEC030_SRV_V2X_001_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=ecgi," & PX_V2X_UNKNOWN_ECGI, + 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 correct error message ***"); + 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_MEC030_SRV_V2X_001_NF + + /** + * @desc Check that the IUT responds with a configured provisioning information over Uu MBMS when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_002_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=ecgi," & PX_V2X_ECGI, + 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_uu_mbms_provisioning_info( + mw_uu_mbms_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuMbmsProvisioningInfo ***"); + 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_MEC030_SRV_V2X_002_OK_01 + + /** + * @desc Check that the IUT responds with a configured provisioning information over Uu MBMS when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_LATITUDE, + 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_uu_mbms_provisioning_info( + mw_uu_mbms_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuMbmsProvisioningInfo ***"); + 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_MEC030_SRV_V2X_002_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/invalid_uu_mbms_provisioning_info?location_info=" & PX_V2X_LATITUDE, + 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 successfully responds with correct error message ***"); + 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_MEC030_SRV_V2X_002_BR + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=ecgi," & PX_V2X_UNKNOWN_ECGI, + 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 correct error message ***"); + 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_MEC030_SRV_V2X_002_NF + + /** + * @desc Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_003_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=ecgi," & PX_V2X_ECGI, + 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_pc5_provisioning_info( + mw_pc5_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Pc5ProvisioningInfo ***"); + 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_MEC030_SRV_V2X_003_OK_01 + + /** + * @desc Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_003_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE, + 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_pc5_provisioning_info( + mw_pc5_provisioning_info + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Pc5ProvisioningInfo ***"); + 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_MEC030_SRV_V2X_003_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_003_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/invalid_pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE, + 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 successfully responds with correct error message ***"); + 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_MEC030_SRV_V2X_003_BR + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=ecgi," & PX_V2X_UNKNOWN_ECGI, + 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 correct error message ***"); + 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_MEC030_SRV_V2X_003_NF + + /** + * @desc Check that the IUT processes properly a request to information of V2X Message Distribution servers + */ + testcase TC_MEC_MEC030_SRV_V2X_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/provide_v2x_msg_distribution_server_info", + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server_info( + { + m_v2x_msg_distribution_server( + m_info_protocol + ) + } + )))))); + 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_v2x_msg_distribution_server_info( + mw_v2x_msg_distribution_server_info( + { + mw_v2x_msg_distribution_server( + m_info_protocol, + mw_info_connection( + PX_V2X_MC_SERVER, + str2int(PX_V2X_MC_PORT) + )) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct connection information ***"); + 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_MEC030_SRV_V2X_004_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_MEC030_SRV_V2X_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/provide_v2x_msg_distribution_server_info", + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server_info( + { + m_v2x_msg_distribution_server( + m_info_protocol, + m_info_connection( // Wrong field value: Shall only be included in the response + PX_V2X_MSG_DISTRIBUTION_SERVER_IP_ADDRESS, + PX_V2X_MSG_DISTRIBUTION_SERVER_PORT + )) + } + )))))); + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_004_BR + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/provide_v2x_msg_distribution_server_info", + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_distribution_server_info( + m_v2x_msg_distribution_server_info( + { + m_v2x_msg_distribution_server( + m_info_protocol({ AMQP_1_0 }) + ) + } + )))))); + 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 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_MEC030_SRV_V2X_004_NF + + /** + * @desc Check that the IUT sends a request about QoS information for a vehicular UE when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/provide_predicted_qos", + v_headers, + m_http_message_body_json( + m_body_json_v2x_predicted_qos( + m_predicted_qos( + -, + PX_LOC_GRANULARITY, + m_qos( + { + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) + } + )/*, + { + m_predicted_qos_routes( + { + m_route_info( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + ), + -, + 128, + 128 + ), + m_route_info( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.75, 10.5) + ), + -, + 128, + 128 + ) + } + ) + }*/ + )))))); + 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_v2x_predicted_qos( + mw_predicted_qos( + -, + PX_LOC_GRANULARITY + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a PredictedQos ***"); + 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_MEC030_SRV_V2X_005_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_MEC030_SRV_V2X_005_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/provide_predicted_qos", + v_headers, + m_http_message_body_json( + m_body_json_v2x_predicted_qos( + m_predicted_qos( + -, + PX_LOC_GRANULARITY & "InvalidSemantic", + m_qos( + { + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) + } + )/*, + { + m_predicted_qos_routes( + { + m_route_info( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + ), + -, + 128, + 128 + ), + m_route_info( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.75, 10.5) + ), + -, + 128, + 128 + ) + } + ) + }*/ + )))))); + 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 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_MEC030_SRV_V2X_005_BR + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/provide_predicted_qos", + v_headers, + m_http_message_body_json( + m_body_json_v2x_predicted_qos( + m_predicted_qos( + -, + PX_LOC_GRANULARITY, + m_qos( + { + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), // FIXME To be refined + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }), + m_stream({ m_qos_kpi("", ""), m_qos_kpi("", "") }) + } + )/*, + { + m_predicted_qos_routes( + { + m_route_info( + m_location_info( + m_ecgi( + PX_V2X_UNKNOWN_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + ), + -, + 128, + 128 + ), + m_route_info( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_UNKNOWN_MCC, PX_UNKNOWN_MNC) + ), + m_location_info_geo_area(43.75, 10.5) + ), + -, + 128, + 128 + ) + } + ) + }*/ + )))))); + 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 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_MEC030_SRV_V2X_005_NF + + /** + * @desc Check that the IUT processes properly a request to publish a V2X message + */ + testcase TC_MEC_MEC030_SRV_V2X_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/publish_v2x_message", + v_headers, + m_http_message_body_json( + m_body_json_v2x_message( + m_v2x_message( + m_v2x_msg_properties_values( + -, -, -, + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) // FIXME Use PIXITs + )))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // 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 responds with the correct status 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_MEC030_SRV_V2X_006_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_MEC030_SRV_V2X_006_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/publish_v2x_message", + v_headers, + m_http_message_body_json( + m_body_json_v2x_message( + m_v2x_message( + m_v2x_msg_properties_values( + -, -, -, + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + )), + "UnknownEncodeFormat" + )))))); + 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 successfully responds with 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_MEC030_SRV_V2X_006_BR + + /** + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - prov_chg_uu_uni + */ + testcase TC_MEC_MEC030_SRV_V2X_007_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_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_V2X_URI_SUB & "?subscription_type=prov_chg_uu_uni", + 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_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + 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_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_01 + + /** + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - prov_chg_uu_mbms + */ + testcase TC_MEC_MEC030_SRV_V2X_007_OK_02() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; + var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; + var charstring v_subscription_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration @@ -238,15 +1387,14 @@ module AtsMec_V2XInformationServiceAPI_TestCases { // Test adapter configuration // Preamble + f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_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_V2X_QUERIES_URI & "/uu_unicast_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?subscription_type=prov_chg_uu_mbms", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -254,11 +1402,13 @@ module AtsMec_V2XInformationServiceAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_v2x_subscription_link_list + )))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -267,2604 +1417,2079 @@ module AtsMec_V2XInformationServiceAPI_TestCases { } } // End of 'alt' statement - // Postamble + // postamble + f_delete_prov_uu_mbms_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_001_NF + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_02 /** - * @desc Check that the IUT responds with a configured provisioning information over Uu mbms when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - prov_chg_pc5 */ - testcase TC_MEC_MEC030_SRV_V2X_002_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC030_SRV_V2X_007_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_pc5_subscription(v_prov_chg_pc5_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_V2X_URI_SUB & "?subscription_type=prov_chg_pc5", + 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_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // 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_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_ECGI, - 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_uu_mbms_provisioning_info( - mw_uu_mbms_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuMbmsProvisioningInfo ***"); - 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_MEC030_SRV_V2X_002_OK_01 + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_pc5_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_03 /** - * @desc Check that the IUT responds with a configured provisioning information over Uu mbms when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - v2x_msg */ - testcase TC_MEC_MEC030_SRV_V2X_002_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC030_SRV_V2X_007_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_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_V2X_URI_SUB & "?subscription_type=v2x_msg", + 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_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // 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_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, 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_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_04 - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_uu_mbms_provisioning_info( - mw_uu_mbms_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a UuMbmsProvisioningInfo ***"); - 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_MEC030_SRV_V2X_002_OK_02 + /** + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - pred_qos + */ + testcase TC_MEC_MEC030_SRV_V2X_007_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var PredQosSubscription v_pred_qos; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_pred_qos_subscription(v_pred_qos, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "?subscription_type=pred_qos", + 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_v2x_subscription_link_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); + 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_pred_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_007_OK_05 /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application */ - testcase TC_MEC_MEC030_SRV_V2X_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC030_SRV_V2X_007_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/subscriptions/_prov_chg_uu_uni_", // Invalid subscription type + 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 successfully responds with a list of SubscriptionLink ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // 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_V2X_QUERIES_URI & "/invalid_uu_mbms_provisioning_info?location_info=" & PX_V2X_LATITUDE, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, 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_MEC030_SRV_V2X_007_BR - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + /** + * @desc Check that the IUT responds with the requested to create a subscription - ProvChgUuUniSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_01() 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_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_uni_subscription( + mw_prov_chg_uu_uni_subscription( + -, + PX_PROV_UU_UNI_SUB_CALLBACK, + ? + )))))) -> 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 ProvChgUuUniSubscription subscription ***"); + 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_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a provChgUuUniSubscription, 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_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_002_BR + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_01 /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested to create a subscription - ProvChgUuMbmsSubscription */ - testcase TC_MEC_MEC030_SRV_V2X_002_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC030_SRV_V2X_008_OK_02() 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_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_mbms_subscription( + m_prov_chg_uu_mbms_subscription( + m_prov_chg_uu_mbms_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_server_usd( + { PX_V2X_MBMS_SERVICE_ID }, + m_sdp_info( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT + ), + m_tmgi( + PX_V2X_SERVICE_AREA_ID, + PX_MCC, + PX_MNC + ))), + PX_PROV_UU_MBMS_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_prov_chg_uu_mbms_subscription( + mw_prov_chg_uu_mbms_subscription( + -, + PX_PROV_UU_MBMS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + 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_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a provChgUuMbmsSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } - - // 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_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, 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_prov_uu_mbms_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_02 - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); + /** + * @desc Check that the IUT responds with the requested to create a subscription - + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_03() 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_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configurationProvChgPc5Subscription + 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_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_pc5_subscription( + m_prov_chg_pc5_subscription( + m_filter_criteria( + PX_V2X_DST_LAYER_2_ID, + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + ))), + PX_PROV_PC5_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_prov_chg_pc5_subscription( + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + 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_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a provChgPc5Subscription, 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_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_002_NF + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_pc5_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_0078_OK_03 /** - * @desc Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested to create a subscription - V2xMsgSubscription */ - testcase TC_MEC_MEC030_SRV_V2X_003_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC030_SRV_V2X_008_OK_04() 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_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_subscription( + m_v2x_msg_subscription( + m_v2x_msg_subscription_filter_criteria, + PX_PROV_V2X_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_v2x_msg_subscription( + mw_v2x_msg_subscription( + -, + PX_PROV_V2X_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + 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_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a v2xMsgSubscription, SubscriptionId: ", v_subscription_id," ***"); + } } - - // 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_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_ECGI, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, 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_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_04 - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_pc5_provisioning_info( - mw_pc5_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Pc5ProvisioningInfo ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + /** + * @desc Check that the IUT responds with the requested to create a subscription - PredQosSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_008_OK_05() 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_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_pred_qos_subscription( + m_pred_qos_subscription( + m_qos_pred_filter_criteria, + PX_PRED_QOS_SUB_CALLBACK + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_pred_qos_subscription( + mw_pred_qos_subscription( + -, + PX_PRED_QOS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + 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_V2X_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a predQosSubscription, SubscriptionId: ", v_subscription_id," ***"); } - } // End of 'alt' statement - - // Postamble - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_003_OK_01 + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_pred_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_05 /** - * @desc Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Wrong SubscriptionType */ - testcase TC_MEC_MEC030_SRV_V2X_003_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + testcase TC_MEC_MEC030_SRV_V2X_008_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription_invalid( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK + )))))); + 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 successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // 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_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE, - 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_pc5_provisioning_info( - mw_pc5_provisioning_info - ))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a Pc5ProvisioningInfo ***"); - 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_MEC030_SRV_V2X_003_OK_02 - - /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_003_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/invalid_pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE, - 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 - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - 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_MEC030_SRV_V2X_003_BR - - /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_003_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_UNKNOWN_ECGI, - 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 - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with correct error message ***"); - 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_MEC030_SRV_V2X_003_NF - - /** - * @desc Check that the IUT sends a request about QoS information for a vehicular UE when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_004_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/provide_predicted_qos", - v_headers, - m_http_message_body_json( - m_body_json_v2x_predicted_qos( - m_predicted_qos( - PX_LOC_GRANULARITY, - { - m_predicted_qos_routes( - { - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.72, 10.41) - ), - -, - 128, - 128 - ), - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.75, 10.5) - ), - -, - 128, - 128 - ) - } - ) - } - )))))); - 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_v2x_predicted_qos( - mw_predicted_qos( - PX_LOC_GRANULARITY - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a PredictedQos ***"); - 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_MEC030_SRV_V2X_004_OK - - /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_004_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/provide_predicted_qos", - v_headers, - m_http_message_body_json( - m_body_json_v2x_predicted_qos( - m_predicted_qos( - PX_LOC_GRANULARITY & "InvalidSemantic", - { - m_predicted_qos_routes( - { - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.72, 10.41) - ), - -, - 128, - 128 - ), - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.75, 10.5) - ), - -, - 128, - 128 - ) - } - ) - } - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - 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_MEC030_SRV_V2X_004_BR - - /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_004_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/provide_predicted_qos", - v_headers, - m_http_message_body_json( - m_body_json_v2x_predicted_qos( - m_predicted_qos( - PX_LOC_GRANULARITY, - { - m_predicted_qos_routes( - { - m_route_info( - m_location_info( - m_ecgi( - PX_UNKNOWN_CELL_ID, - m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area(43.72, 10.41) - ), - -, - 128, - 128 - ), - m_route_info( - m_location_info( - m_ecgi( - PX_CELL_ID, - m_plmn(PX_UNKNOWN_MCC, PX_UNKNOWN_MNC) - ), - m_location_info_geo_area(43.75, 10.5) - ), - -, - 128, - 128 - ) - } - ) - } - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_404_not_found - )) -> value v_response { - 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_MEC030_SRV_V2X_004_NF - - /** - * @desc Check that the IUT processes properly a request to publish a V2X message - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_005_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/publish_v2x_message", - v_headers, - m_http_message_body_json( - m_body_json_v2x_message( - m_v2x_message - ))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // 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 responds with correct status ***"); - 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_MEC030_SRV_V2X_005_OK - - /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_005_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/publish_v2x_message", - v_headers, - m_http_message_body_json( - m_body_json_v2x_message( - m_v2x_message( - -, - "UnknownEncodeFormat" - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_400_bad_request - )) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with 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_MEC030_SRV_V2X_005_BR - - /** - * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_006_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/subscriptions/prov_chg_uu_uni", - 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_v2x_subscription_link_list - )))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); - 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_MEC030_SRV_V2X_006_OK_01 - - /** - * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_006_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/subscriptions/prov_chg_uu_mbms", - 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_v2x_subscription_link_list - )))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); - 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_MEC030_SRV_V2X_006_OK_02 - - /** - * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_006_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/subscriptions/prov_chg_pc5", - 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_v2x_subscription_link_list - )))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); - 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_MEC030_SRV_V2X_006_OK_03 - - /** - * @desc Check that the IUT responds with the requested list of subscription when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_006_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/subscriptions/v2x_msg", - 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_v2x_subscription_link_list - )))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); - 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_MEC030_SRV_V2X_006_OK_04 - - /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_006_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/subscriptions/_prov_chg_uu_uni_", // Invalid subscription type - 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 successfully responds with a list of SubscriptionLink ***"); - 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_MEC030_SRV_V2X_006_BR - - /** - * @desc Check that the IUT responds with the requested to create a subscription - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/subscriptions/prov_chg_uu_uni", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_uni_subscription( - mw_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - 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_MEC030_SRV_V2X_007_OK_01 - - /** - * @desc Check that the IUT responds with the requested to create a subscription - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/subscriptions/prov_chg_uu_mbms", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_mbms_subscription( - m_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, - m_prov_chg_uu_mbms_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_server_usd( - { PX_V2X_MBMS_SERVICE_ID }, - m_sdp_info( - PX_V2X_MC_SERVER, - PX_V2X_MC_PORT - ), - m_tmgi( - PX_V2X_SERVICE_AREA_ID, - PX_MCC, - PX_MNC - ))))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_prov_chg_uu_mbms_subscription( - mw_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - 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_MEC030_SRV_V2X_007_OK_02 - - /** - * @desc Check that the IUT responds with the requested to create a subscription - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/subscriptions/prov_chg_pc5", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_pc5_subscription( - m_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - m_filter_criteria( - PX_V2X_DST_LAYER_2_ID, - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - ))))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - 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_MEC030_SRV_V2X_007_OK_03 - - /** - * @desc Check that the IUT responds with the requested to create a subscription - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/subscriptions/V2xMsgSubscription", - v_headers, - m_http_message_body_json( - m_body_json_v2x_msg_subscription( - m_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - m_v2x_msg_subscription_filter_criteria - )))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_v2x_msg_subscription( - mw_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - 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_MEC030_SRV_V2X_007_OK_04 - - /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_007_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/subscriptions/prov_chg_uu_uni", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription_invalid( - PX_PROV_UU_UNI_SUB_CALLBACK, - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )))))))); - 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 successfully registers subscription ***"); - 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_MEC030_SRV_V2X_007_BR - - /** - * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_, - 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_prov_chg_uu_uni_subscription( - mw_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - 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_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_01 - - /** - * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_, - 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_prov_chg_uu_mbms_subscription( - mw_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - 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_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_02 - - /** - * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgPc5Subscription v_prov_chg_pc5_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_, - 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_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - 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_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_03 - - /** - * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var V2xMsgSubscription v_v2x_msg_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_v2x_msg_subscription(v_v2x_msg_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_, - 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_v2x_msg_subscription( - mw_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - -, - ? - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - 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_v2x_msg_subscription(v_v2x_msg_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_OK_04 - - /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_008_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var V2xMsgSubscription v_v2x_msg_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_v2x_msg_subscription(v_v2x_msg_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_, - 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 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_delete_v2x_msg_subscription(v_v2x_msg_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_008_BR + [] 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_MEC030_SRV_V2X_008_BR_01 /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - No Callback neitheir WebSocket */ - testcase TC_MEC_MEC030_SRV_V2X_008_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI & "/subscriptions/invalid_links", - 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 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_MEC030_SRV_V2X_008_NF + testcase TC_MEC_MEC030_SRV_V2X_008_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + "" + )))))); + 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 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_008_BR_02 /** - * @desc Check that the IUT responds with the request of updating subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuUniSubscription */ testcase TC_MEC_MEC030_SRV_V2X_009_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_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_V2X_URI_SUB & "/" & 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_prov_chg_uu_uni_subscription( + mw_prov_chg_uu_uni_subscription( + -, + PX_PROV_UU_UNI_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrieves the provChgUuUniSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_, - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.77, - 10.46 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), - v_prov_chg_uu_uni_subscription.links - )))))); - 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_prov_chg_uu_uni_subscription( - mw_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, - -, - v_prov_chg_uu_uni_subscription.links - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - 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_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_01 /** - * @desc Check that the IUT responds with the request of updating subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgUuMbmsSubscription */ testcase TC_MEC_MEC030_SRV_V2X_009_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_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_V2X_URI_SUB & "/" & 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_prov_chg_uu_mbms_subscription( + mw_prov_chg_uu_mbms_subscription( + -, + PX_PROV_UU_MBMS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrives the provChgUuMbmsSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_, - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_mbms_subscription( - m_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, - m_prov_chg_uu_mbms_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.77, - 10.46 - )), - m_v2x_server_usd( - { PX_V2X_MBMS_SERVICE_ID }, - m_sdp_info( - PX_V2X_MC_SERVER, - PX_V2X_MC_PORT - ), - m_tmgi( - PX_V2X_SERVICE_AREA_ID, - PX_MCC, - PX_MNC - ))), - v_prov_chg_uu_mbms_subscription.links -)))))); - 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_prov_chg_uu_mbms_subscription( - mw_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, - -, - v_prov_chg_uu_mbms_subscription.links - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - 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_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_cf_01_http_down(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_mbms_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_02 /** - * @desc Check that the IUT responds with the request of updating subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - ProvChgPc5Subscription */ testcase TC_MEC_MEC030_SRV_V2X_009_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgPc5Subscription v_prov_chg_pc5_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_, - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_pc5_subscription( - m_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - m_filter_criteria( - PX_V2X_DST_LAYER_2_ID, - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.77, - 10.46 - ))), - v_prov_chg_pc5_subscription.links - )))))); - 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_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - -, - v_prov_chg_pc5_subscription.links - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - 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_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_03 - - /** - * @desc Check that the IUT responds with the request of updating subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_009_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var V2xMsgSubscription v_v2x_msg_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_pc5_subscription(v_prov_chg_pc5_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_V2X_URI_SUB & "/" & 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_prov_chg_pc5_subscription( + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrives the provChgPc5Subscriptions ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_v2x_msg_subscription(v_v2x_msg_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_, - v_headers, - m_http_message_body_json( - m_body_json_v2x_msg_subscription( - m_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - m_v2x_msg_subscription_filter_criteria, - v_v2x_msg_subscription.links - )))))); - 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_v2x_msg_subscription( - mw_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - -, - v_v2x_msg_subscription.links - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully registers subscription ***"); - 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_v2x_msg_subscription(v_v2x_msg_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_04 - - /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_009_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_, - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription_invalid( - PX_PROV_UU_UNI_SUB_CALLBACK, - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), - v_prov_chg_uu_uni_subscription.links - )))))); - 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 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_delete_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_009_BR + } // End of 'alt' statement + + // postamble + f_delete_prov_pc5_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_03 - /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 - */ - testcase TC_MEC_MEC030_SRV_V2X_009_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/invalid_links", - v_headers, - m_http_message_body_json( - m_body_json_prov_chg_uu_uni_subscription( - m_prov_chg_uu_uni_subscription_invalid( - PX_PROV_UU_UNI_SUB_CALLBACK, - m_prov_chg_uu_uni_filter_criteria( - m_location_info( - m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) - ), - m_location_info_geo_area( - 43.72, - 10.41 - )), - m_v2x_application_server( - oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), - oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )), - v_prov_chg_uu_uni_subscription.links - )))))); - 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 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_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_cf_01_http_down(); + /** + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - V2xMsgSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_009_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_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_V2X_URI_SUB & "/" & 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_v2x_msg_subscription( + mw_v2x_msg_subscription( + -, + PX_PROV_V2X_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrieves the v2xMsgSubscription ***"); + 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_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_04 + + /** + * @desc Check that the IUT responds with the requested of subscription information when queried by a MEC Application - PredQosSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_009_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var PredQosSubscription v_pred_qos_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_pred_qos_subscription(v_pred_qos_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_V2X_URI_SUB & "/" & 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_pred_qos_subscription( + mw_pred_qos_subscription( + -, + PX_PRED_QOS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully retrieves the predQosSubscription ***"); + 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_pred_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_OK_05 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_009_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_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_V2X_URI_SUB & "?sub="& v_subscription_id, // Wrong URL + 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 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_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_009_BR + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_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_V2X_URI_SUB & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + 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 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_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_009_NF /** - * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - ProvChgUuUniSubscription */ testcase TC_MEC_MEC030_SRV_V2X_010_OK_01() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_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_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.77, + 10.46 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links + )))))); + 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_prov_chg_uu_uni_subscription( + mw_prov_chg_uu_uni_subscription( + -, + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_uni_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // 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 removes subscription ***"); - 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(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_01 /** - * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - ProvChgUuMbmsSubscription */ testcase TC_MEC_MEC030_SRV_V2X_010_OK_02() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_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_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_mbms_subscription( + m_prov_chg_uu_mbms_subscription( + m_prov_chg_uu_mbms_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.77, + 10.46 + )), + m_v2x_server_usd( + { PX_V2X_MBMS_SERVICE_ID }, + m_sdp_info( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT + ), + m_tmgi( + PX_V2X_SERVICE_AREA_ID, + PX_MCC, + PX_MNC + ))), + PX_PROV_UU_MBMS_SUB_CALLBACK, + v_prov_chg_uu_mbms_subscription.links + )))))); + 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_prov_chg_uu_mbms_subscription( + mw_prov_chg_uu_mbms_subscription( + -, + PX_PROV_UU_MBMS_SUB_CALLBACK, + v_prov_chg_uu_mbms_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_uu_mbms_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // 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 removes subscription ***"); - 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(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_mbms_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_02 /** - * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - ProvChgPc5Subscription */ testcase TC_MEC_MEC030_SRV_V2X_010_OK_03() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var ProvChgPc5Subscription v_prov_chg_pc5_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_pc5_subscription(v_prov_chg_pc5_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_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_pc5_subscription( + m_prov_chg_pc5_subscription( + m_filter_criteria( + PX_V2X_DST_LAYER_2_ID, + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.77, + 10.46 + ))), + PX_PROV_PC5_SUB_CALLBACK, + v_prov_chg_pc5_subscription.links + )))))); + 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_prov_chg_pc5_subscription( + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + v_prov_chg_pc5_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_prov_pc5_subscription(v_prov_chg_pc5_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_prov_chg_pc5_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // 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 removes subscription ***"); - 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(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_pc5_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_03 /** - * @desc Check that the IUT responds with the request of removing subscription information when queried by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - V2xMsgSubscription */ testcase TC_MEC_MEC030_SRV_V2X_010_OK_04() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - var V2xMsgSubscription v_v2x_msg_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_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_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_v2x_msg_subscription( + m_v2x_msg_subscription( + m_v2x_msg_subscription_filter_criteria, + PX_PROV_V2X_SUB_CALLBACK, + v_v2x_msg_subscription.links + )))))); + 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_v2x_msg_subscription( + mw_v2x_msg_subscription( + -, + PX_PROV_V2X_SUB_CALLBACK, + v_v2x_msg_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_v2x_msg_subscription(v_v2x_msg_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & v_v2x_msg_subscription.links.self_, - v_headers - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // 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 registers subscription ***"); - 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(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_v2x_msg_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_04 /** - * @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/gs030-vis-api/blob/master/MEC030_V2XInformationService.yaml - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC030/SRV/V2XInformationService.tplan2 + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - PredQosSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_010_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var PredQosSubscription v_pred_qos_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_pred_qos_subscription(v_pred_qos_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_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_pred_qos_subscription( + m_pred_qos_subscription( + m_qos_pred_filter_criteria, + PX_PRED_QOS_SUB_CALLBACK, + v_pred_qos_subscription.links + )))))); + 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_pred_qos_subscription( + mw_pred_qos_subscription( + -, + PX_PRED_QOS_SUB_CALLBACK, + ? + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully udates the predQosSubscription ***"); + 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_pred_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_OK_05 + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_010_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_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_V2X_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription_invalid( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links + )))))); + 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 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_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC030_SRV_V2X_010_BR + + /** + * @desc Check that the IUT responds with the requested of updating subscription when queried by a MEC Application */ testcase TC_MEC_MEC030_SRV_V2X_010_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_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_V2X_URI_SUB & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_prov_chg_uu_uni_subscription( + m_prov_chg_uu_uni_subscription_invalid( + m_prov_chg_uu_uni_filter_criteria( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area( + 43.72, + 10.41 + )), + m_v2x_application_server( + oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), + oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) + )), + PX_PROV_UU_UNI_SUB_CALLBACK, + v_prov_chg_uu_uni_subscription.links + )))))); + 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 correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // 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_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/invalid_links", - 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 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(); + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // postamble + f_delete_prov_uu_uni_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC030_SRV_V2X_010_NF + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgUuUniSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_011_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_uni_subscription(v_prov_chg_uu_uni_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_V2X_URI_SUB & "/" & 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_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + 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_MEC030_SRV_V2X_011_OK_01 + + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgUuMbmsSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_011_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgUuMbmsSubscription v_prov_chg_uu_mbms_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_uu_mbms_subscription(v_prov_chg_uu_mbms_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_V2X_URI_SUB & "/" & 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_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + 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_MEC030_SRV_V2X_011_OK_02 + + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - ProvChgPc5Subscription + */ + testcase TC_MEC_MEC030_SRV_V2X_011_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var ProvChgPc5Subscription v_prov_chg_pc5_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_prov_pc5_subscription(v_prov_chg_pc5_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_V2X_URI_SUB & "/" & 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_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + 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_MEC030_SRV_V2X_011_OK_03 + + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - V2xMsgSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_011_OK_04() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var V2xMsgSubscription v_v2x_msg_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_v2x_msg_subscription(v_v2x_msg_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_V2X_URI_SUB & "/" & 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_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + 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_MEC030_SRV_V2X_011_OK_04 + + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application - PredQosSubscription + */ + testcase TC_MEC_MEC030_SRV_V2X_011_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var PredQosSubscription v_pred_qos_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_pred_qos_subscription(v_pred_qos_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_V2X_URI_SUB & "/" & 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_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully removes subscription ***"); + 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_MEC030_SRV_V2X_011_OK_05 + + /** + * @desc Check that the IUT responds with the requested of removing subscription when queried by a MEC Application + */ + testcase TC_MEC_MEC030_SRV_V2X_011_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ProvChgUuUniSubscription v_prov_chg_uu_uni_subscription; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_V2X_INFORMATION_SERVICE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_V2X_INFORMATION_SERVICE_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_delete( + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + 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 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_MEC030_SRV_V2X_011_NF + } // End of group me_app_role } // End of module AtsMec_V2XInformationServiceAPI_TestCases diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn index ee7c702cbc32eb4d91df8bc25b64413349ca9cda..5b6023314553055f7efcb6faedc31b7ca824325e 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn @@ -12,6 +12,69 @@ module AtsMec_V2XInformationServiceAPI_TestControl { control { if (PICS_MEC_PLAT and PICS_SERVICES) { + execute(TC_MEC_MEC030_SRV_V2X_001_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_001_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_001_BR()); + execute(TC_MEC_MEC030_SRV_V2X_001_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_002_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_002_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_002_BR()); + execute(TC_MEC_MEC030_SRV_V2X_002_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_003_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_003_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_003_BR()); + execute(TC_MEC_MEC030_SRV_V2X_003_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_004_OK()); + execute(TC_MEC_MEC030_SRV_V2X_004_BR()); + execute(TC_MEC_MEC030_SRV_V2X_004_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_005_OK()); + execute(TC_MEC_MEC030_SRV_V2X_005_BR()); + execute(TC_MEC_MEC030_SRV_V2X_005_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_006_OK()); + execute(TC_MEC_MEC030_SRV_V2X_006_BR()); + + execute(TC_MEC_MEC030_SRV_V2X_007_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_007_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_007_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_007_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_007_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_007_BR()); + + execute(TC_MEC_MEC030_SRV_V2X_008_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_008_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_008_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_008_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_008_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_008_BR_01()); + execute(TC_MEC_MEC030_SRV_V2X_008_BR_02()); + + execute(TC_MEC_MEC030_SRV_V2X_009_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_009_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_009_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_009_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_009_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_009_BR()); + execute(TC_MEC_MEC030_SRV_V2X_009_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_010_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_010_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_010_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_010_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_010_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_010_BR()); + execute(TC_MEC_MEC030_SRV_V2X_010_NF()); + + execute(TC_MEC_MEC030_SRV_V2X_011_OK_01()); + execute(TC_MEC_MEC030_SRV_V2X_011_OK_02()); + execute(TC_MEC_MEC030_SRV_V2X_011_OK_03()); + execute(TC_MEC_MEC030_SRV_V2X_011_OK_04()); + execute(TC_MEC_MEC030_SRV_V2X_011_OK_05()); + execute(TC_MEC_MEC030_SRV_V2X_011_NF()); } } // End of 'control' statement diff --git a/ttcn/AtsMec_V2XInformationService/module.mk b/ttcn/AtsMec_V2XInformationService/module.mk index a58df4a071caccb603052e29000c9c6df87c8e0f..4e4bc434dc0aa80d046e527f314d9bc756e6e3f3 100644 --- a/ttcn/AtsMec_V2XInformationService/module.mk +++ b/ttcn/AtsMec_V2XInformationService/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -14,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ @@ -22,10 +22,13 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn index 9ecbc2bf2103ead2455ddb6cbe49126798d8ebd3..e1ee4e62a50343936baf346101bed0a5823b59ef 100644 --- a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn +++ b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / TTF T012 + * @author ETSI / TTF T012 / TTF T027 * @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 002, Draft ETSI GS MEC 028 V2.1.1 (2020-06) + * @see ETSI GS MEC 002, Draft ETSI GS MEC 028 V2.3.1 (2022-07) */ module AtsMec_WlanInformationAPI_TestCases { @@ -43,426 +43,580 @@ module AtsMec_WlanInformationAPI_TestCases { /** * @desc Check that the IUT responds with the list of WLAN Access Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ApInfo.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/ap/ap_information", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/ap/ap_information", + 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_ap_info_list - )))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); - 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(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ap_info_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); + 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_MEC028_SRV_WAI_001_OK /** * @desc Check that the IUT responds with the list of WLAN Access Point filtered by the macId provided as query parameter - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ApInfo.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_002_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/ap/ap_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/ap/ap_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", + 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_ap_info_list - )))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); - 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(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_ap_info_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***"); + 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_MEC028_SRV_WAI_002_OK /** * @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/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ApInfo.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_002_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/apId/ap_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/apId/ap_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery + 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 - )) -> value v_response { - 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_cf_01_http_down(); + // 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 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_MEC028_SRV_WAI_002_BR /** * @desc Check that the IUT responds with the list of Station Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/StationInfo.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_003_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/sta/sta_information", - 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_sta_info_list - )))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo 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_cf_01_http_down(); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/sta/sta_information", + 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_sta_info_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo 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_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_003_OK /** * @desc Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/StationInfo.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_004_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/sta/sta_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/sta/sta_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", + 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_sta_info_list - )))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo 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_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_sta_info_list + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo 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_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_004_OK /** * @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/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/StationInfo.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_004_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/staId/sta_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/staId/sta_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery + 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 - )) -> value v_response { - 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_cf_01_http_down(); + // 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 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_MEC028_SRV_WAI_004_BR /** * @desc Check that the IUT responds with the requested list of subscription - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_005_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; // FIXME Use an array of 3 elements to get a list - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription, v_assoc_sta_subscription_1; + var Json.String v_subscription_id, v_subscription_id_1; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id_1); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, + 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_wlan_subscription_link_list( + mw_subscription_link_list( + -, + { + *, + mw_subscription( + v_assoc_sta_subscription.links.self_.href, + "AssocStaSubscription" + ), + mw_subscription( + v_assoc_sta_subscription_1.links.self_.href, + "AssocStaSubscription" + ), * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, 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_assoc_sta_subscription(v_subscription_id); + f_delete_assoc_sta_subscription(v_subscription_id_1); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_005_OK - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - mw_body_json_wlan_subscription_link_list( - mw_subscription_link_list - ))))) -> value v_response { - tc_ac.stop; + /** + * @desc Check that the IUT responds with the requested list of subscription when the MEC Platform is queried using a filter on subscription type + */ + testcase TC_MEC_MEC028_SRV_WAI_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_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_WLAN_URI_SUB & "subscription_type=assoc_sta", + 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_wlan_subscription_link_list( + mw_subscription_link_list( + -, + { + *, + mw_subscription( + v_assoc_sta_subscription.links.self_.href, + "AssocStaSubscription" + ), + * + } + )))))) { + tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of subscription ***"); - 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 + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of AssocStaSubscription ***"); + 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_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_006_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_MEC028_SRV_WAI_006_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id - // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_005_OK + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_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_WLAN_URI & "/subscriptions/assoc_sta", + 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 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_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_006_BR /** - * @desc Check that the IUT responds with the requested list of subscription - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 + * @desc Check that the IUT responds with an error when a request with not existing parameters is sent */ - testcase TC_MEC_MEC028_SRV_WAI_006_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC028_SRV_WAI_006_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_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_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_WLAN_URI_SUB, + 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 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_MEC028_SRV_WAI_006_NF + + /** + * @desc Check that the IUT responds with a Notification Subscription + */ + testcase TC_MEC_MEC028_SRV_WAI_007_OK() runs on HttpComponent system HttpTestAdapter { // Local variables - var AssocStaSubscription v_assoc_sta_subscription; var Headers v_headers; var HttpMessage v_response; + var Json.String v_subscription_id; // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; } // Test component configuration @@ -471,34 +625,58 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions?subscription_type=assoc_sta", - v_headers - ) - ) - ); + m_http_request_post( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + m_ap_identity( + PX_MAC_ID + ), + -, -, -, + 10, // notificationPeriod - Table 6.3.2-1: Attributes of the AssocStaSubscription Note 2 + -, + m_time_stamp( + f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds + ))))))); 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_wlan_subscription_link_list( - mw_subscription_link_list( - -, - ? - )))))) -> value v_response { + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_assoc_sta_subscription( + mw_assoc_sta_subscription( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + -, -, -, + ? + )))))) -> value v_response { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of AssocStaSubscription ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Check HTTP Location header + if (f_check_headers(v_response.response.header) == false) { + log("*** " & testcasename() & ": FAIL: IUT failed in subscription ***"); + 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_WLAN_URI_SUB & "/(?*)", + 0 + ); + + log("*** " & testcasename() & ": PASS: IUT successfully responds to the subscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); @@ -507,801 +685,615 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); + f_delete_assoc_sta_subscription(v_subscription_id); f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_006_OK - - /** - * @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/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 - */ - testcase TC_MEC_MEC028_SRV_WAI_006_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/assoc_sta", - 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 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_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC028_SRV_WAI_006_BR - - /** - * @desc Check that the IUT responds with an error when a request with not existing parameters is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 - */ - testcase TC_MEC_MEC028_SRV_WAI_006_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_URI & "/subscriptions/assoc_sta", - 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 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_MEC028_SRV_WAI_006_NF - - /*** - var charstring v_uri; - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); - ***/ - - /** - * @desc Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 - */ - testcase TC_MEC_MEC028_SRV_WAI_007_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - var HttpMessage v_response; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_URI & "/subscriptions", - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - m_ap_identity( - PX_MAC_ID - ), - -, -, -, - 10, // notificationPeriod - Table 6.3.2-1: Attributes of the AssocStaSubscription Note 2 - -, - m_time_stamp( - f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_assoc_sta_subscription( - mw_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - -, -, -, - ? - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds to the subscription ***"); - 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_assoc_sta_subscription(v_response.response.body.json_body.assocStaSubscription); - f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_007_OK /** * @desc Check that the IUT responds with an error when an invalid Subscription request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_007_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_URI & "/subscriptions", - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription_invalid( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - m_ap_identity( - PX_MAC_ID - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_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_WLAN_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription_invalid( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + m_ap_identity( + PX_MAC_ID + ))))))); + 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 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_cf_01_http_down(); + // 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 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_MEC028_SRV_WAI_007_BR /** * @desc Check that the IUT responds with an error when a request with not existing parameters is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_007_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_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_WLAN_URI_SUB & "&filter=(eq,ap/macId,00:01:02:03:04:04)", + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + m_ap_identity( + PX_MAC_ID + ))))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; + // 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); } - - // 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_WLAN_URI & "/subscriptions&filter=(eq,ap/macId,00:01:02:03:04:04)", - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - m_ap_identity( - PX_MAC_ID - ))))))); - 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 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(); + [] 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_MEC028_SRV_WAI_007_NF /** * @desc Check that the IUT responds with the list of Subscription - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_008_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+" & PX_ME_WLAN_URI & "/subscriptions/" & "(?*)", - 0 - ); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/" & v_uri, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_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_WLAN_URI_SUB & "/" & 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_assoc_sta_subscription( - mw_assoc_sta_subscription( - v_assoc_sta_subscription.callbackReference, - -, - -, -, - v_assoc_sta_subscription.links - )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); - 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_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_assoc_sta_subscription( + mw_assoc_sta_subscription( + v_assoc_sta_subscription.callbackReference, + -, + -, -, + v_assoc_sta_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); + 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_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_008_OK /** * @desc Check that the IUT responds with an error when a request for existing subscription with incorrect parameters is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_008_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri := "unknown"; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/unknown", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // 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_WLAN_URI & "/subscriptions/unknown", + 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 an AssocStaSubscription ***"); - 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_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); + // 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 an AssocStaSubscription ***"); + 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_MEC028_SRV_WAI_008_NF /** * @desc Check that the IUT responds with a Notification Subscription when it is modified - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_009_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+" & PX_ME_WLAN_URI & "/subscriptions/" & "(?*)", - 0 - ); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/" & v_uri, - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription( - v_assoc_sta_subscription.callbackReference, - m_ap_identity( - PX_MAC_ID - ), - -, -, - v_assoc_sta_subscription.links, - 12, - m_time_stamp( - f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_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_WLAN_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + v_assoc_sta_subscription.callbackReference, + m_ap_identity( + PX_MAC_ID + ), + -, -, + v_assoc_sta_subscription.links, + 12, + m_time_stamp( + f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds + ))))))); + 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_assoc_sta_subscription( - mw_assoc_sta_subscription( - v_assoc_sta_subscription.callbackReference, - ?, - -, -, - v_assoc_sta_subscription.links )))))) -> value v_response { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds to the AssocStatSubscription update ***"); - 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_assoc_sta_subscription(v_response.response.body.json_body.assocStaSubscription); - f_cf_01_http_down(); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_assoc_sta_subscription( + mw_assoc_sta_subscription( + v_assoc_sta_subscription.callbackReference, + ?, + -, -, + v_assoc_sta_subscription.links + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds to the AssocStatSubscription update ***"); + 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_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_009_OK /** * @desc Check that the IUT responds with an error when an invalid field is set in the subscription modification request - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_009_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - httpPort.send( - m_http_request( - m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/unknown", - v_headers, - m_http_message_body_json( - m_body_json_assoc_sta_subscription( - m_assoc_sta_subscription( - v_assoc_sta_subscription.callbackReference, - m_ap_identity( - PX_MAC_ID - ), - -, -, - v_assoc_sta_subscription.links, - 12, - m_time_stamp( - f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds - ))))))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_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_WLAN_URI_SUB & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + "", // No callback reference + m_ap_identity( + PX_MAC_ID + ), + -, -, + v_assoc_sta_subscription.links, + 12, + m_time_stamp( + f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds + ))))))); + 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 successfully responds 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_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); + // 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 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_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_009_BR + /** + * @desc Check that the IUT responds with an error when an unknown subscription modification request + */ + testcase TC_MEC_MEC028_SRV_WAI_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_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_WLAN_URI_SUB & "/unknown", + v_headers, + m_http_message_body_json( + m_body_json_assoc_sta_subscription( + m_assoc_sta_subscription( + v_assoc_sta_subscription.callbackReference, + m_ap_identity( + PX_MAC_ID + ), + -, -, + v_assoc_sta_subscription.links, + 12, + m_time_stamp( + f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds + ))))))); + 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 to the AssocStatSubscription update ***"); + 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_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC028_SRV_WAI_009_NF + /** * @desc Check that the IUT responds with 204 when an existing subscription is correctly deleted - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_010_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & v_uri, - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_assoc_sta_subscription(v_assoc_sta_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_WLAN_URI_SUB & 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_204_no_content - )) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***"); - 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(); + // 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 responds with an AssocStaSubscription ***"); + 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_MEC028_SRV_WAI_010_OK /** * @desc Check that the IUT responds with an error when an not existing subscription cannot be deleted - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_010_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var charstring v_uri; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf_01_http_up(); - - // Test adapter configuration - - // Preamble - f_create_assoc_sta_subscription(v_assoc_sta_subscription); - f_init_default_headers_list(-, -, v_headers); - v_uri := regexp( - oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); - httpPort.send( - m_http_request( - m_http_request_delete( - PICS_ROOT_API & v_uri & "_Invalid", - v_headers - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_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_delete( + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "unknown", + 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 an AssocStaSubscription ***"); - 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_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_down(); + // 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 an AssocStaSubscription ***"); + 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_MEC028_SRV_WAI_010_NF /** * @desc Check that the IUT sends a notification about WLAN event notification if the MEC service has an associated subscription and the event is generated - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/NotificationCallback.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_011_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var AssocStaSubscription v_assoc_sta_subscription; - var Headers v_headers; - var HttpMessage v_response; + // Local variables + var Headers v_headers; + var AssocStaSubscription v_assoc_sta_subscription; + var Json.String v_subscription_id; - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_assoc_sta_subscription(v_assoc_sta_subscription); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_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_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_wait.start; - alt { - [] httpPort_notif.receive( - mw_http_request( - mw_http_request_post( - -, - -, - mw_http_message_body_json( - mw_body_json_assoc_sta_subscription( - mw_assoc_sta_subscription( - PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, - -, - -, -, - ? - )))))) -> 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_wait.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_delete_assoc_sta_subscription(v_assoc_sta_subscription); - f_cf_01_http_notif_down(); + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_assoc_sta_subscription( + mw_assoc_sta_subscription( + PX_ASSOC_STA_SUBSCRIPTION_CALLBACK, + -, + -, -, + ? + )))))) { + 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_wait.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_assoc_sta_subscription(v_subscription_id); + f_cf_01_http_notif_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_011_OK /** * @desc Check that the IUT responds with the list of WLAN Access Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_012_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1327,9 +1319,7 @@ module AtsMec_WlanInformationAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/queries/measurements", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1340,7 +1330,7 @@ module AtsMec_WlanInformationAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_wlan_measurement_config_link_list - )))) -> value v_response { + )))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of measurement config ***"); @@ -1356,125 +1346,14 @@ module AtsMec_WlanInformationAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_012_OK - /** - * @desc Check that the IUT responds with the list of WLAN Access Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 - */ - /*testcase TC_MEC_MEC028_SRV_WAI_012_BR() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/invalid_measurements", - 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 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_cf_01_http_down(); - }*/ // End of testcase TC_MEC_MEC028_SRV_WAI_012_BR - - /** - * @desc Check that the IUT responds with the list of WLAN Access Point - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 - */ - testcase TC_MEC_MEC028_SRV_WAI_012_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_QUERIES_URI & "/invalid_measurements", - 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 list of ApInfo ***"); - 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_MEC028_SRV_WAI_012_NF - /** * @desc Check that the IUT responds with a new measurement configuration - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_013_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -1493,7 +1372,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS, v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -1502,14 +1381,14 @@ module AtsMec_WlanInformationAPI_TestCases { { m_sta_identity( PX_MAC_ID, - PX_SSID, + {PX_SSID}, -, - PX_IP_ADDRESS + {PX_IP_ADDRESS} ) }, PX_MEASUREMENT_ID, m_measurement_info(1000, 10) - )))))); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1523,15 +1402,20 @@ module AtsMec_WlanInformationAPI_TestCases { mw_measurement_config( ?, {mw_sta_identity(PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS + {PX_SSID}, + -, + {PX_IP_ADDRESS} )}, PX_MEASUREMENT_ID, mw_measurement_info - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; + v_measurement_config_id := regexp( + oct2char(unichar2oct(v_response.response.body.json_body.measurementConfig.links.self_.href)), + "?+" & PX_ME_WLAN_URI_MEAS & "/" & "(?*)", + 0 + ); log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1542,14 +1426,12 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_response.response.body.json_body.measurementConfig); + f_delete_measurement_config(v_measurement_config_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_013_OK /** * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_013_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1572,7 +1454,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS, v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -1581,14 +1463,14 @@ module AtsMec_WlanInformationAPI_TestCases { { m_sta_identity( PX_MAC_ID & ":00", // Invalid MAC address - PX_SSID, + {PX_SSID}, -, - PX_IP_ADDRESS + {PX_IP_ADDRESS} ) }, PX_MEASUREMENT_ID, m_measurement_info(1000, 10) - )))))); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1597,7 +1479,7 @@ module AtsMec_WlanInformationAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully with the correct error code ***"); @@ -1613,83 +1495,14 @@ module AtsMec_WlanInformationAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_013_BR - /** - * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 - */ - /*testcase TC_MEC_MEC028_SRV_WAI_013_NF() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_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_WLAN_URI & "/Invalid_measurements", - v_headers, - m_http_message_body_json( - m_body_json_wlan_measurement_config( - m_measurement_config( - -, - { - m_sta_identity( - PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS - ) - }, - PX_MEASUREMENT_ID, - m_measurement_info(1000, 10) - )))))); - 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 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_MEC028_SRV_WAI_013_NF - /** * @desc Check that the IUT responds with the specified measurement configuration - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_014_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -1704,16 +1517,14 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_measurement_config(v_measurement_config, v_measurement_config_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements/" & v_measurement_config.links.self_.href, + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements" & "/" & v_measurement_config_id, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1729,14 +1540,14 @@ module AtsMec_WlanInformationAPI_TestCases { { mw_sta_identity( PX_MAC_ID, - PX_SSID, + {PX_SSID}, -, - PX_IP_ADDRESS + {PX_IP_ADDRESS} ) }, PX_MEASUREMENT_ID, mw_measurement_info - )))))) -> value v_response { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); @@ -1749,19 +1560,18 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_response.response.body.json_body.measurementConfig); + f_delete_measurement_config(v_measurement_config_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_014_OK /** * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_014_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -1776,16 +1586,14 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_measurement_config(v_measurement_config, v_measurement_config_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements/" & v_measurement_config.links.self_.href & "_Invalid", + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements"& "/" & v_measurement_config_id & "_Invalid", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1794,7 +1602,7 @@ module AtsMec_WlanInformationAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***"); @@ -1807,20 +1615,18 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_measurement_config); + f_delete_measurement_config(v_measurement_config_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_014_NF /** * @desc Check that the IUT responds with the modified measurement configuration - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_015_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response; var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -1835,12 +1641,12 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_measurement_config(v_measurement_config, v_measurement_config_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href, + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id, v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -1849,14 +1655,14 @@ module AtsMec_WlanInformationAPI_TestCases { { m_sta_identity( PX_MAC_ID, - PX_SSID, + {PX_SSID}, -, - PX_IP_ADDRESS + {PX_IP_ADDRESS} ) }, PX_MEASUREMENT_ID, m_measurement_info(2000, 20) - )))))); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1869,14 +1675,15 @@ module AtsMec_WlanInformationAPI_TestCases { mw_body_json_wlan_measurement_config( mw_measurement_config( ?, - {mw_sta_identity(PX_MAC_ID, - PX_SSID, - -, - PX_IP_ADDRESS + {mw_sta_identity( + PX_MAC_ID, + {PX_SSID}, + -, + {PX_IP_ADDRESS} )}, PX_MEASUREMENT_ID, mw_measurement_info(2000, 20) - )))))) -> value v_response { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); @@ -1889,19 +1696,18 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_response.response.body.json_body.measurementConfig); + f_delete_measurement_config(v_measurement_config_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_015_OK /** * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_015_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -1916,12 +1722,12 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_measurement_config(v_measurement_config, v_measurement_config_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href & "_Invalid", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id & "_Invalid", v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -1930,14 +1736,14 @@ module AtsMec_WlanInformationAPI_TestCases { { m_sta_identity( PX_MAC_ID, - PX_SSID, + {PX_SSID}, -, - PX_IP_ADDRESS + {PX_IP_ADDRESS} ) }, PX_MEASUREMENT_ID, m_measurement_info(2000, 20) - )))))); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1946,7 +1752,7 @@ module AtsMec_WlanInformationAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); @@ -1959,19 +1765,18 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_measurement_config); + f_delete_measurement_config(v_measurement_config_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_015_NF /** * @desc Check that the IUT responds with with 204 when requested to delete the specified measurement configuration - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_016_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -1986,14 +1791,14 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_measurement_config(v_measurement_config, v_measurement_config_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href, + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id, v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2002,7 +1807,7 @@ module AtsMec_WlanInformationAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***"); @@ -2020,13 +1825,12 @@ module AtsMec_WlanInformationAPI_TestCases { /** * @desc Check that the IUT responds with an error when an invalid request is sent - * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2 */ testcase TC_MEC_MEC028_SRV_WAI_016_NF() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var MeasurementConfig v_measurement_config; + var Json.String v_measurement_config_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) { @@ -2041,14 +1845,14 @@ module AtsMec_WlanInformationAPI_TestCases { // Test adapter configuration // Preamble - f_create_measurement_config(v_measurement_config); + f_create_measurement_config(v_measurement_config, v_measurement_config_id); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href & "_invalid", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id & "_invalid", v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -2057,7 +1861,7 @@ module AtsMec_WlanInformationAPI_TestCases { [] 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 ***"); @@ -2070,7 +1874,7 @@ module AtsMec_WlanInformationAPI_TestCases { } // End of 'alt' statement // Postamble - f_delete_measurement_config(v_measurement_config); + f_delete_measurement_config(v_measurement_config_id); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC028_SRV_WAI_016_NF diff --git a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn index 90b10bfa70c7e14b22be87ebb709afbdd224713b..d66759baebbab0cb4dc7c706108bcd140551fddf 100644 --- a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn +++ b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestControl.ttcn @@ -11,9 +11,49 @@ module AtsMec_WlanInformationAPI_TestControl { control { - if (PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED) { + if (PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED) { execute(TC_MEC_MEC028_SRV_WAI_001_OK()); execute(TC_MEC_MEC028_SRV_WAI_002_OK()); + execute(TC_MEC_MEC028_SRV_WAI_002_BR()); + + execute(TC_MEC_MEC028_SRV_WAI_003_OK()); + execute(TC_MEC_MEC028_SRV_WAI_004_OK()); + execute(TC_MEC_MEC028_SRV_WAI_004_BR()); + + execute(TC_MEC_MEC028_SRV_WAI_005_OK()); + execute(TC_MEC_MEC028_SRV_WAI_006_OK()); + execute(TC_MEC_MEC028_SRV_WAI_006_BR()); + execute(TC_MEC_MEC028_SRV_WAI_006_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_007_OK()); + execute(TC_MEC_MEC028_SRV_WAI_007_BR()); + execute(TC_MEC_MEC028_SRV_WAI_007_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_008_OK()); + execute(TC_MEC_MEC028_SRV_WAI_008_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_009_OK()); + execute(TC_MEC_MEC028_SRV_WAI_009_BR()); + execute(TC_MEC_MEC028_SRV_WAI_009_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_010_OK()); + execute(TC_MEC_MEC028_SRV_WAI_010_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_011_OK()); + + execute(TC_MEC_MEC028_SRV_WAI_012_OK()); + + execute(TC_MEC_MEC028_SRV_WAI_013_OK()); + execute(TC_MEC_MEC028_SRV_WAI_013_BR()); + + execute(TC_MEC_MEC028_SRV_WAI_014_OK()); + execute(TC_MEC_MEC028_SRV_WAI_014_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_015_OK()); + execute(TC_MEC_MEC028_SRV_WAI_015_NF()); + + execute(TC_MEC_MEC028_SRV_WAI_016_OK()); + execute(TC_MEC_MEC028_SRV_WAI_016_NF()); } } // End of 'control' statement diff --git a/ttcn/AtsMec_WlanInformation/module.mk b/ttcn/AtsMec_WlanInformation/module.mk index 390fd0df9ad3f296f4dfacccb97526e171871b37..f5432313efa46742fdb7eb52abebae2558eb40c9 100644 --- a/ttcn/AtsMec_WlanInformation/module.mk +++ b/ttcn/AtsMec_WlanInformation/module.mk @@ -7,6 +7,7 @@ sources := \ modules := ../LibCommon \ ../../titan-test-system-framework/ttcn/LibHelpers \ ../../titan-test-system-framework/ttcn/LibHttp \ + ../../titan-test-system-framework/ttcn/LibXsd \ ../../titan-test-system-framework/ttcn/LibJson \ ../patch_lib_http \ ../LibMec \ @@ -14,7 +15,6 @@ modules := ../LibCommon \ ../LibMec/EdgePlatformApplicationEnablementAPI \ ../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \ ../LibMec/TrafficManagementAPI \ - ../LibMec/RnisAPI \ ../LibMec/UEAppInterfaceAPI \ ../LibMec/UEidentityAPI \ ../LibMec/V2XInformationServiceAPI \ @@ -22,10 +22,13 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ + ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ ../../titan-test-system-framework/ccsrc/Protocols/Tcp \ + ../../titan-test-system-framework/ccsrc/Protocols/Xml \ ../../titan-test-system-framework/ccsrc/Helpers \ ../../ccsrc/Ports/LibHttp \ ../../ccsrc/EncDec/LibMec \ diff --git a/ttcn/LibMec/Ams/module.mk b/ttcn/LibMec/Ams/module.mk deleted file mode 100644 index bce6cc104631075fe5d883c9140d2be52798ae85..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/Ams/module.mk +++ /dev/null @@ -1,7 +0,0 @@ -sources := \ - ttcn/Ams_Pics.ttcn \ - ttcn/Ams_Pixits.ttcn \ - ttcn/Ams_EncdecDeclarations.ttcn \ - ttcn/Ams_Templates.ttcn \ - ttcn/Ams_TypesAndValues.ttcn \ - diff --git a/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn deleted file mode 100644 index 2a189e1beb32fc04781d52b6b7c3ab84fda704f8..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn +++ /dev/null @@ -1,22 +0,0 @@ -module Ams_EncdecDeclarations { - - import from Ams_TypesAndValues all; - - external function enc_AppMobilityServiceInfo(in AppMobilityServiceInfo p_app_mobility_service_info) return octetstring - with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; - external function dec_AppMobilityServiceInfo(in octetstring p_pdu) return AppMobilityServiceInfo - with { extension "prototype (convert) decode(JSON)" }; - - external function enc_RegistrationRequest(in RegistrationRequest p_registration_request) return octetstring - with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; - external function dec_RegistrationRequest(in octetstring p_pdu) return RegistrationRequest - with { extension "prototype (convert) decode(JSON)" }; - - - external function enc_RegistrationInfo(in RegistrationInfo p_registration_info) return octetstring - with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; - external function dec_Registrationinfo(in octetstring p_pdu) return RegistrationInfo - with { extension "prototype (convert) decode(JSON)" }; - - -} // End of module Ams_EncdecDeclarations diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn deleted file mode 100644 index 89089fac5ec1c00a037da9864348d6fedfe27022..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/Ams/ttcn/Ams_Pics.ttcn +++ /dev/null @@ -1,8 +0,0 @@ -module Ams_Pics { - - /** - * @desc Does the IUT support LocationAPI? - */ - modulepar boolean PICS_AMS_API_SUPPORTED := true; - -} // End of module LocationAPI_Pics diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn deleted file mode 100644 index 1a4870e2291b0f04b34f00c79f4b069476651f10..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn +++ /dev/null @@ -1,27 +0,0 @@ -module Ams_Pixits { - - // JSON - import from Json all; - - // LibMec/LocationAPI - import from Ams_TypesAndValues all; - - modulepar Json.String PX_APP_MOBILITY_SERVICE_ID := "KtRGymNQ84dG3mQfRepa"; - - modulepar Json.String PX_APP_INS_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; - - modulepar SubscriptionType PX_SUBSCRIPTION_TYPE := MobilityProcedureSubscription; - - modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"; - - modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"; - - modulepar Json.String PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID := "PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID"; - - modulepar Json.String PX_CALLBACK_REFERENCE := "http://127.0.0.1/callback"; - - modulepar charstring PX_CALLBACK_URI := "http://127.0.0.1/callback"; - - modulepar Json.String PX_MEP_ID := ""; - -} // End of module LocationAPI_Pixits diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn deleted file mode 100644 index ee4630aae84f497bc16aed54f954d1bad241019f..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn +++ /dev/null @@ -1,267 +0,0 @@ -module Ams_Templates { - - // JSON - import from Json all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; - - // LibMec/LocationAPI - import from Ams_TypesAndValues all; - import from Ams_Pixits all; - - template (omit) AppMobilityServiceInfo m_app_mobility_service_info( - in String p_app_mobility_service_id := PX_APP_MOBILITY_SERVICE_ID, - in template (omit) RegistrationInfos p_registration_info := omit - ) := { - registeredAppMobilityService := p_registration_info, - appMobilityServiceId := p_app_mobility_service_id - } // End of template m_app_mobility_service_info - - - template (present) AppMobilityServiceInfo mw_app_mobility_service_info( - template (present) RegistrationInfos p_registration_info := ?, - template (present) String p_app_mobility_service_id := ? - ) := { - registeredAppMobilityService := p_registration_info, - appMobilityServiceId := p_app_mobility_service_id - } - - template (omit) RegistrationInfo m_app_mobility_registration_info( - in template (value) ServiceConsumerId p_serviceConsumerId, - in template (omit) DeviceInformations p_deviceInformation := omit, - in template (omit) UInt32 p_expiryTime := omit - ) := { - serviceConsumerId := p_serviceConsumerId, - deviceInformation := p_deviceInformation, - expiryTime := p_expiryTime - } - - template RegistrationInfo mw_app_mobility_registration_info( - template (present) ServiceConsumerId p_serviceConsumerId := ?, - template DeviceInformations p_deviceInformation := *, - template UInt32 p_expiryTime := * - ) := { - serviceConsumerId := p_serviceConsumerId, - deviceInformation := p_deviceInformation, - expiryTime := p_expiryTime - } - - template (omit) ServiceConsumerId m_service_consumer_id( - in template (omit) String p_appInstanceId := omit, - in template (omit) String p_mepId := omit - ) := { - appInstanceId := p_appInstanceId, - mepId := p_mepId - } - - template (omit) ServiceConsumerIdWithError m_service_consumer_id_with_error( - in template (omit) String p_appId := omit, - in template (omit) String p_mepId := omit - ) := { - appId := p_appId, - mepId := p_mepId - } - - template (omit) ServiceConsumer m_service_consumer_error( - in template (omit) String p_appInstance := omit, - in template (omit) String p_mepId := omit - ) := { - appInstance := p_appInstance, - mepId := p_mepId - } - - template ServiceConsumerId mw_service_consumer_id( - template String p_appInstanceId := *, - template String p_mepId := * - ) := { - appInstanceId := p_appInstanceId, - mepId := p_mepId - } - - template (omit) RegistrationRequest m_registration_request ( - in template (omit) ServiceConsumerId p_service_consumer_id := omit, - in template (omit) DeviceInformations p_device_info := omit, - in template (omit) UInt32 p_expire_time := omit - ) := { - serviceConsumerId := p_service_consumer_id, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - - template (omit) RegistrationRequestWithError m_registration_request_with_error ( - in template (omit) ServiceConsumerIdWithError p_service_consumer_id_with_error := omit, - in template (omit) DeviceInformations p_device_info := omit, - in template (omit) UInt32 p_expire_time := omit - ) := { - serviceConsumerIdWithError := p_service_consumer_id_with_error, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - - template (omit) RegistrationRequest m_registration_request_error ( - in template (omit) ServiceConsumer p_service_consumer := omit, - in template (omit) DeviceInformations p_device_info := omit, - in template (omit) UInt32 p_expire_time := omit - ) := { - serviceConsumerId := p_service_consumer, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - - template RegistrationRequest mw_registration_request( - template ServiceConsumerId p_service_consumer_id := ?, - template DeviceInformations p_device_info := omit, - template UInt32 p_expire_time := omit - ) := { - serviceConsumerId := p_service_consumer_id, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - - template (value) RegistrationInfo m_registration_info ( - in template (omit) ServiceConsumerId p_service_consumer_id := omit, - in template (omit) DeviceInformations p_device_info := omit, - in UInt32 p_expire_time - ) := { - serviceConsumerId := p_service_consumer_id, - deviceInformation := p_device_info, - expiryTime := p_expire_time - } - - template (present) RegistrationInfos mw_registration_info( - template (present) ServiceConsumerId p_service_consumer_id := ?, - template (present) DeviceInformations p_device_info := ?, - template (present) UInt32 p_expire_time := ? - ) := { - - } - - - template (value) ServiceConsumer m_service_consumer ( - in String p_app_instance, - in String p_mep_id - ) := { - appInstance := p_app_instance, - mepId := p_mep_id - } - - template (omit) ServiceConsumer mw_service_consumer ( - in String p_app_instance, - in template (omit) String p_mep_id := omit - ) := { - appInstance := p_app_instance, - mepId := p_mep_id - } - - template (value) DeviceInformation m_device_info ( - in String p_associate_id - ) := { - associateId := p_associate_id - } - - template (omit) DeviceInformation mw_device_info ( - in String p_associate_id - ) := { - associateId := p_associate_id - } - type record AmsSubscriptionLinkList { - Json.AnyURI links, - Subscription subscription - } - - template (value) AdjacentAppInfoSubscription_ mw_adjacent_application_info_notification ( - in template (omit) SubscriptionType p_subscriptionType := omit, - in Json.AnyURI p_callbackReference, - in template (omit) Json.AnyURI p_links := omit, - in template (omit) AdjacentFilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - - ) := { - subscriptionType := p_subscriptionType , - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - - template (value) MobilityProcedureSubscription_ m_ams_subscription ( - in SubscriptionType p_subscriptionType := PX_SUBSCRIPTION_TYPE, - in Json.AnyURI p_callbackReference, - in template (omit) Json.AnyURI p_links := omit, - in template (omit) FilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - - ) := { - subscriptionType := p_subscriptionType , - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - - - template (value) MobilityProcedureSubscription_ mw_mobility_procedure_notification ( - in template (omit) SubscriptionType p_subscriptionType := omit, - in Json.AnyURI p_callbackReference, - in template (omit) Json.AnyURI p_links := omit, - in template (omit) FilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - - ) := { - subscriptionType := p_subscriptionType , - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - template (value) MobilityProcedureSubscriptionError m_ams_subscription_error ( - in SubscriptionType p_subscriptionType, - in Json.AnyURI p_callbackReference, - in template (omit) Json.AnyURI p_links := omit, - in template (omit) FilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - - ) := { - subscriptionType := p_subscriptionType, - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - template (present) MobilityProcedureSubscription_ mw_ams_subscription ( - in SubscriptionType p_subscriptionType, - in template (omit) Json.AnyURI p_callbackReference := omit, - in template (omit) Json.AnyURI p_links := omit, - in template (omit) FilterCriteria p_filterCriteria := omit, - in template (omit) TimeStamp p_expiryDeadline := omit - ) := { - subscriptionType := p_subscriptionType , - callbackReference := p_callbackReference, - links := p_links, - filterCriteria := p_filterCriteria, - expiryDeadline := p_expiryDeadline - } - - template (present) ExpiryNotification mw_expire_notification ( - in template (omit) TimeStamp p_timestamp := omit, - in template (omit) Json.AnyURI p_links := omit, - in TimeStamp p_expiryDeadline - ) := { - timeStamp := p_timestamp, - links := p_links, - expiryDeadline := p_expiryDeadline - } - - - - -} // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn deleted file mode 100644 index dc4eb50489f024873d102ddd801e37bc5ea57c26..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn +++ /dev/null @@ -1,567 +0,0 @@ -module Ams_TypesAndValues { - -// JSON -import from Json all; - -// LibCommon -import from LibCommon_BasicTypesAndValues all; - - -type record of AppMobilityServiceInfo AppMobilityServiceInfos; -type record AppMobilityServiceInfo { - RegistrationInfos registeredAppMobilityService , - String appMobilityServiceId -} - -type record of RegistrationInfo RegistrationInfos; -type record RegistrationInfo { - ServiceConsumerId serviceConsumerId, - DeviceInformations deviceInformation optional, - UInt32 expiryTime optional -} - - -type record RegistrationRequest { - ServiceConsumerId serviceConsumerId, - DeviceInformations deviceInformation optional, - UInt32 expiryTime optional -} - - -type record RegistrationRequestWithError { - ServiceConsumerIdWithError serviceConsumerIdWithError, - DeviceInformations deviceInformation optional, - UInt32 expiryTime optional -} - - -type record of ServiceConsumerId ServiceConsumerIds; -type record ServiceConsumerId { - String appInstanceId optional, - String mepId optional -} - -type record ServiceConsumerIdWithError { - String appId optional, - String mepId optional -} - -// Erroneous parameter: appInstance should be appInstanceId -type record of ServiceConsumer ServiceConsumers; -type record ServiceConsumer { - String appInstance optional, - String mepId optional -} - -type record of DeviceInformation DeviceInformations; -type record DeviceInformation { - String associateId -} - - -type Json.AnyURI links; - -type enumerated SubscriptionType { - MobilityProcedureSubscription, - AdjacentAppInfoSubscription -} - -type record Subscription { - Json.AnyURI href, - SubscriptionType subscriptionType -} - - -type record of AmsSubscriptionLinkList AmsSubscriptionLinkLists; -type record AmsSubscriptionLinkList { - Json.AnyURI links, - Subscription subscription -} - - -type record MobilityProcedureSubscriptionError { - SubscriptionType subscriptionType, - Json.AnyURI callbackReference, - Json.AnyURI links optional, - FilterCriteria filterCriteria, - TimeStamp expiryDeadline optional -} - - - - -type record of MobilityProcedureSubscription_ MobilityProcedureSubscriptions; -type record MobilityProcedureSubscription_ { - SubscriptionType subscriptionType, - Json.AnyURI callbackReference, - Json.AnyURI links optional, - FilterCriteria filterCriteria, - TimeStamp expiryDeadline optional -} - -type enumerated MobilityStatusType { - INTERHOST_MOVEOUT_TRIGGERED, - TARGET_APPINST_CONFIRMED, - TARGET_TRAFFIC_RULE_ACTIVATED, - INTERHOST_MOVEOUT_COMPLETED, - INTERHOST_MOVEOUT_FAILED -} - -type record AssociateIdList { - String associateId -} - -type record of FilterCriteria FilterCriterias; -type record FilterCriteria { - String appInstanceId optional, - AssociateIdList associateId optional, - MobilityStatusType mobilityStatus -} - - - -type record AdjacentFilterCriteria { - String appInstanceId optional -} - - -type record of ExpiryNotification ExpiryNotifications; -type record ExpiryNotification { - TimeStamp timeStamp, - Json.AnyURI links optional, - TimeStamp expiryDeadline -} - -type record of AdjacentAppInfoSubscription_ AdjacentAppInfoSubscriptions; -type record AdjacentAppInfoSubscription_ { - SubscriptionType subscriptionType, - Json.AnyURI callbackReference, - Json.AnyURI links optional, - AdjacentFilterCriteria filterCriteria, - TimeStamp expiryDeadline optional -} - - /** - * @desc - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 NanoSeconds; - -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// /** -// * @desc -// * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC -// * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC -// */ -// type record TimeStamp { -// Seconds seconds, -// NanoSeconds nanoSeconds -// } -// -// /** -// * @desc A type containing list of users. -// * @member user Collection of the zone information list. -// * @member resourceURL Self referring URL. -// */ -// type record of UserInfo UserInfos; -// type record UserList { -// UserInfos user optional, -// ResourceURL resourceURL -// } -// -// /** -// * @desc A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. -// * @member latitude -// * @member longitude -// * @member altitude -// * @member accuracy -// */ -// type record LocationInfo { -// Json.Number latitude, -// Json.Number longitude, -// Json.Number altitude optional, -// UInt32 accuracy -// } // End of type LocationInfo -// -// /** -// * @desc A type containing zone information. -// * @member zoneId Identifier of zone -// * @member numberOfAccessPoints The number of access points within the zone -// * @member numberOfUnservicableAccessPoints Number of inoperable access points within the zone. -// * @member numberOfUsers The number of users currently on the access point. -// * @member resourceURL Self referring URL. -// */ -// type record ZoneInfo { -// ZoneId zoneId, -// NumberOfAccessPoints numberOfAccessPoints, -// NumberOfUnserviceableAccessPoints numberOfUnservicableAccessPoints, -// NumberOfUsers numberOfUsers, -// ResourceURL resourceURL -// } -// -// /** -// * @desc Collection of the zone information list. -// * @member zone Collection of the zone information list. -// * @member resourceURL Self referring URL. -// */ -// type record of ZoneInfo ZoneInfos; -// type record ZoneList { -// ZoneInfos zone optional, -// ResourceURL resourceURL -// } -// -// /** -// * @desc Identifier of access point, (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element -// */ -// type Json.String AccessPointId; -// -// /** -// * @desc A type containing access point information. -// * @member accessPointId -// * @member connectionType The connection type for the access poin -// * @member operationStatus The operation status of the access point -// * @member numberOfUsers The number of users currently on the access point. -// * @member resourceURL Self referring URL. -// */ -// type record AccessPointInfo { -// AccessPointId accessPointId, -// LocationInfo locationInfo optional, -// ConnectionType connectionType, -// OperationStatus operationStatus, -// NumberOfUsers numberOfUsers, -// InterestRealm interestRealm, -// ResourceURL resourceURL -// } -// type record of AccessPointInfo AccessPointInfos; -// -// /** -// * @desc A type containing list of access points. -// * @member zoneId -// * @member accessPoint Collection of the access point information list. -// * @member resourceURL -// */ -// type record AccessPointList { -// ZoneId zoneId, -// AccessPointInfos accessPoint optional, -// ResourceURL resourceURL -// } -// -// /** -// * @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). -// */ -// type Json.String Address -// -// /** -// * @desc Reserved for future use. -// */ -// type Json.String AncillaryInfo; -// -// /** -// * @desc CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [\ -//REST_NetAPI_Common]. -// */ -// type Json.String CallbackData; -// -// /** -// * @desc Notification callback definition. -// * @member notifyURL -// */ -// type record CallbackReference { -// NotifyURL notifyURL -// } -// -// /** -// * @desc Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription. -// */ -// type Json.String ClientCorrelator; -// -// /** -// * @desc The connection type for the access point -// */ -// type enumerated ConnectionType { -// Femto, -// LTE_femto, -// Smallcell, -// LTE_smallcell, -// Wifi, -// Pico, -// Micro, -// Macro, -// Wimax, -// Unknown -// } -// -// /** -// * @desc Contextual information of a user location (e.g., aisle, floor, room number, etc.) -// */ -// type Json.String ContextLocationInfo; -// -// /** -// * @desc Zone ID -// */ -// type Json.String CurrentAccessPointId; -// -// /** -// * @desc Period (in seconds) of time notifications are provided for. If set to \"0\" (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications. This element MAY be given by the client during resource creation in order to signal the desired lifetime of the subscription. The server MUST return in this element the period of time for which the subscription will still be valid. -// */ -// type Json.Date Duration; -// -// /** -// * @desc Interest realm of access point (e.g. geographical area, a type of industry etc.). -// */ -// type Json.String InterestRealm; -// -// /** -// * @desc Link to other resources -// * @member rel Describes the relationship between the URI and the resource. -// * @member href UTI -// */ -// type record Link { -// Json.String rel, -// Json.String href -// } -// -// /** -// * @desc The URL of your own listener application. -// */ -// type Json.String NotifyURL; -// -// /** -// * @desc The number of access points within the zone -// */ -// type UInt32 NumberOfAccessPoints; -// -// /** -// * @desc Number of inoperable access points within the zone. -// */ -// type UInt32 NumberOfUnserviceableAccessPoints; -// -// /** -// * @desc The number of users currently on the access point. -// */ -// type UInt32 NumberOfUsers; -// -// /** -// * @desc Threshold number of users in an access point which if crossed shall cause a notification. -// */ -// type UInt32 NumberOfUsersAPThreshold; -// -// /** -// * @desc This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription. -// */ -// type UInt32 NumberOfUsersInAP; -// -// /** -// * @desc Threshold number of users in a zone which if crossed shall cause a notification. -// */ -// type UInt32 NumberOfUsersInZone; -// -// /** -// * @desc Threshold number of users in a zone which if crossed shall cause a notification. -// */ -// type UInt32 NumberOfUsersZoneThreshold; -// -// /** -// * @desc The operation status of the access point -// */ -// type enumerated OperationStatus { -// Serviceable, -// Unserviceable, -// Unknown -// } -// -// /** -// * @desc Zone ID -// */ -// type Json.String PreviousAccessPointId; -// -// /** -// * @desc Self referring URL -// */ -// type Json.AnyURI ResourceURL; -// -// /** -// * @desc Indicates the time of day for zonal presence notification. -// */ -// type Json.String Timestamp; -// -// /** -// * @desc Time zone of access point -// */ -// type Json.String Timezone; -// -// /** -// * @desc User event -// */ -// type enumerated UserEventType { -// Entering, -// Leaving, -// Transferring -// } -// -// /** -// * @desc List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event. -// */ -// type record of UserEventType UserEventCriteria; -// -// /** -// * @desc A type containing user information. -// * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). -// * @member accessPointId Identifier of access point, (reference ETSI TS 129 171). -// * @member zoneId Identifier of zone -// * @member resourceURL Self referring URL. -// * @member locationInfo A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. -// * @member contextLocationInfo -// * @member ancillaryInfo -// */ -// type record UserInfo { -// Address address_, -// AccessPointId accessPointId, -// ZoneId zoneId, -// ResourceURL resourceURL, -// LocationInfo locationInfo optional, -// ContextLocationInfo contextLocationInfo optional, -// AncillaryInfo ancillaryInfo optional -// } with { -// variant (address_) "name as 'address'"; -// } // End of type UserInfo -// -// /** -// * @desc A type containing user tracking subscription. -// * @member -// */ -// type record UserTrackingSubscription { -// ClientCorrelator clientCorrelator optional, -// CallbackReference callbackReference, -// Address address_, -// UserEventCriteria userEventCriteria optional, -// ResourceURL resourceURL optional -// } with { -// variant (address_) "name as 'address'"; -// } -// -// /** -// * @desc A type containing zonal presence notification -// * @member -// * @member link Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification. -// */ -// type record ZonalPresenceNotification { -// CallbackReference callbackReference optional, -// ZoneId zoneId, -// Address address_, -// InterestRealm interestRealm optional, -// UserEventType userEventType, -// CurrentAccessPointId currentAccessPointId, -// PreviousAccessPointId previousAccessPointId optional, -// Timestamp timestamp_, -// Link link optional -// } with { -// variant (address_) "name as 'address'"; -// variant (timestamp_) "name as 'timestamp'"; -// } -// -// /** -// * @desc A type containing zonal traffic subscription -// * @member -// * @member interestRealm Interest realms of access points within a zone (e.g. geographical area, a type of industry etc.). -// * @member userEventCriteria List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event. -// * @member resourceURL -// */ -// type record ZonalTrafficSubscription { -// ClientCorrelator clientCorrelator optional, -// CallbackReference callbackReference, -// ZoneId zoneId, -// InterestRealm interestRealm optional, -// UserEventCriteria userEventCriteria optional, -// Duration duration optional, -// ResourceURL resourceURL optional -// } -// -// /** -// * @desc Identifier of zone -// */ -// type Json.String ZoneId; -// -// /** -// * @desc A type containing zone status notification. -// * @member zoneId -// * @member -// */ -// type record ZoneStatusNotification { -// CallbackData callbackData optional, -// ZoneId zoneId, -// AccessPointId accessPointId optional, -// NumberOfUsersInZone numberOfUsersInZone optional, -// NumberOfUsersInAP numberOfUsersInAP optional, -// OperationStatus operationStatus optional, -// Timestamp timestamp_, -// Link link -// } with { -// variant (timestamp_) "name as 'timestamp'"; -// } -// -// /** -// * @desc A type containing zone status subscription. -// * @member zoneId -// * @member -// * @member -// * @member -// * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone). -// */ -// type record ZoneStatusSubscription { -// ClientCorrelator clientCorrelator optional, -// ResourceURL resourceURL optional, -// CallbackReference callbackReference, -// ZoneId zoneId, -// NumberOfUsersZoneThreshold numberOfUsersZoneThreshold optional, -// NumberOfUsersAPThreshold numberOfUsersAPThreshold optional, -// OperationStatus operationStatus optional -// } -// -// /** -// * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC -// */ -// type UInt32 Seconds; -// -// /** -// * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC -// */ -// type UInt32 NanoSeconds; - -} with { -encode "JSON" -} diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk b/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk index 46b5cab7d7abdebb65bf9ec7995ab94799aa009f..37bd881607c6f37e769ca2da8a72eb8964965791 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/module.mk @@ -5,3 +5,4 @@ sources := \ ttcn/ApplicationMobilityServiceAPI_Templates.ttcn \ ttcn/ApplicationMobilityServiceAPI_Functions.ttcn \ +modules := ../RnisAPI diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn index d5f9d639d818b349403af21ad4b1ba981689d10f..443257a3999569ecce71e4c1a56e42add4becfeb 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn @@ -3,4 +3,341 @@ module ApplicationMobilityServiceAPI_Functions { // JSON import from Json all; + // LibCommon + import from LibCommon_BasicTypesAndValues all; + 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/ApplicationMobilityServiceAPI + import from ApplicationMobilityServiceAPI_TypesAndValues all; + import from ApplicationMobilityServiceAPI_Templates all; + import from ApplicationMobilityServiceAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_application_mobility_services( + in Json.String p_app_instance_id := PX_APP_INS_ID, + out RegistrationInfo p_registration_info + ) 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_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_info( + m_registration_info( + -, + m_service_consumer_id( + p_app_instance_id + ))))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_registration_info( + mw_registration_info( + ?, + mw_service_consumer_id( + p_app_instance_id + ))))))) -> value v_response { + tc_ac.stop; + + p_registration_info := v_response.response.body.json_body.registrationInfo; + log("f_create_application_mobility_services: INFO: IUT successfully responds to the registration: ", p_registration_info); + } + [] tc_ac.timeout { + log("f_create_application_mobility_services: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_application_mobility_services + + function f_delete_application_mobility_services( + in Json.String p_app_mobility_service_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_delete( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(p_app_mobility_service_id, "UTF-8")), + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_application_mobility_services: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_application_mobility_services + + function f_create_adjacent_app_instance_info( + in Json.String p_app_instance_id := PX_APP_INS_ID, + in Json.String p_app_id := PX_APP_ID, + in template (value) CommunicationInterface p_communication_interface, + out AdjacentAppInstanceInfo p_adjacent_app_instance_info + ) 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_APP_AMS_URI, + v_headers, + m_http_message_body_json( + m_body_json_ams_adjacent_app_instance_info( + m_adjacent_app_instance_info( + p_app_instance_id, + p_app_id, + p_communication_interface + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_adjacent_app_instance_info( + mw_adjacent_app_instance_info( + p_app_instance_id, + p_app_id + )))))) -> value v_response { + tc_ac.stop; + + p_adjacent_app_instance_info := v_response.response.body.json_body.adjacentAppInstanceInfo; + log("f_create_adjacent_app_instance_info: INFO: IUT successfully responds to the adjacentAppInstanceInfo: ", p_adjacent_app_instance_info); + } + [] tc_ac.timeout { + log("f_create_adjacent_app_instance_info: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_adjacent_app_instance_info + + function f_delete_adjacent_app_instance_info( + in Json.String p_app_instance_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_delete( + PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(p_app_instance_id, "UTF-8")), + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_adjacent_app_instance_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_adjacent_app_instance_info + + function f_create_mobility_procedure_subscription( + out MobilityProcedureSubscription p_mobility_procedure_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_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_mobility_procedure_subscription( + m_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + m_filter_criteria, + -, -, -, + { seconds := (f_get_current_timestamp_utc() / 1000) + 60, nanoSeconds := 0 } + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_mobility_procedure_subscription( + mw_mobility_procedure_subscription( + PX_CALLBACK_REFERENCE, + mw_filter_criteria, + mw_links + )))))) -> 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_APP_AMS_SUBS & "/(?*)", + 0 + ); + p_mobility_procedure_subscription := v_response.response.body.json_body.mobilityProcedureSubscription; + log("f_create_mobility_procedure_subscription: INFO: IUT successfully responds to the subscription: ", p_mobility_procedure_subscription); + log("f_create_mobility_procedure_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_mobility_procedure_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_mobility_procedure_subscription + + function f_delete_mobility_procedure_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_APP_AMS_SUBS & "/" & 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_mobility_procedure_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_mobility_procedure_subscription + + function f_create_adjacent_appInfo_subscription( + out AdjacentAppInfoSubscription p_adjacent_appInfo_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_APP_AMS_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_ams_adjacent_appInfo_subscription( + m_adjacent_app_info_subscription( + PX_CALLBACK_REFERENCE, + m_adjacent_filter_criteria + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_ams_adjacent_appInfo_subscription( + mw_adjacent_app_info_subscription( + PX_CALLBACK_REFERENCE, + mw_adjacent_filter_criteria, + mw_links + )))))) -> 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_APP_AMS_SUBS & "/(?*)", + 0 + ); + p_adjacent_appInfo_subscription := v_response.response.body.json_body.adjacentAppInfoSubscription; + log("f_create_adjacent_appInfo_subscription: INFO: IUT successfully responds to the subscription: ", p_adjacent_appInfo_subscription); + log("f_create_adjacent_appInfo_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_adjacent_appInfo_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_adjacent_appInfo_subscription + + function f_delete_adjacent_appInfo_subscription( // FIXME To be merged with f_delete_mobility_procedure_subscription into f_delete_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_APP_AMS_SUBS & "/" & 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_adjacent_appInfo_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_adjacent_appInfo_subscription + } // End of module ApplicationMobilityServiceAPI_Functions diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pics.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pics.ttcn index 0499a19f36cc10d3b90660c89109839389648f11..89a128a697a30490df4c971e7ee96e6cd1d98644 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pics.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pics.ttcn @@ -3,4 +3,9 @@ module ApplicationMobilityServiceAPI_Pics { // JSON import from Json all; + /** + * @desc Does the IUT support LocationAPI? + */ + modulepar boolean PICS_AMS_API_SUPPORTED := true; + } // End of module ApplicationMobilityServiceAPI_Pics diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn index f07ed63450913d8a676838474a1530481f3aa0c4..6b6d4858fb06245c067deeb7df5bd8212815b7d1 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn @@ -3,4 +3,31 @@ module ApplicationMobilityServiceAPI_Pixits { // JSON import from Json all; + // LibMec/ApplicationMobilityServiceAPI + import from ApplicationMobilityServiceAPI_TypesAndValues all; + + modulepar Json.String PX_APP_INS_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; + + modulepar Json.String PX_APP_INS_ID_2 := "4e92055c-c594-11ee-8535-13445063b38e"; + + modulepar Json.String PX_APP_INS_ID_NEW := "d1e24122-c596-11ee-9ffa-33159308a999"; + + modulepar Json.String PX_APP_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; + + modulepar Json.String PX_APP_ID_2 := "4e92055c-c594-11ee-8535-13445063b38e"; + + modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"; + + modulepar Json.String PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID := "PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID"; + + modulepar Json.String PX_CALLBACK_REFERENCE := "http://127.0.0.1/callback"; + + modulepar charstring PX_CALLBACK_URI := "http://127.0.0.1/callback"; + + modulepar Json.String PX_MEP_ID := ""; + + modulepar Json.String PX_HOST := ""; + + modulepar UInt16 PX_PORT := 12345 + } // End of module ApplicationMobilityServiceAPI_Pixits diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn index e63aa9a18acab7455e51148a881256bf7181d720..6426d0688a3496be95018da208f2dc818eb35499 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn @@ -3,7 +3,339 @@ module ApplicationMobilityServiceAPI_Templates { // JSON import from Json all; + // MEC 012 + import from RnisAPI_TypesAndValues all; + // LibMec/ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; + import from ApplicationMobilityServiceAPI_Pixits all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + template (omit) RegistrationInfo m_registration_info( + in template (omit) Json.String p_app_mobility_service_id := omit, + in template (value) ServiceConsumerId p_serviceConsumerId, + in template (omit) DeviceInformation p_deviceInformation := omit, + in template (omit) UInt32 p_expiryTime := omit + ) := { + appMobilityServiceId := p_app_mobility_service_id, + serviceConsumerId := p_serviceConsumerId, + deviceInformation := p_deviceInformation, + expiryTime := p_expiryTime + } // End of template m_registration_info + + template (present) RegistrationInfo mw_registration_info( + template (present) Json.String p_app_mobility_service_id := ?, + template (present) ServiceConsumerId p_serviceConsumerId := ?, + template DeviceInformation p_deviceInformation := *, + template UInt32 p_expiryTime := * + ) := { + appMobilityServiceId := p_app_mobility_service_id, + serviceConsumerId := p_serviceConsumerId, + deviceInformation := p_deviceInformation, + expiryTime := p_expiryTime + } // End of template m_registration_info + + template (omit) ServiceConsumerId m_service_consumer_id( + in template (omit) Json.String p_appInstanceId := omit, + in template (omit) Json.String p_mepId := omit + ) := { + appInstanceId := p_appInstanceId, + mepId := p_mepId + } // End of template m_service_consumer_id + + template ServiceConsumerId mw_service_consumer_id( + template String p_appInstanceId := *, + template String p_mepId := * + ) := { + appInstanceId := p_appInstanceId, + mepId := p_mepId + } // End of template mw_service_consumer_id + + template (omit) DeviceInformation_ m_device_info( + in Json.String p_associate_id, + in template (omit) AppMobilityServiceLevel p_appMobilityServiceLevel := omit, + in template (omit) ContextTransferState p_contextTransferState := omit + ) := { + associateId := p_associate_id, + appMobilityServiceLevel := p_appMobilityServiceLevel, + contextTransferState := p_contextTransferState + } // End of template m_device_info + + template (present) DeviceInformation_ mw_device_info( + template (present) Json.String p_associate_id := ?, + template AppMobilityServiceLevel p_appMobilityServiceLevel := *, + template ContextTransferState p_contextTransferState := * + ) := { + associateId := p_associate_id, + appMobilityServiceLevel := p_appMobilityServiceLevel, + contextTransferState := p_contextTransferState + } // End of template mw_device_info + + template (omit) MobilityProcedureSubscription m_mobility_procedure_subscription( + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (value) FilterCriteria p_filterCriteria, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "MobilityProcedureSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_mobility_procedure_subscription + + template (omit) MobilityProcedureSubscription m_mobility_procedure_subscription_error( + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (value) FilterCriteria p_filterCriteria, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) modifies m_mobility_procedure_subscription := { + subscriptionType := "MobilityProcedureSub" + } // End of template m_mobility_procedure_subscription_error + + template (present) MobilityProcedureSubscription mw_mobility_procedure_subscription( + template Json.AnyURI p_callbackReference := *, + template (present) FilterCriteria p_filterCriteria := ?, + template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "MobilityProcedureSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template mw_mobility_procedure_subscription + + template (omit) FilterCriteria m_filter_criteria( + in template (omit) Json.String p_appInstanceId := omit, + in template (omit) AssociateId p_associateId := omit, + in template (omit) MobilityStatus p_mobilityStatus := omit + ) := { + appInstanceId := p_appInstanceId, + associateId := p_associateId, + mobilityStatus := p_mobilityStatus + } // End of template m_filter_criteria + + template FilterCriteria mw_filter_criteria( + template Json.String p_appInstanceId := *, + template AssociateId p_associateId := *, + template MobilityStatus p_mobilityStatus := * + ) := { + appInstanceId := p_appInstanceId, + associateId := p_associateId, + mobilityStatus := p_mobilityStatus + } // End of template mw_filter_criteria + + template (omit) AdjacentAppInstanceInfo m_adjacent_app_instance_info( + in template (value) Json.String p_appInstanceId, + in template (value) Json.String p_appDId, + in template (value) CommunicationInterface p_appInstanceCommLink, + in template (omit) MECHostInformation p_mecHostInformation := omit, + in template (omit) Json.String p_registeredInstanceId := omit + ) := { + appInstanceId := p_appInstanceId, + appDId := p_appDId, + appInstanceCommLink := p_appInstanceCommLink, + mecHostInformation := p_mecHostInformation, + registeredInstanceId := p_registeredInstanceId + } // End of template m_adjacent_app_instance_info + + template (present) AdjacentAppInstanceInfo mw_adjacent_app_instance_info( + template (present) Json.String p_appInstanceId := ?, + template (present) Json.String p_appDId := ?, + template (present) CommunicationInterface p_appInstanceCommLink := ?, + template MECHostInformation p_mecHostInformation := *, + template Json.String p_registeredInstanceId := * + ) := { + appInstanceId := p_appInstanceId, + appDId := p_appDId, + appInstanceCommLink := p_appInstanceCommLink, + mecHostInformation := p_mecHostInformation, + registeredInstanceId := p_registeredInstanceId + } // End of template mw_adjacent_app_instance_info + + template (omit) CommunicationInterface m_communication_interface( + in template (omit) IpAddresses p_ipAddresses := omit + ) := { + ipAddresses := p_ipAddresses + } // End of template m_communication_interface + + template CommunicationInterface mw_communication_interface( + template IpAddresses p_ipAddresses := * + ) := { + ipAddresses := p_ipAddresses + } // End of template mw_communication_interface + + template (omit) AdjacentAppInfoSubscription m_adjacent_app_info_subscription( + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (value) AdjacentFilterCriteria p_filterCriteria, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "AdjacentAppInfoSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_adjacent_app_info_subscription + + template (present) AdjacentAppInfoSubscription mw_adjacent_app_info_subscription( + template Json.AnyURI p_callbackReference := *, + template (present) AdjacentFilterCriteria p_filterCriteria := ?, + template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "AdjacentAppInfoSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template mw_adjacent_app_info_subscription + + template (omit) AdjacentFilterCriteria m_adjacent_filter_criteria( + in template (omit) Json.String p_appInstanceId := omit + ) := { + appInstanceId := p_appInstanceId + } // End of template m_adjacent_filter_criteria + + template AdjacentFilterCriteria mw_adjacent_filter_criteria( + template Json.String p_appInstanceId := * + ) := { + appInstanceId := p_appInstanceId + } // End of template mw_adjacent_filter_criteria + + template (value) MobilityProcedureNotification m_mobility_procedure_notification( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links, + in template (value) AssociateId p_associateId, + in template (value) MobilityStatus p_mobilityStatus, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) TargetAppInfo p_targetAppInfo := omit + ) := { + notificationType := "MobilityProcedureNotification", + timeStamp := p_timeStamp, + associateId := p_associateId, + mobilityStatus := p_mobilityStatus, + targetAppInfo := p_targetAppInfo, + links := p_links + } // End of template m_mobility_procedure_notification + + template (present) MobilityProcedureNotification mw_mobility_procedure_notification( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, + template (present) AssociateId p_associateId := ?, + template (present) MobilityStatus p_mobilityStatus := ?, + template TimeStamp p_timeStamp := *, + template TargetAppInfo p_targetAppInfo := * + ) := { + notificationType := "MobilityProcedureNotification", + timeStamp := p_timeStamp, + associateId := p_associateId, + mobilityStatus := p_mobilityStatus, + targetAppInfo := p_targetAppInfo, + links := p_links + } // End of template mw_mobility_procedure_notification + + template (omit) AdjacentAppInfoNotification m_adjacent_app_info_notification( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links, + in template (omit) AdjacentAppInfo p_adjacentAppInfo := omit, + in template (omit) TimeStamp p_timeStamp := omit + ) :={ + notificationType := "AdjacentAppInfoNotification", + timeStamp := p_timeStamp, + adjacentAppInfo := p_adjacentAppInfo, + links := p_links + } // End of template m_adjacent_app_info_notification + + template (present) AdjacentAppInfoNotification mw_adjacent_app_info_notification( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, + template AdjacentAppInfo p_adjacentAppInfo := *, + template TimeStamp p_timeStamp := * + ) :={ + notificationType := "AdjacentAppInfoNotification", + timeStamp := p_timeStamp, + adjacentAppInfo := p_adjacentAppInfo, + links := p_links + } // End of template mw_adjacent_app_info_notification + + template (omit) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification m_expire_notification( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links, + in template (omit) TimeStamp p_timestamp := omit + ) := { + notificationType := "ExpiryNotification", + timeStamp := p_timestamp, + links := p_links + } // End of template m_expire_notification + + template (present) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification mw_expire_notification( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, + template TimeStamp p_timestamp := * + ) := { + notificationType := "ExpiryNotification", + timeStamp := p_timestamp, + links := p_links + } // End of template mw_expire_notification + + template (value) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList m_subscription_link_list( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links, + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Subscription p_subscription + ) := { + links := p_links, + subscription := p_subscription + } // End of template m_subscription_link_list + + template (present) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList mw_subscription_link_list( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Subscription p_subscription := ? + ) := { + links := p_links, + subscription := p_subscription + } // End of template mw_subscription_link_list + + template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links m_links( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.LinkType p_self_ + ) := { + self_ := p_self_ + } // End of template m_links + + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links mw_links( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.LinkType p_self_ := ? + ) := { + self_ := p_self_ + } // End of template mw_links + + template (value) ApplicationMobilityServiceAPI_TypesAndValues.Subscription m_subscription( + in template (value) Json.AnyURI p_href, + in template (value) Json.String p_subscriptionType + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template m_subscription + + template (present) ApplicationMobilityServiceAPI_TypesAndValues.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 } // End of module ApplicationMobilityServiceAPI_Templates diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn index 4c4bf95d6f1a7f516cdfadbc2c834efd172827f0..f6dc76222214e8418468fd4f99451149d470d927 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn @@ -1,15 +1,313 @@ +/** + * @author ETSI / STF569 / TTF T027 + * @version $Url$ + * $Id$ + * @desc Types and Values for ETSI GS MEC 021 V3.1.1 (2023-10) + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + */ module ApplicationMobilityServiceAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; + // MEC 012 + import from RnisAPI_TypesAndValues all; + + /** + * @desc This data type represents the registration information used in the registration API of Application Mobility Service + * @member appMobilityServiceId The identifier of registered Application Mobility Service + * @member serviceConsumerId The identifier of service consumer requesting the Application Mobility Service + * @member deviceInformation Specifies the device served by the application instance which is registering the Application Mobility Service + * @member expiryTime Indicates the time of Application Mobility Service expiration from the time of registration accepted + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo + */ + type record RegistrationInfo { + Json.String appMobilityServiceId, + ServiceConsumerId serviceConsumerId, + DeviceInformation deviceInformation optional, + Json.UInteger expiryTime optional + } + type record of RegistrationInfo RegistrationInfos; + + /** + * @desc The identifier of service consumer requesting the Application Mobility Service + * @member appInstanceId Represents the identifier of the application instance registering the Application Mobility Service + * @member mepId Represents the identifier of the MEC platform registering the Application Mobility Service + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo + */ + type record ServiceConsumerId { + Json.String appInstanceId optional, + Json.String mepId optional + } + type record of ServiceConsumerId ServiceConsumerIds; + + /** + * @desc Specifies the device served by the application instance which is registering the Application Mobility Service + * @member associateId Represents the identifier of the device + * @member appMobilityServiceLevel If the application is stateful, this attribute shall be included + * @member contextTransferState If present, it represents the state of transferring the user context to another application instance + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo + */ + type record DeviceInformation_ { + Json.String associateId, + AppMobilityServiceLevel appMobilityServiceLevel optional, + ContextTransferState contextTransferState optional + } + type record of DeviceInformation_ DeviceInformation; + + /** + * @desc Represents the state of transferring the user context to another application instance + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo + */ + type enumerated ContextTransferState { + NOT_TRANSFERRED, + USER_CONTEXT_TRANSFER_COMPLETED + } with { + variant "JSON: as number" + } + + /** + * @desc This data type represents the adjacent application instance information of the adjacent_app_instances resource + * @member appInstanceId Identifier of the application instance + * @member appDId Identifier of the application descriptor + * @member appInstanceCommLink It specifies the communication interface of application instance + * @member mecHostInformation The MEC host where the application instance is running on + * @member registeredInstanceId Identifier of the application instance that registers to the AMS, which is instantiated from the application descriptor identified by the attribute "appDId" + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.3-1: Attributes of AdjacentAppInstanceInfo + */ + type record AdjacentAppInstanceInfo { + Json.String appInstanceId, + Json.String appDId, + CommunicationInterface appInstanceCommLink, + MECHostInformation mecHostInformation optional, + Json.String registeredInstanceId optional + } + type record of AdjacentAppInstanceInfo AdjacentAppInstanceInfos; + + /** + * @desc This type represents a subscription to mobility procedure notifications from AMS + * @member subscriptionType Shall be set to "MobilityProcedureSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription + */ + type record MobilityProcedureSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteria filterCriteria, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + type record of MobilityProcedureSubscription MobilityProcedureSubscriptions; + + /** + * @desc Hyperlink related to the resource + * @member self_ Self-referring URI + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Identifier of the application instance that registers to the Application Mobility Service + * @member associateId Identifiers to associate the information for specific UE(s) and flow(s) + * @member mobilityStatus In case mobilityStatus is not included in the subscription request + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription + */ + type record FilterCriteria { + Json.String appInstanceId optional, + AssociateId associateId optional, + MobilityStatus mobilityStatus optional + } + type record of FilterCriteria FilterCriterias; + + /** + * @desc This type represents a subscription to notification about the change on adjacent application instance information from AMS + * @member subscriptionType Shall be set to "AdjacentAppInfoSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription + */ + type record AdjacentAppInfoSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + AdjacentFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + type record of AdjacentAppInfoSubscription AdjacentAppInfoSubscriptions; + + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Identifier of the application instance that registers to the Application Mobility Service + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription + */ + type record AdjacentFilterCriteria { + Json.String appInstanceId optional + } + + /** + * @desc This type represents a list of links related to currently existing subscriptions for the service consumer + * @member links The URI referring to the subscription + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.4-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinkList { + Links links, + Subscription subscription + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc The service consumer's subscriptions + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.4-1: Attributes of the SubscriptionLinkList + */ + type record Subscription { + Json.AnyURI href, + Json.String subscriptionType + } + + /** + * @desc This type represents a notification from AMS with regards to mobility procedure + * @member notificationType Shall be set to "MobilityProcedureNotification" + * @member timeStamp Date and time of the generation of the notification + * @member associateId Identifiers to associate the information for specific UE(s) and flow(s) + * @member mobilityStatus Indicate the status of the UE mobility + * @member targetAppInfo Identifiers to associate the information of target application instance + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification + */ + type record MobilityProcedureNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + AssociateId associateId, + MobilityStatus mobilityStatus, + TargetAppInfo targetAppInfo optional, + Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Identifiers to associate the information of target application instance + * @member appInstanceId Identifiers of the target application instance + * @member CommunicationInterface It specifies the communication interface of the application instance + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification + */ + type record TargetAppInfo { + Json.String appInstanceId, + CommunicationInterface commInterface optional + } + + /** + * @desc Indicate the status of the UE mobility + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification + */ + type enumerated MobilityStatus { + INTERHOST_MOVEOUT_TRIGGERED (1), + INTERHOST_MOVEOUT_COMPLETED (2), + INTERHOST_MOVEOUT_FAILED (3) + } with { + variant "JSON: as number" + } + + /** + * @desc This type represents a notification from AMS with regards to change on adjacent application instances information + * @member notificationType Shall be set to "MobilityProcedureNotification" + * @member timeStamp Date and time of the generation of the notification + * @member adjacentAppInfo 0 to N identifiers to associate the information for adjacent application instances + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.3-1: Attributes of the AdjacentAppInfoNotification + */ + type record AdjacentAppInfoNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + AdjacentAppInfo adjacentAppInfo optional, + Links links + } with { + variant (links) "name as '_links'"; + } + + type record of TargetAppInfo AdjacentAppInfo; + + /** + * @desc This data type represents a notification from AMS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "ExpiryNotification" + * @member timeStamp Date and time of the generation of the notification + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.4-1: Attributes of the ExpiryNotification + */ + type record ExpiryNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This data type represents the Application Mobility Service level information used in the Application Mobility Service APIs + * @member appMobilityServiceLevel Provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.5-1: Attributes of AppMobilityServiceLevel + */ + type record AppMobilityServiceLevel { + AppMobilityServiceLevelEnmu appMobilityServiceLevel + } + + /** + * @desc Provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.5-1: Attributes of AppMobilityServiceLevel + */ + type enumerated AppMobilityServiceLevelEnmu { + APP_MOBILITY_NOT_ALLOWED (1), + APP_MOBILITY_WITH_CONFIRMATION (2), + APP_MOBILITY_WITHOUT_CONFIRMATION (3) + } with { + variant "JSON: as number" + } + + /** + * @desc This data type represents a notification from AMS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "TestNotification" + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.6-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links links + } with { + variant (links) "name as '_links'"; + } /** * @desc This type represents the communication interface of an application instance * @member ipAddresses Entry point information of the service as one or more pairs of IP address and port - * @see ETSI GS MEC 021 Clause 7.5.2 Type: CommunicationInterface + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.2 Type: CommunicationInterface */ type record CommunicationInterface { IpAddresses ipAddresses optional @@ -19,15 +317,59 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @desc Entry point information of the service as one or more pairs of IP address and port * @member host Host portion of the address * @member port Port portion of the address - * @see ETSI GS MEC 021 Clause 7.5.2 Type: CommunicationInterface + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.2 Type: CommunicationInterface */ type record IpAddress { - Json.String host, - UInt32 port_ + Json.String host, + Json.UInteger port_ } with { variant (port_) "name as 'port'"; } - type record length(1..infinity) of IpAddress IpAddresses; + /** + * @desc This type represents a type of link + * @member href URI referring to a resource + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.4 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc The type represents the parameters of MEC host information + * @member hostName Human-readable name of MEC host + * @member hostId Deployment-specific information to identify a MEC host + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.5.5-1: Attributes of MECHostInformation + */ + type record MECHostInformation { + Json.String hostName optional, + KeyValuePairs hostId + } + + /** + * @desc This data type represents a list of key-value pairs + * @member key_name + * @member key_value + * @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 6.2.5.3 Type: KeyValuePairs + */ + type record KeyValuePairs { + Json.String key_name, + anytype key_value // FIXME To be refined + } + + /** + * @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 021 V3.1.1 (2023-10) Clause 7.5.7 Type: WebsockNotifConfig + */ + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } + +} with { + extension "anytype integer, float, boolean, universal charstring"; + encode "JSON" } // End of module ApplicationMobilityServiceAPI_TypesAndValues diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn index ba95c97ee03e3c7d973e0a6f1b44695b5e7bb767..ecff7dd1a8cc6cf36b974ddb100d60fef232b788 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn @@ -1,3 +1,510 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { + // JSON + import from Json all; + + // Libcommon + 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_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pics all; + import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all; + + // LibMec + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_grant_request( + out Grant p_grant + ) runs on HttpComponent { + // Local variables + 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_MEO_GRANT_URI, + v_headers, + m_http_message_body_json( + m_body_json_grant_request( + m_grant_request( + PX_APP_INSTANCE_ID, + PX_APP_LCM_OP_OCC_ID, + PX_APP_ID, + INSTANTIATE, + m_grant_request_link( + m_link_type(PX_APP_LCM_OP_OCC_ID_URI), + m_link_type(PX_APP_INSTANCE_ID_URI) + ), + { + m_resource_definition( + "", // TODO + -, + { "" }, // TODO + m_resource_definition_resource( + m_vim_connection_info( + "", // TODO + "" // TODO + ), + "" // TODO + )) + } + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_grant_response( + mw_grant + ))))) -> value v_response { + tc_ac.stop; + p_grant := v_response.response.body.json_body.grantResponse; + log("f_create_grant_request: INFO: IUT successfully responds to the GrantRequest: ", p_grant); + } + [] tc_ac.timeout { + log("f_create_grant_request: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_grant_request + + function f_delete_grant_request( + out Json.String p_grant_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(p_grant_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_grant_request: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_grant_request + + function f_create_package_management( + out AppPkgInfo p_app_pkg_info, + in boolean p_onboarded := false + ) runs on HttpComponent { + // Local variables + 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_MEO_PKGM_URI, + v_headers, + m_http_message_body_json( + m_body_json_create_package_management( + m_create_package_management( + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + m_checksum(-, PX_CHECKSUM), + PX_APP_PKG_PATH + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + 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 + )))))) -> value v_response { + tc_ac.stop; + + p_app_pkg_info := v_response.response.body.json_body.appPkgInfo; + log("f_create_package_management: INFO: IUT successfully responds to the CreateAppPkg: ", p_app_pkg_info); + } + [] tc_ac.timeout { + log("f_create_package_management: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_package_management + + function f_delete_package_management( + in Json.String p_pkg_info_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEO_PKGM_URI & oct2char(unichar2oct(p_pkg_info_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_package_management: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_package_management + + function f_create_app_pkg_subscription( + out AppPkgSubscriptionInfo p_app_pkg_subscription_info, + in charstring p_uri := PX_MEO_PKGM_SUBS, + in Json.AnyURI p_callback_uri := PX_CALLBACK_URI + ) runs on HttpComponent { + // Local variables + 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 & p_uri, + v_headers, + m_http_message_body_json( + m_body_json_pkgm_subscription( + m_app_pkg_info_subscription( + p_callback_uri + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_pkgm_subscription_info( + mw_app_pkg_subscription_info( + -, + -, + PX_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + p_app_pkg_subscription_info := v_response.response.body.json_body.appPkgSubscriptionInfo; + log("f_create_app_pkg_subscription: INFO: IUT responds to the AppPkgSubscriptionInfo: ", p_app_pkg_subscription_info); + } + [] tc_ac.timeout { + log("f_create_app_pkg_subscription: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_create_app_pkg_subscription + + function f_delete_app_pkg_subscription( + in Json.String p_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEO_PKGM_SUBS & oct2char(unichar2oct(p_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_app_pkg_subscription: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_delete_app_pkg_subscription + + function f_create_app_instance( + out AppPkgInfo p_app_pkg_info, + out AppInstanceInfo p_app_instance_info + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + f_create_package_management(p_app_pkg_info); + if (not(isbound(p_app_pkg_info))) { + log("f_create_app_instance: Failed to create pkg"); + return; + } + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI, + v_headers, + m_http_message_body_json( + m_body_json_create_app_instance_request( + m_create_app_instance_request( + p_app_pkg_info.appDId, + p_app_pkg_info.appName & "_1" + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_instance_info( + mw_app_instance_info( + -, + p_app_pkg_info.appDId + )))))) -> value v_response { + tc_ac.stop; + p_app_instance_info := v_response.response.body.json_body.appInstanceInfo; + log("f_create_app_pkg_subscription: INFO: IUT responds to the AppInstanceInfo: ", p_app_instance_info); + } + [] tc_ac.timeout { + log("f_create_app_pkg_subscription: : INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_create_app_instance + + function f_delete_app_instance( + in Json.String p_app_pkg_info_id, + in Json.String p_app_instance_info_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(p_app_instance_info_id)), + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_app_instance: : INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + f_delete_package_management(p_app_pkg_info_id); + } // End of function f_delete_app_instance + + function f_instanciate_app_instance( + out AppPkgInfo p_app_pkg_info, + out AppInstanceInfo p_app_instance_info, + out charstring p_app_lcm_op_occ_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + f_create_app_instance(v_app_pkg_info, v_app_instance_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_instantiate_app_request( + m_instantiate_app_request( + m_selected_mec_host_info( + { + { key_name := PX_ONBOARD_HOSTID_NAME, key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } } + } + ))))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) -> value v_response { + tc_ac.stop; + + var charstring_list v_header_value; + if (f_check_headers(v_response.response.header)) { + f_get_header(v_response.response.header, "Location", v_header_value); + p_app_lcm_op_occ_id := regexp( + v_header_value[0], + PX_MEX_LCM_OP_OCC_URI & "/(?*)", + 0 + ); + log("f_instanciate_app_instance: IUT successfully responds with the correct header Location ", p_app_lcm_op_occ_id); + } + } + [] tc_ac.timeout { + log("f_instanciate_app_instance: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_instanciate_app_instance + + function f_terminate_app_instance( + in Json.String p_app_pkg_info_id, + in Json.String p_app_instance_info_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + var AppPkgInfo v_app_pkg_info; + var AppInstanceInfo v_app_instance_info; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate", + v_headers, + m_http_message_body_json( + m_body_json_terminate_app_request( + m_terminate_app_request + ))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_202_accepted + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_terminate_app_instance: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + f_delete_app_instance(p_app_pkg_info_id, p_app_instance_info_id); + } // End of function f_terminate_app_instance + + function f_create_app_instance_subscription( + out AppInstSubscriptionInfo p_app_inst_subscription_info + ) runs on HttpComponent { + // Local variables + 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_MEX_LCM_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_app_inst_subscription_request( + m_app_inst_subscription_request( + PX_APP_INST_SUBSCRIPTION_REQUEST, // Wrong subscription request + PX_CALLBACK_URI + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_app_inst_subscription_info( + mw_app_inst_subscription_info( + -, + PX_APP_INST_SUBSCRIPTION_REQUEST, + PX_CALLBACK_URI + )))))) -> value v_response { + tc_ac.stop; + + p_app_inst_subscription_info := v_response.response.body.json_body.appInstSubscriptionInfo; + log("f_create_app_pkg_subscription: IUT responds to the AppInstSubscriptionInfo: ", p_app_inst_subscription_info); + } + [] tc_ac.timeout { + log("f_create_app_pkg_subscription: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_create_app_instance_subscription + + function f_delete_app_instance_subscription( + in Json.String p_id + ) runs on HttpComponent { + // Local variables + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(p_id)), + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + ))) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_create_app_pkg_subscription: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_delete_app_instance_subscription + } // End of ApplicationPackageLifecycleAndOperationGrantingAPI_Functions diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn index 6ca4b5049e16d4c5ae23f8df159159ae0a1b2502..813a09832bc1b64fcf4241feaa8b4333bb0a736a 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pics.ttcn @@ -1,5 +1,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pics { + modulepar boolean PICS_IUT_MEO := true; + + modulepar boolean PICS_IUT_MEPM := false; + + modulepar boolean PICS_IUT_MEX := false; + /** * @desc Does the IUT support GRANT? */ diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn index a8d9de7d186e5f6932099c616d6b38d8b0167999..027b5cc26de1b7a01049a4b03b3da2a6b7d6accc 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn @@ -12,44 +12,75 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits { modulepar Json.String PX_APP_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c"; - modulepar OperationType PX_APP_OPERATION := INSTANTIATE; + modulepar OperationType PX_APP_OPERATION := OPERATE; modulepar OperationType PX_APP_OPERATION_ERROR := INSTANTIATE; modulepar Json.String PX_APP_LCM_OP_OCC_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c" + modulepar Json.String PX_APP_NON_EXISTANT_LCM_OP_OCC_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c" + + modulepar Json.AnyURI PX_APP_LCM_OP_OCC_ID_URI := "/app_lcm/v1/app_lcm_op_occs/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c"; + + modulepar Json.AnyURI PX_APP_INSTANCE_ID_URI := ""; + modulepar Json.String PX_GRANTING_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"; modulepar Json.String PX_NON_EXISTANT_GRANTING_ID := "PX_NON_EXISTANT_GRANTING_ID"; + modulepar Json.String PX_TRAFFIC_RULE_ID := "PX_TRAFFIC_RULE_ID"; + modulepar FilterType PX_TRAFFIC_FILTERTYPE := FLOW; - modulepar Json.String PX_APP_PKG_NAME := "APP_PKG_NAME" + modulepar Json.Integer PX_TRAFFIC_RULE_PRIORITY := 0; - modulepar Json.String PX_APP_PKG_VERSION := "APP_PKG_VERSION" + modulepar Action PX_TRAFFIC_RULE_ACTION := PASSTHROUGH; - modulepar Json.String PX_CHECKSUM := "CHECKSUM" + modulepar Json.String PX_TRAFFIC_FILTER_SRC_ADDRESS := ""; - modulepar Json.String PX_APP_PKG_PATH := "APP_PKG_PATH" + modulepar Json.String PX_TRAFFIC_FILTER_DST_ADDRESS := ""; + + modulepar Json.String PX_TRAFFIC_FILTER_SRC_PORT := "12345"; - modulepar OperationalState PX_OPERATIONAL_STATE := STARTED + modulepar Json.String PX_TRAFFIC_FILTER_DST_PORT := "12346"; - modulepar UsageState PX_USAGE_STATE := NOT_IN_USE + modulepar Json.String PX_TRAFFIC_FILTER_PROTOCOL := ""; + + modulepar Json.String PX_APP_PKG_NAME := "APP_PKG_NAME"; + + modulepar Json.String PX_APP_PKG_VERSION := "APP_PKG_VERSION"; + + modulepar Json.String PX_CHECKSUM := "CHECKSUM"; + + modulepar Json.String PX_APP_PKG_PATH := "APP_PKG_PATH"; - modulepar Json.String PX_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f" + modulepar OperationalState PX_OPERATIONAL_STATE := STARTED; - modulepar Json.String PX_ON_BOARDED_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f" + modulepar UsageState PX_USAGE_STATE := NOT_IN_USE; - modulepar Json.String PX_NON_EXISTENT_APP_PKG_ID := "NON_EXISTENT_APP_PKG_ID" + modulepar Json.String PX_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; - modulepar Json.String PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID := "NON_ON_BOARDED_EXISTENT_APP_PKG_ID" + modulepar Json.String PX_ON_BOARDED_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"; - modulepar Json.AnyURI PX_CALLBACK_URI := "http://127.0.0.1/callback" + modulepar Json.String PX_NON_EXISTENT_APP_PKG_ID := "NON_EXISTENT_APP_PKG_ID"; - modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3" + modulepar Json.String PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID := "NON_ON_BOARDED_EXISTENT_APP_PKG_ID"; + + modulepar Json.AnyURI PX_CALLBACK_URI := "http://127.0.0.1/callback"; - modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID" + modulepar Json.String PX_APP_INST_SUBSCRIPTION_REQUEST := "AppInstSubscriptionRequest"; + // AppLcmOpOccSubscriptionRequest + // AppInstIdCreationSubscriptionRequest + // AppInstIdDeletionSubscriptionRequest - modulepar Json.AnyURI PX_APP_PKG_HREF := ""; + modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"; + + modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"; + modulepar Json.AnyURI PX_APP_PKG_HREF := ""; + + modulepar Json.String PX_ONBOARD_HOSTID_NAME := ""; + + modulepar Json.String PX_ONBOARD_HOSTID_VALUE := ""; + } // End of module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index f2bd9713d156d5ffb18ce4bbadb4c76586ddfa8d..b914cc021008429ac735901d7b606e3d6184bc1a 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -3,10 +3,13 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { // JSON import from Json all; - // LibMec_EdgePlatformApplicationEnablementAPI + // LibMec + import from LibMec_TypesAndValues all; + + // LibMec/LibMec_EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; - // LibMec_ApplicationMobilityServiceAPI + // LibMec/LibMec_ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; // LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI @@ -15,18 +18,19 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { group granting { - template (value) GrantRequest m_grant_request( - in String p_app_instance_id := PX_APP_INSTANCE_ID, - in String p_appLcmOpOccId := PX_APP_LCM_OP_OCC_ID, - in String p_appDId := PX_APP_ID, - in OperationType p_operation := PX_APP_OPERATION, - in template (value) GrantRequest_Link p_links - ) := { + template (omit) GrantRequest m_grant_request( + in String p_app_instance_id := PX_APP_INSTANCE_ID, + in String p_appLcmOpOccId := PX_APP_LCM_OP_OCC_ID, + in String p_appDId := PX_APP_ID, + in OperationType p_operation := PX_APP_OPERATION, + in template (value) GrantRequest_Link p_links, + in template (omit) ResourceDefinitions p_addResources := omit + ) := { appInstanceId := p_app_instance_id, appLcmOpOccId := p_appLcmOpOccId, appDId := p_appDId, operation := p_operation, - addResources := omit, + addResources := p_addResources, tempResources := omit, updateResources := omit, additionalParams := omit, @@ -54,7 +58,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (present) Grant mw_grant( template (present) String p_id := ?, template (present) String p_app_instance_id := PX_APP_INSTANCE_ID, - template (present) String p_appLcmOpOccId := ?, + template (present) String p_appLcmOpOccId := PX_APP_LCM_OP_OCC_ID, template (present) Grant_Link p_links := ? ) := { id := p_id, @@ -100,7 +104,83 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { ) := { href := p_href } // End of template mw_link_type - + + template (omit) ResourceDefinition m_resource_definition( + in Json.String p_id, + in ResourceDefinition_Type p_type_ := OSCONTAINER, + in template (value) ResourceTemplateId p_resourceTemplateId, + in template (value) ResourceDefinition_Resource p_resource, + in template (omit) Json.String p_vduId := omit + ) := { + id := p_id, + type_ := p_type_, + vduId := p_vduId, + resourceTemplateId := p_resourceTemplateId, + resource := p_resource + } // End of template m_resource_definition + + template (present) ResourceDefinition mw_resource_definition( + template (present) Json.String p_id := ?, + template (present) ResourceDefinition_Type p_type_ := ?, + template (present) ResourceTemplateId p_resourceTemplateId := ?, + template (present) ResourceDefinition_Resource p_resource := ?, + template Json.String p_vduId := * + ) := { + id := p_id, + type_ := p_type_, + vduId := p_vduId, + resourceTemplateId := p_resourceTemplateId, + resource := p_resource + } // End of template mw_resource_definition + + template (value) ResourceDefinition_Resource m_resource_definition_resource( + in template (value) VimConnectionInfo p_vimConnectionInfo, + in Json.String p_resourceId + ) := { + vimConnectionInfo := p_vimConnectionInfo, + resourceId := p_resourceId + } // End of template m_resource_definition_resource + + template (present) ResourceDefinition_Resource mw_resource_definition_resource( + template (present) VimConnectionInfo p_vimConnectionInfo := ?, + template (present) Json.String p_resourceId := ? + ) := { + vimConnectionInfo := p_vimConnectionInfo, + resourceId := p_resourceId + } // End of template mw_resource_definition_resource + + template (omit) VimConnectionInfo m_vim_connection_info( + in Json.String p_id, + in Json.String p_vimType, + in template (omit) Json.String p_vimId := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_interfaceInfo := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_accessInfo := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_extra := omit + ) := { + id := p_id, + vimId := p_vimId, + vimType := p_vimType, + interfaceInfo := p_interfaceInfo, + accessInfo := p_accessInfo, + extra := p_extra + } // End of template m_vim_connection_info + + template (present) VimConnectionInfo mw_vim_connection_info( + template (present) Json.String p_id := ?, + template (present) Json.String p_vimType := ?, + template Json.String p_vimId := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_interfaceInfo := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_accessInfo := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_extra := * + ) := { + id := p_id, + vimId := p_vimId, + vimType := p_vimType, + interfaceInfo := p_interfaceInfo, + accessInfo := p_accessInfo, + extra := p_extra + } // End of template mw_vim_connection_info + } // End of group granting group pkgmgt { @@ -133,18 +213,52 @@ 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, + 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( - template (present) Json.String p_id:= ?, - template (present) Json.String p_appDId:= ?, - template (present) Json.String p_appName:= ?, - template (present) Json.String p_appSoftwareVersion:= ?, - template (present) Json.String p_appDVersion:= ?, - template (present) Checksum p_checksum:= ?, - template (present) AppPkgSWImageInfo p_softwareImages:= ?, - template (present) OnboardingState p_onboardingState:= ?, - template (present) AppPkgInfo_OperationalState p_operationalState:= ?, - template (present) UsageState p_usageState:= ?, - template (present) AppPkgInfo_MecInfo p_mecInfo:= ?, + template (present) Json.String p_id := ?, + template (present) Json.String p_appDId := ?, + template (present) Json.String p_appName := ?, + template (present) Json.String p_appSoftwareVersion := ?, + template (present) Json.String p_appDVersion := ?, + template (present) Checksum p_checksum := ?, + template (present) AppPkgSWImageInfo p_softwareImages := ?, + template (present) OnboardingState p_onboardingState := ?, + template (present) AppPkgInfo_OperationalState p_operationalState := ?, + template (present) UsageState p_usageState := ?, + template (present) AppPkgInfo_MecInfo p_mecInfo := ?, template (present) AppPkgInfo_Links p_links := ? ) := { id := p_id, @@ -232,7 +346,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (present) Json.String p_id := ?, template (present) Json.String p_notificationType := ?, template (present) Json.String p_subscriptionId := ?, - template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_timeStamp := ?, + template (present) TimeStamp p_timeStamp := ?, template (present) Json.String p_appPkgId := ?, template (present) Json.String p_appDId := ?, template (present) AppPkgInfo_OperationalState p_operationalState := ?, @@ -259,20 +373,64 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { ) := { self_ := { href := p_href } } // End of template mw_app_pkg_link - + + template (value) AppPkgSubscriptionLinkList m_app_pkg_ubscription_link_list( + in template (value) AppPkgSubscriptionLinkList_Link p_links + ) := { + links := p_links + } // End of template m_app_pkg_ubscription_link_list + + template (present) AppPkgSubscriptionLinkList mw_app_pkg_ubscription_link_list( + template (present) AppPkgSubscriptionLinkList_Link p_links := ? + ) := { + links := p_links + } // End of template mw_app_pkg_ubscription_link_list + + template (omit) AppPkgSubscriptionLinkList_Link m_app_pkg_subscription_link_list_link( + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_self_, + in template (omit) AppPkgSubscriptionLinkList_Link_Subscriptions p_subscriptions := omit + ) := { + self_ := p_self_, + subscriptions := p_subscriptions + } // End of template m_app_pkg_subscription_link_list_link + + template (present) AppPkgSubscriptionLinkList_Link mw_app_pkg_subscription_link_list_link( + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_self_ := ?, + template AppPkgSubscriptionLinkList_Link_Subscriptions p_subscriptions := * + ) := { + self_ := p_self_, + subscriptions := p_subscriptions + } // End of template mw_app_pkg_subscription_link_list_link + + template (value) AppPkgSubscriptionLinkList_Link_Subscription m_app_pkg_subscription_link_list_link_subscription( + in Json.AnyURI p_href, + in AppPkgSubscriptionType p_subscriptionType + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template m_app_pkg_subscription_link_list_link_subscription + + template (present) AppPkgSubscriptionLinkList_Link_Subscription mw_app_pkg_subscription_link_list_link_subscription( + template (present) Json.AnyURI p_href := ?, + template (present) AppPkgSubscriptionType p_subscriptionType := ? + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template mw_app_pkg_subscription_link_list_link_subscription + } // End of group pkgmgt group mepm_lifcyclemgt { template (omit) ConfigPlatformForAppRequest m_config_platform_for_app_request( - in template (value) ServiceDependency p_appServiceRequired, - in template (omit) ServiceDependency p_appServiceOptional := omit, - in template (omit) ServiceDependency p_appServiceProduced := omit, - in template (omit) FeatureDependency p_appFeatureRequired := omit, - in template (omit) FeatureDependency p_appFeatureOptional := omit, - in template (omit) TransportDependency p_transportDependencies := omit, - in template (omit) TrafficRuleDescriptor p_appTrafficRule := omit, - in template (omit) DNSRuleDescriptor p_appDNSRule := omit, + in template (value) ServiceDependencies p_appServiceRequired, + in template (omit) ServiceDependencies p_appServiceOptional := omit, + in template (omit) ServiceDependencies p_appServiceProduced := omit, + in template (omit) FeatureDependencies p_appFeatureRequired := omit, + in template (omit) FeatureDependencies p_appFeatureOptional := omit, + in template (omit) TransportDependencies p_transportDependencies := omit, + in template (omit) TrafficRuleDescriptors p_appTrafficRule := omit, + in template (omit) DNSRuleDescriptors p_appDNSRule := omit, in template (omit) LatencyDescriptor p_appLatency := omit, in template (omit) UserContextTransferCapability p_userContextTransferCapability := omit, in template (omit) AppNetworkPolicy p_appNetworkPolicy := omit @@ -291,14 +449,14 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // End of template m_config_platform_for_app_request template (present) ConfigPlatformForAppRequest mw_config_platform_for_app_request( - template (present) ServiceDependency p_appServiceRequired := ?, - template ServiceDependency p_appServiceOptional := *, - template ServiceDependency p_appServiceProduced := *, - template FeatureDependency p_appFeatureRequired := *, - template FeatureDependency p_appFeatureOptional := *, - template TransportDependency p_transportDependencies := *, - template TrafficRuleDescriptor p_appTrafficRule := *, - template DNSRuleDescriptor p_appDNSRule := *, + template (present) ServiceDependencies p_appServiceRequired := ?, + template ServiceDependencies p_appServiceOptional := *, + template ServiceDependencies p_appServiceProduced := *, + template FeatureDependencies p_appFeatureRequired := *, + template FeatureDependencies p_appFeatureOptional := *, + template TransportDependencies p_transportDependencies := *, + template TrafficRuleDescriptors p_appTrafficRule := *, + template DNSRuleDescriptors p_appDNSRule := *, template LatencyDescriptor p_appLatency := *, template UserContextTransferCapability p_userContextTransferCapability := *, template AppNetworkPolicy p_appNetworkPolicy := * @@ -343,7 +501,179 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { serTransportDependencies := p_serTransportDependencies, requestedPermissions := p_requestedPermissions } // End of template mw_service_dependency - + + template (value) FeatureDependency m_feature_dependency( + in Json.String p_featureName, + in Json.String p_version + ) := { + featureName := p_featureName, + version := p_version + } // End of template m_feature_dependency + + template (present) FeatureDependency mw_feature_dependency( + template (present) Json.String p_featureName := ?, + template (present) Json.String p_version := ? + ) := { + featureName := p_featureName, + version := p_version + } // End of template mw_feature_dependency + + template (value) TransportDependency m_transport_dependency( + in template (value) TransportDescriptor p_transport, + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType p_serializers, + in template (value) Labels p_labels + ) := { + transport := p_transport, + serializers := p_serializers, + labels := p_labels + } // End of template m_transport_dependency + + template (present) TransportDependency mw_transport_dependency( + template (present) TransportDescriptor p_transport := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType p_serializers := ?, + template (present) Labels p_labels := ? + ) := { + transport := p_transport, + serializers := p_serializers, + labels := p_labels + } // End of template mw_transport_dependency + + template (omit) TransportDescriptor m_transport_descriptor( + in Json.String p_name, + in ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType p_type_ := REST_HTTP, + in Json.String p_protocol, + in Json.String p_version, + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo p_security, + in template (omit) Json.String p_description := omit, + in template (omit) Json.String p_implSpecificInfo := omit + ) := { + name := p_name, + description := p_description, + type_ := p_type_, + protocol := p_protocol, + version := p_version, + security := p_security, + implSpecificInfo := p_implSpecificInfo + } // End of template m_transport_descriptor + + template (present) TransportDescriptor mw_transport_descriptor( + template (present) Json.String p_name := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType p_type_ := ?, + template (present) Json.String p_protocol := ?, + template (present) Json.String p_version := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo p_security := ?, + template Json.String p_description := *, + template Json.String p_implSpecificInfo := * + ) := { + name := p_name, + description := p_description, + type_ := p_type_, + protocol := p_protocol, + version := p_version, + security := p_security, + implSpecificInfo := p_implSpecificInfo + } // End of template mw_transport_descriptor + + template (omit) TrafficRuleDescriptor m_traffic_rule_descriptor( + in template (value) Json.String p_trafficRuleId, + in template (value) FilterType p_filterType, + in template (value) Json.Integer p_priority, + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter p_trafficFilter, + in template (value) Action p_action, + in template (omit) InterfaceDescriptor p_dstInterface := omit + ) := { + trafficRuleId := p_trafficRuleId, + filterType := p_filterType, + priority := p_priority, + trafficFilter := p_trafficFilter, + action_ := p_action, + dstInterface := p_dstInterface + } // End of template m_traffic_rule_descriptor + + template (present) TrafficRuleDescriptor mw_traffic_rule_descriptor( + template (present) Json.String p_trafficRuleId := ?, + template (present) FilterType p_filterType := ?, + template (present) Json.Integer p_priority := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter p_trafficFilter := ?, + template (present) Action p_action := ?, + template InterfaceDescriptor p_dstInterface := * + ) := { + trafficRuleId := p_trafficRuleId, + filterType := p_filterType, + priority := p_priority, + trafficFilter := p_trafficFilter, + action_ := p_action, + dstInterface := p_dstInterface + } // End of template mw_traffic_rule_descriptor + + template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter m_traffic_filter( + in template (omit) Json.String p_srcAddress := omit, + in template (omit) Json.String p_dstAddress := omit, + in template (omit) Json.String p_srcPort := omit, + in template (omit) Json.String p_dstPort := omit, + in template (omit) Json.String p_protocol := omit, + in template (omit) Json.String p_tag := omit, + in template (omit) Json.String p_uri := omit, + in template (omit) Json.String p_packetLabel := omit, + in template (omit) Json.String p_srcTunnelAddress := omit, + in template (omit) Json.String p_tgtTunnelAddress := omit, + in template (omit) Json.String p_srcTunnelPort := omit, + in template (omit) Json.String p_dstTunnelPort := omit, + in template (omit) Json.Integer p_qCI := omit, + in template (omit) Json.Integer p_dSCP := omit, + in template (omit) Json.Integer p_tC := omit + ) :={ + srcAddress := p_srcAddress, + dstAddress := p_dstAddress, + srcPort := p_srcPort, + dstPort := p_dstPort, + protocol := p_protocol, + tag := p_tag, + uri := p_uri, + packetLabel := p_packetLabel, + srcTunnelAddress := p_srcTunnelAddress, + tgtTunnelAddress := p_tgtTunnelAddress, + srcTunnelPort := p_srcTunnelPort, + dstTunnelPort := p_dstTunnelPort, + qCI := p_qCI, + dSCP := p_dSCP, + tC := p_tC + } // End of template m_traffic_filter + + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter mw_traffic_filter( + template Json.String p_srcAddress := *, + template Json.String p_dstAddress := *, + template Json.String p_srcPort := *, + template Json.String p_dstPort := *, + template Json.String p_protocol := *, + template Json.String p_tag := *, + template Json.String p_uri := *, + template Json.String p_packetLabel := *, + template Json.String p_srcTunnelAddress := *, + template Json.String p_tgtTunnelAddress := *, + template Json.String p_srcTunnelPort := *, + template Json.String p_dstTunnelPort := *, + template Json.Integer p_qCI := *, + template Json.Integer p_dSCP := *, + template Json.Integer p_tC := * + ) :={ + srcAddress := p_srcAddress, + dstAddress := p_dstAddress, + srcPort := p_srcPort, + dstPort := p_dstPort, + protocol := p_protocol, + tag := p_tag, + uri := p_uri, + packetLabel := p_packetLabel, + srcTunnelAddress := p_srcTunnelAddress, + tgtTunnelAddress := p_tgtTunnelAddress, + srcTunnelPort := p_srcTunnelPort, + dstTunnelPort := p_dstTunnelPort, + qCI := p_qCI, + dSCP := p_dSCP, + tC := p_tC + } // End of template mw_traffic_filter + } // End of group mepm_lifcyclemgt group mex_lifcyclemgt { @@ -447,9 +777,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { template (omit) Link m_link( in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_self, in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_instantiate := omit, - in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_terminate := omit, - in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_operate := omit, - in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_configure_platform_for_app := omit + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_terminate := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_operate := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_configure_platform_for_app := omit ) := { self_ := p_self, instantiate := p_instantiate, @@ -471,7 +801,287 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { operate := p_operate, configure_platform_for_app := p_configure_platform_for_app } // End of template mw_link - + + template (omit) InstantiateAppRequest m_instantiate_app_request( + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation p_selectedMECHostInfo, + in template (omit) VirtualComputeDescriptor p_virtualComputeDescriptor := omit, + in template (omit) OsContainerDescriptors p_osContainerDescriptor := omit, + in template (omit) VirtualStorageDescriptor p_virtualStorageDescriptor := omit, + in template (omit) LocationConstraints p_locationConstraints := omit, + in template (omit) VimConnectionInfos p_vimConnectionInfo := omit, + in template (omit) AppTermCandsForCoord p_appTermCandsForCoord := omit + ) :={ + virtualComputeDescriptor := p_virtualComputeDescriptor, + osContainerDescriptor := p_osContainerDescriptor, + virtualStorageDescriptor := p_virtualStorageDescriptor, + selectedMECHostInfo := p_selectedMECHostInfo, + locationConstraints := p_locationConstraints, + vimConnectionInfo := p_vimConnectionInfo, + appTermCandsForCoord := p_appTermCandsForCoord + } // End of template m_instantiate_app_request + + template (present) InstantiateAppRequest mw_instantiate_app_request( + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation p_selectedMECHostInfo := ?, + template VirtualComputeDescriptor p_virtualComputeDescriptor := *, + template OsContainerDescriptors p_osContainerDescriptor := *, + template VirtualStorageDescriptor p_virtualStorageDescriptor := *, + template LocationConstraints p_locationConstraints := *, + template VimConnectionInfos p_vimConnectionInfo := *, + template AppTermCandsForCoord p_appTermCandsForCoord := * + ) :={ + virtualComputeDescriptor := p_virtualComputeDescriptor, + osContainerDescriptor := p_osContainerDescriptor, + virtualStorageDescriptor := p_virtualStorageDescriptor, + selectedMECHostInfo := p_selectedMECHostInfo, + locationConstraints := p_locationConstraints, + vimConnectionInfo := p_vimConnectionInfo, + appTermCandsForCoord := p_appTermCandsForCoord + } // End of template mw_instantiate_app_request + + template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation m_selected_mec_host_info( + in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_hostId, + in template (omit) Json.String p_hostName := omit + ) := { + hostName := p_hostName, + hostId := p_hostId + } // End of template m_selected_mec_host_info + + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation mw_selected_mec_host_info( + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_hostId := ?, + template Json.String p_hostName := * + ) := { + hostName := p_hostName, + hostId := p_hostId + } // End of template mw_selected_mec_host_info + + template (omit) TerminateAppRequest m_terminate_app_request( + in TerminationType p_termination_type := GRACEFUL, + in template (omit) Json.UInteger p_graceful_termination_timeout := omit + ) := { + terminationType := p_termination_type, + gracefulTerminationTimeout := p_graceful_termination_timeout + } // End of template m_terminate_app_request + + template (present) TerminateAppRequest mw_terminate_app_request( + template (present) TerminationType p_termination_type := ?, + template Json.UInteger p_graceful_termination_timeout := * + ) := { + terminationType := p_termination_type, + gracefulTerminationTimeout := p_graceful_termination_timeout + } // End of template mw_terminate_app_request + + template (omit) OperateAppRequest m_operate_app_request( + in OperationalState p_change_state_to := STOPPED, + in template (omit) StopType p_stop_type := omit, + in template (omit) Json.UInteger p_graceful_stop_timeout := omit + ) := { + changeStateTo := p_change_state_to, + stopType := p_stop_type, + gracefulStopTimeout := p_graceful_stop_timeout + } // End of template m_operate_app_request + + template (present) OperateAppRequest mw_operate_app_request( + template (present) OperationalState p_change_state_to := STOPPED, + template StopType p_stop_type := *, + template Json.UInteger p_graceful_stop_timeout := * + ) := { + changeStateTo := p_change_state_to, + stopType := p_stop_type, + gracefulStopTimeout := p_graceful_stop_timeout + } // End of template mw_operate_app_request + + template (omit) AppLcmOpOcc m_app_lcm_op_occ( + in Json.String p_id, + in OperationState p_operationState, + in template (value) TimeStamp p_stateEnteredTime, + in template (value) TimeStamp p_startTime, + in OperationType p_lcmOperation, + in template (value) AppLcmOpOcc_Link p_links, + in template (omit) OperationParams p_operationParams := omit, + in template (omit) Json.Bool p_isCancelPending := omit, + in template (omit) CancelMode p_cancelMode := omit + ) := { + id := p_id, + operationState := p_operationState, + stateEnteredTime := p_stateEnteredTime, + startTime := p_startTime, + lcmOperation := p_lcmOperation, + operationParams := p_operationParams, + isCancelPending := p_isCancelPending, + cancelMode := p_cancelMode, + links := p_links + } // End of template m_app_lcm_op_occ + + template (present) AppLcmOpOcc mw_app_lcm_op_occ( + template (present) Json.String p_id := ?, + template (present) OperationState p_operationState := ?, + template (present) TimeStamp p_stateEnteredTime := ?, + template (present) TimeStamp p_startTime := ?, + template (present) OperationType p_lcmOperation := ?, + template (present) AppLcmOpOcc_Link p_links := ?, + template OperationParams p_operationParams := *, + template Json.Bool p_isCancelPending := *, + template CancelMode p_cancelMode := * + ) := { + id := p_id, + operationState := p_operationState, + stateEnteredTime := p_stateEnteredTime, + startTime := p_startTime, + lcmOperation := p_lcmOperation, + operationParams := p_operationParams, + isCancelPending := p_isCancelPending, + cancelMode := p_cancelMode, + links := p_links + } // End of template mw_app_lcm_op_occ + + template (value) AppLcmOpOcc_Link m_app_lcm_op_occ_link( + in Json.AnyURI p_href, + in Json.AnyURI p_app_instance + ) := { + self_ := { href := p_href }, + appInstance := { href := p_app_instance } + } // End of template m_app_lcm_op_occ_link + + template (present) AppLcmOpOcc_Link mw_app_lcm_op_occ_link( + template (present) Json.AnyURI p_href := ?, + template (present) Json.AnyURI p_app_instance := ? + ) := { + self_ := { href := p_href }, + appInstance := { href := p_app_instance } + } // End of template mw_app_lcm_op_occ_link + + template (omit) AppInstSubscriptionRequest m_app_inst_subscription_request( + in Json.String p_subscriptionType, + in Json.AnyURI p_callbackUri, + in template (omit) AppInstanceState p_appInstanceState := omit, + in template (omit) AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := omit + ) := { + subscriptionType := p_subscriptionType, + callbackUri := p_callbackUri, + appInstanceState := p_appInstanceState, + appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter + } // End of template m_app_inst_subscription_request + + template (present) AppInstSubscriptionRequest mw_app_inst_subscription_request( + template (present) Json.String p_subscriptionType := ?, + template (present) Json.AnyURI p_callbackUri := ?, + template AppInstanceState p_appInstanceState := *, + template AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := * + ) := { + subscriptionType := p_subscriptionType, + callbackUri := p_callbackUri, + appInstanceState := p_appInstanceState, + appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter + } // End of template mw_app_inst_subscription_request + + template (omit) AppInstSubscriptionInfo m_app_inst_subscription_info( + in Json.String p_id, + in Json.String p_subscriptionType, + in Json.AnyURI p_callbackUri, + in template (value) AppInstSubscriptionInfo_Link p_links, + in template (omit) AppInstanceState p_appInstanceState := omit, + in template (omit) AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := omit + ) := { + id := p_id, + subscriptionType := p_subscriptionType, + appInstanceState := p_appInstanceState, + appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter, + callbackUri := p_callbackUri, + links := p_links + } // End of template m_app_inst_subscription_info + + template (present) AppInstSubscriptionInfo mw_app_inst_subscription_info( + template (present) Json.String p_id := ?, + template (present) Json.String p_subscriptionType := ?, + template (present) Json.AnyURI p_callbackUri := ?, + template (present) AppInstSubscriptionInfo_Link p_links := ?, + template AppInstanceState p_appInstanceState := *, + template AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := * + ) := { + id := p_id, + subscriptionType := p_subscriptionType, + appInstanceState := p_appInstanceState, + appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter, + callbackUri := p_callbackUri, + links := p_links + } // End of template mw_app_inst_subscription_info + + template (value) AppInstanceSubscriptionLinkList m_app_instance_subscription_link_list( + in template (value) AppInstanceSubscriptionLinkList_Link p_links + ) := { + links := p_links + } // End of template m_app_instance_subscription_link_list + + template (present) AppInstanceSubscriptionLinkList mw_app_instance_subscription_link_list( + template (present) AppInstanceSubscriptionLinkList_Link p_links := ? + ) := { + links := p_links + } // End of template mw_app_instance_subscription_link_list + + template (omit) AppInstanceSubscriptionLinkList_Link m_app_instance_subscription_link_list_link( + in Json.AnyURI p_href, + in template (omit) AppInstanceSubscriptionLinkList_Link_Subscriptions p_subscriptions := omit + ) := { + self_ := { href := p_href }, + subscriptions := p_subscriptions + } // End of template m_app_instance_subscription_link_list_link + + template (present) AppInstanceSubscriptionLinkList_Link mw_app_instance_subscription_link_list_link( + template (present) Json.AnyURI p_href := ?, + template AppInstanceSubscriptionLinkList_Link_Subscriptions p_subscriptions := * + ) := { + self_ := { href := p_href }, + subscriptions := p_subscriptions + } // End of template mw_app_instance_subscription_link_list_link + + template (omit) AppInstNotification m_app_inst_notification( + in Json.String p_id, + in ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.NotificationType p_notificationType, + in Json.String p_subscriptionId, + in template (value) TimeStamp p_timeStamp, + in Json.String p_appInstanceId, + in Json.String p_appPkgId, + in Json.String p_appDId, + in template (value) AppInstNotification_Links p_links, + in template (omit) AppInstanceState p_appInstanceState := omit, + in template (omit) LocationInformation p_appInstLocation := omit + ) := { + id := p_id, + notificationType := p_notificationType, + appInstanceState := p_appInstanceState, + subscriptionId := p_subscriptionId, + timeStamp := p_timeStamp, + appInstanceId := p_appInstanceId, + appPkgId := p_appPkgId, + appDId := p_appDId, + appInstLocation := p_appInstLocation, + links := p_links + } // End of template m_app_inst_notification + + template (present) AppInstNotification mw_app_inst_notification( + template (present) Json.String p_id := ?, + template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.NotificationType p_notificationType := ?, + template (present) Json.String p_subscriptionId := ?, + template (present) TimeStamp p_timeStamp := ?, + template (present) Json.String p_appInstanceId := ?, + template (present) Json.String p_appPkgId := ?, + template (present) Json.String p_appDId := ?, + template (present) AppInstNotification_Links p_links := ?, + template AppInstanceState p_appInstanceState := *, + template LocationInformation p_appInstLocation := * + ) := { + id := p_id, + notificationType := p_notificationType, + appInstanceState := p_appInstanceState, + subscriptionId := p_subscriptionId, + timeStamp := p_timeStamp, + appInstanceId := p_appInstanceId, + appPkgId := p_appPkgId, + appDId := p_appDId, + appInstLocation := p_appInstLocation, + links := p_links + } // End of template mw_app_inst_notification + } // End of group mex_lifcyclemgt } // End of module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index 97e86757b4648c13c57b6a206e66cf048fd5f4ef..ba064e332cacdd0330fffbcd34367ccd65e9a004 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -1,11 +1,18 @@ +/** + * @author ETSI / TTF T012 / TTF T027 + * @version $Url$ + * $Id$ + * @desc Types ANd Values for ETSI GS MEC 010-2 V3.2.1 (2023-06) + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + */ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - // LibMec import from LibMec_TypesAndValues all; @@ -15,1701 +22,1994 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { // LibMec_ApplicationMobilityServiceAPI import from ApplicationMobilityServiceAPI_TypesAndValues all; - group application_descriptor_information_model { - - /** - * @desc An application Descriptor (AppD) is a part of application package, and describes application requirements and rules required by application provider - * @member appDid Identifier of this MEC application descriptor. This attribute shall be globally unique - * @member appName Name to identify the MEC application - * @member appProvider Provider of the application and of the AppD - * @member appSoftVersion Identifies the version of software of the MEC application - * @member appDVersion Identifies the version of the application descriptor - * @member mecVersion Identifies version(s) of MEC system compatible with the MEC application described in this version of the AppD - * @member appInfoName Human readable name for the MEC application - * @member appDescription Human readable description of the MEC application - * @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisation container used to realize this MEC application - * @member swImageDescriptor Describes the descriptors of the software image to be used by the virtualisation container used to realize this MEC application - * @member appExtCpd Describes external interface(s) exposed by this MEC application - * @member appServiceRequired Describes services a MEC application requires to run - * @member appServiceOptional Describes services a MEC application may use if available - * @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications - * @member appFeatureRequired Describes features a MEC application requires to run - * @member appFeatureOptional Describes features a MEC application may use if available - * @member transportDependencies Transports, if any, that this application requires to be provided by the platform - * @member appTrafficRule Describes traffic rules the MEC application requires - * @member appDNSRule Describes DNS rules the MEC application requires - * @member appLatency Describes the maximum latency tolerated by the MEC application - * @member terminateAppInstanceOpConfig Configuration parameters for the Terminate application instance operation - * @member changeAppInstanceStateOpConfig Configuration parameters for the change application instance state operation - * @member userContextTransferCapability If the application supports the user context transfer capability - * @member appNetworkPolicy It represents the application network policy of carrying the application traffic - * @see ETSI GS MEC 010-2 Clause 6.2.1.2.2 - */ - type record AppD { - Json.String appDId, - Json.String appName, - Json.String appProvider, - Json.String appSoftVersion, - Json.String appDVersion, - Json.String mecVersion, - Json.String appInfoName optional, - Json.String appDescription, - VirtualComputeDescriptor virtualComputeDescriptor, - SwImageDescriptor virtualStorageDescriptor optional, - AppExternalCpd appExtCpd optional, - ServiceDependency appServiceRequired optional, - ServiceDependency appServiceOptional optional, - ServiceDescriptor appServiceProduced optional, - FeatureDependency appFeatureRequired optional, - FeatureDependency appFeatureOptional optional, - TransportDependency transportDependencies optional, - TrafficRuleDescriptor appTrafficRule optional, - DNSRuleDescriptor appDNSRule optional, - LatencyDescriptor appLatency optional, - TerminateAppInstanceOpConfig terminateAppInstanceOpConfig optional, - ChangeAppInstanceStateOpConfig changeAppInstanceStateOpConfig optional, - UserContextTransferCapability userContextTransferCapability optional, - AppNetworkPolicy appNetworkPolicy optional - } - - /** - * @desc The VirtualComputeDescriptor data type supports the specification of requirements related to virtual compute resources - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.3 Type: VirtualComputeDescriptor - */ - type record VirtualComputeDescriptor { - // FIXME shall follow the definition in clause 7.1.9.2.2 of ETSI GS NFV‑IFA 011 [0], with the following consideration: - } - - /** - * @desc The SwImageDescriptor data type describes the software image of a MEC application - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.4 Type: SwImageDescriptor - */ - type record SwImageDescriptor { - // FIXME shall follow the definition in clause 7.1.6.5 of ETSI GS NFV‑IFA 011 [0], with the following consideration: - } - - /** - * @desc The VirtualStorageDescriptor data type describes the virtual storage required by a MEC application - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.5 Type: VirtualStorageDescriptor - */ - type record VirtualStorageDescriptor { - // FIXME shall follow the definition in clause 7.1.9.4 of ETSI GS NFV‑IFA 011 [0], with the following consideration: - } - - /** - * @desc The AppExternalCpd data type supports the specification of MEC application requirements related to external connection point - * @member virtualNetworkInterfaceRequirements Specifies requirements on a virtual network interface realizing the CPs instantiated from this CPD - * @see ETSI GS MEC 010-2 Clause 6.2.1.6 Type: AppExternalCpd - */ - type record AppExternalCpd { - VirtualNetworkInterfaceRequirements virtualNetworkInterfaceRequirements optional - } - - type record VirtualNetworkInterfaceRequirement { - // FIXME For the definition of the VirtualNetworkInterfaceRequirements, please refer to clause 7.1.6.6 of ETSI GS NFV-IFA 011 [0]. For the definition of Cpd, please refer to clause 7.1.6.3 of ETSI GS NFV-IFA 011 [0] - } - - type record length(1..infinity) of VirtualNetworkInterfaceRequirement VirtualNetworkInterfaceRequirements; - - /** - * @desc The ServiceDescriptor data type describes a MEC service produced by a service-providing MEC applicationt - * @member serName The name of the service, for example, RNIS, LocationService, etc - * @member serCategory A Category reference of the service, defined in ETSI GS MEC 011 [17]i.0 - * @member version The version of the service - * @member transportsSupported Indicates transports and serialization formats supported made available to the service-consuming application - * @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor - */ - type record ServiceDescriptor { - Json.String serName, - CategoryRef serCategory optional, - Json.String version, - TransportsSupported transportsSupported optional - } - - /** - * @desc Indicates transports and serialization formats supported made available to the service-consuming application - * @member transport Information about the transport in this binding - * @member serializers Information about the serializers in this binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0 - * @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor - */ - type record TransportsSupported { - TransportDescriptor transport, - SerializerType serializers - } - - /** - * @desc The FeatureDependency data type supports the specification of requirements of a MEC application related to a feature of MEC platform - * @member featureName The name of the feature, for example, UserApps, UEIdentity, etc - * @member version The version of the feature - * @see ETSI GS MEC 010-2 Clause 6.2.1.8 Type: FeatureDependency - */ - type record FeatureDependency { - Json.String featureName, - Json.String version - } - - /** - * @desc The TrafficRuleDescriptor data type describes traffic rules related to a MEC application - * @member trafficRuleId Identifies the traffic rule - * @member filterType Definition of filter type: per FLOW or PACKET - * @member priority Priority of this traffic rule within the range 0 to 255. If traffic rule conflicts, the one with higher priority take precedence - * @member trafficFilter The filter used to identify specific flow/packets that need to be handled by the MEC host - * @member action_ Identifies the action of the MEC host data plane, when a packet matches the trafficFilter - * @member dstInterface Describes the destination interface information - * @see ETSI GS MEC 010-2 Clause 6.2.1.9 Type: TrafficRuleDescriptor - */ - type record TrafficRuleDescriptor { - Json.String trafficRuleId, - FilterType filterType, - integer priority, - TrafficFilter trafficFilter, - Action action_, - InterfaceDescriptor dstInterface optional - } with { - variant (action_) "name as 'action'"; - } - - type enumerated FilterType { - FLOW, - PACKET - } with { - variant "JSON: as number" - } - - type enumerated Action { - DROP, - FORWARD_DECAPSULATED, - FORWARD_AS_IS, - PASSTHROUGH, - DUPLICATED_DECAPSULATED, - DUPLICATE_AS_IS - } with { - variant "JSON: as number" - } - - /** - * @desc The TrafficFilter data type supports the specification of MEC application requirements related to traffic rules - * @member srcAddress An IP address or a range of IP addresses - * @member dstAddress A IP address or a range of IP addresses - * @member srcPort A port or a range of ports - * @member dstPort A port or a range of ports - * @member protocol Specify the protocol of the traffic filter - * @member tag Used for tag based traffic rule - * @member uri An URI label, in application layer - * @member packetLabel A customized packet label in network layer, as defined by the owner of the MEC platform, is used to filter the traffic - * @member srcTunnelAddressUsed for GTP tunnel based traffic rule - * @member tgtTunnelAddress Used for GTP tunnel based traffic rule - * @member srcTunnelPort Used for GTP tunnel based traffic rule - * @member qCI Used to match all packets that have the same QCI - * @member dSCP Used to match all IPv4 packets that have the same DSCP - * @member tC Used to match all IPv6 packets that have the same TC - * @see ETSI GS MEC 010-2 Clause 6.2.1.10 Type: TrafficFilter - */ - type record TrafficFilter { - Json.String srcAddress optional, - Json.String dstAddress optional, - Json.String srcPort optional, - Json.String dstPort optional, - Json.String protocol optional, - Json.String tag optional, - Json.String uri optional, - Json.String packetLabel optional, - Json.String srcTunnelAddress optional, - Json.String tgtTunnelAddress optional, - Json.String srcTunnelPort optional, - Json.String dstTunnelPort optional, - integer qCI optional, - integer dSCP optional, - integer tC optional - } - - /** - * @desc The InterfaceDescriptor data type describes an interface of a MEC application - * @member interfaceType Type of interface - * @member tunnelInfo Included only if the destination address type is tunnel - * @member srcMACAddress The source address identifies the MAC address of the interface - * @member dstMACAddress The destination address identifies the MAC address of the destination - * @see ETSI GS MEC 010-2 Clause 6.2.1.11 Type: InterfaceDescriptor - */ - type record InterfaceDescriptor { - InterfaceType interfaceType, - TunnelInfo tunnelInfo optional, - Json.String srcMACAddress optional, - Json.String dstMACAddress optional - } - - type enumerated InterfaceType { - TUNNEL, - MAC, - IP - } with { - variant "JSON: as number" - } - - /** - * @desc The TunnelInfo data type supports the specification of MEC application requirements related to traffic rules - * @member tunnelType Type of tunnel - * @member tunnelDstAddress Destination address of the tunnel - * @member tunnelSrcAddress Source address of the tunnel - * @member tunnelSpecificData Parameters specific to the tunnel - * @see ETSI GS MEC 010-2 Clause 6.2.1.12 Type: TunnelInfo - */ - type record TunnelInfo { - TunnelType tunnelType, - Json.String tunnelDstAddress, - Json.String tunnelSrcAddress, - Json.String tunnelSpecificData optional - } - - type enumerated TunnelType { - GTP_U, - GRE - } with { - variant "JSON: as number" - } - - /** - * @desc The DNSRuleDescriptor data type describes DNS rules associated with a MEC application - * @member dnsRuleId Identifies the DNS Rule - * @member domainName FQDN of the DNS rule - * @member ipAddressType Specifies the IP address type - * @member ttl Time-to-live value - * @see ETSI GS MEC 010-2 Clause 6.2.1.13 Type: DNSRuleDescriptor - */ - type record DNSRuleDescriptor { - Json.String dnsRuleId, - Json.String domainName, - Json.String ipAddressType, - IpAddress ipAddress, - integer ttl optional - } - - /** - * @desc The LatencyDescriptor data type describes latency requirements for a MEC application - * @member maxLatency The value of the maximum latency in nano seconds tolerated by the MEC application - * @see ETSI GS MEC 010-2 Clause 6.2.1.14 Type: LatencyDescriptor - */ - type record LatencyDescriptor { - UInt32 maxLatency - } - - /** - * @desc The TerminateAppInstanceOpConfig data type supports the specification of MEC application requirements related to terminate application instance operation configuration - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.15 Type: TerminateAppInstanceOpConfig - */ - type record TerminateAppInstanceOpConfig { - // FIXME shall follow the definition in clause 7.1.5.7 of ETSI GS NFV‑IFA 011 [0]. - } - - /** - * @desc The ChangeAppInstanceStateOpConfig data type supports the specification of MEC application requirements related to change application instance state operation configuration - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.1.16 Type: ChangeAppInstanceStateOpConfig - */ - type record ChangeAppInstanceStateOpConfig { - // FIXME shall follow the definition in clause 7.1.5.8 of ETSI GS NFV‑IFA 011 [0]. - } - - /** - * @desc The ServiceDependency data type supports the specification of requirements of a service-consuming MEC application related to a MEC service - * @member serName The name of the service - * @member serCategory A Category reference of the service - * @member version The version of the service - * @member serTransportDependencies Indicates transport and serialization format dependencies of consuming the service - * @member requestedPermissions - * @see ETSI GS MEC 010-2 Clause 6.2.1.17 Type: ServiceDependency - */ - type record ServiceDependency { - Json.String serName, - CategoryRef serCategory optional, - Json.String version, - TransportDependency serTransportDependencies optional, - Json.String requestedPermissions optional - } - - /** - * @desc The TransportDependency data type supports the specification of requirements of a MEC application related to supported transport bindings (each being a combination of a transport with one or more serializers) - * @member transport Information about the transport in this transport binding - * @member serializers Information about the serializers in this transport binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0 - * @member labels Set of labels that allow to define groups of transport bindings - * @see ETSI GS MEC 010-2 Clause 6.2.1.18 Type: TransportDependency - */ - type record TransportDependency { - TransportDescriptor transport, - SerializerType serializers, - Labels labels - } - - type record length(1..infinity) of Json.String Labels; - - /** - * @desc The TransportDescriptor data type describes a transport - * @member name The name of this transport - * @member description Human-readable description of this transport - * @member type_ Type of the transport, as defined in the TransportTypes type in ETSI GS MEC 011 [17]i.0 - * @member protocol The name of the protocol used. Shall be set to "HTTP" for a REST API - * @member version The version of the protocol used - * @member security Information about the security used by the transport in ETSI GS MEC 011 [17]i.0 - * @member implSpecificInfo Additional implementation specific details of the transport - * @see ETSI GS MEC 010-2 Clause 6.2.1.19 Type: TransportDescriptor - */ - type record TransportDescriptor { - Json.String name, - Json.String description optional, - TransportTypes type_, - Json.String protocol, - Json.String version, - SecurityInfo security, - Json.String implSpecificInfo optional - } - - /** - * @desc This data type represents the information of user context transfer capability of application - * @member statefulApplication If the application is stateful, this attribute shall be set to true - * @member userContextTransferSupport This attribute shall be present if the application is stateful and shall be absent otherwise - * @see ETSI GS MEC 010-2 Clause 6.2.1.20 Type: UserContextTransferCapability - */ - type record UserContextTransferCapability { - Json.Bool statefulApplication, - Json.Bool userContextTransferSupport optional - } - - /** - * @desc This data type represents the network policy in the application instantiation and operation - * @member steeredNetwork This attribute provides an option for the application to specify a type of network to carry the application traffic - * @member steeredNetwork Provides an option for the application to specify a type of network to carry the application traffic - * @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy - */ - type record AppNetworkPolicy { - SteeredNetwork steeredNetwork - } - - /** - * @desc Provides an option for the application to specify a type of network to carry the application traffic - * @member cellularNetwork The application prefers to a cellular network to carry its traffic - * @member wi_fiNetwork The application prefers to a Wi-Fi network to carry its traffic - * @member fixedAccessNetwork The application prefers to a fixed access network to carry its traffic - * @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy - */ - type record SteeredNetwork { - Json.Bool cellularNetwork optional, - Json.Bool wi_fiNetwork optional, - Json.Bool fixedAccessNetwork optional - } with { - variant (wi_fiNetwork) "name as 'wi-fiNetwork'"; - } - - } // End of group application_descriptor_information_model - - group application_lifecycle_management_information_model { - - /** - * @desc The LocationConstraints data type supports the specification of MEC application requirements related to MEC application deployment location constraints - * @member countryCode The two-letter ISO 3166 [0] country code in capital letters - * @member civicAddressElement Zero or more elements comprising the civic address - * @member area Geographic area - * @see ETSI GS MEC 010-2 Clause 6.2.2.2 Type: LocationConstraints - */ - type record LocationConstraints { - Json.String countryCode optional, - CivicAddressElement civicAddressElement optional, - Polygon area optional - } - - type record CivicAddressElement { - integer caType, - Json.String caValue - } - - type record Geometry { - Json.String type_, - Coordinates coordinates - } with { - variant (type_) "name as 'type'"; - } - type record of Json.Number Coordinate; - type record of Coordinate Coordinates; - type record Property { - Json.String key, - Json.String value_ - } with { - variant (value_) "name as 'value'"; - } - type record of Property Properties; - type record Polygon { - Json.String type_, - Geometry geometry, - Properties properties, - Json.String this_ - } with { - variant (type_) "name as 'type'"; - variant (this_) "name as 'this'"; - } - - /** - * @desc The data type of CreateAppInstanceRequest represents the parameters for creating a new application instance resource - * @member appDId The application descriptor identifier - * @member appInstanceName Human-readable name of the application instance to be created - * @member appInstanceDescription Human-readable description of the application instance to be created - * @member appPlacementInfo Describes the information of selected MEC platform for the application instance to associate - * @see ETSI GS MEC 010-2 Clause 6.2.2.3 Type: CreateAppInstanceRequest - */ - type record CreateAppInstanceRequest { - Json.String appDId, - Json.String appInstanceName optional, - Json.String appInstanceDescription optional, - MepInformation appPlacementInfo optional - } - - /** - * @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources - * @member id Identifier of the application instance represented by this data type - * @member appInstanceName Name of the application instance - * @member appInstanceDescription Human-readable description of the application instance to be created - * @member appDId The application descriptor identifier is managed by the application provider to identify the application descriptor in a globally unique way - * @member appProvider The onboarded application package provider name - * @member appName The onboarded application name - * @member appSoftVersion The application software version - * @member appDVersion Version of the application descriptor - * @member appPkgId Identifier of the onboarded application package - * @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance - * @member nsInstanceId Identifier of the NS instance created by NFVO in which the MEC application has been instantiated as a VNF instance - * @member vnfInstanceId Identifier of the VNF instance created by VNFM that the MEC application has been instantiated as - * @member instantiationState Instantiation state of the application instance - * @member instantiatedAppState Information specific to an instantiated application. This attribute shall be present if the instantiationState attribute value is INSTANTIATED - * @member instantiatedAppState Operational state is applicable in the instantiation state INSTANTIATED - * @member _links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.4 Type: AppInstanceInfo - */ - type record AppInstanceInfo { - Json.String id, - Json.String appInstanceName optional, - Json.String appInstanceDescription optional, - Json.String appDId, - Json.String appProvider, - Json.String appName, - Json.String appSoftVersion, - Json.String appDVersion, - Json.String appPkgId, - VimConnectionInfo vimConnectionInfo optional, - Json.String nsInstanceId optional, - Json.String vnfInstanceId optional, - InstantiationState instantiationState, - InstantiatedAppState instantiatedAppState optional, - CommunicationInterface communicationInterface optional, - Link links - } with { - variant (links) "name as '_links'"; - } - type record of AppInstanceInfo AppInstanceInfoList; - - type record Link { - LinkType self_, - LinkType instantiate optional, - LinkType terminate optional, - LinkType operate optional, - LinkType configure_platform_for_app optional - } with { - variant (self_) "name as 'self'"; - } - - type record InstantiatedAppState { - OperationalState operationalState optional, - LocationInformation appInstLocation optional - } - - type enumerated InstantiationState { - INSTANTIATED, - NOT_INSTANTIATED - } - - type enumerated OperationalState { - STARTED, - STOPPED - } - - /** - * @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources - * @member appInstSelectorType - * @member appInstances - * @member appsFromProviders Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers - * @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter - */ - type record AppInstanceSubscriptionFilter { - AppInstSelectorType appInstSelectorType, - AppInstances appInstances optional, - appsFromProviders appsFromProviders optional - } - - type enumerated AppInstSelectorType { - VOID (0), - APP_IDENTITY (1), - APP_NAME (2), - APP_D_ID (3), - APP_FROM_PROVIDER (4) - } with { - variant "JSON: as number" - } - - type record length(1..infinity) of Json.String AppInstances; - - /** - * @desc Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers - * @member appProvider Name of the application provider to match - * @member appProducts Match application instances that belong to application products with certain product names, from one particular provider - * @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter - */ - type record AppsFromProvider { - Json.String appProvider, - AppProducts appProducts optional - } - - type record length(1..infinity) of AppsFromProvider appsFromProviders; - - type record AppProduct { - Json.String appName, - Versions versions optional - } - - type record length(1..infinity) of AppProduct AppProducts; - - type record Version { - Json.String appSoftVersion, - Json.String appDVersion optional - } - - type record length(1..infinity) of Version Versions; - - /** - * @desc This data type represents a subscription filter criteria to match an application LCM operation occurrence - * @member appInstanceSubscriptionFilter this attribute contains filter criteria that selects one or more application instances on which to receive "LCM operation occurrence" notifications - * @member notificationTypes Match particular notification types - * @member operationTypes Type of the LCM operation represented by this application instance LCM operation occurrence - * @member operationStates Type of the LCM operation state represented by this application instance LCM operation occurrence - * @see ETSI GS MEC 010-2 Clause 6.2.2.6 Type: AppLcmOpOccSubscriptionFilter - */ - type record AppLcmOpOccSubscriptionFilter { - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, - Json.String notificationTypes optional, - OperationTypes operationTypes optional, - OperationStates operationStates optional - } - - type enumerated OperationType { - INSTANTIATE, - OPERATE, - TERMINATE, - INVALID_OPERATE // For BI purpose only - } - - type record length(1..infinity) of OperationType OperationTypes; - - type enumerated OperationState { - STARTING, - PROCESSING, - COMPLETED, - FAILED, - FAILED_TEMP - } - - type record length(1..infinity) of OperationState OperationStates; - - /** - * @desc This data type represents request parameters of the "Instantiate Application" operation - * @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisatio n container used to realize the application instance to be created - * @member virtualStorageDescriptor Defines descriptors of virtual storage resources to be used by the application instance to be created - * @member selectedMECHostInfo Describes the information of selected host for the application instance - * @member locationConstraints Defines the location constraints for the application instance to be created - * @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance, or refer to external/externally-managed virtual links - * @member appTermCandsForCoord Provides sets of applications as termination candidate alternatives that the MEO/MEAO shall select from when utilizing the coordinate LCM operation exchange - * @see ETSI GS MEC 010-2 Clause 6.2.2.7 Type: InstantiateAppRequest - */ - type record InstantiateAppRequest { - VirtualComputeDescriptor virtualComputeDescriptor optional, - VirtualStorageDescriptor virtualStorageDescriptor optional, - MECHostInformation selectedMECHostInfo, - LocationConstraints locationConstraints optional, - VimConnectionInfo vimConnectionInfo optional, - AppTermCandsForCoord appTermCandsForCoord optional - } - - /** - * @desc This data type represents request parameters of the "Operate Application" operation - * @member changeStateTo The desired operational state - * @member stopType The stop type - * @member gracefulStopTimeout The time interval (in seconds) to wait for the application instance to be taken out of service during graceful stop, before stopping the application - * @see ETSI GS MEC 010-2 Clause 6.2.2.8 Type: OperateAppRequest - */ - type record OperateAppRequest { - OperationalState changeStateTo, - StopType stopType optional, - UInt32 gracefulStopTimeout optional - } - - type enumerated StopType { - FORCEFUL, - GRACEFUL - } - - /** - * @desc This data type represents request parameters of the "Terminate Application Request" operation - * @member terminationType Indicates whether forceful or graceful termination is requested - * @member gracefulTerminationTimeout This attribute is only applicable in case of graceful termination - * @see ETSI GS MEC 010-2 Clause 6.2.2.9 Type: TerminateAppRequest - */ - type record TerminateAppRequest { - TerminationType terminationType, - UInt32 gracefulTerminationTimeout optional - } - - type StopType TerminationType; - - /** - * @desc The data type represents a subscription to notification of application instance operational state change - * @member id Identifier of the subscription to application instance operational state change notification - * @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription" - * @member appInstanceState Application instance state subscribed to - * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.10 Type: AppInstSubscriptionInfo - */ - type record AppInstSubscriptionInfo { - Json.String id, - Json.String subscriptionType, - AppInstanceState appInstanceState optional, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, - Json.AnyURI callbackUri, - AppInstSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type enumerated AppInstanceState { - NOT_INSTANTIATED, - STARTED, - STOPPED - } - - type record AppInstSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents an application instance notification for informing the subscribers about operational state of application instance resources - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member appInstanceState Application instance state - * @member subscriptionId Identifier of the subscription related to this notification - * @member timeStamp Date and time of the notification generation - * @member appInstanceId Identifier of application instance - * @member appPkgId Identifier of the onboarded application package - * @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way - * @member appInstLocation Location of the MEC application instance - * @member links A link to the related subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification - */ - type record AppInstNotification { - Json.String id, - NotificationType notificationType, - AppInstanceState appInstanceState optional, - Json.String subscriptionId, - TimeStamp timeStamp, - Json.String appInstanceId, - Json.String appPkgId, - Json.String appDId, - LocationInformation appInstLocation optional, - AppInstNotification_Links links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstNotification_Links { - LinkType subscription - } - - /** - * @desc The data type represents the input parameters of "subscription operation" to notification of application lifecycle management for the operational state change of application instance - * @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceState Only send notifications for application instances that are in one of the states listed in this attribute - * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.12 Type: AppInstSubscriptionRequest - */ - type record AppInstSubscriptionRequest { - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppInstanceState appInstanceState optional, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional - } - - /** - * @desc This data type represents an application lifecycle management operation occurrence - * @member id Identifier of the subscription to application LCM operation occurrence notification - * @member operationState Operation state - * @member stateEnteredTime Date and time when the current state was entered - * @member startTime Date and time of the start of the operation - * @member lcmOperationType of the actual LCM operation represented by this application instance LCM operation occurrence - * @member operationParams Input parameters of the LCM operation - * @member isCancelPending If the application LCM operation occurrence operationState is in "PROCESSING" state and the operation is being cancelled, this attribute shall be set to true - * @member cancelMode The mode of an cancellation - * @member links Link to the application instance that the operation applies to - * @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc - */ - type record AppLcmOpOcc { - Json.String id, - OperationState operationState, - TimeStamp stateEnteredTime, - TimeStamp startTime, - LcmOperation lcmOperation, - OperationParams operationParams optional, - Json.Bool isCancelPending optional, - CancelMode cancelMode optional, - AppLcmOpOcc_Link links - } with { - variant (links) "name as '_links'"; - } - - type OperationType LcmOperation; - - type union OperationParams { - InstantiateAppRequest instantiateAppRequest, - OperateAppRequest operateAppRequest, - TerminateAppRequest terminateAppRequest - } - - type record AppLcmOpOcc_Link { - LinkType self_, - LinkType appInstance - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents a subscription request to notification of application life cycle management operation occurrence - * @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appLcmOpOccSubscriptionFilter Subscription filter criteria to match specific application LCM operation occurrences - * @see ETSI GS MEC 010-2 Clause 6.2.2.14 Type: AppLcmOpOccSubscriptionRequest - */ - type record AppLcmOpOccSubscriptionRequest { - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional - } - - /** - * @desc This data type represents a subscription to notifications of application life cycle management operation occurrence - * @member id Identifier of this subscription resource - * @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription" - * @member appLcmOpOccSubscriptionFilter Criteria used to select application LCM operation occurrences on which to send notifications related to this subscription - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.15 Type: AppLcmOpOccSubscriptionInfo - */ - type record AppLcmOpOccSubscriptionInfo { - Json.String id, - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional, - AppLcmOpOccSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppLcmOpOccSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents a notification related to state changes of an application LCM operation occurrence which informs the subscribers - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member operationType Discriminator for the different notification types - * @member operationState Operation state - * @member subscriptionId Identifier of the subscription to this notification - * @member timeStamp Date and time of the notification generation - * @member appLcmOpOccId Identifier of application lifecycle management operation occurrence - * @member appInstanceId Identifier of application instance - * @member links Links to resources related to this notification - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.16 Type: AppLcmOpOccNotification - */ - type record AppLcmOpOccNotification { - Json.String id, - NotificationType notificationType, - OperationType operationType, - OperationState operationState, - Json.String subscriptionId, - TimeStamp timeStamp, - Json.String appInstanceId, - AppLcmOpOccNotification_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppLcmOpOccNotification_Link { - LinkType appInstance, - LinkType subscription, - LinkType appLcmOpOcc - } - - /** - * @desc The data type represents the parameters of MEC host information - * @member hostName Human-readable name of MEC host - * @member hostId KeyValuePairs - * @see ETSI GS MEC 010-2 Clause 6.2.2.17 Type: MECHostInformation - */ - type record MECHostInformation { - Json.String hostName optional, - KeyValuePairs hostId - } - - /** - * @desc The VimConnectionInfo data type specifies the connection information of VIM for managing the resources of the application instance - * @member id The identifier of the VIM Connection - * @member vimId The identifier of the VIM instance - * @member vimType Discriminator for the different types of the VIM information - * @member interfaceInfo Information about the interface or interfaces to the VIM, if applicable, such as the URI of an interface endpoint to communicate with the VIM - * @member accessInfo Authentication credentials for accessing the VIM, and other access-related information such as tenants or infrastructure resource groups - * @member extra VIM type specific additional information - * @see ETSI GS MEC 010-2 Clause 6.2.2.18 Type: VimConnectionInfo - */ - type record VimConnectionInfo { - Json.String id, - Json.String vimId optional, - Json.String vimType, - KeyValuePairs interfaceInfo optional, - KeyValuePairs accessInfo optional, - KeyValuePairs extra optional - } - - /** - * @desc The data type represents a subscription link list of notification on application lifecycle management - * @member links List of hyperlinks related to the resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList - */ - type record SubscriptionLinkList { - SubscriptionLinkList_Link links - } with { - variant (links) "name as '_links'"; - } - - type record SubscriptionLinkList_Link { - LinkType self_, - SubscriptionLinkList_Link_Subscriptions subscriptions optional - } with { - variant (self_) "name as 'self'"; - } - - type record SubscriptionLinkList_Link_Subscription { - Json.AnyURI href, - AppInstanceSubscriptionType subscriptionType - } - - type record length(1..infinity) of SubscriptionLinkList_Link_Subscription SubscriptionLinkList_Link_Subscriptions; - - /** - * @desc String representing the type of a subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.20.2 Simple data types - */ - type Json.String AppInstanceSubscriptionType; - - /** - * @desc This data type represents the parameters for configuring the MEP to run an application instance - * @member appServiceRequired Describes services a MEC application requires to run - * @member appServiceOptional Describes services a MEC application may use if available - * @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications - * @member appFeatureRequired Describes features a MEC application requires to run - * @member transportDependencies Transports, if any, that this application requires to be provided by the platform - * @member appTrafficRule Describes traffic rules the MEC application requires - * @member appDNSRule Describes DNS rules the MEC application requires - * @member appLatency Describes the maximum latency tolerated by the MEC application - * @member userContextTransferCapability If the application supports the user context transfer capability, this attribute shall be included - * @member appNetworkPolicy If present, it represents the application network policy of carrying the application traffic - * @see ETSI GS MEC 010-2 Clause 6.2.2.21 Type: ConfigPlatformForAppRequest - */ - type record ConfigPlatformForAppRequest { - ServiceDependency appServiceRequired optional, - ServiceDependency appServiceOptional optional, - ServiceDependency appServiceProduced optional, - FeatureDependency appFeatureRequired optional, - FeatureDependency appFeatureOptional optional, - TransportDependency transportDependencies optional, - TrafficRuleDescriptor appTrafficRule optional, - DNSRuleDescriptor appDNSRule optional, - LatencyDescriptor appLatency optional, - UserContextTransferCapability userContextTransferCapability optional, - AppNetworkPolicy appNetworkPolicy optional - } - - /** - * @desc The data type represents the parameters of MEC platform information - * @member mepName Human-readable name of MEC platform - * @member mepId Deployment-specific identifier of MEC platform - * @see ETSI GS MEC 010-2 Clause 6.2.2.22 Type: MepInformation - */ - type record MepInformation { - Json.String mepName optional, - Json.String mepId optional - } - - /** - * @desc The AppTermCandsForCoord data type represents the parameters to provide candidates of applications to terminate in pre-emption situations for LCM coordination exchanges - * @member terminationOptions Sets of application options for the MEO/MEAO to select from as candidates for termination - * @see ETSI GS MEC 010-2 Clause 6.2.2.23 Type: AppTermCandsForCoord - */ - type record AppTermCandsForCoord { - TerminationOptions terminationOptions - } - - type record TerminationOption { - AppInstIdTerminationCands appInstIdTerminationCands - } - - type record length(1..infinity) of Json.String AppInstIdTerminationCands; - - type record length(1..infinity) of TerminationOption TerminationOptions; - - /** - * @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier creation - * @member subscriptionType Shall be set to "AppIdentifierCreationSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.25 Type: AppInstIdCreationSubscriptionRequest - */ - type record AppInstIdCreationSubscriptionRequest { - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional - } - - /** - * @desc The data type represents a subscription to notification of application instance identifier creation - * @member id Identifier of the subscription to application instance operational state change notification - * @member subscriptionType Shall be set to "AppIdentifierCreationSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.26 Type: AppInstIdCreationSubscriptionInfo - */ - type record AppInstIdCreationSubscriptionInfo { - Json.String id, - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, - AppInstIdCreationSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstIdCreationSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents a notification for informing the subscribers about the creation of a new "individual application instance" resource and the associated application instance identifier - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member subscriptionId Identifier of the subscription related to this notification - * @member timeStamp Date and time of the notification generation - * @member appInstanceId The created application instance Identifier - * @member links Links to resources related to this notification - * @see ETSI GS MEC 010-2 Clause 6.2.2.27 Type: AppInstanceIdentifierCreationNotification - */ - type record AppInstanceIdentifierCreationNotification { - Json.String id, - NotificationType notificationType, - TimeStamp timeStamp, - Json.String appInstanceId, - AppInstanceIdentifierCreationNotification_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstanceIdentifierCreationNotification_Link { - LinkType subscription, - LinkType appInstance - } - - /** - * @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier deletion - * @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription - * @see ETSI GS MEC 010-2 Clause 6.2.2.28 Type: AppInstIdDeletionSubscriptionRequest - */ - type record AppInstIdDeletionSubscriptionRequest { - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional - } - - /** - * @desc The data type represents a subscription to notification of application instance identifier deletion - * @member id Identifier of the subscription to application instance operational state change notification - * @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription" - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.2.29 Type: AppInstIdDeletionSubscriptionInfo - */ - type record AppInstIdDeletionSubscriptionInfo { - Json.String id, - Json.String subscriptionType, - Json.AnyURI callbackUri, - AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, - AppInstIdDeletionSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstIdDeletionSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc This data type represents a notification for informing the subscribers about the deletion of an "individual application instance" resource and the associated application instance identifier - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member subscriptionId Identifier of the subscription related to this notification - * @member timeStamp Date and time of the notification generation - * @member appInstanceId The deleted application instance Identifier - * @member links Links to resources related to this notification - * @see ETSI GS MEC 010-2 Clause 6.2.2.30 Type: AppInstanceIdentifierDeletionNotification - */ - type record AppInstanceIdentifierDeletionNotification { - Json.String id, - NotificationType notificationType, - Json.String subscriptionId, - TimeStamp timeStamp, - Json.String appInstanceId, - AppInstanceIdentifierDeletionNotification_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppInstanceIdentifierDeletionNotification_Link { - LinkType subscription, - LinkType appInstance - } - - /** - * @desc The LocationInformation data type represents the location information of the site hosting the MEC application instance - * @member countryCode The two-letter ISO 3166 [3] country code in capital letters where an instance is deployed - * @member civicAddress Provides the civic address of the site hosting the MEC application instance - * @member Geographical position (i.e. latitude and longitude) where an instance is deployed - * @see ETSI GS MEC 010-2 Clause 6.2.2.31 Type: LocationInformation - */ - type record LocationInformation { - Json.String countryCode, - CivicAddressElement civicAddress optional, - Json.String geographicalPosition optional - } - - /** - * @desc This data type represents the valid modes of cancelling an application LCM operation - * @see ETSI GS MEC 010-2 Clause 6.2.2.32 Type: CancelMode - */ - type StopType CancelMode; - - } // End of group application_lifecycle_management_information_model - - group application_package_information_model { - - /** - * @desc The data type CreateAppPkg represents the parameters for creating a new application package resource - * @member appPkgName Name of the application package to be onboarded - * @member appPkgVersion Version of the application package to be onboarded - * @member appProvider The provider's name of the application package to be onboarded - * @member checksum Checksum of the onboarded application package - * @member userDefinedData User defined data for the application package - * @member appPkgPath Address information of the application package - * @see ETSI GS MEC 010-2 Clause 6.2.3.2 Type: CreateAppPkg - */ - type record CreateAppPkg { - Json.String appPkgName, - Json.String appPkgVersion, - Json.String appProvider optional, - Checksum checksum, - KeyValuePairs userDefinedData optional, - Json.AnyURI appPkgPath - } - - /** - * @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 usageState Usage state of the onboarded instance of the application package - * @member mecInfo The MEC version that compatible with this application - * @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 - * @see ETSI GS MEC 010-2 Clause 6.2.3.3 Type: AppPkgInfo - */ - type record AppPkgInfo { - Json.String id, - Json.String appDId, - Json.String appProvider optional, - Json.String appName, - Json.String appSoftwareVersion, - Json.String appDVersion, - Checksum checksum, - Json.String signingCertificate optional, - AppPkgSWImageInfo softwareImages, - AppPkgArtifactInfo additionalArtifacts optional, - OnboardingState onboardingState, - AppPkgInfo_OperationalState operationalState, - UsageState usageState, - AppPkgInfo_MecInfo mecInfo, - KeyValuePairs userDefinedData optional, - ProblemDetails onboardingFailureDetails optional, - AppPkgInfo_Links links - } with { - variant (links) "name as '_links'"; - } - type record of AppPkgInfo AppPkgInfoList; - - type record AppPkgSWImageInfo_ { - // FIXME The data type of application software image information data model is related to virtualisation method and needs for further study - } - type record length(1..infinity) of AppPkgSWImageInfo_ AppPkgSWImageInfo; - type record AppPkgArtifactInfo { - // FIXME The data type of additional information of application package artifacts is not specified in the present document - } - - type enumerated OnboardingState { - CREATED, - UPLOADING, - PROCESSING, - ONBOARDED - } - - type enumerated AppPkgInfo_OperationalState { - ENABLED, - DISABLED, - UNKNOWN // Used for BI purpose only - } - - type enumerated UsageState { - IN_USE, - NOT_IN_USE - } - - type record length(1..infinity) of Json.String AppPkgInfo_MecInfo; - - type record AppPkgInfo_Links { - LinkType self_, - LinkType appD, - LinkType appPkgContent, - LinkType vnfPkgInfo optional - } with { - variant (self_) "name as 'self'"; - } - - /** - * @desc The data type represents a subscription to notification of application package management for the onboarding, or operational state change of application package - * @member id Identifier of the subscription to application package notification - * @member subscriptionType Type of subscription - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.3.4 Type: AppPkgSubscriptionInfo - */ - type record AppPkgSubscriptionInfo { - Json.String id, - AppPkgSubscriptionType subscriptionType, - Json.AnyURI callbackUri, - AppPkgSubscriptionInfo_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppPkgSubscriptionInfo_Link { - LinkType self_ - } with { - variant (self_) "name as 'self'" - } - - /** - * @desc The data type represents a subscription link list of notification on application package management - * @member links Links to resources related to this resource - * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList - */ - type record AppPkgSubscriptionLinkList { - AppPkgSubscriptionLinkList_Link links + /** + * @desc An application Descriptor (AppD) is a part of application package, and describes application requirements and rules required by application provider + * @member appDid Identifier of this MEC application descriptor. This attribute shall be globally unique + * @member appName Name to identify the MEC application + * @member appProvider Provider of the application and of the AppD + * @member appSoftVersion Identifies the version of software of the MEC application + * @member appDVersion Identifies the version of the application descriptor + * @member mecVersion Identifies version(s) of MEC system compatible with the MEC application described in this version of the AppD + * @member appInfoName Human readable name for the MEC application + * @member appDescription Human readable description of the MEC application + * @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisation container used to realize this MEC application + * @member osContainerDescriptor Describes CPU, memory requirements and limits, and software images of the OS Containers realizing this MEC application corresponding to OS Containers sharing the same host and same network namespace + * @member swImageDescriptor Describes the descriptors of the software image to be used by the virtualisation container used to realize this MEC application + * @member virtualStorageDescriptor Defines descriptors of virtual storage resources to be used by the MEC application + * @member appExtCpd Describes external interface(s) exposed by this MEC application + * @member appServiceRequired Describes services a MEC application requires to run + * @member appServiceOptional Describes services a MEC application may use if available + * @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications + * @member appFeatureRequired Describes features a MEC application requires to run + * @member appFeatureOptional Describes features a MEC application may use if available + * @member transportDependencies Transports, if any, that this application requires to be provided by the platform + * @member appTrafficRule Describes traffic rules the MEC application requires + * @member appDNSRule Describes DNS rules the MEC application requires + * @member appLatency Describes the maximum latency tolerated by the MEC application + * @member terminateAppInstanceOpConfig Configuration parameters for the Terminate application instance operation + * @member changeAppInstanceStateOpConfig Configuration parameters for the change application instance state operation + * @member userContextTransferCapability If the application supports the user context transfer capability + * @member appNetworkPolicy It represents the application network policy of carrying the application traffic + * @member mciopId Identifies the MCIOP in the application package, used in containerized workload management, when the application is realized by a set of OS containers + * @member mcioIdentificationData Name and type of the Managed Container Infrastructure Object (MCIO) that realizes this application. It allows the VNFM to identify the MCIO e.g. when querying the Container Infrastructure Service Management (CISM). + * @member logicalNode The logical node requirements + * @member requestAdditionalCapabilities Specifies requirements for additional capabilities. These can be for a range of purposes + * @member mcioConstraintParams The parameter names for constraints expected to be assigned to MCIOs realizing this application + * @see ETSI GS MEC 010-2 Clause 6.2.1.2.2 + */ + type record AppD { + Json.String appDId, + Json.String appName, + Json.String appProvider, + Json.String appSoftVersion, + Json.String appDVersion, + Json.String mecVersion, + Json.String appInfoName optional, + Json.String appDescription, + VirtualComputeDescriptor virtualComputeDescriptor optional, + OsContainerDescriptors osContainerDescriptor optional, + SwImageDescriptors swImageDescriptor, + VirtualStorageDescriptors virtualStorageDescriptor optional, + AppExternalCpds appExtCpd optional, + ServiceDependencies appServiceRequired optional, + ServiceDependencies appServiceOptional optional, + ServiceDescriptors appServiceProduced optional, + FeatureDependencies appFeatureRequired optional, + FeatureDependencies appFeatureOptional optional, + TransportDependencies transportDependencies optional, + TrafficRuleDescriptors appTrafficRule optional, + DNSRuleDescriptors appDNSRule optional, + LatencyDescriptor appLatency optional, + TerminateAppInstanceOpConfig terminateAppInstanceOpConfig optional, + ChangeAppInstanceStateOpConfig changeAppInstanceStateOpConfig optional, + UserContextTransferCapability userContextTransferCapability optional, + AppNetworkPolicy appNetworkPolicy optional, + Json.String mciopId optional, + McioIdentificationData mcioIdentificationData optional, + LogicalNodeRequirements logicalNode optional, + RequestedAdditionalCapabilityData requestAdditionalCapabilities optional, + McioConstraintParams mcioConstraintParams optional + } // End of type AppD + + /** + * @desc Parameter names for constraints expected to be assigned to MCIOs realizing this application + * @see ETSI GS MEC 010-2 Clause 6.2.1.2.2 + */ + type enumerated McioConstraintParams { + localAffinityCisNode (0), + nodeAdditionalCapabilitySsd (1), + nodeAdditionalCapabilityDpdk (2), + nodeAdditionalCapabilitySriov (3), + nodeAdditionalCapabilityGpu (4), + nodeAdditionalCapabilityFpga (5), + nodeAdditionalCapabilityCpuPin (6), + nodeCapabilityLogicalNuma (7), + nodePool + } with { + variant "JSON: as number" + } + + /** + * @desc The VirtualComputeDescriptor data type supports the specification of requirements related to virtual compute resources + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.3 Type: VirtualComputeDescriptor + */ + type record VirtualComputeDescriptor { + // FIXME shall follow the definition in clause 7.1.9.2.2 of ETSI GS NFV‑IFA 011 [0], with the following consideration: + } + + /** + * @desc The SwImageDescriptor data type describes the software image of a MEC application + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.4 Type: SwImageDescriptor + */ + type record SwImageDescriptor { + // FIXME shall follow the definition in clause 7.1.6.5 of ETSI GS NFV‑IFA 001 [1], with the following consideration: + } + type record of SwImageDescriptor SwImageDescriptors; + + /** + * @desc The VirtualStorageDescriptor data type describes the virtual storage required by a MEC application + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.5 Type: VirtualStorageDescriptor + */ + type record VirtualStorageDescriptor { + // FIXME shall follow the definition in clause 7.1.9.4 of ETSI GS NFV‑IFA 011 [0], with the following consideration: + } + type record of VirtualStorageDescriptor VirtualStorageDescriptors; + + /** + * @desc The AppExternalCpd data type supports the specification of MEC application requirements related to external connection point + * @member virtualNetworkInterfaceRequirements Specifies requirements on a virtual network interface realizing the CPs instantiated from this CPD + * member additionalServiceData Additional service identification data of the external CP + * @see ETSI GS MEC 010-2 Clause 6.2.1.6 Type: AppExternalCpd + */ + type record AppExternalCpd { + VirtualNetworkInterfaceRequirements virtualNetworkInterfaceRequirements optional, + AdditionalServiceData additionalServiceData optional + // FIXME inherited attributes + } + type record of AppExternalCpd AppExternalCpds; + + type record VirtualNetworkInterfaceRequirement { + // FIXME For the definition of the VirtualNetworkInterfaceRequirements, please refer to clause 7.1.6.6 of ETSI GS NFV-IFA 001 [1]. For the definition of Cpd, please refer to clause 7.1.6.3 of ETSI GS NFV-IFA 001 [1] + } + + type record AdditionalServiceData { + // FIXME For the definition of the VirtualNetworkInterfaceRequirements, please refer to clause 7.1.18.3 of ETSI GS NFV IFA 011 [1]. + } + + type record length(1..infinity) of VirtualNetworkInterfaceRequirement VirtualNetworkInterfaceRequirements; + + /** + * @desc The ServiceDescriptor data type describes a MEC service produced by a service-providing MEC applicationt + * @member serName The name of the service, for example, RNIS, LocationService, etc + * @member serCategory A Category reference of the service, defined in ETSI GS MEC 011 [17]i.0 + * @member version The version of the service + * @member transportsSupported Indicates transports and serialization formats supported made available to the service-consuming application + * @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor + */ + type record ServiceDescriptor { + Json.String serName, + CategoryRef serCategory optional, + Json.String version, + TransportsSupported transportsSupported optional + } + type record of ServiceDescriptor ServiceDescriptors; + + /** + * @desc Indicates transports and serialization formats supported made available to the service-consuming application + * @member transport Information about the transport in this binding + * @member serializers Information about the serializers in this binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0 + * @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor + */ + type record TransportsSupported { + TransportDescriptor transport, + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType serializers + } + + /** + * @desc The FeatureDependency data type supports the specification of requirements of a MEC application related to a feature of MEC platform + * @member featureName The name of the feature, for example, UserApps, UEIdentity, etc + * @member version The version of the feature + * @see ETSI GS MEC 010-2 Clause 6.2.1.8 Type: FeatureDependency + */ + type record FeatureDependency { + Json.String featureName, + Json.String version + } + type record of FeatureDependency FeatureDependencies; + + /** + * @desc The TrafficRuleDescriptor data type describes traffic rules related to a MEC application + * @member trafficRuleId Identifies the traffic rule + * @member filterType Definition of filter type: per FLOW or PACKET + * @member priority Priority of this traffic rule within the range 0 to 255. If traffic rule conflicts, the one with higher priority take precedence + * @member trafficFilter The filter used to identify specific flow/packets that need to be handled by the MEC host + * @member action_ Identifies the action of the MEC host data plane, when a packet matches the trafficFilter + * @member dstInterface Describes the destination interface information + * @see ETSI GS MEC 010-2 Clause 6.2.1.9 Type: TrafficRuleDescriptor + */ + type record TrafficRuleDescriptor { + Json.String trafficRuleId, + FilterType filterType, + Json.Integer priority, + TrafficFilter trafficFilter, + Action action_, + InterfaceDescriptor dstInterface optional + } with { + variant (action_) "name as 'action'"; + } + type record of TrafficRuleDescriptor TrafficRuleDescriptors; + + /** + * @desc Definition of filter type: per FLOW or PACKET + */ + type enumerated FilterType { + FLOW, + PACKET + } with { + variant "JSON: as number" + } + + /** + * @desc Identifies the action of the MEC host data plane, when a packet matches the trafficFilter + */ + type enumerated Action { + DROP (0), + FORWARD_DECAPSULATED (1), + FORWARD_ENCAPSULATED (2), + PASSTHROUGH (3), + DUPLICATED_DECAPSULATED (4), + DUPLICATE_ENCAPSULATED (5) + } with { + variant "JSON: as number" + } + + /** + * @desc The TrafficFilter data type supports the specification of MEC application requirements related to traffic rules + * @member srcAddress An IP address or a range of IP addresses + * @member dstAddress A IP address or a range of IP addresses + * @member srcPort A port or a range of ports + * @member dstPort A port or a range of ports + * @member protocol Specify the protocol of the traffic filter + * @member tag Used for tag based traffic rule + * @member uri An URI label, in application layer + * @member packetLabel A customized packet label in network layer, as defined by the owner of the MEC platform, is used to filter the traffic + * @member srcTunnelAddressUsed for GTP tunnel based traffic rule + * @member tgtTunnelAddress Used for GTP tunnel based traffic rule + * @member srcTunnelPort Used for GTP tunnel based traffic rule + * @member qCI Used to match all packets that have the same QCI + * @member dSCP Used to match all IPv4 packets that have the same DSCP + * @member tC Used to match all IPv6 packets that have the same TC + * @see ETSI GS MEC 010-2 Clause 6.2.1.10 Type: TrafficFilter + */ + type record TrafficFilter { + Json.String srcAddress optional, + Json.String dstAddress optional, + Json.String srcPort optional, + Json.String dstPort optional, + Json.String protocol optional, + Json.String tag optional, + Json.String uri optional, + Json.String packetLabel optional, + Json.String srcTunnelAddress optional, + Json.String tgtTunnelAddress optional, + Json.String srcTunnelPort optional, + Json.String dstTunnelPort optional, + Json.Integer qCI optional, + Json.Integer dSCP optional, + Json.Integer tC optional + } + + /** + * @desc The InterfaceDescriptor data type describes an interface of a MEC application + * @member interfaceType Type of interface + * @member tunnelInfo Included only if the destination address type is tunnel + * @member srcMACAddress The source address identifies the MAC address of the interface + * @member dstMACAddress The destination address identifies the MAC address of the destination + * @member dstIPAddressIf the interface type is IP, the destination address identifies the IP address of the destination + * @see ETSI GS MEC 010-2 Clause 6.2.1.11 Type: InterfaceDescriptor + */ + type record InterfaceDescriptor { + InterfaceType interfaceType, + TunnelInfo tunnelInfo optional, + Json.String srcMACAddress optional, + Json.String dstMACAddress optional, + Json.String dstIPAddress optional + } + + type enumerated InterfaceType { + TUNNEL (0), + MAC (1), + IP (2) + } with { + variant "JSON: as number" + } + + /** + * @desc The TunnelInfo data type supports the specification of MEC application requirements related to traffic rules + * @member tunnelType Type of tunnel + * @member tunnelDstAddress Destination address of the tunnel + * @member tunnelSrcAddress Source address of the tunnel + * @member tunnelSpecificData Parameters specific to the tunnel + * @see ETSI GS MEC 010-2 Clause 6.2.1.12 Type: TunnelInfo + */ + type record TunnelInfo { + TunnelType tunnelType, + Json.String tunnelDstAddress, + Json.String tunnelSrcAddress, + Json.String tunnelSpecificData optional + } + + type enumerated TunnelType { + GTP_U (0), + GRE (1) + } with { + variant "JSON: as number" + } + + /** + * @desc The DNSRuleDescriptor data type describes DNS rules associated with a MEC application + * @member dnsRuleId Identifies the DNS Rule + * @member domainName FQDN of the DNS rule + * @member ipAddressType Specifies the IP address type + * @member ttl Time-to-live value + * @see ETSI GS MEC 010-2 Clause 6.2.1.13 Type: DNSRuleDescriptor + */ + type record DNSRuleDescriptor { + Json.String dnsRuleId, + Json.String domainName, + Json.String ipAddressType, + IpAddress ipAddress, + Json.Integer ttl optional + } + type record of DNSRuleDescriptor DNSRuleDescriptors; + + /** + * @desc The LatencyDescriptor data type describes latency requirements for a MEC application + * @member maxLatency The value of the maximum latency in nano seconds tolerated by the MEC application + * @see ETSI GS MEC 010-2 Clause 6.2.1.14 Type: LatencyDescriptor + */ + type record LatencyDescriptor { + Json.UInteger maxLatency + } + + /** + * @desc The TerminateAppInstanceOpConfig data type supports the specification of MEC application requirements related to terminate application instance operation configuration + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.15 Type: TerminateAppInstanceOpConfig + */ + type record TerminateAppInstanceOpConfig { + // FIXME shall follow the definition in clause 7.1.5.7 of ETSI GS NFV‑IFA 001 [1]. + } + + /** + * @desc The ChangeAppInstanceStateOpConfig data type supports the specification of MEC application requirements related to change application instance state operation configuration + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.16 Type: ChangeAppInstanceStateOpConfig + */ + type record ChangeAppInstanceStateOpConfig { + // FIXME shall follow the definition in clause 7.1.5.8 of ETSI GS NFV‑IFA 001 [1]. + } + + /** + * @desc The ServiceDependency data type supports the specification of requirements of a service-consuming MEC application related to a MEC service + * @member serName The name of the service + * @member serCategory A Category reference of the service + * @member version The version of the service + * @member serTransportDependencies Indicates transport and serialization format dependencies of consuming the service + * @member requestedPermissions + * @see ETSI GS MEC 010-2 Clause 6.2.1.17 Type: ServiceDependency + */ + type record ServiceDependency { + Json.String serName, + CategoryRef serCategory optional, + Json.String version, + TransportDependency serTransportDependencies optional, + Json.String requestedPermissions optional + } + type record of ServiceDependency ServiceDependencies; + + /** + * @desc The TransportDependency data type supports the specification of requirements of a MEC application related to supported transport bindings (each being a combination of a transport with one or more serializers) + * @member transport Information about the transport in this transport binding + * @member serializers Information about the serializers in this transport binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0 + * @member labels Set of labels that allow to define groups of transport bindings + * @see ETSI GS MEC 010-2 Clause 6.2.1.18 Type: TransportDependency + */ + type record TransportDependency { + TransportDescriptor transport, + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType serializers, + Labels labels + } + type record of TransportDependency TransportDependencies; + + type record length(1..infinity) of Json.String Labels; + + /** + * @desc The TransportDescriptor data type describes a transport + * @member name The name of this transport + * @member description Human-readable description of this transport + * @member type_ Type of the transport, as defined in the TransportType type in ETSI GS MEC 011 [17]i.0 + * @member protocol The name of the protocol used. Shall be set to "HTTP" for a REST API + * @member version The version of the protocol used + * @member security Information about the security used by the transport in ETSI GS MEC 011 [17]i.0 + * @member implSpecificInfo Additional implementation specific details of the transport + * @see ETSI GS MEC 010-2 Clause 6.2.1.19 Type: TransportDescriptor + */ + type record TransportDescriptor { + Json.String name, + Json.String description optional, + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType type_, + Json.String protocol, + Json.String version, + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo security, + Json.String implSpecificInfo optional + } with { + variant (type_) "name as 'type'"; + } + + /** + * @desc This data type represents the information of user context transfer capability of application + * @member statefulApplication If the application is stateful, this attribute shall be set to true + * @member userContextTransferSupport This attribute shall be present if the application is stateful and shall be absent otherwise + * @see ETSI GS MEC 010-2 Clause 6.2.1.20 Type: UserContextTransferCapability + */ + type record UserContextTransferCapability { + Json.Bool statefulApplication, + Json.Bool userContextTransferSupport optional + } + + /** + * @desc This data type represents the network policy in the application instantiation and operation + * @member steeredNetwork This attribute provides an option for the application to specify a type of network to carry the application traffic + * @member steeredNetwork Provides an option for the application to specify a type of network to carry the application traffic + * @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy + */ + type record AppNetworkPolicy { + SteeredNetwork steeredNetwork + } + + /** + * @desc Provides an option for the application to specify a type of network to carry the application traffic + * @member cellularNetwork The application prefers to a cellular network to carry its traffic + * @member wi_fiNetwork The application prefers to a Wi-Fi network to carry its traffic + * @member fixedAccessNetwork The application prefers to a fixed access network to carry its traffic + * @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy + */ + type record SteeredNetwork { + Json.Bool cellularNetwork optional, + Json.Bool wi_fiNetwork optional, + Json.Bool fixedAccessNetwork optional + } with { + variant (wi_fiNetwork) "name as 'wi-fiNetwork'"; + } + + /** + * @desc The OsContainerDescriptor data type supports the specification of requirements of container compute resources when a MEC application is intended to be realized by one or a set of OS Containers sharing the same host and same networking namespace + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.22 Type: OsContainerDescriptor + */ + type record OsContainerDescriptor { + // FIXME shall follow the definition in clause 7.1.6.2 of ETSI GS NFV‑IFA 001 [1]. + } + type record of OsContainerDescriptor OsContainerDescriptors; + + /** + * @desc The McioIdentificationData data type contains data needed to identify an MCIO when interworking with the CISM + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.23 Type: McioIdentificationData + */ + type record McioIdentificationData { + // FIXME shall follow the definition in clause 6.2.75.2 of ETSI GS NFV-SOL 001 [19]. + } + + /** + * @desc The LogicalNodeRequirements data type describes compute, memory and I/O requirements that are to be associated with the logical node of infrastructure + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.24 Type: LogicalNodeRequirements + */ + type record LogicalNodeRequirements { + // FIXME shall follow the definition in clause 7.1.9.6.2 of ETSI GS NFV-IFA 011 [1]. + } + + /** + * @desc The RequestedAdditionalCapabilityData data type supports the specification of requested additional capability for a particular application. Such a capability may be for acceleration or specific tasks + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.1.25 Type: RequestedAdditionalCapabilityData + */ + type record RequestedAdditionalCapabilityData { + // FIXME shall follow the definition in clause 7.1.9.5.2 of ETSI GS NFV-IFA 011 [1]. + } + + /** + * @desc The LocationConstraints data type supports the specification of MEC application requirements related to MEC application deployment location constraints + * @member countryCode The two-letter ISO 3166 [0] country code in capital letters + * @member civicAddressElement Zero or more elements comprising the civic address + * @member area Geographic area + * @see ETSI GS MEC 010-2 Clause 6.2.2.2 Type: LocationConstraints + */ + type record LocationConstraints { + Json.String countryCode optional, + CivicAddressElement civicAddressElement optional, + Polygon area optional + } + + type record CivicAddressElement_ { + Json.Integer caType, + Json.String caValue + } + type record of CivicAddressElement_ CivicAddressElement; + + type record Geometry { + Json.String type_, + Coordinates coordinates + } with { + variant (type_) "name as 'type'"; + } + type record of Json.Number Coordinate; + type record of Coordinate Coordinates; + type record Property { + Json.String key, + Json.String value_ } with { - variant (links) "name as '_links'"; - } - - /** - * @desc Links to resources related to this resource - * @member self_ URI of this resource - * @member subscriptions A link list to the subscriptions to an application package - * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList - */ - type record AppPkgSubscriptionLinkList_Link { - LinkType self_, - AppPkgSubscriptionLinkList_Link_Subscriptions subscriptions optional + variant (value_) "name as 'value'"; + } + type record of Property Properties; + type record Polygon { + Json.String type_, + Geometry geometry, + Properties properties, + Json.String this_ } with { - variant (self_) "name as 'self'"; - } + variant (type_) "name as 'type'"; + variant (this_) "name as 'this'"; + } + + /** + * @desc The data type of CreateAppInstanceRequest represents the parameters for creating a new application instance resource + * @member appDId The application descriptor identifier + * @member appInstanceName Human-readable name of the application instance to be created + * @member appInstanceDescription Human-readable description of the application instance to be created + * @member appPlacementInfo Describes the information of selected MEC platform for the application instance to associate + * @see ETSI GS MEC 010-2 Clause 6.2.2.3 Type: CreateAppInstanceRequest + */ + type record CreateAppInstanceRequest { + Json.String appDId, + Json.String appInstanceName optional, + Json.String appInstanceDescription optional, + MepInformation appPlacementInfo optional + } + + /** + * @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources + * @member id Identifier of the application instance represented by this data type + * @member appInstanceName Name of the application instance + * @member appInstanceDescription Human-readable description of the application instance to be created + * @member appDId The application descriptor identifier is managed by the application provider to identify the application descriptor in a globally unique way + * @member appProvider The onboarded application package provider name + * @member appName The onboarded application name + * @member appSoftVersion The application software version + * @member appDVersion Version of the application descriptor + * @member appPkgId Identifier of the onboarded application package + * @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance + * @member nsInstanceId Identifier of the NS instance created by NFVO in which the MEC application has been instantiated as a VNF instance + * @member vnfInstanceId Identifier of the VNF instance created by VNFM that the MEC application has been instantiated as + * @member instantiationState Instantiation state of the application instance + * @member instantiatedAppState Information specific to an instantiated application. This attribute shall be present if the instantiationState attribute value is INSTANTIATED + * @member communicationInterface Interface for communication with other application instances + * @member _links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.4 Type: AppInstanceInfo + */ + type record AppInstanceInfo { + Json.String id, + Json.String appInstanceName optional, + Json.String appInstanceDescription optional, + Json.String appDId, + Json.String appProvider, + Json.String appName, + Json.String appSoftVersion, + Json.String appDVersion, + Json.String appPkgId, + VimConnectionInfo vimConnectionInfo optional, + Json.String nsInstanceId optional, + Json.String vnfInstanceId optional, + InstantiationState instantiationState, + InstantiatedAppState instantiatedAppState optional, + CommunicationInterface communicationInterface optional, + Link links + } with { + variant (links) "name as '_links'"; + } + type record of AppInstanceInfo AppInstanceInfoList; + + type enumerated InstantiationState { + INSTANTIATED (0), + NOT_INSTANTIATED (1) + } + + type record InstantiatedAppState { + OperationalState operationalState optional, + LocationInformation appInstLocation optional, + McioInfo mcioInfo optional + } + + type enumerated OperationalState { + STARTED (0), + STOPPED (1) + } + + /** + * @desc Links to resources related to this resource + * @member self_ Self referring URI + * @member instantiate Link to the "instantiate" task resource, if the related operation is possible based on the current status of this application instance resource + * @member terminate Link to the "terminate" task resource, if the related operation is possible based on the current status of this application instance resource + * @member operate Link to the "operate" task resource, if the related operation is supported for this application instance, and is possible based on the current status of this application instance resource + * @member appPrconfigure_platform_for_appovider Link to the "configure_platform_for_app" task resource, if the related operation is supported for this application instance, and is possible based on the current status of this application instance resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.4 Type: AppInstanceInfo + */ + type record Link { + LinkType self_, + LinkType instantiate optional, + LinkType terminate optional, + LinkType operate optional, + LinkType configure_platform_for_app optional + } with { + variant (self_) "name as 'self'"; + } + /** + * @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources + * @member appInstSelectorType + * @member appInstances + * @member appsFromProviders Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers + * @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter + */ + type record AppInstanceSubscriptionFilter { + AppInstSelectorType appInstSelectorType, + AppInstances appInstances optional, + appsFromProviders appsFromProviders optional + } + + type enumerated AppInstSelectorType { + VOID (0), + APP_IDENTITY (1), + APP_NAME (2), + APP_D_ID (3), + APP_FROM_PROVIDER (4) + } with { + variant "JSON: as number" + } + + type record length(1..infinity) of Json.String AppInstances; + + /** + * @desc Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers + * @member appProvider Name of the application provider to match + * @member appProducts Match application instances that belong to application products with certain product names, from one particular provider + * @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter + */ + type record AppsFromProvider { + Json.String appProvider, + AppProducts appProducts optional + } + + type record length(1..infinity) of AppsFromProvider appsFromProviders; + + type record AppProduct { + Json.String appName, + Versions versions optional + } + + type record length(1..infinity) of AppProduct AppProducts; + + type record Version { + Json.String appSoftVersion, + AppDVersion appDVersion optional + } + type record of Json.String AppDVersion; + + type record length(1..infinity) of Version Versions; + + /** + * @desc This data type represents a subscription filter criteria to match an application LCM operation occurrence + * @member appInstanceSubscriptionFilter this attribute contains filter criteria that selects one or more application instances on which to receive "LCM operation occurrence" notifications + * @member notificationTypes Match particular notification types + * @member operationTypes Type of the LCM operation represented by this application instance LCM operation occurrence + * @member operationStates Type of the LCM operation state represented by this application instance LCM operation occurrence + * @see ETSI GS MEC 010-2 Clause 6.2.2.6 Type: AppLcmOpOccSubscriptionFilter + */ + type record AppLcmOpOccSubscriptionFilter { + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, + Json.String notificationTypes optional, + OperationTypes operationTypes optional, + OperationStates operationStates optional + } + + type enumerated OperationType { + INSTANTIATE (0), + OPERATE (1), + TERMINATE (2) + } + + type record length(1..infinity) of OperationType OperationTypes; + + type enumerated OperationState { + STARTING (0), + PROCESSING (1), + COMPLETED (2), + FAILED (3), + FAILED_TEMP (4) + } + + type record length(1..infinity) of OperationState OperationStates; + + /** + * @desc This data type represents request parameters of the "Instantiate Application" operation + * @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisatio n container used to realize the application instance to be created + * @member virtualStorageDescriptor Defines descriptors of virtual storage resources to be used by the application instance to be created + * @member osContainerDescriptor Describes CPU, memory requirements and limits, and software images of the OS Containers realizing this MEC application corresponding to OS Containers sharing the same host and same network namespace + * @member selectedMECHostInfo Describes the information of selected host for the application instance + * @member locationConstraints Defines the location constraints for the application instance to be created + * @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance, or refer to external/externally-managed virtual links + * @member appTermCandsForCoord Provides sets of applications as termination candidate alternatives that the MEO/MEAO shall select from when utilizing the coordinate LCM operation exchange + * @see ETSI GS MEC 010-2 Clause 6.2.2.7 Type: InstantiateAppRequest + */ + type record InstantiateAppRequest { + VirtualComputeDescriptor virtualComputeDescriptor optional, + OsContainerDescriptors osContainerDescriptor optional, + VirtualStorageDescriptor virtualStorageDescriptor optional, + MECHostInformation selectedMECHostInfo, + LocationConstraints locationConstraints optional, + VimConnectionInfos vimConnectionInfo optional, + AppTermCandsForCoord appTermCandsForCoord optional + } + + /** + * @desc This data type represents request parameters of the "Operate Application" operation + * @member changeStateTo The desired operational state + * @member stopType The stop type + * @member gracefulStopTimeout The time interval (in seconds) to wait for the application instance to be taken out of service during graceful stop, before stopping the application + * @see ETSI GS MEC 010-2 Clause 6.2.2.8 Type: OperateAppRequest + */ + type record OperateAppRequest { + OperationalState changeStateTo, + StopType stopType optional, + Json.UInteger gracefulStopTimeout optional + } + + type enumerated StopType { + FORCEFUL (0), + GRACEFUL (1), + ERROR_CASE (3) // In case of Bad Request tests + } + + /** + * @desc This data type represents request parameters of the "Terminate Application Request" operation + * @member terminationType Indicates whether forceful or graceful termination is requested + * @member gracefulTerminationTimeout This attribute is only applicable in case of graceful termination + * @see ETSI GS MEC 010-2 Clause 6.2.2.9 Type: TerminateAppRequest + */ + type record TerminateAppRequest { + TerminationType terminationType, + Json.UInteger gracefulTerminationTimeout optional + } + + type StopType TerminationType; + + /** + * @desc The data type represents a subscription to notification of application instance operational state change + * @member id Identifier of the subscription to application instance operational state change notification + * @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription" + * @member appInstanceState Application instance state subscribed to + * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.10 Type: AppInstSubscriptionInfo + */ + type record AppInstSubscriptionInfo { + Json.String id, + Json.String subscriptionType, + AppInstanceState appInstanceState optional, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, + Json.AnyURI callbackUri, + AppInstSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + type enumerated AppInstanceState { + NOT_INSTANTIATED (0), + STARTED (1), + STOPPED (2) + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.10 Type: AppInstSubscriptionInfo + */ + type record AppInstSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents an application instance notification for informing the subscribers about operational state of application instance resources + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member appInstanceState Application instance state + * @member subscriptionId Identifier of the subscription related to this notification + * @member timeStamp Date and time of the notification generation + * @member appInstanceId Identifier of application instance + * @member appPkgId Identifier of the onboarded application package + * @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way + * @member appInstLocation Location of the MEC application instance + * @member links Links to resources related to this notification + * @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification + */ + type record AppInstNotification { + Json.String id, + NotificationType notificationType, + AppInstanceState appInstanceState optional, + Json.String subscriptionId, + TimeStamp timeStamp, + Json.String appInstanceId, + Json.String appPkgId, + Json.String appDId, + LocationInformation appInstLocation optional, + AppInstNotification_Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this notification + * @member subscription A link to the related subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification + */ + type record AppInstNotification_Links { + LinkType subscription + } + + /** + * @desc The data type represents the input parameters of "subscription operation" to notification of application lifecycle management for the operational state change of application instance + * @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceState Only send notifications for application instances that are in one of the states listed in this attribute + * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.12 Type: AppInstSubscriptionRequest + */ + type record AppInstSubscriptionRequest { + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceState appInstanceState optional, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional + } + type record of AppInstSubscriptionRequest AppInstSubscriptionRequestList; + + /** + * @desc This data type represents an application lifecycle management operation occurrence + * @member id Identifier of the subscription to application LCM operation occurrence notification + * @member operationState Operation state + * @member stateEnteredTime Date and time when the current state was entered + * @member startTime Date and time of the start of the operation + * @member lcmOperationType of the actual LCM operation represented by this application instance LCM operation occurrence + * @member operationParams Input parameters of the LCM operation + * @member isCancelPending If the application LCM operation occurrence operationState is in "PROCESSING" state and the operation is being cancelled, this attribute shall be set to true + * @member cancelMode The mode of an cancellation + * @member links Link to the application instance that the operation applies to + * @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc + */ + type record AppLcmOpOcc { + Json.String id, + OperationState operationState, + TimeStamp stateEnteredTime, + TimeStamp startTime, + OperationType lcmOperation, + OperationParams operationParams optional, + Json.Bool isCancelPending optional, + CancelMode cancelMode optional, + AppLcmOpOcc_Link links + } with { + variant (links) "name as '_links'"; + } + type record of AppLcmOpOcc AppLcmOpOccList; + + /** + * @desc Input parameters of the LCM operation + * @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc + */ + type union OperationParams { + InstantiateAppRequest instantiateAppRequest, + OperateAppRequest operateAppRequest, + TerminateAppRequest terminateAppRequest + } + + /** + * @desc Link to the application instance that the operation applies to + * @member self_ URI of this resource + * @member appInstance Link to the application instance that the operation applies to + * @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc + */ + type record AppLcmOpOcc_Link { + LinkType self_, + LinkType appInstance + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents a subscription request to notification of application life cycle management operation occurrence + * @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appLcmOpOccSubscriptionFilter Subscription filter criteria to match specific application LCM operation occurrences + * @see ETSI GS MEC 010-2 Clause 6.2.2.14 Type: AppLcmOpOccSubscriptionRequest + */ + type record AppLcmOpOccSubscriptionRequest { + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional + } + + /** + * @desc This data type represents a subscription to notifications of application life cycle management operation occurrence + * @member id Identifier of this subscription resource + * @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription" + * @member appLcmOpOccSubscriptionFilter Criteria used to select application LCM operation occurrences on which to send notifications related to this subscription + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.15 Type: AppLcmOpOccSubscriptionInfo + */ + type record AppLcmOpOccSubscriptionInfo { + Json.String id, + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional, + AppLcmOpOccSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.15 Type: AppLcmOpOccSubscriptionInfo + */ + type record AppLcmOpOccSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents a notification related to state changes of an application LCM operation occurrence which informs the subscribers + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member operationType Discriminator for the different notification types + * @member operationState Operation state + * @member subscriptionId Identifier of the subscription to this notification + * @member timeStamp Date and time of the notification generation + * @member appLcmOpOccId Identifier of application lifecycle management operation occurrence + * @member appInstanceId Identifier of application instance + * @member links Links to resources related to this notification + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.16 Type: AppLcmOpOccNotification + */ + type record AppLcmOpOccNotification { + Json.String id, + NotificationType notificationType, + OperationType operationType, + OperationState operationState, + Json.String subscriptionId, + TimeStamp timeStamp, + Json.String appLcmOpOccId, + Json.String appInstanceId, + AppLcmOpOccNotification_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member appInstance Link to the resource representing the application instance to which the notified change applies + * @member subscription Link to the related subscription + * @member appLcmOpOcc Link to the application lifecycle management operation occurrence that this notification is related to + * @see ETSI GS MEC 010-2 Clause 6.2.2.16 Type: AppLcmOpOccNotification + */ + type record AppLcmOpOccNotification_Link { + LinkType appInstance, + LinkType subscription, + LinkType appLcmOpOcc + } + + /** + * @desc The data type represents the parameters of MEC host information + * @member hostName Human-readable name of MEC host + * @member hostId KeyValuePairs + * @see ETSI GS MEC 010-2 Clause 6.2.2.17 Type: MECHostInformation + */ + type record MECHostInformation { + Json.String hostName optional, + KeyValuePairs hostId + } + + /** + * @desc The VimConnectionInfo data type specifies the connection information of VIM for managing the resources of the application instance + * @member id The identifier of the VIM Connection + * @member vimId The identifier of the VIM instance + * @member vimType Discriminator for the different types of the VIM information + * @member interfaceInfo Information about the interface or interfaces to the VIM, if applicable, such as the URI of an interface endpoint to communicate with the VIM + * @member accessInfo Authentication credentials for accessing the VIM, and other access-related information such as tenants or infrastructure resource groups + * @member extra VIM type specific additional information + * @see ETSI GS MEC 010-2 Clause 6.2.2.18 Type: VimConnectionInfo + */ + type record VimConnectionInfo { + Json.String id, + Json.String vimId optional, + Json.String vimType, + KeyValuePairs interfaceInfo optional, + KeyValuePairs accessInfo optional, + KeyValuePairs extra optional + } + + type record of VimConnectionInfo VimConnectionInfos; + + /** + * @desc The data type represents a subscription link list of notification on application lifecycle management + * @member links List of hyperlinks related to the resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList + */ + type record AppInstanceSubscriptionLinkList { + AppInstanceSubscriptionLinkList_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of hyperlinks related to the resource + * @member self_ URI of this resource + * @member subscriptions A link list to the subscriptions + * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList + */ + type record AppInstanceSubscriptionLinkList_Link { + LinkType self_, + AppInstanceSubscriptionLinkList_Link_Subscriptions subscriptions optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc A link list to the subscriptions + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList + */ + type record AppInstanceSubscriptionLinkList_Link_Subscription { + Json.AnyURI href, + AppInstanceSubscriptionType subscriptionType + } + + type record length(1..infinity) of AppInstanceSubscriptionLinkList_Link_Subscription AppInstanceSubscriptionLinkList_Link_Subscriptions; + + /** + * @desc String representing the type of a subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.20.2 Simple data types + */ + type Json.String AppInstanceSubscriptionType; + + /** + * @desc This data type represents the parameters for configuring the MEP to run an application instance + * @member appServiceRequired Describes services a MEC application requires to run + * @member appServiceOptional Describes services a MEC application may use if available + * @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications + * @member appFeatureRequired Describes features a MEC application requires to run + * @member transportDependencies Transports, if any, that this application requires to be provided by the platform + * @member appTrafficRule Describes traffic rules the MEC application requires + * @member appDNSRule Describes DNS rules the MEC application requires + * @member appLatency Describes the maximum latency tolerated by the MEC application + * @member userContextTransferCapability If the application supports the user context transfer capability, this attribute shall be included + * @member appNetworkPolicy If present, it represents the application network policy of carrying the application traffic + * @see ETSI GS MEC 010-2 Clause 6.2.2.21 Type: ConfigPlatformForAppRequest + */ + type record ConfigPlatformForAppRequest { + ServiceDependencies appServiceRequired optional, + ServiceDependencies appServiceOptional optional, + ServiceDependencies appServiceProduced optional, + FeatureDependencies appFeatureRequired optional, + FeatureDependencies appFeatureOptional optional, + TransportDependencies transportDependencies optional, + TrafficRuleDescriptors appTrafficRule optional, + DNSRuleDescriptors appDNSRule optional, + LatencyDescriptor appLatency optional, + UserContextTransferCapability userContextTransferCapability optional, + AppNetworkPolicy appNetworkPolicy optional + } + + /** + * @desc The data type represents the parameters of MEC platform information + * @member mepName Human-readable name of MEC platform + * @member mepId Deployment-specific identifier of MEC platform + * @see ETSI GS MEC 010-2 Clause 6.2.2.22 Type: MepInformation + */ + type record MepInformation { + Json.String mepName optional, + Json.String mepId optional + } + + /** + * @desc The AppTermCandsForCoord data type represents the parameters to provide candidates of applications to terminate in pre-emption situations for LCM coordination exchanges + * @member terminationOptions Sets of application options for the MEO/MEAO to select from as candidates for termination + * @see ETSI GS MEC 010-2 Clause 6.2.2.23 Type: AppTermCandsForCoord + */ + type record AppTermCandsForCoord { + TerminationOptions terminationOptions + } + + /** + * @desc Sets of application options for the MEO/MEAO to select from as candidates for termination + * @member appInstIdTerminationCands List of application instance identifiers, constituting a candidate set for termination + * @see ETSI GS MEC 010-2 Clause 6.2.2.23 Type: AppTermCandsForCoord + */ + type record TerminationOption { + AppInstIdTerminationCands appInstIdTerminationCands + } + + type record length(1..infinity) of Json.String AppInstIdTerminationCands; + + type record length(1..infinity) of TerminationOption TerminationOptions; + + /** + * @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier creation + * @member subscriptionType Shall be set to "AppIdentifierCreationSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.25 Type: AppInstIdCreationSubscriptionRequest + */ + type record AppInstIdCreationSubscriptionRequest { + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional + } + + /** + * @desc The data type represents a subscription to notification of application instance identifier creation + * @member id Identifier of the subscription to application instance operational state change notification + * @member subscriptionType Shall be set to "AppIdentifierCreationSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.26 Type: AppInstIdCreationSubscriptionInfo + */ + type record AppInstIdCreationSubscriptionInfo { + Json.String id, + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, + AppInstIdCreationSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.26 Type: AppInstIdCreationSubscriptionInfo + */ + type record AppInstIdCreationSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents a notification for informing the subscribers about the creation of a new "individual application instance" resource and the associated application instance identifier + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member subscriptionId Identifier of the subscription related to this notification + * @member timeStamp Date and time of the notification generation + * @member appInstanceId The created application instance Identifier + * @member links Links to resources related to this notification + * @see ETSI GS MEC 010-2 Clause 6.2.2.27 Type: AppInstanceIdentifierCreationNotification + */ + type record AppInstanceIdentifierCreationNotification { + Json.String id, + NotificationType notificationType, + TimeStamp timeStamp, + Json.String appInstanceId, + AppInstanceIdentifierCreationNotification_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this notification + * @member subscription A link to the related subscription + * @member appInstance Link to the resource representing the created application instance + * @see ETSI GS MEC 010-2 Clause 6.2.2.27 Type: AppInstanceIdentifierCreationNotification + */ + type record AppInstanceIdentifierCreationNotification_Link { + LinkType subscription, + LinkType appInstance + } + + /** + * @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier deletion + * @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription + * @see ETSI GS MEC 010-2 Clause 6.2.2.28 Type: AppInstIdDeletionSubscriptionRequest + */ + type record AppInstIdDeletionSubscriptionRequest { + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional + } + + /** + * @desc The data type represents a subscription to notification of application instance identifier deletion + * @member id Identifier of the subscription to application instance operational state change notification + * @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription" + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.29 Type: AppInstIdDeletionSubscriptionInfo + */ + type record AppInstIdDeletionSubscriptionInfo { + Json.String id, + Json.String subscriptionType, + Json.AnyURI callbackUri, + AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional, + AppInstIdDeletionSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.2.29 Type: AppInstIdDeletionSubscriptionInfo + */ + type record AppInstIdDeletionSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This data type represents a notification for informing the subscribers about the deletion of an "individual application instance" resource and the associated application instance identifier + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member subscriptionId Identifier of the subscription related to this notification + * @member timeStamp Date and time of the notification generation + * @member appInstanceId The deleted application instance Identifier + * @member links Links to resources related to this notification + * @see ETSI GS MEC 010-2 Clause 6.2.2.30 Type: AppInstanceIdentifierDeletionNotification + */ + type record AppInstanceIdentifierDeletionNotification { + Json.String id, + NotificationType notificationType, + Json.String subscriptionId, + TimeStamp timeStamp, + Json.String appInstanceId, + AppInstIdDeletionSubscriptionRequest links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc The LocationInformation data type represents the location information of the site hosting the MEC application instance + * @member countryCode The two-letter ISO 3166 [3] country code in capital letters where an instance is deployed + * @member civicAddress Provides the civic address of the site hosting the MEC application instance + * @member Geographical position (i.e. latitude and longitude) where an instance is deployed + * @see ETSI GS MEC 010-2 Clause 6.2.2.31 Type: LocationInformation + */ + type record LocationInformation { + Json.String countryCode, + CivicAddressElement civicAddress optional, + Json.String geographicalPosition optional + } + + /** + * @desc This data type represents the valid modes of cancelling an application LCM operation + * @see ETSI GS MEC 010-2 Clause 6.2.2.32 Type: CancelMode + */ + type StopType CancelMode; + + /** + * @desc This data type represents the information about an MCIO representing the application instance realized by one or a set of OS containers + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.2.31 Type: LocationInformation + */ + type record McioInfo { + // FIXME McioInfo shall follow the definition in clause 8.3.3.33.2 of ETSI GS NFV-IFA 013 [15]. + } + + + /** + * @desc The data type CreateAppPkg represents the parameters for creating a new application package resource + * @member appPkgName Name of the application package to be onboarded + * @member appPkgVersion Version of the application package to be onboarded + * @member appProvider The provider's name of the application package to be onboarded + * @member checksum Checksum of the onboarded application package + * @member userDefinedData User defined data for the application package + * @member appPkgPath Address information of the application package + * @see ETSI GS MEC 010-2 Clause 6.2.3.2 Type: CreateAppPkg + */ + type record CreateAppPkg { + Json.String appPkgName, + Json.String appPkgVersion, + Json.String appProvider optional, + Checksum checksum, + KeyValuePairs userDefinedData optional, + Json.AnyURI appPkgPath + } + + /** + * @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 usageState Usage state of the onboarded instance of the application package + * @member mecInfo The MEC version that compatible with this application + * @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 + * @see ETSI GS MEC 010-2 Clause 6.2.3.3 Type: AppPkgInfo + */ + type record AppPkgInfo { + Json.String id, + Json.String appDId, + Json.String appProvider optional, + Json.String appName, + Json.String appSoftwareVersion, + Json.String appDVersion, + Checksum checksum, + Json.String signingCertificate optional, + AppPkgSWImageInfo softwareImages, + AppPkgArtifactInfo additionalArtifacts optional, + OnboardingState onboardingState, + AppPkgInfo_OperationalState operationalState, + UsageState usageState, + AppPkgInfo_MecInfo mecInfo, + KeyValuePairs userDefinedData optional, + ProblemDetails onboardingFailureDetails optional, + AppPkgInfo_Links links + } with { + variant (links) "name as '_links'"; + } + type record of AppPkgInfo AppPkgInfoList; + + type record AppPkgSWImageInfo_ { + // FIXME The data type of application software image information data model is related to virtualisation method and needs for further study + } + type record length(1..infinity) of AppPkgSWImageInfo_ AppPkgSWImageInfo; + + type record AppPkgArtifactInfo { + // FIXME The data type of additional information of application package artifacts is not specified in the present document + } + + type enumerated OnboardingState { + CREATED (0), + UPLOADING (1), + PROCESSING (2), + ONBOARDED (3) + } + + type enumerated AppPkgInfo_OperationalState { + ENABLED (0), + DISABLED (1), + ERROR_BAD_REQUEST (2) + } + + type enumerated UsageState { + IN_USE (0), + NOT_IN_USE (1) + } + + type record length(1..infinity) of Json.String AppPkgInfo_MecInfo; + + /** + * @desc Links to resources related to this resource + * @member self_ Self referring URI + * @member appDId Link to the appD resource + * @member appPkgContent Link to the "Onboarded application package content" resource + * @member vnfPkgInfo Link to the corresponding VNF package resource at NFVO + * @see ETSI GS MEC 010-2 Clause 6.2.3.3 Type: AppPkgInfo + */ + type record AppPkgInfo_Links { + LinkType self_, + LinkType appD, + LinkType appPkgContent, + LinkType vnfPkgInfo optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc The data type represents a subscription to notification of application package management for the onboarding, or operational state change of application package + * @member id Identifier of the subscription to application package notification + * @member subscriptionType Type of subscription + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.3.4 Type: AppPkgSubscriptionInfo + */ + type record AppPkgSubscriptionInfo { + Json.String id, + AppPkgSubscriptionType subscriptionType, + Json.AnyURI callbackUri, + AppPkgSubscriptionInfo_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @see ETSI GS MEC 010-2 Clause 6.2.3.4 Type: AppPkgSubscriptionInfo + */ + type record AppPkgSubscriptionInfo_Link { + LinkType self_ + } with { + variant (self_) "name as 'self'" + } + + /** + * @desc The data type represents a subscription link list of notification on application package management + * @member links Links to resources related to this resource + * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList + */ + type record AppPkgSubscriptionLinkList { + AppPkgSubscriptionLinkList_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this resource + * @member self_ URI of this resource + * @member subscriptions A link list to the subscriptions to an application package + * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList + */ + type record AppPkgSubscriptionLinkList_Link { + LinkType self_, + AppPkgSubscriptionLinkList_Link_Subscriptions subscriptions optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc A link list to the subscriptions to an application package + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList + */ + type record AppPkgSubscriptionLinkList_Link_Subscription { + Json.AnyURI href, + AppPkgSubscriptionType subscriptionType + } + + type record length(1..infinity) of AppPkgSubscriptionLinkList_Link_Subscription AppPkgSubscriptionLinkList_Link_Subscriptions; + + /** + * @desc This data type represents an application package management notification for informing the subscribers about onboarding application package resources + * @member id Identifier of this notification + * @member notificationType Discriminator for the different notification types + * @member subscriptionId Identifier of the subscription to this notification + * @member timeStamp Date and time of the notification generation + * @member appPkgId Identifier of the onboarded application package + * @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way + * @member operationalState Operational state of the application package + * @member links Links to resources related to this notification + * @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification + */ + type record AppPkgNotification { + Json.String id, + Json.String notificationType, + Json.String subscriptionId, + TimeStamp timeStamp, + Json.String appPkgId, + Json.String appDId, + AppPkgInfo_OperationalState operationalState, + AppPkgNotification_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this notification + * @member subscription A link to the related subscription + * @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification + */ + type record AppPkgNotification_Link { + LinkType subscription + } + + /** + * @desc The data type represents the input parameters of "subscription operation" to notification of application package management for the onboarding, or operational state change of application package + * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to + * @member subscriptionType Type of the subscription + * @member appPkgFilter The attribute-based filter is to filter application packages on which the query applies + * @see ETSI GS MEC 010-2 Clause 6.2.3.7 Type: AppPkgSubscription + */ + type record AppPkgSubscription { + Json.AnyURI callbackUri, + AppPkgSubscriptionType subscriptionType, + AppPkgFilter appPkgFilter optional + } + + /** + * @desc The data type represents modifications of the "AppPkgInfo" data type that can be requested to perform "application package operation" + * @member New value of the "operationalState" attribute of the "OnboardedAppPkgInfo" structure + * @see ETSI GS MEC 010-2 Clause 6.2.3.8 Type: AppPkgInfoModifications + */ + type record AppPkgInfoModifications { + AppPkgInfo_OperationalState operationalState + } + + /** + * @desc String representing the type of a subscription + * @see ETSI GS MEC 010-2 Clause 6.2.3.9.2 Simple data types + */ + type Json.String AppPkgSubscriptionType; + + /** + * @desc This data type represents subscription filter criteria to match application package + * @member appPkgInfoId Match the application package identifier which is allocated by the MEO + * @member appDId Match the application descriptor identifier which is allocated by the application provider + * @member appProvider Match the provider's name of the onboarded application + * @member appName Match the name of the onboarded application + * @member appSoftwareVersion Match the software version of the application package + * @member appDVersion Match the version of the application descriptor + * @member operationalState Match particular operational state of the application package + * @member usageState Match particular usage state of the application package + * @see ETSI GS MEC 010-2 Clause 6.2.3.10 Type: AppPkgFilter + */ + type record AppPkgFilter { + Json.String appPkgInfoId optional, + Json.String appDId optional, + Json.String appProvider optional, + Json.String appName optional, + Json.String appSoftwareVersion optional, + Json.String appDVersion optional, + AppPkgInfo_OperationalState operationalState optional, + UsageState usageState optional + } + + /** + * @desc This type represents a grant request + * @member appInstanceId Identifier of the application instance which this grant request is related to + * @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the GrantRequest + * @member appDId Identifier of the AppD that defines the application for which the LCM operation is to be granted + * @member operation The lifecycle management operation for which granting is requested + * @member addResources List of resource definitions in the AppD for resources to be added by the LCM operation which is related to this grant request, with one entry per resource + * @member tempResources List of resource definitions in the AppD for resources to be temporarily instantiated during the runtime of the LCM operation which is related to this grant request + * @member removeResources Removed by the LCM operation which is related to this grant request, with one entry per resource + * @member updateResources Provides the definitions of resources to be modified by the LCM operation which is related to this grant request, with one entry per resource + * @member additionalParams MEPM, specific to the application and the LCM operation + * @member links Links to resources related to this request + * @see ETSI GS MEC 010-2 Clause 6.2.4 Granting information model + */ + type record GrantRequest { + Json.String appInstanceId, + Json.String appLcmOpOccId, + Json.String appDId, + OperationType operation, + ResourceDefinitions addResources optional, + ResourceDefinitions tempResources optional, + ResourceDefinitions updateResources optional, + KeyValuePairs additionalParams optional, + GrantRequest_Link links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Links to resources related to this request + * @member appLcmOpOcc Related lifecycle management operation occurrence + * @member appInstance Related application instance + * @see ETSI GS MEC 010-2 Clause 6.2.4 Granting information model + */ + type record GrantRequest_Link { + LinkType appLcmOpOcc, + LinkType appInstance + } + + /** + * @desc This type provides information of an existing or proposed resource used by the application + * @member id Identifier of this "ResourceDefinition" structure, unique at least within the scope of the "GrantRequest" structure + * @member type_ Type of the resource definition referenced + * @member vduId Reference to the related VDU in the AppD applicable to this resource + * @member resourceTemplateId Reference to a resource template, i.e. VirtualComputeDescriptor, AppExtCpd, VirtualStorageDescriptor in the AppD + * @member resource Resource information for an existing resource + * @see ETSI GS MEC 010-2 Clause 6.2.4.3 Type: ResourceDefinition + */ + type record ResourceDefinition { + Json.String id, + ResourceDefinition_Type type_, + Json.String vduId optional, + ResourceTemplateId resourceTemplateId, + ResourceDefinition_Resource resource + } with { + variant (type_) "name as 'type'"; + } + + type record of ResourceDefinition ResourceDefinitions; + + type enumerated ResourceDefinition_Type { + COMPUTE (0), + STORAGE (1), + LINKPORT (2), + OSCONTAINER (3) + } + + type record of Json.String ResourceTemplateId; + + /** + * @desc Resource information for an existing resource + * @member vimConnectionInfo Specifies the connection information of VIM for the resources of the application instance + * @member resourceId Identifier of the resource in the scope of the VIM + * @see ETSI GS MEC 010-2 Clause 6.2.4.3 Type: ResourceDefinition + */ + type record ResourceDefinition_Resource { + VimConnectionInfo vimConnectionInfo, + Json.String resourceId + } + + /** + * @desc This type represents a grant + * @member id Identifier of the Grant + * @member appInstanceId Identifier of the application instance which this Grant is related to + * @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the Grant + * @member vimConnections Provides information regarding VIM connections that are approved to be used by the MEPM to allocate resources, and provides parameters of these VIM connections + * @member zones Identifies resource zones where the resources are approved to be allocated by the MEPM + * @member zoneGroups Information about groups of resource zones that are related and that the MEO has chosen to fulfil a zoneGroup constraint in the Grant request + * @member addResources List of resources that are approved to be added, with one entry per resource + * @member tempResources List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation, with one entry per resource + * @member removeResources List of resources that are approved to be removed, with one entry per resource + * @member updateResources List of resources that are approved to be modified, with one entry per resource + * @member vimAssets Information about assets for the application that are managed by the MEO in the VIM, such as software images + * @member extVirtualLinks Information about external VLs to connect the application instance to + * @member MEPM, specific to the application and the LCM operation + * @member links Links to resources related to this request + * @see ETSI GS MEC 010-2 Clause 6.2.4.4 Type: Grant + */ + type record Grant { + Json.String id, + Json.String appInstanceId, + Json.String appLcmOpOccId, + VimConnectionInfos vimConnections optional, + ZoneInfos zones optional, + ZoneGroupInfos zoneGroups optional, + GrantInfos addResources optional, + GrantInfos tempResources optional, + GrantInfos removeResources optional, + GrantInfos updateResources optional, + VimAssets vimAssets optional, + ExtVirtualLinkDatas extVirtualLinks optional, + KeyValuePairs additionalParams optional, + Grant_Link links + } with { + variant (links) "name as '_links'"; + } + + type record VimAssets { + VimSoftwareImage softwareImages optional + } + + /** + * @desc Links to resources related to this request + * @member appLcmOpOcc Related lifecycle management operation occurrence + * @member appInstance Related application instance + * @see ETSI GS MEC 010-2 Clause 6.2.4.4 Type: Grant + */ + type record Grant_Link { + LinkType appLcmOpOcc, + LinkType appInstance + } + + /** + * @desc This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted + * @member resourceDefinitionId Identifier of the related "ResourceDefinition" structure from the related "GrantRequest" structure + * @member vimConnectionId Identifier of the VIM connection to be used to manage this resource + * @member zoneId Reference to the identifier of the "ZoneInfo" structure in the "Grant" structure defining the resource zone into which this resource is to be placed + * @member resourceGroupId Identifier of the "infrastructure resource group", logical grouping of virtual resources assigned to a tenant within an Infrastructure Domain, to be provided when allocating the resource + * @member mcioConstraints The constraint values to be assigned to MCIOs of an application with containerized components + * @see ETSI GS MEC 010-2 Clause 6.2.4.5 Type: GrantInfo + */ + type record GrantInfo { + Json.String resourceDefinitionId, + Json.String vimConnectionId optional, + Json.String zoneId optional, + Json.String resourceGroupId optional, + KeyValuePairs mcioConstraints optional + } + type record of GrantInfo GrantInfos; + + /** + * @desc This type provides information regarding a resource zone + * @member id The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the "Grant" structure + * @member zoneId The identifier of the resource zone, as managed by the resource management layer (typically, the VIM) + * @member vimConnectionId Identifier of the connection to the VIM that manages the resource zone + * @see ETSI GS MEC 010-2 Clause 6.2.4.6 Type: ZoneInfo + */ + type record ZoneInfo { + Json.String id, + Json.String zoneId, + Json.String vimConnectionId optional + } + type record of ZoneInfo ZoneInfos; + + /** + * @desc This type provides information regarding a resource zone group + * @member zoneId References of identifiers of "ZoneInfo" structures, each of which provides information about a resource zone that belongs to this group + * @see ETSI GS MEC 010-2 Clause 6.2.4.7 Type: ZoneGroupInfo + */ + type record ZoneGroupInfo { + ZoneIds zoneId + } + type record of ZoneGroupInfo ZoneGroupInfos; + type record of Json.String ZoneIds; + + /** + * @desc This type represents an external VL + * @member id The identifier of the external VL instance + * @member vimConnectionId Identifier of the VIM connection to manage this resource + * @member resourceId The identifier of the resource in the scope of the VIM + * @member extCps External CPs of the application instance to be connected to this external VL + * @member extLinkPorts Externally provided link ports to be used to connect external connection points to this external VL + * @see ETSI GS MEC 010-2 Clause 6.2.4.8 Type: ExtVirtualLinkData + */ + type record ExtVirtualLinkData { + Json.String id, + Json.String vimConnectionId optional, + Json.String resourceId, + AppExtCpData extCps, + ExtLinkPortDatas extLinkPorts optional + } + type record of ExtVirtualLinkData ExtVirtualLinkDatas; + + /** + * @desc This type represents an externally provided link port to be used to connect an external connection point to an external VL + * @member id Identifier of this link port as provided by the entity that has created the link port + * @member resourceHandleReference to the virtualised resource realizing this link port + * @see ETSI GS MEC 010-2 Clause 6.2.4.9 Type: ExtLinkPortData + */ + type record ExtLinkPortData { + Json.String id, + ResourceHandle resourceHandle + } + type record of ExtLinkPortData ExtLinkPortDatas; + + /** + * @desc This type represents the information that allows addressing a virtualised resource that is used by an application instance + * @member vimConnectionId Identifier of the VIM connection to manage the resource + * @member resourceId Identifier of the resource in the scope of the VIM + * @member vimLevelResourceType Type of the resource in the scope of the VIM + * @see ETSI GS MEC 010-2 Clause 6.2.4.10 Type: ResourceHandle + */ + type record ResourceHandle { + Json.String vimConnectionId optional, + Json.String resourceId, + Json.String vimLevelResourceType optional + } + + /** + * @desc This type contains a mapping between a software image definition in the AppD and the corresponding software image managed by the MEO in the VIM which is needed during compute resource instantiation + * @member vimConnectionId Identifier of the VIM connection to access the software image referenced in this structure + * @member appDSoftwareImageId Identifier which references the software image descriptor in the AppD + * @member vimSoftwareImageId Identifier of the software image in the resource management layer (i.e. VIM) + * @see ETSI GS MEC 010-2 Clause 6.2.4.11 Type: VimSoftwareImage + */ + type record VimSoftwareImage { + Json.String vimConnectionId optional, + Json.String appDSoftwareImageId, + Json.String vimSoftwareImageId + } + + /** + * @desc This type represents configuration information for external CPs created from a CPD + * @member cpdId The identifier of the CPD in the AppD + * @member cpConfig List of instance data that need to be configured on the CP instances created from the respective CPD + * @see ETSI GS MEC 010-2 Clause 6.2.4.12 Type: AppExtCpData + */ + type record AppExtCpData_ { + Json.String cpdId, + AppExtCpConfig cpConfig + } + + type record length(1..infinity) of AppExtCpData_ AppExtCpData; + + /** + * @desc This type represents an externally provided link port or network address information per instance of an external connection point + * @member cpInstanceId Identifier of the external CP instance to which this set of configuration parameters is requested to be applied + * @member linkPortId Identifier of a pre-configured link port to which the external CP will be associated + * @member cpProtocolData Parameters for configuring the network protocols on the link port that connects the CP to a VL + * @see ETSI GS MEC 010-2 Clause 6.2.4.13 Type: AppExtCpConfig + */ + type record AppExtCpConfig_ { + Json.String cpInstanceId optional, + Json.String linkPortId optional, + CpProtocolData cpProtocolData optional + } + + type record length(1..infinity) of AppExtCpConfig_ AppExtCpConfig; + + /** + * @desc This type represents network protocol data + * @member layerProtocol Identifier of layer(s) and protocol(s) + * @member ipOverEthernet Network address data for IP over Ethernet to assign to the extCP instance + * @see ETSI GS MEC 010-2 Clause 6.2.4.14 Type: CpProtocolData + */ + type record CpProtocolData_ { + LayerProtocol layerProtocol, + IpOverEthernetAddressData ipOverEthernet optional + } + + type record length(1..infinity) of CpProtocolData_ CpProtocolData; + + type enumerated LayerProtocol { + IP_OVER_ETHERNET + } + + /** + * @desc This type represents network address data for IP over Ethernet + * @member macAddress MAC address + * @member ipAddresses List of IP addresses to assign to the CP instance + * @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData + */ + type record IpOverEthernetAddressData { + Json.String macAddress optional, + IpAddresses ipAddresses optional + } + + /** + * @desc IP addresses to assign to the CP instance + * @member type_ The type of the IP addresses + * @member fixedAddresses Fixed addresses to assign (from the subnet defined by "subnetId" if provided) + * @member numDynamicAddresses Number of dynamic addresses to assign (from the subnet defined by "subnetId" if provided) + * @member addressRange An IP address range to be used, e.g. in case of egress connections + * @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData + */ + type record IpAddress { + IpAddressType type_, + FixedAddresses fixedAddresses optional, + Json.Integer numDynamicAddresses optional, + AddressRange addressRange optional + } with { + variant (type_) "name as 'type'"; + } + + type record length(1..infinity) of IpAddress IpAddresses; + + type enumerated IpAddressType { + IPV4, + IPV6 + } + + type record length(1..infinity) of Json.String FixedAddresses; + + type record AddressRange { + Json.String minAddress, + Json.String maxAddress, + Json.String subnetId optional + } + + /** + * @desc This data type represents a type of link + * @member href URI referring to a resource + * @see ETSI GS MEC 010-2 Clause 6.2.5.2 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc This data type represents a list of key-value pairs + * @member + * @member + * @see ETSI GS MEC 010-2 Clause 6.2.5.3 Type: KeyValuePairs + */ + type record KeyValuePair { + Json.String key_name, + anytype key_value + } + type set of KeyValuePair KeyValuePairs; - type record AppPkgSubscriptionLinkList_Link_Subscription { - Json.AnyURI href, - AppPkgSubscriptionType subscriptionType - } + /** + * @desc This type represents the checksum of an application package + * @member algorithm Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004 [18] + * @member hash The hexadecimal value of the checksum + * @see ETSI GS MEC 010-2 Clause 6.2.5.6 Type: Checksum + */ + type record Checksum { + Json.String algorithm, + Json.String hash + } - type record length(1..infinity) of AppPkgSubscriptionLinkList_Link_Subscription AppPkgSubscriptionLinkList_Link_Subscriptions; + group edge_platform_application_enablement { /* TITAN WORK-AROUND for build issue (class forward declaration) */ /** - * @desc This data type represents an application package management notification for informing the subscribers about onboarding application package resources - * @member id Identifier of this notification - * @member notificationType Discriminator for the different notification types - * @member subscriptionId Identifier of the subscription to this notification - * @member timeStamp Date and time of the notification generation - * @member appPkgId Identifier of the onboarded application package - * @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way - * @member operationalState Operational state of the application package - * @member linksLinks to resources related to this notification - * @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification + * @desc The enumeration TransportType represents types of transports. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.4-1: Enumeration TransportType */ - type record AppPkgNotification { - Json.String id, - Json.String notificationType, - Json.String subscriptionId, - TimeStamp timeStamp, - Json.String appPkgId, - Json.String appDId, - AppPkgInfo_OperationalState operationalState, - AppPkgNotification_Link links - } with { - variant (links) "name as '_links'"; - } - - type record AppPkgNotification_Link { - LinkType subscription + type enumerated TransportType { + REST_HTTP, + MB_TOPIC_BASED, + MB_ROUTING, + MB_PUBSUB, + RPC, + RPC_STREAMING, + WEBSOCKET } /** - * @desc The data type represents the input parameters of "subscription operation" to notification of application package management for the onboarding, or operational state change of application package - * @member callbackUri The URI of the endpoint for the subscription related notification to be sent to - * @member subscriptionType Type of the subscription - * @member appPkgFilter The attribute-based filter is to filter application packages on which the query applies - * @see ETSI GS MEC 010-2 Clause 6.2.3.7 Type: AppPkgSubscription + * @desc List of supported OAuth 2.0 grant types. */ - type record AppPkgSubscription { - Json.AnyURI callbackUri, - AppPkgSubscriptionType subscriptionType, - AppPkgFilter appPkgFilter optional - } + // type enumerated GrantTypes { + // OAUTH2_AUTHORIZATION_CODE, + // OAUTH2_IMPLICIT_GRANT, + // OAUTH2_RESOURCE_OWNER, + // OAUTH2_CLIENT_CREDENTIALS + // } + // type record length(1..4) of GrantTypes GrantTypesList; /** - * @desc The data type represents modifications of the "AppPkgInfo" data type that can be requested to perform "application package operation" - * @member New value of the "operationalState" attribute of the "OnboardedAppPkgInfo" structure - * @see ETSI GS MEC 010-2 Clause 6.2.3.8 Type: AppPkgInfoModifications + * @desc The token endpoint. */ - type record AppPkgInfoModifications { - AppPkgInfo_OperationalState operationalState - } + //type Json.String TokenEndpoint; /** - * @desc String representing the type of a subscription - * @see ETSI GS MEC 010-2 Clause 6.2.3.9.2 Simple data types + * @desc Parameters related to use of OAuth 2.0. */ - type Json.String AppPkgSubscriptionType; + // type record OAuth2Info { + // GrantTypesList grantTypes, + // TokenEndpoint tokenEndpoint + // } /** - * @desc This data type represents subscription filter criteria to match application package - * @member appPkgInfoId Match the application package identifier which is allocated by the MEO - * @member appDId Match the application descriptor identifier which is allocated by the application provider - * @member appProvider Match the provider's name of the onboarded application - * @member appName Match the name of the onboarded application - * @member appSoftwareVersion Match the software version of the application package - * @member appDVersion Match the version of the application descriptor - * @member operationalState Match particular operational state of the application package - * @member usageState Match particular usage state of the application package - * @see ETSI GS MEC 010-2 Clause 6.2.3.10 Type: AppPkgFilter + * @desc This type represents security information related to a transport. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.5.4-1: Attributes of SecurityInfo */ - type record AppPkgFilter { - Json.String appPkgInfoId optional, - Json.String appDId optional, - Json.String appProvider optional, - Json.String appName optional, - Json.String appSoftwareVersion optional, - Json.String appDVersion optional, - AppPkgInfo_OperationalState operationalState optional, - UsageState usageState optional + type record SecurityInfo { + OAuth2Info oAuth2Info optional, + Json.UInt8 extensions optional } - } // End of group application_package_information_model - - group granting_information_model { - /** - * @desc This type represents a grant request - * @member appInstanceId Identifier of the application instance which this grant request is related to - * @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the GrantRequest - * @member appDId Identifier of the AppD that defines the application for which the LCM operation is to be granted - * @member operation The lifecycle management operation for which granting is requested - * @member addResources List of resource definitions in the AppD for resources to be added by the LCM operation which is related to this grant request, with one entry per resource - * @member tempResources List of resource definitions in the AppD for resources to be temporarily instantiated during the runtime of the LCM operation which is related to this grant request - * @member removeResources Removed by the LCM operation which is related to this grant request, with one entry per resource - * @member updateResources Provides the definitions of resources to be modified by the LCM operation which is related to this grant request, with one entry per resource - * @member additionalParams MEPM, specific to the application and the LCM operation - * @member links Links to resources related to this request - * @see ETSI GS MEC 010-2 Clause 6.2.4 Granting information model + * @desc The enumeration SerializerTypes represents types of serializers. + * @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.3-1: Enumeration SerializerType */ - type record GrantRequest { - Json.String appInstanceId, - Json.String appLcmOpOccId, - Json.String appDId, - OperationType operation, - ResourceDefinition addResources optional, - ResourceDefinition tempResources optional, - ResourceDefinition updateResources optional, - KeyValuePairs additionalParams optional, - GrantRequest_Link links - } with { - variant (links) "name as '_links'"; - } - - type record GrantRequest_Link { - LinkType appLcmOpOcc, - LinkType appInstance + type enumerated SerializerType { + JSON, + XML, + PROTOBUF3, + RAW // Used for invalid behavior } /** - * @desc This type provides information of an existing or proposed resource used by the application - * @member id Identifier of this "ResourceDefinition" structure, unique at least within the scope of the "GrantRequest" structure - * @member type_ Type of the resource definition referenced - * @member vduId Reference to the related VDU in the AppD applicable to this resource - * @member resourceTemplateId Reference to a resource template, i.e. VirtualComputeDescriptor, AppExtCpd, VirtualStorageDescriptor in the AppD - * @member resource Resource information for an existing resource - * @see ETSI GS MEC 010-2 Clause 6.2.4.3 Type: ResourceDefinition + * @desc Reference of the catalogue. */ - type record ResourceDefinition { - Json.String id, - ResourceDefinition_Type type_, - Json.String vduId optional, - Json.String resourceTemplateId, - ResourceDefinition_Resource resource - } - - type enumerated ResourceDefinition_Type { - COMPUTE, - VL, - STORAGE, - LINKPORT - } - - type record ResourceDefinition_Resource { - VimConnectionInfo vimConnectionInfo, - Json.String resourceId - } + //type Json.String CategoryRef_Href; /** - * @desc This type represents a grant - * @member id Identifier of the Grant - * @member appInstanceId Identifier of the application instance which this Grant is related to - * @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the Grant - * @member vimConnections Provides information regarding VIM connections that are approved to be used by the MEPM to allocate resources, and provides parameters of these VIM connections - * @member zones Identifies resource zones where the resources are approved to be allocated by the MEPM - * @member zoneGroups Information about groups of resource zones that are related and that the MEO has chosen to fulfil a zoneGroup constraint in the Grant request - * @member addResources List of resources that are approved to be added, with one entry per resource - * @member tempResources List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation, with one entry per resource - * @member removeResources List of resources that are approved to be removed, with one entry per resource - * @member updateResources List of resources that are approved to be modified, with one entry per resource - * @member vimAssets Information about assets for the application that are managed by the MEO in the VIM, such as software images - * @member extVirtualLinks Information about external VLs to connect the application instance to - * @member MEPM, specific to the application and the LCM operation - * @member links Links to resources related to this request - * @see ETSI GS MEC 010-2 Clause 6.2.4.4 Type: Grant + * @desc Unique identifier of the category. */ - type record Grant { - Json.String id, - Json.String appInstanceId, - Json.String appLcmOpOccId, - VimConnectionInfo vimConnections optional, - ZoneInfo zones optional, - ZoneGroupInfo zoneGroups optional, - GrantInfo addResources optional, - GrantInfo tempResources optional, - GrantInfo removeResources optional, - GrantInfo updateResources optional, - VimAssets vimAssets optional, - ExtVirtualLinkData extVirtualLinks optional, - KeyValuePairs additionalParams optional, - Grant_Link links - } with { - variant (links) "name as '_links'"; - } - - type record VimAssets { - VimSoftwareImage softwareImages optional - } - - type record Grant_Link { - LinkType appLcmOpOcc, - LinkType appInstance - } + //type Json.String CategoryRef_Id; /** - * @desc This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted - * @member resourceDefinitionId Identifier of the related "ResourceDefinition" structure from the related "GrantRequest" structure - * @member vimConnectionId Identifier of the VIM connection to be used to manage this resource - * @member zoneId Reference to the identifier of the "ZoneInfo" structure in the "Grant" structure defining the resource zone into which this resource is to be placed - * @member resourceGroupId Identifier of the "infrastructure resource group", logical grouping of virtual resources assigned to a tenant within an Infrastructure Domain, to be provided when allocating the resource - * @see ETSI GS MEC 010-2 Clause 6.2.4.5 Type: GrantInfo + * @desc Name of the category. */ - type record GrantInfo { - Json.String resourceDefinitionId, - Json.String vimConnectionId optional, - Json.String zoneId optional, - Json.String resourceGroupId optional - } + //type Json.String Name; /** - * @desc This type provides information regarding a resource zone - * @member id The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the "Grant" structure - * @member zoneId The identifier of the resource zone, as managed by the resource management layer (typically, the VIM) - * @member vimConnectionId Identifier of the connection to the VIM that manages the resource zone - * @see ETSI GS MEC 010-2 Clause 6.2.4.6 Type: ZoneInfo + * @desc Category version. */ - type record ZoneInfo { - Json.String id, - Json.String zoneId, - Json.String vimConnectionId optional - } + //type Json.String CategoryRef_Version; /** - * @desc This type provides information regarding a resource zone group - * @member zoneId References of identifiers of "ZoneInfo" structures, each of which provides information about a resource zone that belongs to this group - * @see ETSI GS MEC 010-2 Clause 6.2.4.7 Type: ZoneGroupInfo + * @desc This type represents the category reference. */ - type record ZoneGroupInfo { - ZoneIds zoneId - } - - type record length(1..infinity) of Json.String ZoneIds; + // type record CategoryRef { + // CategoryRef_Href href, + // CategoryRef_Id id, + // Name name, + // CategoryRef_Version version + // } - /** - * @desc This type represents an external VL - * @member id The identifier of the external VL instance - * @member vimConnectionId Identifier of the VIM connection to manage this resource - * @member resourceId The identifier of the resource in the scope of the VIM - * @member extCps External CPs of the application instance to be connected to this external VL - * @member extLinkPorts Externally provided link ports to be used to connect external connection points to this external VL - * @see ETSI GS MEC 010-2 Clause 6.2.4.8 Type: ExtVirtualLinkData - */ - type record ExtVirtualLinkData { - Json.String id, - Json.String vimConnectionId optional, - Json.String resourceId, - AppExtCpData extCps, - ExtLinkPortData extLinkPorts optional - } - - /** - * @desc This type represents an externally provided link port to be used to connect an external connection point to an external VL - * @member id Identifier of this link port as provided by the entity that has created the link port - * @member resourceHandleReference to the virtualised resource realizing this link port - * @see ETSI GS MEC 010-2 Clause 6.2.4.9 Type: ExtLinkPortData - */ - type record ExtLinkPortData { - Json.String id, - ResourceHandle resourceHandle - } - - /** - * @desc This type represents the information that allows addressing a virtualised resource that is used by an application instance - * @member vimConnectionId Identifier of the VIM connection to manage the resource - * @member resourceId Identifier of the resource in the scope of the VIM - * @member vimLevelResourceType Type of the resource in the scope of the VIM - * @see ETSI GS MEC 010-2 Clause 6.2.4.10 Type: ResourceHandle - */ - type record ResourceHandle { - Json.String vimConnectionId optional, - Json.String resourceId, - Json.String vimLevelResourceType optional - } - - /** - * @desc This type contains a mapping between a software image definition in the AppD and the corresponding software image managed by the MEO in the VIM which is needed during compute resource instantiation - * @member vimConnectionId Identifier of the VIM connection to access the software image referenced in this structure - * @member appDSoftwareImageId Identifier which references the software image descriptor in the AppD - * @member vimSoftwareImageId Identifier of the software image in the resource management layer (i.e. VIM) - * @see ETSI GS MEC 010-2 Clause 6.2.4.11 Type: VimSoftwareImage - */ - type record VimSoftwareImage { - Json.String vimConnectionId optional, - Json.String appDSoftwareImageId, - Json.String vimSoftwareImageId - } - - /** - * @desc This type represents configuration information for external CPs created from a CPD - * @member cpdId The identifier of the CPD in the AppD - * @member cpConfig List of instance data that need to be configured on the CP instances created from the respective CPD - * @see ETSI GS MEC 010-2 Clause 6.2.4.12 Type: AppExtCpData - */ - type record AppExtCpData_ { - Json.String cpdId, - AppExtCpConfig cpConfig - } - - type record length(1..infinity) of AppExtCpData_ AppExtCpData; - - /** - * @desc This type represents an externally provided link port or network address information per instance of an external connection point - * @member cpInstanceId Identifier of the external CP instance to which this set of configuration parameters is requested to be applied - * @member linkPortId Identifier of a pre-configured link port to which the external CP will be associated - * @member cpProtocolData Parameters for configuring the network protocols on the link port that connects the CP to a VL - * @see ETSI GS MEC 010-2 Clause 6.2.4.13 Type: AppExtCpConfig - */ - type record AppExtCpConfig_ { - Json.String cpInstanceId optional, - Json.String linkPortId optional, - CpProtocolData cpProtocolData optional - } - - type record length(1..infinity) of AppExtCpConfig_ AppExtCpConfig; - - /** - * @desc This type represents network protocol data - * @member layerProtocol Identifier of layer(s) and protocol(s) - * @member ipOverEthernet Network address data for IP over Ethernet to assign to the extCP instance - * @see ETSI GS MEC 010-2 Clause 6.2.4.14 Type: CpProtocolData - */ - type record CpProtocolData_ { - LayerProtocol layerProtocol, - IpOverEthernetAddressData ipOverEthernet optional - } - - type record length(1..infinity) of CpProtocolData_ CpProtocolData; - - type enumerated LayerProtocol { - IP_OVER_ETHERNET - } - - /** - * @desc This type represents network address data for IP over Ethernet - * @member macAddress MAC address - * @member ipAddresses List of IP addresses to assign to the CP instance - * @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData - */ - type record IpOverEthernetAddressData { - Json.String macAddress optional, - IpAddresses ipAddresses optional - } - - /** - * @desc IP addresses to assign to the CP instance - * @member type_ The type of the IP addresses - * @member fixedAddresses Fixed addresses to assign (from the subnet defined by "subnetId" if provided) - * @member numDynamicAddresses Number of dynamic addresses to assign (from the subnet defined by "subnetId" if provided) - * @member addressRange An IP address range to be used, e.g. in case of egress connections - * @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData - */ - type record IpAddress { - IpAddressType type_, - FixedAddresses fixedAddresses optional, - integer numDynamicAddresses optional, - AddressRange addressRange optional - } - - type record length(1..infinity) of IpAddress IpAddresses; - - type enumerated IpAddressType { - IPV4, - IPV6 - } - - type record length(1..infinity) of Json.String FixedAddresses; - - type record AddressRange { - Json.String minAddress, - Json.String maxAddress, - Json.String subnetId optional - } - - } // End of group granting_information_model - - group common_information_model { - - /** - * @desc This data type represents a type of link - * @member href URI referring to a resource - * @see ETSI GS MEC 010-2 Clause 6.2.5.2 Type: LinkType - */ - type record LinkType { - Json.AnyURI href - } - /** - * @desc This data type represents a list of key-value pairs - * @member - * @member - * @see ETSI GS MEC 010-2 Clause 6.2.5.3 Type: KeyValuePairs - */ - type record KeyValuePairs { - Json.String key_name, - anytype key_value // FIXME To be refined - } - - /** - * @desc This data type represents the time stamp as Unix-time since January 1, 1970, 00:00:00 UTC - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 010-2 Clause 6.2.5.4 Type: TimeStamp - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 NanoSeconds; - - /** - * @desc This type represents the checksum of an application package - * @member algorithm Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004 [18] - * @member hash The hexadecimal value of the checksum - * @see ETSI GS MEC 010-2 Clause 6.2.5.6 Type: Checksum - */ - type record Checksum { - Json.String algorithm, - Json.String hash - } + type Json.String NotificationType; - } // End of group common_information_model + } // End of group edge_platform_application_enablement } with { extension "anytype integer, float, boolean, universal charstring"; diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/json/UEAppInterfaceApi.json b/ttcn/LibMec/DeviceApplicationInterfaceAPI/json/UEAppInterfaceApi.json deleted file mode 100644 index 6075bbc3f94a82edc215c1c265a5c1fecd279b32..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/json/UEAppInterfaceApi.json +++ /dev/null @@ -1,1051 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs016-dev-app-api" - }, - "title": "ETSI GS MEC 016 Device application interface", - "version": "2.2.1", - "description": "The ETSI MEC ISG Device application interface API described using OpenAPI.", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI GS MEC016 V2.2.1 Device application interface", - "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/02.02.01_60/gs_MEC016v020201p.pdf" - }, - "servers": [ - { - "url": "https://localhost/dev_app/v1" - } - ], - "tags": [ - { - "name": "dev_app" - } - ], - "paths": { - "/app_list": { - "get": { - "tags": [ - "dev_app" - ], - "summary": "Get available application information.", - "description": "Used to query information about the available MEC applications.", - "operationId": "meAppListGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.appName" - }, - { - "$ref": "#/components/parameters/Query.appProvider" - }, - { - "$ref": "#/components/parameters/Query.appSoftVersion" - }, - { - "$ref": "#/components/parameters/Query.vendorId" - }, - { - "$ref": "#/components/parameters/Query.serviceCont" - } - ], - "responses": { - "200": { - "description": "The response body contains an array of the user applications available to the querying device application.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationList" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/app_contexts": { - "post": { - "tags": [ - "dev_app" - ], - "summary": "Creation of a new application context.", - "description": "Used to create a new application context. Upon success, the response contains entity body describing the created application context.", - "operationId": "devAppContextsGET", - "requestBody": { - "description": "Entity body in the request contains the Application Context as requested by the device application.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - } - }, - "parameters": [], - "responses": { - "201": { - "description": "The response body contains the Application Context as it was created by the MEC system, which includes the reference URI(s) of the associated user application instance(s). The URI of the resource created within the MEC system associated with the request, with its specific application context ID, shall be included in the 'Location' HTTP header of the response.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "callbacks": { - "notification": { - "{$request.body#/appContext.callbackReference}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification with content based on subscription type", - "operationId": "notificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineNotification" - }, - "example": { - "notificationType": "ApplicationContextDeleteNotification", - "contextId": "contextId123" - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - } - } - }, - "/app_contexts/{contextId}": { - "put": { - "tags": [ - "dev_app" - ], - "summary": "Updating the callbackReference and/or appLocation of an existing application context.", - "description": "Used to update the callback reference and/or application location constraints of an existing application context. Upon successful operation, the target resource is updated with the new application context information.", - "operationId": "devAppContextPUT", - "requestBody": { - "description": "Only the callbackReference and/or appLocation attribute values are allowed to be updated. Other attributes and their values shall remain untouched.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.contextId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "delete": { - "tags": [ - "dev_app" - ], - "summary": "Deletion of an existing application context.", - "description": "Used to delete the resource that represents the existing application context.", - "operationId": "devAppContextDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.contextId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/obtain_app_loc_availability": { - "post": { - "tags": [ - "dev_app" - ], - "summary": "Obtain the location constraints for a new application context.", - "description": "Used to obtain the locations available for instantiation of a specific user application in the MEC system.", - "operationId": "appLocationAvailabilityPOST", - "requestBody": { - "description": "Entity body in the request contains the user application information for the MEC system to evaluate the locations available for instantiation of that application.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationLocationAvailability" - } - } - } - }, - "parameters": [], - "responses": { - "200": { - "description": "The response body contains the locations available for instantiation of the requested user application in the MEC system.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationLocationAvailability" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - } - }, - "components": { - "responses": { - "204": { - "description": "Upon success, a response 204 No Content without any response body is returned." - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized : used when the client did not submit credentials.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Query.appName": { - "name": "appName", - "in": "query", - "description": "Name to identify the MEC application.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "maxLength": 32 - } - } - }, - "Query.appProvider": { - "name": "appProvider", - "in": "query", - "description": "Provider of the MEC application.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "maxLength": 32 - } - } - }, - "Query.appSoftVersion": { - "name": "appSoftVersion", - "in": "query", - "description": "Software version of the MEC application.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "maxLength": 32 - } - } - }, - "Query.vendorId": { - "name": "vendorId", - "in": "query", - "description": "Vendor identifier", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "maxLength": 32 - } - } - }, - "Query.serviceCont": { - "name": "serviceCont", - "in": "query", - "description": "Required service continuity mode for this application. Permitted values: 0 = SERVICE_CONTINUITY_NOT_REQUIRED. 1 = SERVICE_CONTINUITY_REQUIRED.", - "required": false, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, - "Path.contextId": { - "name": "contextId", - "in": "path", - "description": "Uniquely identifies the application context in the MEC system. It is assigned by the MEC system.", - "required": true, - "schema": { - "type": "string" - } - } - }, - "schemas": { - "AddressChangeNotification": { - "properties": { - "appInstanceId": { - "description": "Identifier of the user application instance.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "contextId": { - "description": "Uniquely identifies the application context in the MEC system.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "notificationType": { - "description": "Shall be set to \"AddressChangeNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "referenceURI": { - "description": "Address of the user application. Used as the reference URI for the application. Assigned by the MEC system.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "URI" - } - }, - "required": [ - "notificationType", - "contextId", - "appInstanceId", - "referenceURI" - ], - "type": "object", - "x-etsi-ref": "6.4.2" - }, - "AppContext": { - "properties": { - "appAutoInstantiation": { - "description": "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.", - "type": "boolean", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Boolean" - }, - "appInfo": { - "description": "", - "properties": { - "appDId": { - "description": "Identifier of this MEC application descriptor. This attribute shall be globally unique. It is equivalent to the appDId defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1]. It shall be present if the application is one in the ApplicationList.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appDVersion": { - "description": "Identifies the version of the application descriptor. It is equivalent to the appDVersion defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appDescription": { - "description": "Human readable description of the MEC application. The length of the value shall not exceed 128 characters.", - "type": "string", - "maxLength": 128, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appName": { - "description": "Name of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appProvider": { - "description": "Provider of the MEC application.\nThe length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appSoftVersion": { - "description": "Software version of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appPackageSource": { - "description": "URI of the application package.\nIncluded in the request if the application is not one in the ApplicationList. appPackageSource enables on-boarding of the application package into the MEC system. The application package shall comply with the definitions in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "userAppInstanceInfo": { - "description": "List of user application instance information.", - "items": { - "type": "object", - "properties": { - "appInstanceId": { - "description": "Identifier of the user application instance. It shall only be included in the response.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appLocation": { - "$ref": "#/components/schemas/LocationConstraints" - }, - "referenceURI": { - "description": "Address of the user application instance. It shall only be included in the response.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - } - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "array (Structure inlined)" - } - }, - "required": [ - "appName", - "appProvider", - "appDVersion", - "userAppInstanceInfo" - ], - "type": "object", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "appLocationUpdates": { - "description": "Used by the device application to request to receive notifications at the callbackReference URI relating to location availability for user application instantiation.", - "type": "boolean", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Boolean" - }, - "associateDevAppId": { - "description": "Uniquely identifies the device application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "callbackReference": { - "description": "URI assigned by the device application to receive application lifecycle related notifications. Inclusion in the request implies the client supports the pub/sub mechanism and is capable of receiving notifications. This endpoint shall be maintained for the lifetime of the application context.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "contextId": { - "description": "Uniquely identifies the application context in the MEC system. Assigned by the MEC system and shall be present other than in a create request. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "associateDevAppId", - "appInfo" - ], - "type": "object", - "x-etsi-notes": "NOTE 1:\tIf a value of the attribute is included in the request, the same value shall be included in the response.\nNOTE 2:\tThe design of the current operation with callback reference assumes no web proxy between the entity that originates the notification and the entity that receives it.\nNOTE 3:\tThe language support for the application description may be limited.\nNOTE 4:\tAttribute appLocationUpdates and appAutoInstantiation shall not both be set to TRUE.", - "x-etsi-ref": "6.2.3" - }, - "ApplicationContextDeleteNotification": { - "properties": { - "contextId": { - "description": "Uniquely identifies the application context that has been deleted from the MEC system.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "notificationType": { - "description": "Shall be set to \"ApplicationContextDeleteNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "notificationType", - "contextId" - ], - "type": "object", - "x-etsi-ref": "6.4.3" - }, - "ApplicationContextUpdateNotification": { - "properties": { - "contextId": { - "description": "Uniquely identifies the application context in the MEC system.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "notificationType": { - "description": "Shall be set to \"ApplicationContextUpdateNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "userAppInstanceInfo": { - "description": "List of user application instance information.", - "items": { - "type": "object", - "properties": { - "appInstanceId": { - "description": "Identifier of the user application instance.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appLocation": { - "$ref": "#/components/schemas/LocationConstraints" - }, - "referenceURI": { - "description": "Address of the user application instance.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "URI" - } - } - }, - "minItems": 1, - "required": [ - "appInstanceId", - "referenceURI" - ], - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "array (Structure inlined)" - } - }, - "type": "object", - "required": [ - "notificationType", - "contextId", - "userAppInstanceInfo" - ], - "x-etsi-ref": "6.4.4" - }, - "ApplicationList": { - "properties": { - "appList": { - "description": "List of user applications available to the device application. As defined below.", - "items": { - "type": "object", - "properties": { - "appInfo": { - "description": "", - "properties": { - "appCharcs": { - "description": "Characteristics of the application. As defined below. The application characteristics relate to the system resources consumed by the application. A device application can use this information e.g. for estimating the cost of use of the application or for the expected user experience.", - "properties": { - "bandwidth": { - "description": "The required connection bandwidth in kbit/s for the use of the MEC application instance. ", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "uint32" - }, - "latency": { - "description": "The target round trip time in milliseconds supported by the MEC system for the MEC application instance.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "uint32" - }, - "memory": { - "description": "The maximum size in Mbytes of the memory resource expected to be used by the MEC application instance in the MEC system.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "uint32" - }, - "serviceCont": { - "description": "Required service continuity mode for this application. Permitted values: 0 = SERVICE_CONTINUITY_NOT_REQUIRED. 1 = SERVICE_CONTINUITY_REQUIRED.", - "enum": [ - 0, - 1 - ], - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Enum" - }, - "storage": { - "description": "The maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "uint32" - } - }, - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "appDId": { - "description": "Identifier of this MEC application descriptor. It is equivalent to the appDId defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1]. This attribute shall be globally unique.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appDVersion": { - "description": "Identifies the version of the application descriptor. It is equivalent to the appDVersion defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appDescription": { - "description": "Human readable description of the MEC application (see note 2).", - "type": "string", - "maxLength": 128, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appLocation": { - "description": "Identifies the locations of the MEC application.", - "items": { - "$ref": "#/components/schemas/LocationConstraints" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "LocationConstraints" - }, - "appName": { - "description": "Name of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appProvider": { - "description": "Provider of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appSoftVersion": { - "description": "Software version of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "appDId", - "appName", - "appProvider", - "appSoftVersion", - "appDVersion", - "appDescription" - ], - "type": "object", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "vendorSpecificExt": { - "description": "Extension for vendor specific information (see note 1).", - "properties": { - "vendorId": { - "description": "Vendor identifier. The length of the value shall not exceed 32 characters. The rest of the structure of vendor specific extension is not defined.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "vendorId" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - } - }, - "minItems": 0, - "required": [ - "appInfo" - ], - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Array (Structure (inlined))" - } - }, - "type": "object", - "x-etsi-notes": "NOTE 1:\tThe vendor specific extension allows submitting information on the application lists that have been made available to the device application of the corresponding vendor.\nNOTE 2:\tThe language support may be limited. The length of the value shall not exceed 128 characters.", - "x-etsi-ref": "6.2.2" - }, - "ApplicationLocationAvailability": { - "properties": { - "appInfo": { - "description": "", - "properties": { - "appDVersion": { - "description": "Identifies the version of the application descriptor. It is equivalent to the appDVersion defined in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appDescription": { - "description": "Human readable description of the MEC application. The length of the value shall not exceed 128 characters.", - "type": "string", - "maxLength": 128, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appName": { - "description": "Name of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appPackageSource": { - "description": "URI of the application package. Shall be included in the request. The application package shall comply with the definitions in clause 6.2.1.2 of ETSI GS MEC 0102 [1].", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "appProvider": { - "description": "Provider of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appSoftVersion": { - "description": "Software version of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "availableLocations": { - "description": "MEC application location constraints. ", - "items": { - "type": "object", - "properties": { - "appLocation": { - "$ref": "#/components/schemas/LocationConstraints" - } - } - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "array (Structure (inline))" - } - }, - "required": [ - "appName", - "appProvider", - "appDVersion" - ], - "type": "object", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "associateDevAppId": { - "description": "Uniquely identifies the device application. The length of the value shall not exceed 32 characters.", - "type": "string", - "maxLength": 32, - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "associateDevAppId", - "appInfo" - ], - "type": "object", - "x-etsi-ref": "6.2.4" - }, - "ApplicationLocationAvailabilityNotification": { - "properties": { - "availableLocations": { - "description": "Locations available to the MEC application.", - "items": { - "type": "object", - "properties": { - "appLocation": { - "$ref": "#/components/schemas/LocationConstraints" - } - } - }, - "minItems": 1, - "required": [ - "appLocation" - ], - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "array (Structure (inline))" - }, - "contextId": { - "description": "Uniquely identifies the application context in the MEC system.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "notificationType": { - "description": "Shall be set to \"ApplicationLocationAvailabilityNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "type": "object", - "required": [ - "notificationType", - "availableLocations" - ], - "x-etsi-ref": "6.4.5" - }, - "InlineNotification": { - "oneOf": [ - { - "$ref": "#/components/schemas/AddressChangeNotification" - }, - { - "$ref": "#/components/schemas/ApplicationContextDeleteNotification" - }, - { - "$ref": "#/components/schemas/ApplicationContextUpdateNotification" - }, - { - "$ref": "#/components/schemas/ApplicationLocationAvailabilityNotification" - } - ], - "discriminator": { - "propertyName": "notificationType" - } - }, - "LocationConstraints": { - "properties": { - "area": { - "$ref": "#/components/schemas/Polygon" - }, - "civicAddressElement": { - "description": "Zero or more elements comprising the civic address. Shall be absent if the \"area\" attribute is present.", - "items": { - "type": "object", - "properties": { - "caType": { - "description": "Describe the content type of caValue. The value of caType shall comply with section 3.4 of IETF RFC 4776 [6]. ", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "caValue": { - "description": "Content of civic address element corresponding to the caType. The format caValue shall comply with section 3.4 of IETF RFC 4776 [6].", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - } - }, - "minItems": 0, - "required": [ - "caType", - "caValue" - ], - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "array (Structure inlined)" - }, - "countryCode": { - "description": "The two-letter ISO 3166 [7] country code in capital letters. Shall be present in case the \"area\" attribute is absent. May be absent if the \"area\" attribute is present (see note).", - "type": "string", - "maxLength": 2, - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - } - }, - "type": "object", - "x-etsi-notes": "NOTE:\tIf both \"countryCode\" and \"area\" are present, no conflicts should exist between the values of these two attributes. In case of conflicts, the API producer (e.g. MEO, MEAO) shall disregard parts of the geographic area signalled by \"area\" that are outside the boundaries of the country signalled by \"countryCode\". If \"countryCode\" is absent, it is solely the \"area\" attribute that defines the location constraint.", - "x-etsi-ref": "6.5.2" - }, - "Polygon": { - "properties": { - "coordinates": { - "items": { - "items": { - "items": { - "type": "number", - "format": "float" - }, - "type": "array" - }, - "type": "array" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "array" - } - }, - "type": "object" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - } - } - } -} diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn index 07bb4c7c169fd4ff19a5e5fc155cf1adce73005b..791a797e15f2838d2711d3c6ab5492a31902e875 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / TTF T012 + * @author ETSI / TTF T012 / TTF T027 * @version $Url$ * $Id$ * @desc Types ANd Values for ETSI GS MEC 016 V2.2.1 (2020-04) @@ -10,88 +10,29 @@ */ module DeviceApplicationInterfaceAPI_TypesAndValues { - // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - /** - * @desc Required service continuity mode for this application. - */ - type enumerated ServiceCount { - SERVICE_CONTINUITY_NOT_REQUIRED (0), - SERVICE_CONTINUITY_REQUIRED (1) - } with { - variant "JSON: as number" - } - - /** - * @desc Characteristics of the application - * @member memory The maximum size in Mbytes of the memory resource expected to be used by the MEC application instance in the MEC system - * @member storageThe maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system - * @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 Clause 6.2.2 Type: ApplicationList - */ - type record AppCharcs { - UInt32 memory optional, - UInt32 storage optional, - UInt32 latency optional, - UInt32 bandwidth optional, - ServiceCount serviceCont optional - } - - /** - * @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 + * @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 */ - type record CivicAddressElement { - Json.Integer caType, - Json.String caValue - } - - type record Geometry { - Json.String type_, - Coordinates coordinates - } with { - variant (type_) "name as 'type'"; - } - type record of Json.Number Coordinate; - type record of Coordinate Coordinates; - type record Property { - Json.String key, - Json.String value_ - } with { - variant (value_) "name as 'value'"; - } - type record of Property Properties; - type record Polygon { - Json.String type_, - Geometry geometry, - Properties properties, - Json.String this_ - } with { - variant (type_) "name as 'type'"; - variant (this_) "name as 'this'"; + type record ApplicationList { + AppList appList optional } /** - * @desc Identifies the locations of the MEC application - * @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 Clause 6.5.2 Type: LocationConstraints + * @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 */ - type record LocationConstraints { - Json.String countryCode optional, - CivicAddressElement civicAddressElement optional, - Polygon area optional + type record AppListItem { + ApplicationList_AppInfo appInfo, + VendorSpecificExt vendorSpecificExt optional } - type record of LocationConstraints LocationConstraintsList; + type record of AppListItem AppList; /** * @desc Information on available applications @@ -103,61 +44,74 @@ 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 Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ type record ApplicationList_AppInfo { - Json.String appDId, - Json.String appName, - Json.String appProvider, - Json.String appSoftVersion optional, - Json.String appDVersion, - Json.String appDescription optional, + Json.String appDId, + Json.String appName, + Json.String appProvider, + Json.String appSoftVersion, + Json.String appDVersion, + Json.String appDescription, LocationConstraintsList appLocation optional, - AppCharcs appCharcs optional + AppCharcs appCharcs optional } /** * @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 */ type record VendorSpecificExt { Json.String vendorId } /** - * @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 Clause 6.2.2 Type: ApplicationList + * @desc Characteristics of the application + * @member memory The maximum size in Mbytes of the memory resource expected to be used by the MEC application instance in the MEC system + * @member storageThe maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system + * @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 */ - type record AppListItem { - ApplicationList_AppInfo appInfo, - VendorSpecificExt vendorSpecificExt optional + type record AppCharcs { + Json.UInteger memory optional, + Json.UInteger storage optional, + Json.UInteger latency optional, + Json.UInteger bandwidth optional, + ServiceCount serviceCont optional } - type record of AppListItem AppList; /** - * @desc Information on available applications - * @member appList List of user applications available to the device application - * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList + * @desc Required service continuity mode for this application + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList */ - type record ApplicationList { - AppList appList optional + type enumerated ServiceCount { + SERVICE_CONTINUITY_NOT_REQUIRED (0), + SERVICE_CONTINUITY_REQUIRED (1) + } with { + variant "JSON: as number" } /** - * @desc user application instance information - * @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 Clause 6.2.3 Type: AppContext + * @desc Information on application context created by the MEC system + * @member contextId Uniquely identifies the application context in the MEC system + * @member associateDevAppId Uniquely identifies the device application + * @member callbackReference Assigned by the device application to receive application lifecycle related notifications + * @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 */ - type record UserAppInstanceInfo { - Json.String appInstanceId optional, - Json.AnyURI referenceURI optional, - LocationConstraints appLocation optional + type record AppContext { + Json.String contextId optional, + Json.String associateDevAppId, + Json.AnyURI callbackReference optional, + boolean appLocationUpdates optional, + boolean appAutoInstantiation optional, + ApplicationContext_AppInfo appInfo } - type record of UserAppInstanceInfo UserAppInstanceInfoList; /** * @desc Information on available applications @@ -169,48 +123,44 @@ 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 Clause 6.2.3 Type: AppContext + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext */ type record ApplicationContext_AppInfo { - Json.String appDId, - Json.String appName, - Json.String appProvider, - Json.String appSoftVersion optional, - Json.String appDVersion, - Json.String appDescription optional, + Json.String appDId, + Json.String appName, + Json.String appProvider, + Json.String appSoftVersion optional, + Json.String appDVersion, + Json.String appDescription optional, UserAppInstanceInfoList userAppInstanceInfo optional, - Json.AnyURI appPackageSource optional + Json.AnyURI appPackageSource optional } /** - * @desc Information on application context created by the MEC system - * @member contextId Uniquely identifies the application context in the MEC system - * @member associateDevAppId Uniquely identifies the device application - * @member callbackReference Assigned by the device application to receive application lifecycle related notifications - * @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 Clause 6.2.3 Type: AppContext + * @desc user application instance information + * @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 */ - type record AppContext { - Json.String contextId optional, - Json.String associateDevAppId, - Json.AnyURI callbackReference optional, - boolean appLocationUpdates optional, - boolean appAutoInstantiation optional, - ApplicationContext_AppInfo appInfo + type record UserAppInstanceInfo { + Json.String appInstanceId optional, + Json.AnyURI referenceURI optional, + LocationConstraints appLocation optional } + type record of UserAppInstanceInfo UserAppInstanceInfoList; /** - * @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 Clause 6.2.4 Type: ApplicationLocationAvailability + * @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 */ - type record AvailableLocations { - LocationConstraints appLocation optional + type record ApplicationLocationAvailability { + Json.String associateDevAppId, + ApplicationLocationAvailability_AppInfo appInfo } - type record of AvailableLocations AvailableLocationsList; + /** * @desc * @member appDId Identifier of this MEC application descriptor @@ -221,29 +171,28 @@ 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 - * @see ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability + * @seeETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability */ type record ApplicationLocationAvailability_AppInfo { - Json.String appDId, - Json.String appName, - Json.String appProvider, - Json.String appSoftVersion optional, - Json.String appDVersion, - Json.String appDescription optional, + Json.String appDId, + Json.String appName, + Json.String appProvider, + Json.String appSoftVersion optional, + Json.String appDVersion, + Json.String appDescription optional, AvailableLocationsList availableLocations optional, - Json.AnyURI appPackageSource optional + Json.AnyURI appPackageSource optional } /** - * @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 Clause 6.2.4 Type: ApplicationLocationAvailability + * @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 */ - type record ApplicationLocationAvailability { - Json.String associateDevAppId, - ApplicationLocationAvailability_AppInfo appInfo + type record AvailableLocations { + LocationConstraints appLocation optional } + type record of AvailableLocations AvailableLocationsList; /** * @desc Notification from the UALCMP regarding a change in address of a user application instance @@ -251,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 Clause 6.4.2 Type: AddressChangeNotification + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.2 Type: AddressChangeNotification */ type record AddressChangeNotification { Json.String notificationType, @@ -262,9 +211,9 @@ 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 "AddressChangeNotification" + * @member notificationType Shall be set to "ApplicationContextDeleteNotification" * @member contextId Uniquely identifies the application context in the MEC system - * @see ETSI GS MEC 016 Clause 6.4.3 Type: ApplicationContextDeleteNotification + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.3 Type: ApplicationContextDeleteNotification */ type record ApplicationContextDeleteNotification { Json.String notificationType, @@ -273,30 +222,94 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc Notification from the UALCMP regarding an update to an application change by the MEC system - * @member notificationType Shall be set to "AddressChangeNotification" + * @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 Clause 6.4.4 Type: ApplicationContextDeleteNotification + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.4 Type: ApplicationContextUpdateNotification */ type record ApplicationContextUpdateNotification { - Json.String notificationType, - Json.String contextId, + Json.String notificationType, + Json.String contextId, UserAppInstanceInfoList userAppInstanceInfo } /** * @desc Notification from the UALCMP regarding the availability of a location that was requested in the Application context create that could not be fulfilled at the time of the request - * @member notificationType Shall be set to "AddressChangeNotification" + * @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 Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification */ type record ApplicationLocationAvailabilityNotification { - Json.String notificationType, - Json.String contextId, + Json.String notificationType, + Json.String contextId, AvailableLocationsList availableLocations } + /** + * @desc Identifies the locations of the MEC application + * @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 + */ + type record LocationConstraints { + Json.String countryCode optional, + CivicAddressElement civicAddressElement optional, + Polygon area optional + } + type record of LocationConstraints LocationConstraintsList; + + /** + * @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 + */ + type record CivicAddressElement { + Json.Integer caType, + Json.String caValue + } + + /** + * @desc + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record Polygon { + Json.String type_, + Geometry geometry, + Properties properties, + Json.String this_ + } with { + variant (type_) "name as 'type'"; + variant (this_) "name as 'this'"; + } + + /** + * @desc + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record Geometry { + Json.String type_, + Coordinates coordinates + } with { + variant (type_) "name as 'type'"; + } + type record of Json.Number Coordinate; + type record of Coordinate Coordinates; + + /** + * @desc + * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + */ + type record Property { + Json.String key, + Json.String value_ + } with { + variant (value_) "name as 'value'"; + } + type record of Property Properties; + } with { encode "JSON" } // End of module DeviceApplicationInterfaceAPI_TypesAndValues diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/json/EdgePlatformApplicationEnablementAPI.json b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/json/EdgePlatformApplicationEnablementAPI.json deleted file mode 100644 index e6a39042a6583aaba17e7fc7fc5b1a9c500b8032..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/json/EdgePlatformApplicationEnablementAPI.json +++ /dev/null @@ -1,2529 +0,0 @@ -{ - "openapi": "3.0.2", - "servers": [ - { - "url": "http://127.0.0.1:8081/mp1/v1" - }, - { - "url": "https://127.0.0.1:8081/mp1/v1" - } - ], - "info": { - "title": "Mp1 API", - "version": "1.1.1", - "description": "The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI", - "license": { - "name": "ETSI Forge copyright notice", - "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" - }, - "contact": { - "email": "cti_support@etsi.org" - } - }, - "externalDocs": { - "description": "ETSI GS MEC011 Application Enablement API, V1.1.1", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf" - }, - "tags": [ - { - "name": "trafficRules" - }, - { - "name": "dnsRules" - }, - { - "name": "subscriptions" - }, - { - "name": "services" - }, - { - "name": "timing" - }, - { - "name": "transports" - }, - { - "name": "callbacks" - } - ], - "paths": { - "/applications/{appInstanceId}/dns_rules": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "This method retrieves information about all the DNS rules associated with a mobile edge application instance.", - "operationId": "ApplicationsDnsRules_GET", - "tags": [ - "trafficRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsDnsRules.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/applications/{appInstanceId}/dns_rules/{dnsRuleId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - }, - { - "$ref": "#/components/parameters/Path.DnsRuleId" - } - ], - "get": { - "description": "This method retrieves information about a DNS rule associated with a mobile edge application instance.", - "operationId": "ApplicationsDnsRule_GET", - "tags": [ - "dnsRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsDnsRule.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "This method activates, de-activates or updates a traffic rule.", - "operationId": "ApplicationsDnsRule_PUT", - "tags": [ - "dnsRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsDnsRule.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ApplicationsDnsRule" - } - } - }, - "/applications/{appInstanceId}/subscriptions": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor.", - "operationId": "ApplicationsSubscriptions_GET", - "tags": [ - "subscriptions" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsSubscriptions.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "post": { - "description": "The POST method may be used to create a new subscription. One example use case is to create a new subscription to the mobile edge service availability notifications. Upon success, the response contains entity body describing the created subscription.", - "operationId": "ApplicationsSubscriptions_POST", - "tags": [ - "subscriptions" - ], - "responses": { - "201": { - "$ref": "#/components/responses/ApplicationsSubscriptions.201" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ApplicationsSubscriptions" - }, - "callbacks": { - "appTerminationNotification": { - "$ref": "#/components/callbacks/AppTerminationNotification" - }, - "serviceAvailabilityNotification": { - "$ref": "#/components/callbacks/ServiceAvailabilityNotification" - } - } - } - }, - "/applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - }, - { - "$ref": "#/components/parameters/Path.SubscriptionType" - }, - { - "$ref": "#/components/parameters/Path.SubscriptionId" - } - ], - "get": { - "description": "The GET method requests information about a subscription for this requestor. Upon success, the response contains entity body with the subscription for the requestor.", - "operationId": "ApplicationsSubscription_GET", - "tags": [ - "subscriptions" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsSubscription.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "delete": { - "description": "This method deletes a meMp1Subscription. This method is typically used in \"Unsubscribing from service availability event notifications\" procedure.", - "operationId": "ApplicationsSubscription_DELETE", - "tags": [ - "subscriptions" - ], - "responses": { - "204": { - "description": "No Content" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/applications/{appInstanceId}/traffic_rules": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.", - "operationId": "ApplicationsTrafficRules_GET", - "tags": [ - "trafficRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsTrafficRules.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/applications/{appInstanceId}/traffic_rules/{trafficRuleId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - }, - { - "$ref": "#/components/parameters/Path.TrafficRuleId" - } - ], - "get": { - "description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.", - "operationId": "ApplicationsTrafficRule_GET", - "tags": [ - "trafficRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsTrafficRule.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "This method retrieves information about all the traffic rules associated with a mobile edge application instance.", - "operationId": "ApplicationsTrafficRule_PUT", - "tags": [ - "trafficRules" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ApplicationsTrafficRule.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ApplicationsTrafficRule" - } - } - }, - "/services": { - "get": { - "description": "This method retrieves information about a list of meService resources. This method is typically used in \"service availability query\" procedure", - "operationId": "Services_GET", - "tags": [ - "services" - ], - "parameters": [ - { - "$ref": "#/components/parameters/Query.Ser_instance_id" - }, - { - "$ref": "#/components/parameters/Query.Ser_name" - }, - { - "$ref": "#/components/parameters/Query.Ser_category_id" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/Services.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "post": { - "description": "This method is used to create a meService resource. This method is typically used in \"service availability update and new service registration\" procedure", - "operationId": "Services_POST", - "tags": [ - "services" - ], - "responses": { - "201": { - "$ref": "#/components/responses/Services.201" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/Services.Post" - } - } - }, - "/services/{serviceId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.ServiceId" - } - ], - "get": { - "description": "This method retrieves information about a meService resource. This method is typically used in \"service availability query\" procedure", - "operationId": "ServicesServiceId_GET", - "tags": [ - "services" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ServicesServiceId.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "This method updates the information about a meService resource", - "operationId": "ServicesServiceId_PUT", - "tags": [ - "services" - ], - "responses": { - "200": { - "$ref": "#/components/responses/ServicesServiceId.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/ServicesServiceId" - } - } - }, - "/timing/current_time": { - "get": { - "description": "This method retrieves the information of the platform's current time which corresponds to the get platform time procedure", - "operationId": "TimingCurrentTime_GET", - "tags": [ - "timing" - ], - "responses": { - "200": { - "$ref": "#/components/responses/TimingCurrentTime.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/timing/timing_caps": { - "get": { - "description": "This method retrieves the information of the platform's timing capabilities which corresponds to the timing capabilities query", - "operationId": "TimingCaps_GET", - "tags": [ - "timing" - ], - "responses": { - "200": { - "$ref": "#/components/responses/TimingCaps.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/transports": { - "get": { - "description": "This method retrieves information about a list of available transports. This method is typically used by a service-producing application to discover transports provided by the mobile edge platform in the \"transport information query\" procedure", - "operationId": "Transports_GET", - "tags": [ - "transports" - ], - "responses": { - "200": { - "$ref": "#/components/responses/Transports.200" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - } - }, - "components": { - "schemas": { - "Empty": { - "description": "Empty schema" - }, - "AppTerminationNotification.MaxGracefulTimeout": { - "description": "Maximum timeout value in seconds for graceful termination or graceful stop of an application instance.", - "type": "integer", - "format": "uint32", - "example": 10 - }, - "AppTerminationNotification.NotificationType": { - "description": "Shall be set to AppTerminationNotification.", - "type": "string", - "example": "AppTerminationNotification" - }, - "AppTerminationNotification": { - "description": "This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop.", - "type": "object", - "required": [ - "notificationType", - "maxGracefulTimeout", - "_links" - ], - "properties": { - "notificationType": { - "$ref": "#/components/schemas/AppTerminationNotification.NotificationType" - }, - "maxGracefulTimeout": { - "$ref": "#/components/schemas/AppTerminationNotification.MaxGracefulTimeout" - }, - "_links": { - "$ref": "#/components/schemas/Subscription" - } - } - }, - "AppTerminationNotificationSubscription.AppInstanceId": { - "description": "It is used as the filtering criterion for the subscribed events.", - "type": "string", - "example": "ID1" - }, - "AppTerminationNotificationSubscription.CallbackReference": { - "description": "URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge application instance management information. This shall be included in both the request and the response.", - "type": "string", - "format": "uri" - }, - "AppTerminationNotificationSubscription": { - "description": "This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop.", - "type": "object", - "required": [ - "subscriptionType", - "callbackReference", - "_links", - "appInstanceId" - ], - "properties": { - "subscriptionType": { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription.SubscriptionType" - }, - "callbackReference": { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription.CallbackReference" - }, - "_links": { - "$ref": "#/components/schemas/Self" - }, - "appInstanceId": { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription.AppInstanceId" - } - } - }, - "AppTerminationNotificationSubscription.SubscriptionType": { - "description": "Shall be set to AppTerminationNotificationSubscription.", - "type": "string", - "example": "AppTerminationNotificationSubscription" - }, - "CategoryRef.Href": { - "description": "Reference of the catalogue", - "type": "string", - "example": "catItem1" - }, - "CategoryRef.Id": { - "description": "Unique identifier of the category", - "type": "string", - "example": "id12345" - }, - "CategoryRef.Name": { - "description": "Name of the category", - "type": "string", - "example": "RNI" - }, - "CategoryRef.Version": { - "description": "Category version", - "type": "string", - "example": "version1" - }, - "CategoryRef": { - "description": "This type represents the category reference", - "type": "object", - "required": [ - "href", - "id", - "name", - "version" - ], - "properties": { - "href": { - "$ref": "#/components/schemas/CategoryRef.Href" - }, - "id": { - "$ref": "#/components/schemas/CategoryRef.Id" - }, - "name": { - "$ref": "#/components/schemas/CategoryRef.Name" - }, - "version": { - "$ref": "#/components/schemas/CategoryRef.Version" - } - } - }, - "CurrentTime": { - "description": "This type represents the information provided by the mobile edge platform in response to the Get Platform Time Request message.", - "type": "object", - "required": [ - "nanoSeconds", - "seconds", - "timeSourceStatus" - ], - "properties": { - "seconds": { - "type": "integer", - "format": "uint32", - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 1577836800 - }, - "nanoSeconds": { - "type": "integer", - "format": "uint32", - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 0 - }, - "timeSourceStatus": { - "type": "string", - "enum": [ - "TRACEABLE", - "NONTRACEABLE" - ], - "description": "Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source", - "example": "TRACEABLE" - } - } - }, - "DestinationInterface.InterfaceType": { - "description": "Type of the interface", - "type": "string", - "enum": [ - "TUNNEL", - "MAC", - "IP" - ], - "example": "TUNNEL" - }, - "DestinationInterface.IpAddress": { - "description": "IP address of the remote destination", - "type": "string", - "example": "192.0.2.0" - }, - "DestinationInterface.MacAddress": { - "description": "Source address identifies the MAC address of the interface", - "type": "string", - "example": "02-00-00-00-00-00" - }, - "DestinationInterface": { - "description": "This type represents the destination interface.", - "type": "object", - "required": [ - "interfaceType" - ], - "properties": { - "interfaceType": { - "$ref": "#/components/schemas/DestinationInterface.InterfaceType" - }, - "tunnelInfo": { - "$ref": "#/components/schemas/TunnelInfo" - }, - "srcMacAddress": { - "$ref": "#/components/schemas/DestinationInterface.MacAddress" - }, - "dstMacAddress": { - "$ref": "#/components/schemas/DestinationInterface.MacAddress" - }, - "dstIpAddress": { - "$ref": "#/components/schemas/DestinationInterface.IpAddress" - } - } - }, - "DnsRule.DomainName": { - "description": "FQDN resolved by the DNS rule", - "type": "string", - "example": "www.example.com" - }, - "DnsRule.Id": { - "description": "Identifies the DNS Rule", - "type": "string", - "example": "dnsRule1" - }, - "DnsRule.IpAddress": { - "description": "IP address associated with the FQDN resolved by the DNS rule", - "type": "string", - "example": "192.0.2.0" - }, - "DnsRule.IpAddressType": { - "description": "IP address type", - "type": "string", - "enum": [ - "IP_V6", - "IP_V4" - ], - "example": "IP_V6" - }, - "DnsRule.State": { - "description": "DNS rule state", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "example": "ACTIVE" - }, - "DnsRule.Ttl": { - "description": "Time to live value", - "type": "integer", - "format": "uint32", - "example": "?" - }, - "DnsRule": { - "description": "This type represents the general information of a DNS rule.", - "type": "object", - "required": [ - "dnsRuleId", - "domainName", - "ipAddressType", - "ipAddress", - "state" - ], - "properties": { - "dnsRuleId": { - "$ref": "#/components/schemas/DnsRule.Id" - }, - "domainName": { - "$ref": "#/components/schemas/DnsRule.DomainName" - }, - "ipAddressType": { - "$ref": "#/components/schemas/DnsRule.IpAddressType" - }, - "ipAddress": { - "$ref": "#/components/schemas/DnsRule.IpAddress" - }, - "ttl": { - "$ref": "#/components/schemas/DnsRule.Ttl" - }, - "state": { - "$ref": "#/components/schemas/DnsRule.State" - } - } - }, - "EndPointInfo.Address.Host": { - "description": "Host portion of the address", - "type": "string", - "example": "192.0.2.0" - }, - "EndPointInfo.Address_Port": { - "description": "Port portion of the address", - "type": "integer", - "format": "uint32", - "example": 8080 - }, - "EndPointInfo.Address": { - "description": "A IP address and port pair", - "type": "object", - "required": [ - "host", - "port" - ], - "properties": { - "host": { - "$ref": "#/components/schemas/EndPointInfo.Address.Host" - }, - "port": { - "$ref": "#/components/schemas/EndPointInfo.Address_Port" - } - } - }, - "EndPointInfo.Addresses": { - "description": "Entry point information of the service as one or more pairs of IP address and port", - "type": "object", - "required": [ - "addresses" - ], - "properties": { - "addresses": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/EndPointInfo.Address" - } - } - } - }, - "EndPointInfo.Alternative": { - "description": "Entry point information of the service in a format defined by an implementation, or in an external specification.", - "type": "object", - "required": [ - "alternative" - ], - "properties": { - "alternative": { - "type": "object" - } - } - }, - "EndPointInfo.Uri": { - "description": "Entry point information of the service", - "type": "string", - "format": "uri", - "example": "/meMp1/service/EntryPoint" - }, - "EndPointInfo.Uris": { - "description": "Entry point information of the service as string, formatted according to URI syntax", - "type": "object", - "required": [ - "uris" - ], - "properties": { - "uris": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/EndPointInfo.Uri" - } - } - } - }, - "LinkType": { - "description": "This type represents a type of link and may be referenced from data structures", - "type": "object", - "properties": { - "href": { - "$ref": "#/components/schemas/Href" - } - } - }, - "Href": { - "description": "URI referring to a resource", - "type": "string", - "format": "uri", - "example": "/meMp1/example" - }, - "Mp1SubscriptionLinkList.Links": { - "description": "Self-referring URI.", - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - }, - "subscription": { - "description": "Subscription list", - "type": "array", - "items": { - "$ref": "#/components/schemas/Mp1SubscriptionLinkList.Subscription" - } - } - } - }, - "Mp1SubscriptionLinkList.Subscription": { - "description": "A link to a subscription.", - "type": "object", - "required": [ - "href", - "rel" - ], - "properties": { - "href": { - "$ref": "#/components/schemas/Href" - }, - "rel": { - "description": "The values are as defined in the \"subscriptionType\" attribute for each different Mp1 event subscription data type.", - "type": "string", - "enum": [ - "AppTerminationNotificationSubscription", - "SerAvailabilityNotificationSubscription" - ] - } - } - }, - "Mp1SubscriptionLinkList": { - "description": "This type represents a list of links related to currently existing subscriptions for a mobile edge application instance. This information is returned when sending a request to receive current subscriptions.", - "type": "object", - "required": [ - "_links" - ], - "properties": { - "_links": { - "$ref": "#/components/schemas/Mp1SubscriptionLinkList.Links" - } - } - }, - "ProblemDetails": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/Problem.type" - }, - "title": { - "$ref": "#/components/schemas/Problem.title" - }, - "status": { - "$ref": "#/components/schemas/Problem.status" - }, - "detail": { - "$ref": "#/components/schemas/Problem.detail" - }, - "instance": { - "$ref": "#/components/schemas/Problem.instance" - } - } - }, - "Problem.detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem" - }, - "Problem.instance": { - "type": "string", - "format": "uri", - "description": "A URI reference that identifies the specific occurrence of the problem" - }, - "Problem.status": { - "type": "integer", - "format": "uint32", - "description": "The HTTP status code for this occurrence of the problem" - }, - "Problem.title": { - "type": "string", - "description": "A short, human-readable summary of the problem type" - }, - "Problem.type": { - "type": "string", - "format": "uri", - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" - }, - "SecurityInfo.OAuth2Info.GrantTypes": { - "description": "List of supported OAuth 2.0 grant types", - "type": "string", - "enum": [ - "OAUTH2_AUTHORIZATION_CODE", - "OAUTH2_IMPLICIT_GRANT", - "OAUTH2_RESOURCE_OWNER", - "OAUTH2_CLIENT_CREDENTIALS" - ], - "example": "OAUTH2_CLIENT_CREDENTIALS" - }, - "SecurityInfo.OAuth2Info.TokenEndpoint": { - "description": "The token endpoint", - "type": "string", - "format": "uri", - "example": "/meMp1/security/TokenEndPoint" - }, - "SecurityInfo.OAuth2Info": { - "description": "Parameters related to use of OAuth 2.0", - "required": [ - "grantTypes", - "tokenEndpoint" - ], - "properties": { - "grantTypes": { - "description": "List of supported OAuth 2.0 grant types.", - "type": "array", - "minItems": 1, - "maxItems": 4, - "items": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.GrantTypes" - } - }, - "tokenEndpoint": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info.TokenEndpoint" - } - }, - "type": "object" - }, - "SecurityInfo": { - "description": "This type represents security information related to a transport", - "type": "object", - "properties": { - "oAuth2Info": { - "$ref": "#/components/schemas/SecurityInfo.OAuth2Info" - } - } - }, - "Self": { - "description": "Self-referring URI.", - "type": "object", - "required": [ - "self" - ], - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "readOnly": true - }, - "SerAvailabilityNotificationSubscription.CallbackReference": { - "description": "URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge service availability information. This shall be included in both the request and the response.", - "type": "string", - "format": "uri" - }, - "SerAvailabilityNotificationSubscription": { - "description": "This type represents a subscription to the notifications from the mobile edge platform regarding the availability of a mobile edge service or a list of mobile edge services.", - "type": "object", - "required": [ - "subscriptionType", - "callbackReference", - "_links", - "filteringCriteria" - ], - "properties": { - "subscriptionType": { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType" - }, - "callbackReference": { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.CallbackReference" - }, - "_links": { - "$ref": "#/components/schemas/Self" - }, - "filteringCriteria": { - "$ref": "#/components/schemas/ServiceInfo" - } - } - }, - "SerAvailabilityNotificationSubscription.SubscriptionType": { - "description": "Shall be set to SerAvailabilityNotificationSubscription.", - "type": "string", - "example": "SerAvailabilityNotificationSubscription" - }, - "ServiceAvailabilityNotification": { - "description": "This type represents the service availability information.", - "type": "object", - "required": [ - "notificationType", - "services", - "_links" - ], - "properties": { - "notificationType": { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription.SubscriptionType" - }, - "services": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServiceInfo" - } - }, - "_links": { - "$ref": "#/components/schemas/Subscription" - } - } - }, - "SerializerTypes": { - "description": "The enumeration SerializerTypes represents types of serializers", - "type": "string", - "enum": [ - "JSON", - "XML", - "PROTOBUF3" - ], - "example": "JSON" - }, - "ServiceInfo.SerInstanceId": { - "description": "Identifier of the service instance assigned by the MEPM / mobile edge platform.", - "type": "string", - "readOnly": true, - "example": "ServiceInstance123" - }, - "ServiceInfo.SerName": { - "description": "The name of the service. This is how the service producing mobile edge application identifies the service instance it produces.", - "type": "string", - "example": "ExampleService" - }, - "ServiceInfo.State": { - "description": "Contains the state", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "example": "ACTIVE" - }, - "ServiceInfo.TransportId": { - "description": "Identifier of the platform-provided transport to be used by the service. Valid identifiers may be obtained using the \"Transport information query\" procedure. May be present in POST requests to signal the use of a platform-provided transport for the service, and shall be absent otherwise.", - "type": "string", - "writeOnly": true, - "example": "Rest1" - }, - "ServiceInfo.Version": { - "description": "Service version", - "type": "string", - "example": "ServiceVersion1" - }, - "ServiceInfo.Post": { - "description": "This type represents the general information of a mobile edge service.", - "type": "object", - "required": [ - "serName", - "version", - "state", - "serializer" - ], - "oneOf": [ - { - "required": [ - "transportId" - ] - }, - { - "required": [ - "transportInfo" - ] - } - ], - "properties": { - "serInstanceId": { - "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" - }, - "serName": { - "$ref": "#/components/schemas/ServiceInfo.SerName" - }, - "serCategory": { - "$ref": "#/components/schemas/CategoryRef" - }, - "version": { - "$ref": "#/components/schemas/ServiceInfo.Version" - }, - "state": { - "$ref": "#/components/schemas/ServiceInfo.State" - }, - "transportId": { - "$ref": "#/components/schemas/ServiceInfo.TransportId" - }, - "transportInfo": { - "$ref": "#/components/schemas/TransportInfo" - }, - "serializer": { - "$ref": "#/components/schemas/SerializerTypes" - } - } - }, - "ServiceInfo": { - "description": "This type represents the general information of a mobile edge service.", - "type": "object", - "required": [ - "serName", - "version", - "state", - "transportInfo", - "serializer" - ], - "properties": { - "serInstanceId": { - "$ref": "#/components/schemas/ServiceInfo.SerInstanceId" - }, - "serName": { - "$ref": "#/components/schemas/ServiceInfo.SerName" - }, - "serCategory": { - "$ref": "#/components/schemas/CategoryRef" - }, - "version": { - "$ref": "#/components/schemas/ServiceInfo.Version" - }, - "state": { - "$ref": "#/components/schemas/ServiceInfo.State" - }, - "transportInfo": { - "$ref": "#/components/schemas/TransportInfo" - }, - "serializer": { - "$ref": "#/components/schemas/SerializerTypes" - } - } - }, - "Subscription": { - "description": "A link to the related subscription", - "type": "object", - "required": [ - "subscription" - ], - "properties": { - "subscription": { - "$ref": "#/components/schemas/LinkType" - } - } - }, - "TimingCaps.NtpServers.AuthenticationKeyNum": { - "description": "Authentication key number", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TimingCaps.NtpServers.AuthenticationOption": { - "description": "NTP authentication option", - "type": "string", - "enum": [ - "NONE", - "SYMMETRIC_KEY", - "AUTO_KEY" - ], - "example": "NONE" - }, - "TimingCaps.NtpServers.DelayReqMaxRate": { - "description": "Acceptable maximum rate of the Delay_Req messages in packets per second", - "type": "integer", - "format": "uint32", - "example": 10 - }, - "TimingCaps.NtpServers.LocalPriority": { - "description": "NTP server local priority", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TimingCaps.NtpServers.MaxPollingInterval": { - "description": "Maximum poll interval for NTP messages, in seconds as a power of two. Range 3...17", - "type": "integer", - "format": "uint32", - "example": 17 - }, - "TimingCaps.NtpServers.MinPollingInterval": { - "description": "Minimum poll interval for NTP messages, in seconds as a power of two. Range 3...17", - "type": "integer", - "format": "uint32", - "example": 3 - }, - "TimingCaps.NtpServers.NtpServerAddr": { - "description": "NTP server address", - "type": "string", - "example": "192.0.2.0" - }, - "TimingCaps.NtpServers.NtpServerAddrType": { - "description": "Address type of NTP server", - "type": "string", - "enum": [ - "IP_ADDRESS", - "DNS_NAME" - ], - "example": "IP_ADDRESS" - }, - "TimingCaps.NtpServers_PtpMasterIpAddress": { - "description": "PTP Master IP Address", - "type": "string", - "example": "192.0.2.0" - }, - "TimingCaps.NtpServers_PtpMasterLocalPriority": { - "description": "PTP Master local priority", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TimingCaps.NtpServers": { - "description": "NTP server detail.", - "type": "object", - "required": [ - "ntpServerAddrType", - "ntpServerAddr", - "minPollingInterval", - "maxPollingInterval", - "localPriority", - "authenticationOption", - "authenticationKeyNum" - ], - "properties": { - "ntpServerAddrType": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.NtpServerAddrType" - }, - "ntpServerAddr": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.NtpServerAddr" - }, - "minPollingInterval": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.MinPollingInterval" - }, - "maxPollingInterval": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.MaxPollingInterval" - }, - "localPriority": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.LocalPriority" - }, - "authenticationOption": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.AuthenticationOption" - }, - "authenticationKeyNum": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.AuthenticationKeyNum" - } - } - }, - "TimingCaps_PtpMasters": { - "description": "NTP server detail.", - "type": "object", - "required": [ - "ptpMasterIpAddress", - "ptpMasterLocalPriority", - "delayReqMaxRate" - ], - "properties": { - "ptpMasterIpAddress": { - "$ref": "#/components/schemas/TimingCaps.NtpServers_PtpMasterIpAddress" - }, - "ptpMasterLocalPriority": { - "$ref": "#/components/schemas/TimingCaps.NtpServers_PtpMasterLocalPriority" - }, - "delayReqMaxRate": { - "$ref": "#/components/schemas/TimingCaps.NtpServers.DelayReqMaxRate" - } - } - }, - "TimingCaps.TimeStamp": { - "description": "time", - "type": "object", - "required": [ - "nanoSeconds", - "seconds" - ], - "properties": { - "seconds": { - "type": "integer", - "format": "uint32", - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 1577836800 - }, - "nanoSeconds": { - "type": "integer", - "format": "uint32", - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 0 - } - } - }, - "TimingCaps": { - "description": "This type represents the information provided by the mobile edge platform in response to the Timing capabilities Query message.", - "type": "object", - "properties": { - "timeStamp": { - "$ref": "#/components/schemas/TimingCaps.TimeStamp" - }, - "ntpServers": { - "description": "Available NTP servers", - "type": "array", - "items": { - "$ref": "#/components/schemas/TimingCaps.NtpServers" - } - }, - "ptpMasters": { - "description": "Available PTP Masters", - "type": "array", - "items": { - "$ref": "#/components/schemas/TimingCaps_PtpMasters" - } - } - } - }, - "TrafficFilter.Address": { - "description": "Identify the traffic ip address.", - "type": "string", - "example": "192.168.1.1" - }, - "TrafficFilter.DSCP": { - "description": "Used to match all IPv4 packets that have the same Differentiated Services Code Point (DSCP)", - "type": "integer", - "format": "uint32", - "example": 0 - }, - "TrafficFilter.Port": { - "description": "A port", - "type": "string", - "example": "8080" - }, - "TrafficFilter.Protocol": { - "description": "Protocol of the traffic filter", - "type": "string", - "example": "?" - }, - "TrafficFilter.QCI": { - "description": "Used to match all packets that have the same Quality Class Indicator (QCI).", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TrafficFilter.TC": { - "description": "Used to match all IPv6 packets that have the same Traffic Class.", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TrafficFilter.Token": { - "description": "Used for token based traffic rule", - "type": "string", - "example": "?" - }, - "TrafficFilter.TunnelAddress": { - "description": "Used for GTP tunnel based traffic rule", - "type": "string", - "example": "?" - }, - "TrafficFilter.TunnelPort": { - "description": "Used for GTP tunnel based traffic rule", - "type": "string", - "example": "?" - }, - "TrafficFilter": { - "description": "This type represents the traffic filter.", - "type": "object", - "properties": { - "srcAddress": { - "description": "An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Address" - } - }, - "dstAddress": { - "description": "An IP address or a range of IP address. For IPv4, the IP address could be an IP address plus mask, or an individual IP address, or a range of IP addresses. For IPv6, the IP address could be an IP prefix, or a range of IP prefixes.", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Address" - } - }, - "srcPort": { - "description": "A port or a range of ports", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Port" - } - }, - "dstPort": { - "description": "A port or a range of ports", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Port" - } - }, - "protocol": { - "description": "Specify the protocol of the traffic filter", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Protocol" - } - }, - "token": { - "description": "Used for token based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.Token" - } - }, - "srcTunnelAddress": { - "description": "Used for GTP tunnel based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.TunnelAddress" - } - }, - "tgtTunnelAddress": { - "description": "Used for GTP tunnel based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.TunnelAddress" - } - }, - "srcTunnelPort": { - "description": "Used for GTP tunnel based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.TunnelPort" - } - }, - "dstTunnelPort": { - "description": "Used for GTP tunnel based traffic rule", - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter.TunnelPort" - } - }, - "qCI": { - "$ref": "#/components/schemas/TrafficFilter.QCI" - }, - "dSCP": { - "$ref": "#/components/schemas/TrafficFilter.DSCP" - }, - "tC": { - "$ref": "#/components/schemas/TrafficFilter.TC" - } - } - }, - "TrafficRule.Action": { - "description": "The action of the ME host data plane when a packet matches the trafficFilter", - "type": "string", - "enum": [ - "DROP", - "FORWARD_DECAPSULATED", - "FORWARD_AS_IS", - "PASSTHROUGH", - "DUPLICATE_DECAPSULATED", - "DUPLICATE_AS_IS" - ], - "example": "DROP" - }, - "TrafficRule.FilterType": { - "description": "Definition of filter per FLOW or PACKET. If flow the filter match UE->EPC packet and the reverse packet is handled in the same context", - "type": "string", - "enum": [ - "FLOW", - "PACKET" - ], - "example": "FLOW" - }, - "TrafficRule.Id": { - "description": "Identify the traffic rule.", - "type": "string", - "example": "TrafficRule1" - }, - "TrafficRule_Priority": { - "description": "Priority of this traffic rule. If traffic rule conflicts, the one with higher priority take precedence", - "type": "integer", - "format": "uint32", - "example": 1 - }, - "TrafficRule.State": { - "description": "Contains the traffic rule state", - "type": "string", - "enum": [ - "ACTIVE", - "INACTIVE" - ], - "example": "ACTIVE" - }, - "TrafficRule": { - "description": "This type represents the general information of a traffic rule.", - "type": "object", - "required": [ - "trafficRuleId", - "filterType", - "priority", - "trafficFilter", - "action", - "state" - ], - "properties": { - "trafficRuleId": { - "$ref": "#/components/schemas/TrafficRule.Id" - }, - "filterType": { - "$ref": "#/components/schemas/TrafficRule.FilterType" - }, - "priority": { - "$ref": "#/components/schemas/TrafficRule_Priority" - }, - "trafficFilter": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TrafficFilter" - } - }, - "action": { - "$ref": "#/components/schemas/TrafficRule.Action" - }, - "dstInterface": { - "$ref": "#/components/schemas/DestinationInterface" - }, - "state": { - "$ref": "#/components/schemas/TrafficRule.State" - } - } - }, - "TransportInfo.Description": { - "description": "Human-readable description of this transport", - "type": "string", - "example": "REST API" - }, - "TransportInfo.Id": { - "description": "The identifier of this transport", - "type": "string", - "example": "TransId12345" - }, - "TransportInfo.ImplSpecificInfo": { - "description": "Additional implementation specific details of the transport", - "type": "object" - }, - "TransportInfo.Name": { - "description": "The name of this transport", - "type": "string", - "example": "REST" - }, - "TransportInfo.Protocol": { - "description": "The name of the protocol used. Shall be set to HTTP for a REST API.", - "type": "string", - "example": "HTTP" - }, - "TransportInfo.Version": { - "description": "The version of the protocol used", - "type": "string", - "example": "2.0" - }, - "TransportInfo": { - "description": "This type represents the general information of a mobile edge service.", - "type": "object", - "required": [ - "id", - "name", - "type", - "protocol", - "version", - "endpoint", - "security" - ], - "properties": { - "id": { - "$ref": "#/components/schemas/TransportInfo.Id" - }, - "name": { - "$ref": "#/components/schemas/TransportInfo.Name" - }, - "description": { - "$ref": "#/components/schemas/TransportInfo.Description" - }, - "type": { - "$ref": "#/components/schemas/TransportTypes" - }, - "protocol": { - "$ref": "#/components/schemas/TransportInfo.Protocol" - }, - "version": { - "$ref": "#/components/schemas/TransportInfo.Version" - }, - "endpoint": { - "description": "This type represents information about a transport endpoint", - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/EndPointInfo.Uris" - }, - { - "$ref": "#/components/schemas/EndPointInfo.Addresses" - }, - { - "$ref": "#/components/schemas/EndPointInfo.Alternative" - } - ] - }, - "security": { - "$ref": "#/components/schemas/SecurityInfo" - }, - "implSpecificInfo": { - "$ref": "#/components/schemas/TransportInfo.ImplSpecificInfo" - } - } - }, - "TransportTypes": { - "description": "The enumeration TransportTypes represents types of transports", - "type": "string", - "enum": [ - "REST_HTTP", - "MB_TOPIC_BASED", - "MB_ROUTING", - "MB_PUBSUB", - "RPC", - "RPC_STREAMING", - "WEBSOCKET" - ], - "example": "REST_HTTP" - }, - "TunnelInfo.TunnelDstAddress": { - "description": "Destination address of the tunnel", - "type": "string", - "example": "?" - }, - "TunnelInfo.TunnelSrcAddress": { - "description": "Source address of the tunnel", - "type": "string", - "example": "?" - }, - "TunnelInfo.TunnelType": { - "description": "This type represents the tunnel information.", - "type": "string", - "enum": [ - "GTP_U", - "GRE" - ], - "example": "GTP_U" - }, - "TunnelInfo": { - "description": "This type represents the tunnel information.", - "type": "object", - "required": [ - "tunnelType" - ], - "properties": { - "tunnelType": { - "$ref": "#/components/schemas/TunnelInfo.TunnelType" - }, - "tunnelDstAddress": { - "$ref": "#/components/schemas/TunnelInfo.TunnelDstAddress" - }, - "tunnelSrcAddress": { - "$ref": "#/components/schemas/TunnelInfo.TunnelSrcAddress" - } - } - } - }, - "parameters": { - "Path.AppInstanceId": { - "name": "appInstanceId", - "description": "Represents a mobile edge application instance. Note that the appInstanceId is allocated by the mobile edge platform manager.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.DnsRuleId": { - "name": "dnsRuleId", - "description": "Represents a DNS rule.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.SubscriptionId": { - "name": "subscriptionId", - "description": "Represents a subscription to the notifications from the mobile edge platform.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.SubscriptionType": { - "name": "subscriptionType", - "description": "Represents a subscription type to the notifications from the mobile edge platform.", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "AppTerminationNotificationSubscription", - "SerAvailabilityNotificationSubscription" - ] - } - }, - "Path.ServiceId": { - "name": "serviceId", - "description": "Represents a mobile edge service instance.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Path.TrafficRuleId": { - "name": "trafficRuleId", - "description": "Represents a traffic rule.", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - "Query.Ser_category_id": { - "name": "ser_category_id", - "description": "A mobile edge application instance may use ser_category_id as an input parameter to query the availability of a list of mobile edge service instances in a serCategory. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - "Query.Ser_instance_id": { - "name": "ser_instance_id", - "description": "A mobile edge application instance may use multiple ser_instance_ids as an input parameter to query the availability of a list of mobile edge service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.Ser_name": { - "name": "ser_name", - "description": "A mobile edge application instance may use multiple ser_names as an input parameter to query the availability of a list of mobile edge service instances. Either \"ser_instance_id\" or \"ser_name\" or \"ser_category_id\" or none of them shall be present.", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "responses": { - "ApplicationsDnsRules.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/DnsRule" - } - }, - "examples": { - "DnsRules": { - "$ref": "#/components/examples/DnsRules" - } - } - } - }, - "links": { - "getIndividualMeDNSRule": { - "$ref": "#/components/links/GetIndividualMeDNSRule" - }, - "putIndividualMeDNSRule": { - "$ref": "#/components/links/PutIndividualMeDNSRule" - } - } - }, - "ApplicationsDnsRule.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DnsRule" - }, - "examples": { - "DnsRule": { - "$ref": "#/components/examples/DnsRule" - } - } - } - } - }, - "ApplicationsSubscriptions.200": { - "description": "Upon success, a response body containing the list of links to the requested subscriptions is returned.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Mp1SubscriptionLinkList" - } - } - }, - "links": { - "getIndividualMeMp1SubscriptionLinkList": { - "$ref": "#/components/links/GetIndividualMeMp1SubscriptionLinkList" - }, - "delIndividualMeMp1SubscriptionLinkList": { - "$ref": "#/components/links/DelIndividualMeMp1SubscriptionLinkList" - } - } - }, - "ApplicationsSubscriptions.201": { - "description": "Entity body in the request contains a subscription to the mobile edge service availability notifications that is to be created.", - "headers": { - "location": { - "description": "The resource URI of the created resource", - "schema": { - "type": "string", - "format": "uri" - } - } - }, - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription" - }, - { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" - } - ] - } - } - }, - "links": { - "getIndividualMeMp1Subscription": { - "$ref": "#/components/links/GetIndividualMeMp1Subscription" - }, - "delIndividualMeMp1Subscription": { - "$ref": "#/components/links/DelIndividualMeMp1Subscription" - } - } - }, - "ApplicationsSubscription.200": { - "description": "Upon success, a response body containing the requested subscription is returned.", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription" - }, - { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" - } - ] - } - } - } - }, - "ApplicationsTrafficRules.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/TrafficRule" - } - }, - "examples": { - "TrafficRules": { - "$ref": "#/components/examples/TrafficRules" - } - } - } - }, - "links": { - "getIndividualMeTrafficRule": { - "$ref": "#/components/links/GetIndividualMeTrafficRule" - }, - "putIndividualMeTrafficRule": { - "$ref": "#/components/links/PutIndividualMeTrafficRule" - } - } - }, - "ApplicationsTrafficRule.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TrafficRule" - }, - "examples": { - "TrafficRule": { - "$ref": "#/components/examples/TrafficRule" - } - } - } - } - }, - "Services.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/ServiceInfo" - } - }, - "examples": { - "ServiceInfoList": { - "$ref": "#/components/examples/ServiceInfoList" - } - } - } - }, - "links": { - "getIndividualMeService": { - "$ref": "#/components/links/GetIndividualMeService" - }, - "putIndividualMeService": { - "$ref": "#/components/links/PutIndividualMeService" - } - } - }, - "Services.201": { - "description": "Upon success, the HTTP response shall include a Location HTTP header that contains the resource URI of the created resource.", - "headers": { - "location": { - "description": "The resource URI of the created resource", - "schema": { - "type": "string", - "format": "uri" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo" - }, - "examples": { - "ServiceInfo": { - "$ref": "#/components/examples/ServiceInfo" - } - } - } - }, - "links": { - "getIndividualMeService": { - "$ref": "#/components/links/GetIndividualMeService" - }, - "putIndividualMeService": { - "$ref": "#/components/links/PutIndividualMeService" - } - } - }, - "ServicesServiceId.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo" - }, - "examples": { - "ServiceInfo": { - "$ref": "#/components/examples/ServiceInfo" - } - } - } - } - }, - "TimingCurrentTime.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CurrentTime" - } - } - } - }, - "TimingCaps.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TimingCaps" - } - } - } - }, - "Transports.200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/TransportInfo" - } - } - } - }, - "links": { - "getTransportInfo": { - "$ref": "#/components/links/GetTransportInfo" - } - } - }, - "Error.400": { - "description": "Bad Request", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.403": { - "description": "Forbidden", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "Error.404": { - "description": "Not Found", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.412": { - "description": "Precondition Failed", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - }, - "requestBodies": { - "ApplicationsDnsRule": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DnsRule" - } - } - }, - "description": "The updated state is included in the entity body of the request.", - "required": true - }, - "ApplicationsSubscriptions": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/AppTerminationNotificationSubscription" - }, - { - "$ref": "#/components/schemas/SerAvailabilityNotificationSubscription" - } - ] - } - } - }, - "description": "Entity body in the request contains a subscription to the mobile edge application termination notifications that is to be created.", - "required": true - }, - "ApplicationsTrafficRule": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TrafficRule" - } - } - }, - "description": "One or more updated attributes that are allowed to be changed", - "required": true - }, - "Services": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo" - } - } - }, - "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", - "required": true - }, - "Services.Post": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo.Post" - } - } - }, - "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", - "required": true - }, - "ServicesServiceId": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceInfo" - } - } - }, - "description": "New ServiceInfo with updated \"state\" is included as entity body of the request", - "required": true - }, - "AppTerminationNotification": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppTerminationNotification" - } - } - } - }, - "ServiceAvailabilityNotification": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceAvailabilityNotification" - } - } - } - } - }, - "callbacks": { - "AppTerminationNotification": { - "{$request.body#/callbackReference}": { - "post": { - "description": "Represents the information that the MEP notifies the subscribed application instance about the corresponding application instance termination/stop", - "operationId": "AppTerminationNotification_POST", - "tags": [ - "callback" - ], - "requestBody": { - "$ref": "#/components/requestBodies/AppTerminationNotification" - }, - "responses": { - "200": { - "description": "Expected responses from callback consumer, if it accepts the callback" - } - } - } - } - }, - "ServiceAvailabilityNotification": { - "{$request.body#/callbackReference}": { - "post": { - "description": "'Represents the service availability information that is used in the following cases - when the MEC platform announces the newly available\n services to the authorized relevant MEC applications (e.g. \n the applications that indicate the services as \"optional\" \n or \"required\") that are subscribed to the corresponding \n service availability notifications\n- when the MEC platform notifies the authorized relevant applications that are subscribed to the corresponding service availability notifications about the service availability changes.'", - "operationId": "ServiceAvailabilityNotification_POST", - "tags": [ - "callback" - ], - "requestBody": { - "$ref": "#/components/requestBodies/ServiceAvailabilityNotification" - }, - "responses": { - "200": { - "description": "Expected responses from callback consumer, if it accepts the callback" - } - } - } - } - } - }, - "links": { - "GetIndividualMeService": { - "operationId": "ServicesServiceId_GET", - "description": "The `serviceId` value returned in the response can be used as the `serviceId` parameter in `GET /services/{serviceId}`", - "parameters": { - "serviceId": "$response.body#/serviceId" - } - }, - "PutIndividualMeService": { - "operationId": "ServicesServiceId_PUT", - "description": "The `serviceId` value returned in the response can be used as the `serviceId` parameter in `PUT /services/{serviceId}`", - "parameters": { - "serviceId": "$response.body#/serviceId" - } - }, - "GetIndividualMeDNSRule": { - "operationId": "ApplicationsDnsRule_GET", - "description": "The `dnsRuleId` value returned in the response can be used as the `dnsRuleId` parameter in `GET /applications/{appInstanceId}/dns_rules/{dnsRuleId}`", - "parameters": { - "dnsRuleId": "$response.body#/dnsRuleId" - } - }, - "PutIndividualMeDNSRule": { - "operationId": "ApplicationsDnsRule_PUT", - "description": "The `dnsRuleId` value returned in the response can be used as the `dnsRuleId` parameter in `PUT /applications/{appInstanceId}/dns_rules/{dnsRuleId}`", - "parameters": { - "dnsRuleId": "$response.body#/dnsRuleId" - } - }, - "GetIndividualMeTrafficRule": { - "operationId": "ApplicationsTrafficRule_GET", - "description": "The `trafficRuleId` value returned in the response can be used as the `trafficRuleId` parameter in `GET /applications/{appInstanceId}/traffic_rules/{trafficRuleId}`", - "parameters": { - "trafficRuleId": "$response.body#/trafficRuleId" - } - }, - "PutIndividualMeTrafficRule": { - "operationId": "ApplicationsTrafficRule_PUT", - "description": "The `trafficRuleId` value returned in the response can be used as the `trafficRuleId` parameter in `PUT /applications/{appInstanceId}/traffic_rules/{trafficRuleId}`", - "parameters": { - "trafficRuleId": "$response.body#/trafficRuleId" - } - }, - "GetTransportInfo": { - "operationId": "AppServices_POST", - "description": "The `id` value returned in the response can be used as the `transportId` parameter in `POST /applications/{appInstanceId}/services`. The first transport is provided as the link as wildcards are not supported", - "parameters": { - "transportId": "$response.body#/0/id" - } - }, - "GetIndividualMeMp1Subscription": { - "operationId": "ApplicationsSubscription_GET", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", - "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", - "subscriptionId": "TBC" - } - }, - "DelIndividualMeMp1Subscription": { - "operationId": "ApplicationsSubscription_DELETE", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", - "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", - "subscriptionId": "TBC" - } - }, - "GetIndividualMeMp1SubscriptionLinkList": { - "operationId": "ApplicationsSubscription_GET", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `GET /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", - "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", - "subscriptionId": "TBC" - } - }, - "DelIndividualMeMp1SubscriptionLinkList": { - "operationId": "ApplicationsSubscription_DELETE", - "description": "The `subscriptionId` value returned in the response can be used as the `subscriptionId` parameter in `DELETE /applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}`", - "parameters": { - "description": "regex = \\/mp1\\/v1\\/applications\\/.*\\/subscriptions\\/.*\\/(.*);subscriptionId = href.match(regex)[1];// where \"href\" is an attribute within the subscription attribute within the _links attribute", - "subscriptionId": "TBC" - } - } - }, - "examples": { - "DnsRule": { - "value": { - "dnsRuleId": "DnsRule1", - "domainName": "www.example.com", - "ipAddressType": "IP_V4", - "ipAddress": "146.241.7.3", - "ttl": 300, - "state": "ACTIVE" - } - }, - "DnsRules": { - "value": [ - { - "dnsRuleId": "DnsRule1", - "domainName": "www.example.com", - "ipAddressType": "IP_V4", - "ipAddress": "146.241.7.3", - "ttl": 300, - "state": "ACTIVE" - } - ] - }, - "ServiceInfo": { - "value": { - "serInstanceId": "ServiceInstance123", - "serName": "ExampleService", - "serCategory": { - "href": "catItem1", - "id": "id12345", - "name": "RNI", - "version": "version1" - }, - "version": "ServiceVersion1", - "state": "ACTIVE", - "transportInfo": { - "id": "TransId12345", - "name": "REST", - "description": "REST API", - "type": "REST_HTTP", - "protocol": "HTTP", - "version": "2.0", - "endpoint": { - "uris": [ - "/meMp1/service/EntryPoint" - ] - }, - "security": { - "oAuth2Info": { - "grantTypes": [ - "OAUTH2_CLIENT_CREDENTIALS" - ], - "tokenEndpoint": "/meMp1/security/TokenEndPoint" - } - } - }, - "serializer": "JSON" - } - }, - "ServiceInfoList": { - "value": [ - { - "serInstanceId": "ServiceInstance123", - "serName": "ExampleService", - "serCategory": { - "href": "catItem1", - "id": "id12345", - "name": "RNI", - "version": "version1" - }, - "version": "ServiceVersion1", - "state": "ACTIVE", - "transportInfo": { - "id": "TransId12345", - "name": "REST", - "description": "REST API", - "type": "REST_HTTP", - "protocol": "HTTP", - "version": "2.0", - "endpoint": { - "addresses": [ - { - "host": "192.0.2.0", - "port": 8080 - } - ] - }, - "security": { - "oAuth2Info": { - "grantTypes": [ - "OAUTH2_CLIENT_CREDENTIALS" - ], - "tokenEndpoint": "/meMp1/security/TokenEndPoint" - } - } - }, - "serializer": "JSON" - } - ] - }, - "TrafficRule": { - "value": { - "trafficRuleId": "TrafficRule123", - "serName": "ExampleService", - "filterType": "FLOW", - "priority": 1, - "trafficFilter": [ - { - "srcAddress": [ - "192.168.2.0/24", - "192.168.3.0/24" - ], - "dstAddress": [ - "192.127.4.100/32" - ], - "dstPort": [ - "80" - ] - } - ], - "action": "FORWARD_DECAPSULATED", - "dstInterface": { - "interfaceType": "IP", - "dstIpAddress": "20.1.1.1" - }, - "state": "ACTIVE" - } - }, - "TrafficRules": { - "value": [ - { - "trafficRuleId": "TrafficRule123", - "serName": "ExampleService", - "filterType": "FLOW", - "priority": 1, - "trafficFilter": [ - { - "srcAddress": [ - "192.168.2.0/24", - "192.168.3.0/24" - ], - "dstAddress": [ - "192.127.4.100/32" - ], - "dstPort": [ - "80" - ] - } - ], - "action": "FORWARD_DECAPSULATED", - "dstInterface": { - "interfaceType": "IP", - "dstIpAddress": "20.1.1.1" - }, - "state": "ACTIVE" - } - ] - } - } - } -} \ No newline at end of file diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn index 7e3cb45fb7bc29dfcb85b08303ebe3fea50ca4be..5df5a0556a3f0e1ee2d462445a6ee9b44c9f3da5 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn @@ -29,7 +29,7 @@ module EdgePlatformApplicationEnablementAPI_Functions { function f_create_service_info( out ServiceInfo p_service_info, - out Headers p_headers + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -39,24 +39,22 @@ module EdgePlatformApplicationEnablementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services", v_headers, m_http_message_body_json( m_body_json_service_info( m_service_info( v_service_name, - -, -, -, - m_service_info_link("m_service_info_link"), - -, -, //-, + -, -, -, -, -, -, m_transport_info( - "transportId1", - "ETSI MEC-011 Conformance test", + "REST", + "REST_HTTP", REST_HTTP, "HTTP", "2.0", m_end_point_uris({"/meMp1/service/MyEntryPoint"}), m_security_info - ))))))); + ))))))); tc_ac.start; alt { [] httpPort.receive( @@ -65,13 +63,22 @@ module EdgePlatformApplicationEnablementAPI_Functions { mw_http_message_body_json( mw_body_json_service_info( mw_service_info( - v_service_name //serName - )))))) -> value v_response { + v_service_name + )))))) -> 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_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services" & "/(?*)", + 0 + ); p_service_info := v_response.response.body.json_body.serviceInfo; - p_headers := v_response.response.header; - log("f_create_service_info: INFO: IUT successfully responds to the subscription: ", p_service_info); + log("f_create_service_info: INFO: IUT successfully responds to the service creation: ", p_service_info); + log("f_create_service_info: INFO: Resource URI: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_service_info: INCONC: Expected message not received"); @@ -80,7 +87,7 @@ module EdgePlatformApplicationEnablementAPI_Functions { } // End of function f_create_service_info function f_delete_service_info( - in ServiceInfo p_service_info + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; @@ -88,7 +95,7 @@ module EdgePlatformApplicationEnablementAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(p_service_info.serName)), + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & p_subscription_id, v_headers ))); tc_ac.start; @@ -104,9 +111,96 @@ module EdgePlatformApplicationEnablementAPI_Functions { } } // End of 'alt' statement } // End of function f_delete_service_info - + + function f_create_app_termination_notif_subscription( + out AppTerminationNotificationSubscription p_app_termination_notification_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_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + v_headers, + m_http_message_body_json( + m_body_json_app_termination_notif_subscription( + m_app_termination_notif_subscription( + PX_APP_TERM_NOTIF_CALLBACK_URI, + -, + PX_APP_INSTANCE_ID + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_termination_notif_subscription( + mw_app_termination_notif_subscription( + PX_APP_TERM_NOTIF_CALLBACK_URI, + mw_self, + PX_APP_INSTANCE_ID + )))))) -> 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_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); + p_app_termination_notification_subscription := v_response.response.body.json_body.appTerminationNotificationSubscription; + log("f_create_app_termination_notif_subscription: INFO: IUT successfully responds with a AppTerminationNotificationSubscription: ", p_app_termination_notification_subscription); + log("f_create_app_termination_notif_subscription: INFO: Resource URI: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_app_termination_notif_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_app_termination_notif_subscription + + function f_delete_app_termination_notif_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + // Local variables + 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_APP_SUPPORT_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & p_subscription_id, + v_headers + ))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_app_termination_notif_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_app_termination_notif_subscription + function f_create_ser_availability_notification_subscription( - out SerAvailabilityNotificationSubscription p_ser_availability_notification_subscription + out SerAvailabilityNotificationSubscription p_ser_availability_notification_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -115,13 +209,13 @@ module EdgePlatformApplicationEnablementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", v_headers, m_http_message_body_json( m_body_json_srv_avail_notif_subscription( m_srv_avail_notif_subscription( PX_SRV_AVAIL_NOTIF_CALLBACK_URI - )))))); + )))))); tc_ac.start; alt { [] httpPort.receive( @@ -131,11 +225,21 @@ module EdgePlatformApplicationEnablementAPI_Functions { mw_body_json_srv_avail_notif_subscription( mw_srv_avail_notif_subscription( PX_SRV_AVAIL_NOTIF_CALLBACK_URI - )))))) -> value v_response { + )))))) -> 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_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); p_ser_availability_notification_subscription := v_response.response.body.json_body.serAvailabilityNotificationSubscription log("f_create_ser_availability_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_ser_availability_notification_subscription); + log("f_create_service_info: INFO: Resource URI: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_ser_availability_notification_subscription: INCONC: Expected message not received"); @@ -144,28 +248,23 @@ module EdgePlatformApplicationEnablementAPI_Functions { } // End of function f_create_ser_availability_notification_subscription function f_delete_ser_availability_notification_subscription( - in SerAvailabilityNotificationSubscription p_ser_availability_notification_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_ser_availability_notification_subscription.links.self_.href)), - "?+(" & PX_MEC_SVC_MGMT_APPS_URI & "/?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & v_uri, + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & 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 { @@ -173,5 +272,81 @@ module EdgePlatformApplicationEnablementAPI_Functions { } } // End of 'alt' statement } // End of function f_delete_ser_availability_notification_subscription - + + function f_app_registration( + out AppInfo p_app_info, + out Headers p_headers + ) 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_MEC_SVC_MGMT_APPS_URI, + v_headers, + m_http_message_body_json( + m_body_json_app_info_regapps( + m_app_info( + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + m_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_app_info_regapps( + mw_app_info( + PX_APP_NAME, + -, -, -, + PX_APP_INSTANCE_ID, + mw_end_point_uris({PX_APP_ENDPOINT_URI}) + )))))) -> value v_response { + tc_ac.stop; + + p_app_info := v_response.response.body.json_body.appInfo_regapps; + p_headers := v_response.response.header; + log("f_app_registration: IUT successfully responds with a AppInfo: ", p_app_info); + } + [] tc_ac.timeout { + log("f_app_registration: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_app_registration + + function f_app_deletion( + in Json.String p_app_instance_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_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + 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_app_deletion: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_app_deletion + } // End of module EdgePlatformApplicationEnablementAPI_Functions diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn index e36543de5dc9a81c6019fcc555378b7702fd9518..3a7bcfd47408aef041b06654b70d3d806c2030f5 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn @@ -1,13 +1,22 @@ module EdgePlatformApplicationEnablementAPI_Pixits { + // JSON + import from Json all; + // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + modulepar Json.String PX_APP_NAME := "appName01"; + + modulepar Json.String PX_APP_D_ID := "appName01"; + modulepar AppInstanceId PX_APP_INSTANCE_ID := "appInst01"; modulepar AppInstanceId PX_NON_EXISTENT_APP_INSTANCE_ID := "appInst99"; + + modulepar Json.String PX_APP_ENDPOINT_URI := "http://example.com:12345"; - modulepar SerName PX_SERVICE_NAME := "serName"; + modulepar SerName PX_SERVICE_NAME := "serName01"; modulepar SerName PX_NON_EXISTENT_SERVICE_NAME := "unknownSerName"; diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn index 4584bc9ce3f4e1570904ab46bd4a0551a72ea424..2121e7dc46878dd2372a1ac5777984894d32a4bf 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn @@ -1,6 +1,5 @@ /** * @desc The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI - * @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf */ module EdgePlatformApplicationEnablementAPI_Templates { @@ -10,27 +9,17 @@ module EdgePlatformApplicationEnablementAPI_Templates { // LibCommon import from LibCommon_BasicTypesAndValues all; - // LibMec/AppEna + // LibMec + import from LibMec_TypesAndValues all; + + // LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; import from EdgePlatformApplicationEnablementAPI_Pixits all; - template (value) TimeStamp m_time_stamp( - in Seconds p_seconds, - in NanoSeconds p_nanoSeconds := 0 - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of template m_time_stamp - - template (present) TimeStamp mw_time_stamp( - template (present) Seconds p_seconds := ?, - template (present) NanoSeconds p_nanoSeconds := ? - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of template mw_time_stamp - - template (value) SecurityInfo m_security_info( + template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo m_security_info( in GrantTypesList p_grantTypes := { OAUTH2_CLIENT_CREDENTIALS }, in TokenEndpoint p_tokenEndpoint := "/mecSerMgmtApi/security/MyTokenEndPoint" ) := { @@ -41,7 +30,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { extentions := omit } // End of template m_security_info - template (present) SecurityInfo mw_security_info( + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo mw_security_info( template (present) GrantTypesList p_grantTypes := ?, template (present) TokenEndpoint p_tokenEndpoint := ? ) := { @@ -52,18 +41,20 @@ module EdgePlatformApplicationEnablementAPI_Templates { extentions := * } // End of template mw_security_info - template (value) TransportInfo_Endpoint m_end_point_uris( - in template (value) EndPointInfo_UriList p_uris - ) := { + template (value) EndPointInfo m_end_point_uris( + in template (value) EndPointInfo_UriList p_uris + ) := { uris := p_uris, + fqdn := omit, addresses := omit, alternative := omit } // End of template m_end_point_uris - template (present) TransportInfo_Endpoint mw_end_point_uris( - template (present) EndPointInfo_UriList p_uris := ? - ) := { + template (present) EndPointInfo mw_end_point_uris( + template (present) EndPointInfo_UriList p_uris := ? + ) := { uris := p_uris, + fqdn := *, addresses := *, alternative := * } // End of template mw_end_point_uris @@ -86,8 +77,8 @@ module EdgePlatformApplicationEnablementAPI_Templates { in SerName p_serName, in ServiceInfo_Version p_version := PX_SERVICE_INFO_VERSION, in ServiceState p_state := PX_SERVICE_INFO_STATE, - in SerializerType p_serializer := PX_SERIALIZER, - in template (value) ServiceInfo_Link p_links, + in EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType p_serializer := PX_SERIALIZER, + in template (omit) ServiceInfo_Link p_links := omit, in template (omit) SerInstanceId p_serInstanceId := omit, in template (omit) TransportId p_transportId := omit, in template (omit) TransportInfo p_transportInfo := omit, @@ -112,7 +103,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (present) SerName p_serName := ?, template (present) ServiceInfo_Version p_version := PX_SERVICE_INFO_VERSION, template (present) ServiceState p_state := PX_SERVICE_INFO_STATE, - template (present) SerializerType p_serializer := PX_SERIALIZER, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType p_serializer := PX_SERIALIZER, template (present) ServiceInfo_Link p_links := ?, template SerInstanceId p_serInstanceId := *, template TransportId p_transportId := *, @@ -147,11 +138,17 @@ module EdgePlatformApplicationEnablementAPI_Templates { } // End of template mw_subscription_link_list template (value) Self m_self( - in template (value) LinkType p_self_ + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.LinkType p_self_ ) := { self_ := p_self_ } // End of template m_self + template (present) Self mw_self( + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.LinkType p_self_ := ? + ) := { + self_ := p_self_ + } // End of template mw_self + template (omit) AppTerminationNotificationSubscription m_app_termination_notif_subscription( in template (value) AppTerminationNotificationSubscription_CallbackReference p_callbackReference, in template (omit) Self p_links := omit, @@ -182,6 +179,62 @@ module EdgePlatformApplicationEnablementAPI_Templates { appInstanceId := p_appInstanceId } // End of template mw_app_termination_notif_subscription + template (omit) AppInfo m_app_info( + in Json.String p_appName, + in template (omit) Json.String p_appProvider := omit, + in template (omit) CategoryRef p_appCategory := omit, + in template (omit) Json.String p_appDId := omit, + in template (omit) Json.String p_appInstanceId := omit, + in template (omit) EndPointInfo p_endpoint := omit, + in template (omit) ServiceDependencies p_appServiceRequired := omit, + in template (omit) ServiceDependencies p_appServiceOptional := omit, + in template (omit) FeatureDependencies p_appFeatureRequired := omit, + in template (omit) FeatureDependencies p_appFeatureOptional := omit, + in template (omit) Json.Bool p_isInsByMec := omit, + in template (omit) AppProfile p_appProfile := omit + ) := { + appName := p_appName, + appProvider := p_appProvider, + appCategory := p_appCategory, + appDId := p_appDId, + appInstanceId := p_appInstanceId, + endpoint := p_endpoint, + appServiceRequired := p_appServiceRequired, + appServiceOptional := p_appServiceOptional, + appFeatureRequired := p_appFeatureRequired, + appFeatureOptional := p_appFeatureOptional, + isInsByMec := p_isInsByMec, + appProfile := p_appProfile + } // End of template m_app_info + + template (present) AppInfo mw_app_info( + template (present) Json.String p_appName := ?, + template Json.String p_appProvider := *, + template CategoryRef p_appCategory := *, + template Json.String p_appDId := *, + template Json.String p_appInstanceId := *, + template EndPointInfo p_endpoint := *, + template ServiceDependencies p_appServiceRequired := *, + template ServiceDependencies p_appServiceOptional := *, + template FeatureDependencies p_appFeatureRequired := *, + template FeatureDependencies p_appFeatureOptional := *, + template Json.Bool p_isInsByMec := *, + template AppProfile p_appProfile := * + ) := { + appName := p_appName, + appProvider := p_appProvider, + appCategory := p_appCategory, + appDId := p_appDId, + appInstanceId := p_appInstanceId, + endpoint := p_endpoint, + appServiceRequired := p_appServiceRequired, + appServiceOptional := p_appServiceOptional, + appFeatureRequired := p_appFeatureRequired, + appFeatureOptional := p_appFeatureOptional, + isInsByMec := p_isInsByMec, + appProfile := p_appProfile + } // End of template mw_app_info + template (value) ServiceLivenessInfo m_service_liveness_info( in ServiceState p_state, in template (value) TimeStamp p_timeStamp, @@ -205,11 +258,11 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (value) TransportInfo m_transport_info( in TransportInfo_Id p_id, in TransportInfo_Name p_name, - in TransportTypes p_type_, + in EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type_, in TransportInfo_Protocol p_protocol, in TransportInfo_Version p_version, - in template (value) TransportInfo_Endpoint p_endpoint, - in template (value) SecurityInfo p_security + in template (value) EndPointInfo p_endpoint, + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security ) := { id := p_id, name := p_name, @@ -225,11 +278,11 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (present) TransportInfo mw_transport_info( template (present) TransportInfo_Id p_id := ?, template (present) TransportInfo_Name p_name := ?, - template (present) TransportTypes p_type_ := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type_ := ?, template (present) TransportInfo_Protocol p_protocol := ?, template (present) TransportInfo_Version p_version := ?, - template (present) TransportInfo_Endpoint p_endpoint := ?, - template (present) SecurityInfo p_security := ? + template (present) EndPointInfo p_endpoint := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security := ? ) := { id := p_id, name := p_name, diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn index 30b0b36f95a84b7ce0f5b08647de9e7f2c21b572..fabb260e1b332ad740150f9965908b1032650c1e 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn @@ -1,19 +1,21 @@ /** * @desc The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI - * @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v020201p.pdf */ module EdgePlatformApplicationEnablementAPI_TypesAndValues { // JSON import from Json all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; + + // LibMec + import from LibMec_TypesAndValues all; + + // MEC-10-2 + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; /** * @desc Maximum timeout value in seconds for graceful termination or graceful stop of an application instance. */ - type UInt32 MaxGracefulTimeout; + type Json.UInteger MaxGracefulTimeout; /** * @desc Shall be set to AppTerminationNotification. @@ -24,63 +26,47 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @desc Operation that is being performed on the MEC */ type enumerated OperationAction { - STOPPING (0), + STOPPING (0), TERMINATING (1) } /** * @desc This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop. + * @member notificationType Shall be set to "AppTerminationNotification" + * @member operationAction Operation that is being performed on the MEC application instance + * @member maxGracefulTimeout Maximum non-zero timeout value in seconds for graceful termination or graceful stop of an application instance + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.4.2-1: Attributes of AppTerminationNotification */ type record AppTerminationNotification { - NotificationType notificationType, - OperationAction operationAction, + NotificationType notificationType, + OperationAction operationAction, MaxGracefulTimeout maxGracefulTimeout, - Subscription links + Subscription links } with { variant (links) "name as '_links'"; } /** * @desc This type represents the information that the MEC application instance provides to the MEC platform when informing it -that the application has completed its application level related terminate/stop actions, e.g. retention of application state -in the case of stop. + * that the application has completed its application level related terminate/stop actions, e.g. retention of application state + * in the case of stop. + * @member operationAction Operation that is being performed on the MEC application instance + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.4.3-1: Attributes of AppTerminationConfirmation */ type record AppTerminationConfirmation { OperationAction operationAction } /** - * @desc This type represents the information that the MEC application instance indicates to the MEC platform that it is up and -running + * @desc This type represents the information that the MEC application instance indicates to the MEC platform that it is up and running + * @member indication Indication about the MEC application instance + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.4.4-1: Attributes of AppReadyConfirmation */ type record AppReadyConfirmation { Json.String indication } - /** - * @desc Represents possible states of a MEC service instance - */ - type enumerated ServiceState { - ACTIVE (0), - INACTIVE (1), - SUSPENDED (2) - } - type record length(1..infinity) of ServiceState ServiceStateList; - - /** - * @desc This type represents the liveness information of a MEC service instance - */ - type record ServiceLivenessInfo { - ServiceState state, - TimeStamp timeStamp, - integer interval - } - - /** - * @desc It is used as the filtering criterion for the subscribed events. - */ - type Json.String AppInstanceId; - /** * @desc URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge application instance management information. * This shall be included in both the request and the response." @@ -89,6 +75,11 @@ running /** * @desc This type represents the information that the mobile edge platform notifies the subscribed application instance about the corresponding application instance termination/stop. + * @member subscriptionType Shall be set to "AppTerminationNotificationSubscription" + * @member callbackReference URI selected by the MEC application instance to receive notifications on the subscribed MEC application instance management information + * @member links Object containing hyperlinks related to the resource + * @member appInstanceId It is used as the filtering criterion for the subscribed events + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.3.2-1: Attributes of AppTerminationNotificationSubscription */ type record AppTerminationNotificationSubscription { SubscriptionType subscriptionType, @@ -104,6 +95,35 @@ running */ type Json.String SubscriptionType; + /** + * @desc It is used as the filtering criterion for the subscribed events. + */ + type Json.String AppInstanceId; + + /** + * @desc Represents possible states of a MEC service instance + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.6-1: Enumeration ServiceState + */ + type enumerated ServiceState { + ACTIVE (0), + INACTIVE (1), + SUSPENDED (2) + } + type record length(1..infinity) of ServiceState ServiceStateList; + + /** + * @desc This type represents the liveness information of a MEC service instance + * @member state Liveness state of the MEC service instance + * @member timeStamp The time when the last "heartbeat" message was received by MEC platform + * @member interval The interval (in seconds) between two consecutive "heartbeat" messages (see clause 8.2.10.3.3) that MEC platform has determined. + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.2.4-1: Attributes of ServiceLivenessInfo + */ + type record ServiceLivenessInfo { + ServiceState state, + TimeStamp timeStamp, + integer interval + } + /** * @desc Reference of the catalogue. */ @@ -128,25 +148,16 @@ running * @desc This type represents the category reference. */ type record CategoryRef { - CategoryRef_Href href, - CategoryRef_Id id, - Name name, + CategoryRef_Href href, + CategoryRef_Id id, + Name name, CategoryRef_Version version } type record length(1..infinity) of CategoryRef CategoryRefList; - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - */ - type UInt32 Seconds; - - /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - */ - type UInt32 NanoSeconds; - /** * @desc Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source. + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.5-1: Attributes of CurrentTime */ type enumerated TimeSourceStatus { TRACEABLE (1), @@ -158,6 +169,7 @@ running * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. * @member timeSourceStatus Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source. + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.5-1: Attributes of CurrentTime */ type record CurrentTime { Seconds seconds, @@ -165,6 +177,45 @@ running TimeSourceStatus timeSourceStatus } + /** + * @desc This type represents the information provided by the MEC application instance as part of the "application registration request" and "application registration update" messages + * @member appName Name of the application. It shall be consistent with the appName in the AppD, if an AppD is available + * @member appProvider Provider of the application. It shall be consistent with the appProvider in the AppD, if an AppD is available + * @member appCategory Category of the application + * @member appDId The application descriptor identifier + * @member appInstanceId Identifier of the application instance + * @member endpoint Endpoint information (e.g. URI, FQDN, IP address) of the application server, which is part of the application functionalities + * @member appServiceRequired Describes services a MEC application requires to run + * @member appServiceOptional Describes services a MEC application may use if available + * @member appFeatureRequired Describes features a MEC application requires to run + * @member appFeatureOptional Describes features a MEC application may use if available + * @member isInsByMec Indicate whether the application instance is instantiated by the MEC Management + * @member appProfile Can be mapped to EAS profile as defined in ETSI TS 129 558 [19] + * @see ETSI GS MEC 011 V3.2.1 7.1.2.6-1: Attributes of AppInfo + */ + type record AppInfo { + Json.String appName, + Json.String appProvider optional, + CategoryRef appCategory optional, + Json.String appDId optional, + Json.String appInstanceId optional, + EndPointInfo endpoint optional, + ServiceDependencies appServiceRequired optional, + ServiceDependencies appServiceOptional optional, + FeatureDependencies appFeatureRequired optional, + FeatureDependencies appFeatureOptional optional, + Json.Bool isInsByMec optional, + AppProfile appProfile optional + } // End of type AppInfo + + /** + * @desc + * @see ETSI TS 129 558 V17.2.0 + */ + type record AppProfile { + // TODO + } // End of type AppProfile + /** * @desc Type of the interface. */ @@ -187,13 +238,19 @@ running /** * @desc This type represents the destination interface. + * member interfaceType Type of the interface, e.g. TUNNEL, MAC, IP, etc + * member tunnelInfo Included only if the destination interface type is "tunnel" + * member srcMacAddress If the interface type is "MAC", source address identifies the MAC address of the interface + * member dstMacAddress If the interface type is "MAC", destination address identifies the MAC address of the interface + * member dstIpAddress If the interface type is "IP", destination address identifies the IP address of the remote destination + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.5.3-1: Attributes of DestinationInterface */ type record DestinationInterface { - InterfaceType interfaceType, - TunnelInfo tunnelInfo optional, + InterfaceType interfaceType, + TunnelInfo tunnelInfo optional, DestinationInterface_MacAddress srcMacAddress optional, DestinationInterface_MacAddress dstMacAddress optional, - DestinationInterface_IpAddress dstIpAddress optional + DestinationInterface_IpAddress dstIpAddress optional } type record of DestinationInterface DestinationInterfaceList; @@ -232,18 +289,25 @@ running /** * @desc Time to live value. */ - type UInt32 Ttl; + type Json.UInteger Ttl; /** - * @desc This type represents the general information of a DNS rule. + * @desc This type represents the general information of a DNS rule + * member dnsRuleId Identifies the DNS Rule + * member domainName FQDN resolved by the DNS rule + * member ipAddressType 1 Specify the IP address type, value: IP_V6, IP_V4 + * member ipAddress IP address associated with the FQDN resolved by the DNS rule + * member ttl Time to live value, in seconds. + * member state Contains the DNS rule state: ACTIVE, INACTIVE + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.3-1: Attributes of DnsRule */ type record DnsRule { - DnsRule_Id dnsRuleId, - DomainName domainName, + DnsRule_Id dnsRuleId, + DomainName domainName, DnsRule_IpAddressType ipAddressType, - DnsRule_IpAddress ipAddress, - Ttl ttl, - DnsRule_State state + DnsRule_IpAddress ipAddress, + Ttl ttl, + DnsRule_State state } type record of DnsRule DnsRuleList; @@ -255,13 +319,13 @@ running /** * @desc Port portion of the address. */ - type UInt32 Address_Port; + type Json.UInteger Address_Port; /** * @desc A IP address and port pair. */ type record Address { - Host host, + Host host, Address_Port port_ } with { variant (port_) "name as 'port'"; @@ -276,7 +340,7 @@ running * @desc Entry point information of the service in a format defined by an implementation, or in an external specification. */ type record EndPointInfo_Alternative { - anytype alternative + anytype alternative optional } /** @@ -289,8 +353,15 @@ running */ type record length(1..infinity) of EndPointInfo_Uri EndPointInfo_UriList; + /** + * @desc Fully Qualified Domain Name of the service. + */ + type record length(1..infinity) of Json.String EndPointInfo_FqdnList; + /** * @desc This type represents a type of link and may be referenced from data structures. + * @member href URI referring to a resource + * @see ETSI GS MEC 011 V3.2.1 Table 6.3.2-1: Attributes of the LinkType */ type record LinkType { Href href @@ -337,8 +408,14 @@ running variant (links) "name as '_links'"; } + /** + * @desc This type represents a list of links related to currently existing subscriptions for a MEC application instance. + * @member self_ Self-referring URI + * @member subscriptions The MEC application instance's subscriptions + * @see ETSI GS MEC 011 V3.2.1 Table 6.2.2-1: Attributes of the SubscriptionLinkList + */ type record Links { - LinkType self_, + LinkType self_, Subscriptions subscriptions } with { variant (self_) "name as 'self'"; @@ -346,6 +423,8 @@ running /** * @desc This type represents a list of links related to currently existing subscriptions for a MEC application instance. + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 011 V3.2.1 Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record SubscriptionLinkList { Links links @@ -357,6 +436,7 @@ running * @desc The MEC application instance's subscriptions * @member href URI referring to the subscription * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 011 V3.2.1 Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record Subscription_ { Json.AnyURI href, @@ -390,10 +470,11 @@ running /** * @desc This type represents security information related to a transport. + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.5.4-1: Attributes of SecurityInfo */ type record SecurityInfo { OAuth2Info oAuth2Info optional, - UInt8 extentions optional + Json.UInt8 extentions optional } /** @@ -429,6 +510,12 @@ running /** * @desc Filtering criteria to match services for which events are requested to be reported + * @member serInstanceIds Identifiers of service instances about which to report events + * @member serNames Names of services about which to report events + * @member serCategories Categories of services about which to report events + * @member states States of the services about which to report events + * @member isLocal Restrict event reporting to whether the service is local to the MEC platform where the subscription is managed + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.3.2-1: Attributes of SerAvailabilityNotificationSubscription */ type record FilteringCriteria { SerInstanceIdList serInstanceIds optional, @@ -449,6 +536,7 @@ running /** * @desc The enumeration SerializerTypes represents types of serializers. + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.3-1: Enumeration SerializerType */ type enumerated SerializerType { JSON, @@ -483,6 +571,7 @@ running /** * @desc Contains the types of locality. + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.5-1: Enumeration LocalityType */ type enumerated LocalityType { MEC_SYSTEM, @@ -514,6 +603,20 @@ running /** * @desc This type represents the general information of a mobile edge service. + * @member serInstanceId Identifier of the service instance assigned by the MEPM/MEC platform + * @member serName The name of the service + * @member serCategory A Category reference + * @member version The version of the service + * @member state Contains the service state + * @member transportId Identifier of the platform-provided transport to be used by the service + * @member transportInfo Information regarding the transport used by the service + * @member serializer Indicate the supported serialization format of the service + * @member scopeOfLocality The scope of locality as expressed by "consumedLocalOnly" and "isLocal". + * @member consumedLocalOnly Indicate whether the service can only be consumed by the MEC applications located in the same locality (as defined by scopeOfLocality) as this service instance (TRUE) or not (FALSE) + * @member isLocal Indicate whether the service is located in the same locality (as defined by scopeOfLocality) as the consuming MEC application (TRUE) or not (FALSE) + * @member livenessInterval Interval (in seconds) between two consecutive "heartbeat" messages + * @member links Links to resources related to this resource + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.2.2-1: Attributes of ServiceInfo */ type record ServiceInfo { SerInstanceId serInstanceId optional, @@ -527,8 +630,8 @@ running LocalityType scopeOfLocality optional, Json.Bool consumedLocalOnly optional, Json.Bool isLocal optional, - UInt32 livenessInterval optional, - ServiceInfo_Link links + Json.UInteger livenessInterval optional, + ServiceInfo_Link links optional } with { variant (links) "name as '_links'"; } @@ -544,7 +647,7 @@ running /** * @desc Authentication key number. */ - type UInt32 AuthenticationKeyNum; + type Json.UInteger AuthenticationKeyNum; /** * @desc NTP authentication option. @@ -558,12 +661,12 @@ running /** * @desc Acceptable maximum rate of the Delay_Req messages in packets per second. */ - type UInt32 DelayReqMaxRate; + type Json.UInteger DelayReqMaxRate; /** * @desc NTP server local priority. */ - type UInt32 LocalPriority; + type Json.UInteger LocalPriority; /** * @desc Maximum poll interval for NTP messages, in seconds as a power of two. Range 3...17. @@ -596,10 +699,18 @@ running /** * @desc PTP Master local priority. */ - type UInt32 NtpServers_PtpMasterLocalPriority; + type Json.UInteger NtpServers_PtpMasterLocalPriority; /** * @desc NTP server detail. + * @member ntpServerAddrType Address type of NTP server + * @member ntpServerAddr NTP server address + * @member minPollingInterval Minimum poll interval for NTP messages + * @member maxPollingInterval Maximum poll interval for NTP messages + * @member localPriority NTP server local priority + * @member authenticationOption NTP authentication option + * @member authenticationKeyNum Authentication key number + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.4-1: Attributes of TimingCaps */ type record NtpServers { NtpServerAddrType ntpServerAddrType, @@ -623,17 +734,11 @@ running type record of TimingCaps_PtpMasters TimingCaps_PtpMastersList; /** - * @desc Time. - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - /** - * @desc This type represents the information provided by the mobile edge platform in response to the Timing capabilities Query message. + * @desc This type represents the information provided by the mobile edge platform in response to the Timing capabilities Query message + * @member timeStamp + * @member ntpServers Number of available NTP servers + * @member ptpMasters Number of available PTP Servers (referred to as "masters" in IEEE 1588-2019™ [i.2]) + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.4-1: Attributes of TimingCaps */ type record TimingCaps { TimeStamp timeStamp optional, @@ -650,7 +755,7 @@ running /** * @desc Used to match all IPv4 packets that have the same Differentiated Services Code Point (DSCP). */ - type UInt32 TrafficFilter_DSCP; + type Json.UInteger TrafficFilter_DSCP; /** * @desc Identify the traffic ip address. @@ -667,12 +772,12 @@ running /** * @desc Used to match all packets that have the same Quality Class Indicator (QCI). */ - type UInt32 TrafficFilter_QCI; + type Json.UInteger TrafficFilter_QCI; /** * @desc Used to match all IPv6 packets that have the same Traffic Class. */ - type UInt32 TrafficFilter_TC; + type Json.UInteger TrafficFilter_TC; /** * @desc Used for tag based traffic rule. @@ -694,6 +799,20 @@ running /** * @desc This type represents the traffic filter. + * @member srcAddress An IP address or a range of IP address + * @member dstAddress An IP address or a range of IP address + * @member srcPort A port or a range of ports. + * @member dstPort A port or a range of ports. + * @member protocol Specify the protocol of the traffic filter + * @member tag Used for tag based traffic rule + * @member srcTunnelAddress Used for GTP tunnel based traffic rule + * @member tgtTunnelAddress Used for GTP tunnel based traffic rule + * @member srcTunnelPort Used for GTP tunnel based traffic rule + * @member dstTunnelPort Used for GTP tunnel based traffic rule + * @member qCI Used to match all packets that have the same QCI + * @member dSCP Used to match all IPv4 packets that have the same DSCP + * @member tC Used to match all IPv6 packets that have the same TC + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.5.2-1: Attributes of TrafficFilter */ type record TrafficFilter { TrafficFilter_AddressList srcAddress optional, @@ -740,7 +859,7 @@ running /** * @desc Priority of this traffic rule. If traffic rule conflicts, the one with higher priority take precedence. */ - type UInt32 TrafficRule_Priority; + type Json.UInteger TrafficRule_Priority; /** * @desc Contains the traffic rule state. @@ -751,7 +870,15 @@ running } /** - * @desc This type represents the general information of a traffic rule. + * @desc This type represents the general information of a traffic rule + * member trafficRuleId Identify the traffic rule. + * member filterType Definition of filter per FLOW or PACKET + * member priority Priority of this traffic rule within the range 0 to 255] + * member trafficFilter The filter used to identify specific packets that need to be handled by the MEC host + * member action The action of the MEC host data plane when a packet matches the trafficFilter + * member dstInterface Describes the destination interface information + * member state Contains the traffic rule state: ACTIVE, INACTIVE + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.2.2-1: Attributes of TrafficRule */ type record TrafficRule { TrafficRule_Id trafficRuleId, @@ -797,25 +924,41 @@ running type Json.String TransportInfo_Version; /** - * @desc This type represents information about a transport endpoint. + * @desc This type represents information about a transport endpoint + * @member uris Entry point information of the service as string, formatted according to URI syntax (see IETF RFC 3986 [8]) + * @member fqdn Fully Qualified Domain Name of the service + * @member addresses Entry point information of the service as one or more pairs of IP address and port + * @member alternativeEntry point information of the service in a format defined by an implementation, or in an external specification + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.5.3-1: Attributes of EndPointInfo */ - type record TransportInfo_Endpoint { + type record EndPointInfo { EndPointInfo_UriList uris optional, + EndPointInfo_FqdnList fqdn optional, EndPointInfo_AddressList addresses optional, EndPointInfo_Alternative alternative optional } /** * @desc This type represents the general information of a mobile edge service. + * @member id The identifier of this transport + * @member name The name of this transport + * @member description Human-readable description of this transport + * @member type_ Type of the transport + * @member protocol The name of the protocol used. Shall be set to "HTTP" for a REST API + * @member version The version of the protocol used + * @member endpoint Information about the endpoint to access the transport + * @member security Information about the security used by the transport + * @member implSpecificInfo Additional implementation specific details of the transport + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.2.3-1: Attributes of TransportInfo */ type record TransportInfo { TransportInfo_Id id, TransportInfo_Name name, TransportInfo_Description description optional, - TransportTypes type_, + TransportType type_, TransportInfo_Protocol protocol, TransportInfo_Version version, - TransportInfo_Endpoint endpoint, + EndPointInfo endpoint, SecurityInfo security, TransportInfo_ImplSpecificInfo implSpecificInfo optional } with { @@ -824,9 +967,10 @@ running type record of TransportInfo TransportInfoList; /** - * @desc The enumeration TransportTypes represents types of transports. + * @desc The enumeration TransportType represents types of transports. + * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.4-1: Enumeration TransportType */ - type enumerated TransportTypes { + type enumerated TransportType { REST_HTTP, MB_TOPIC_BASED, MB_ROUTING, @@ -856,6 +1000,10 @@ running /** * @desc This type represents the tunnel information. + * @member tunnelType Type of the tunnel, e.g. GTP_U, GRE, etc + * @member tunnelDstAddress Destination address of the tunnel + * @member tunnelSrcAddress Source address of the tunnel + * @see ETSI GS MEC 011 V3.2.1 Table 7.1.5.4-1: Attributes of TunnelInfo */ type record TunnelInfo { TunnelInfo_TunnelType tunnelType, diff --git a/ttcn/LibMec/FederationEnablementAPI/module.mk b/ttcn/LibMec/FederationEnablementAPI/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..ff13bd478290a6caf17c3eaf23584f45a486c8ca --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/module.mk @@ -0,0 +1,6 @@ +sources := \ + ttcn/FederationEnablementAPI_Pics.ttcn \ + ttcn/FederationEnablementAPI_Pixits.ttcn \ + ttcn/FederationEnablementAPI_Templates.ttcn \ + ttcn/FederationEnablementAPI_Functions.ttcn \ + ttcn/FederationEnablementAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cdf7464695ef7e845f18950389d7885e5ad12e18 --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn @@ -0,0 +1,118 @@ +module FederationEnablementAPI_Functions { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + 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/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + import from FederationEnablementAPI_Templates all; + import from FederationEnablementAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_system_info( + out SystemInfo p_system_info + ) 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_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_fed_system_info( + m_system_info( + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_PROVIDER_1 + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fed_system_info( + mw_system_info( + PX_FED_SYSTEM_PROVIDER_1, + PX_FED_SYSTEM_NAME_1, + PX_FED_SYSTEM_ID_1 + )))))) -> value v_response { + tc_ac.stop; + + p_system_info := v_response.response.body.json_body.systemInfo; + log("f_create_system_info: INFO: IUT successfully responds to the subscription: ", p_system_info); + } + [] tc_ac.timeout { + log("f_create_system_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_system_info + + function f_delete_system_info( + in SystemInfo p_system_info + ) 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_delete( + PICS_ROOT_API & PX_FED_API_SUB & "/" & oct2char(unichar2oct(p_system_info.systemId, "UTF-8")), + 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_system_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_system_info + + function f_create_system_info_list( + out SystemInfoList p_system_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_system_info_list); i := i + 1) { + f_create_system_info(p_system_info_list[i]); + } + } // End of function f_create_system_info_list + + function f_delete_system_info_list( + in SystemInfoList p_system_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_system_info_list); i := i + 1) { + if (ispresent(p_system_info_list[i].systemId)) { + f_delete_system_info(p_system_info_list[i]); + } + } + } // End of function f_delete_system_info_list + +} // End of modue FederationEnablementAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d45a081bc96982519d7ddae5b20cde2242b4efaf --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pics.ttcn @@ -0,0 +1,8 @@ +module FederationEnablementAPI_Pics { + + /** + * @desc Does the IUT support MEC Federation API? + */ + modulepar boolean PICS_FED_API_SUPPORTED := true; + +} // End of module FederationEnablementAPI_Pics \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a13a3bf0b5c0c5e3e5b63cd93ad87f8bc79fa743 --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn @@ -0,0 +1,42 @@ +module FederationEnablementAPI_Pixits { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + + modulepar Json.String PX_FED_SYSTEM_ID_1 := ""; + + modulepar Json.String PX_FED_SYSTEM_NAME_1 := ""; + + modulepar Json.String PX_FED_SYSTEM_PROVIDER_1 := ""; + + modulepar Json.String PX_FED_SYSTEM_ID_2 := ""; + + modulepar Json.String PX_FED_SYSTEM_NAME_2 := ""; + + modulepar Json.String PX_FED_SYSTEM_PROVIDER_2 := ""; + + modulepar Json.String PX_FED_SYSTEM_ID_3 := ""; + + modulepar Json.String PX_FED_SYSTEM_NAME_3 := ""; + + modulepar Json.String PX_FED_SYSTEM_PROVIDER_3 := ""; + + modulepar Json.String PX_FED_SYSTEM_ID_UNKNOWN := ""; + + modulepar Json.String PX_FED_SYSTEM_NAME_UNKNOWN := ""; + + modulepar Json.String PX_FED_SYSTEM_PROVIDER_UNKNOWN := ""; + + modulepar Json.String PX_FED_ENDPOINT_URI_1 := ""; + + modulepar Json.String PX_FED_ENDPOINT_URI_2 := ""; + + modulepar Json.String PX_FED_ENDPOINT_URI_3 := ""; + +} // End of module FederationEnablementAPI_Pixits \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a724d4e0ad97be03f96b17a161ec6592f4cf5e85 --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn @@ -0,0 +1,51 @@ +module FederationEnablementAPI_Templates { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + + template (omit) SystemInfo m_system_info( + in Json.String p_system_name, + in Json.String p_system_provider, + in template (omit) Json.String p_system_id := omit + ) := { + systemId := p_system_id, + systemName := p_system_name, + systemProvider := p_system_provider + } // End of template m_system_info + + template (present) SystemInfo mw_system_info( + template (present) Json.String p_system_name := ?, + template (present) Json.String p_system_provider := ?, + template Json.String p_system_id := * + ) := { + systemId := p_system_id, + systemName := p_system_name, + systemProvider := p_system_provider + } // End of template mw_system_info + + template (omit) SystemInfoUpdate m_system_info_update( + in template (omit) Json.String p_system_name := omit, + in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo p_end_point := omit + ) := { + systemName := p_system_name, + endPoint := p_end_point + } // End of template m_system_info_update + + template SystemInfoUpdate mw_system_info_update( + template Json.String p_system_name := *, + template EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo p_end_point := * + ) := { + systemName := p_system_name, + endPoint := p_end_point + } // End of template mw_system_info_update + +} // End of module FederationEnablementAPI_Templates \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..640e6c2e4d9e90a8f195f70b7d101fcec643bffa --- /dev/null +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn @@ -0,0 +1,42 @@ +/** + * @desc The ETSI MEC ISG MEC040 Radio Network Information API described using OpenAPI + * @see TODO + */ +module FederationEnablementAPI_TypesAndValues { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + /** + * @desc Information provided by the MEC orchestrator as a part of the "Registration of MEC system to the federation" + * @member systemId Identifier of the MEC system + * @member systemName The name of the MEC system + * @member systemProvider Provider of the MEC system + * @see Draft ETSI GS MEC 040 V3.1.3 (2022-12) Table 6.2.2-1: Attributes of SystemInfo + */ + type record SystemInfo { + Json.String systemId optional, // Shall be absent in POST request + Json.String systemName, + Json.String systemProvider + } // End of type SystemInfo + type record of SystemInfo SystemInfoList; + + /** + * @desc information provided by MEC orchestrator as a part of the "Update of MEC system(s) to the federation" + * @member systemName The name of the MEC system + * @member endpoint Endpoint information (e.g. URI, FQDN, IP address) of MEC federator + * @see Draft ETSI GS MEC 040 V3.1.3 (2022-12) Table 6.2.3-1: Attributes of SystemInfoUpdate + */ + type record SystemInfoUpdate { + Json.String systemName optional, + EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo endPoint optional + } // End of type SystemInfoUpdate + +} with { + encode "JSON" +} // End of module FederationEnablementAPI_TypesAndValues \ No newline at end of file diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/module.mk b/ttcn/LibMec/FixedAccessInformationServiceAPI/module.mk index 341b7f87750406b3e72b6b8ac6e344dc73fb2a69..2d89431e97f033dc6686d3d8c0df75b50ce845c8 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/module.mk +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/module.mk @@ -2,5 +2,6 @@ sources := \ ttcn/FixedAccessInformationServiceAPI_Pics.ttcn \ ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn \ ttcn/FixedAccessInformationServiceAPI_Templates.ttcn \ + ttcn/FixedAccessInformationServiceAPI_Functions.ttcn \ ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Functions.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Functions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3ce305c2aec485141fd5e6abd5a2ace3f4a0463c --- /dev/null +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Functions.ttcn @@ -0,0 +1,342 @@ +module FixedAccessInformationServiceAPI_Functions { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + 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/FixedAccessInformationServiceAPI + import from FixedAccessInformationServiceAPI_TypesAndValues all; + import from FixedAccessInformationServiceAPI_Templates all; + import from FixedAccessInformationServiceAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_onu_alarm_subscription( + out OnuAlarmSubscription p_onu_alarm_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_FAI_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_fai_onu_alarm_subscription( + m_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_onu_alarm + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI + )))))) -> 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_FAI_SUB_URI & "/(?*)", + 0 + ); + p_onu_alarm_subscription := v_response.response.body.json_body.onuAlarmSubscription; + log("f_create_onu_alarm_subscription: INFO: IUT successfully responds to the subscription: ", p_onu_alarm_subscription); + log("f_create_onu_alarm_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_onu_alarm_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_onu_alarm_subscription + + function f_delete_onu_alarm_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_FAI_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_onu_alarm_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_onu_alarm_subscription + + function f_create_dev_info_subscription( + out DevInfoSubscription p_dev_info_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_FAI_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_fai_dev_info_subscription( + m_dev_info_subscription( + PX_DEV_ALARM_SUB_CALLBACK_URI, + m_filter_criteria_dev_info + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_ONU_ALARM_SUB_CALLBACK_URI + )))))) -> 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_FAI_SUB_URI & "/(?*)", + 0 + ); + p_dev_info_subscription := v_response.response.body.json_body.devInfoSubscription; + log("f_create_dev_info_subscription: INFO: IUT successfully responds to the subscription: ", p_dev_info_subscription); + log("f_create_dev_info_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_onu_alarm_suf_create_dev_info_subscriptionbscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_dev_info_subscription + + function f_delete_dev_info_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_FAI_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_dev_info_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_dev_info_subscription + + function f_create_cm_conn_subscription( + out CmConnSubscription p_cm_conn_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_FAI_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_fai_cm_conn_subscription( + m_cm_conn_subscription( + PX_CM_CONN_SUB_CALLBACK_URI + //m_filter_criteria_dev_info + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fai_onu_alarm_subscription( + mw_onu_alarm_subscription( + PX_CM_CONN_SUB_CALLBACK_URI + )))))) -> 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_FAI_SUB_URI & "/(?*)", + 0 + ); + p_cm_conn_subscription := v_response.response.body.json_body.cmConnSubscription; + log("f_create_cm_conn_subscription: INFO: IUT successfully responds to the subscription: ", p_cm_conn_subscription); + log("f_create_cm_conn_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_onu_alarm_suf_create_cm_conn_subscriptionbscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_cm_conn_subscription + + function f_delete_cm_conn_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_FAI_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_cm_conn_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_cm_conn_subscription + + function f_create_ani_alarm_subscription( + out AniAlarmSubscription p_ani_alarm_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_FAI_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_fai_ani_alarm_subscription( + m_ani_alarm_subscription( + PX_ANI_ALARM_SUB_CALLBACK_URI + //m_filter_criteria_ani_alarm + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_fai_ani_alarm_subscription( + mw_ani_alarm_subscription( + PX_ANI_ALARM_SUB_CALLBACK_URI + )))))) -> 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_FAI_SUB_URI & "/(?*)", + 0 + ); + p_ani_alarm_subscription := v_response.response.body.json_body.aniAlarmSubscription; + log("f_create_ani_alarm_subscription: INFO: IUT successfully responds to the subscription: ", p_ani_alarm_subscription); + log("f_create_ani_alarm_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_ani_alarm_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_ani_alarm_subscription + + function f_delete_ani_alarm_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_FAI_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_ani_alarm_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_ani_alarm_subscription + +} // End of module FixedAccessInformationServiceAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn index 670fd237eb1f9daaa02f27c498eef25935b4a47d..e5c244989bfe106b341bce8116fe2b0956145497 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pics.ttcn @@ -1,5 +1,8 @@ module FixedAccessInformationServiceAPI_Pics { + /** + * @desc Does the IUT support MEC Federation API? + */ modulepar boolean PICS_FAI_API_SUPPORTED := true; } // End of module FixedAccessInformationServiceAPI_Pics diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn index 563b4f2cbd62aeb4bf1fbddadf10563fadef16c0..28872c3a5bc71abeb0fcb5748699dcaa81ed428a 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Pixits.ttcn @@ -6,17 +6,17 @@ module FixedAccessInformationServiceAPI_Pixits { // LibMec_FixedAccessInformationServiceAPI import from FixedAccessInformationServiceAPI_TypesAndValues all; - modulepar GatewayId PX_FAI_GW_ID := { "" }; + modulepar Json.String PX_FAI_CM_ID := ""; - modulepar GatewayId PX_NON_EXISTING_FAI_GW_ID := { "" }; + modulepar Json.String PX_NON_EXISTING_FAI_CM_ID := ""; - modulepar CmdId PX_FAI_CM_ID := ""; + modulepar Json.String PX_FAI_ONU_ID := ""; - modulepar CmdId PX_NON_EXISTING_FAI_CM_ID := ""; + modulepar Json.String PX_NON_EXISTING_FAI_ONU_ID := ""; - modulepar OnuId PX_FAI_ONU_ID := ""; + modulepar Json.String PX_FAI_GW_ID := ""; - modulepar OnuId PX_NON_EXISTING_FAI_ONU_ID := ""; + modulepar Json.String PX_NON_EXISTING_FAI_GW_ID := ""; modulepar Json.String PX_FAI_SUB_ID := ""; @@ -24,6 +24,12 @@ module FixedAccessInformationServiceAPI_Pixits { modulepar Json.AnyURI PX_ONU_ALARM_SUB_CALLBACK_URI := ""; + modulepar Json.AnyURI PX_DEV_ALARM_SUB_CALLBACK_URI := ""; + + modulepar Json.AnyURI PX_CM_CONN_SUB_CALLBACK_URI := ""; + + modulepar Json.AnyURI PX_ANI_ALARM_SUB_CALLBACK_URI := ""; + modulepar Json.String PX_SUBSCRIPTION_ID := ""; modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := ""; diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn index 1534408ef535d6e97b1fc9231e2d2c871bf0f38e..b97c9aa16ea9884ab0ae93101552d38815066dce 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_Templates.ttcn @@ -6,32 +6,51 @@ module FixedAccessInformationServiceAPI_Templates { // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec_FixedAccessInformationServiceAPI import from FixedAccessInformationServiceAPI_TypesAndValues all; import from FixedAccessInformationServiceAPI_Pixits all; template (omit) FaInfo m_fa_info( in template (value) CpInfo p_customerPremisesInfo, + in template (value) LastMileTech p_lastMileTech, + in template (value) InterfaceType p_interfaceType, in template (omit) TimeStamp p_timeStamp := omit, - in template (omit) ConnectivityInfo p_connectivityInfo := omit - ) := { - timeStamp := p_timeStamp, - customerPremisesInfo := p_customerPremisesInfo, - connectivityInfo := p_connectivityInfo - } // End of template m_fa_info - + in template (omit) Json.Integer p_dsbw := omit, + in template (omit) Json.Integer p_usbw := omit, + in template (omit) Json.Integer p_latency := omit + ) := { + timeStamp := p_timeStamp, + customerPremisesInfo := p_customerPremisesInfo, + lastMileTech := p_lastMileTech, + interfaceType := p_interfaceType, + dsbw := p_dsbw, + usbw := p_usbw, + latency := p_latency + } // End of template m_fa_info + template FaInfo mw_fa_info( template (present) CpInfo p_customerPremisesInfo := ?, + template (present) LastMileTech p_lastMileTech := ?, + template (present) InterfaceType p_interfaceType := ?, template TimeStamp p_timeStamp := *, - template ConnectivityInfo p_connectivityInfo := * - ) := { - timeStamp := p_timeStamp, - customerPremisesInfo := p_customerPremisesInfo, - connectivityInfo := p_connectivityInfo - } // End of template mw_fa_info + template Json.Integer p_dsbw := *, + template Json.Integer p_usbw := *, + template Json.Integer p_latency := * + ) := { + timeStamp := p_timeStamp, + customerPremisesInfo := p_customerPremisesInfo, + lastMileTech := p_lastMileTech, + interfaceType := p_interfaceType, + dsbw := p_dsbw, + usbw := p_usbw, + latency := p_latency + } // End of template mw_fa_info template (omit) DeviceInfo m_device_info( - in template (value) GatewayId p_gwId, + in template (value) Json.String p_gwId, in template (value) DeviceStatus p_deviceStatus, in template (value) Json.Number p_upTime, in template (value) Json.Number p_iPConnectionUpTime, @@ -40,7 +59,7 @@ module FixedAccessInformationServiceAPI_Templates { in template (value) Json.Number p_totalPacketsSent, in template (value) Json.Number p_totalPacketsReceived, in template (omit) TimeStamp p_timeStamp := omit, - in template (omit) DeviceId p_deviceId := omit, + in template (omit) Json.String p_deviceId := omit, in template (omit) IPPingDiagnostics p_iPPingDiagnostics := omit, in template (omit) TraceRouteDiagnostics p_traceRouteDiagnostics := omit, in template (omit) DownloadDiagnostics p_downloadDiagnostics := omit, @@ -63,7 +82,7 @@ module FixedAccessInformationServiceAPI_Templates { } // End of template m_device_info template DeviceInfo mw_device_info( - template (present) GatewayId p_gwId := ?, + template (present) Json.String p_gwId := ?, template (present) DeviceStatus p_deviceStatus := ?, template (present) Json.Number p_upTime := ?, template (present) Json.Number p_iPConnectionUpTime := ?, @@ -72,7 +91,7 @@ module FixedAccessInformationServiceAPI_Templates { template (present) Json.Number p_totalPacketsSent := ?, template (present) Json.Number p_totalPacketsReceived := ?, template TimeStamp p_timeStamp := *, - template DeviceId p_deviceId := *, + template Json.String p_deviceId := *, template IPPingDiagnostics p_iPPingDiagnostics := *, template TraceRouteDiagnostics p_traceRouteDiagnostics := *, template DownloadDiagnostics p_downloadDiagnostics := *, @@ -96,133 +115,310 @@ module FixedAccessInformationServiceAPI_Templates { template (omit) CableLineInfo m_cable_line_info( in template (value) CpInfo p_customerPremisesInfo, - in template (value) CmdInfo p_cmdInfo, - in template (omit) TimeStamp p_timeStamp := omit + in template (value) Json.String p_cmdId, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) CmStatus p_cmStatus := omit, + in template (omit) CmDpvStats p_cmDpvStats := omit, + in template (omit) ServiceFlowStats p_serviceFlowStats := omit ) := { timeStamp := p_timeStamp, customerPremisesInfo := p_customerPremisesInfo, - cmdInfo := p_cmdInfo + cmdId := p_cmdId, + cmStatus := p_cmStatus, + cmDpvStats := p_cmDpvStats, + serviceFlowStats := p_serviceFlowStats } // End of template m_cable_line_info template CableLineInfo mw_cable_line_info( template (present) CpInfo p_customerPremisesInfo := ?, - template (present) CmdInfo p_cmdInfo := ?, - template TimeStamp p_timeStamp := * + template (present) Json.String p_cmdId := ?, + template TimeStamp p_timeStamp := *, + template CmStatus p_cmStatus := *, + template CmDpvStats p_cmDpvStats := *, + template ServiceFlowStats p_serviceFlowStats := * + ) := { timeStamp := p_timeStamp, customerPremisesInfo := p_customerPremisesInfo, - cmdInfo := p_cmdInfo + cmdId := p_cmdId, + cmStatus := p_cmStatus, + cmDpvStats := p_cmDpvStats, + serviceFlowStats := p_serviceFlowStats } // End of template mw_cable_line_info template (omit) PonInfo m_pon_info( in template (value) CpInfo p_customerPremisesInfo, - in template (value) PonSYS_ID p_ponSYS_ID, - in template (value) OpticalNetworkInfo p_opticalNetworkInfo, + in template (value) Json.String p_ponSYS_ID, + in template (value) Json.String p_onuId, + in template (value) PonTech p_ponTech, + in template (value) OperationalState p_operationalState, + in template (value) DsRate p_dsRate, + in template (value) UsRate p_usRate, in template (omit) TimeStamp p_timeStamp := omit - ) := { + ) := { timeStamp := p_timeStamp, customerPremisesInfo := p_customerPremisesInfo, ponSYS_ID := p_ponSYS_ID, - opticalNetworkInfo := p_opticalNetworkInfo + onuId := p_onuId, + ponTech := p_ponTech, + operationalState := p_operationalState, + dsRate := p_dsRate, + usRate := p_usRate } // End of template m_pon_info template PonInfo mw_pon_info( template (present) CpInfo p_customerPremisesInfo := ?, - template (present) PonSYS_ID p_ponSYS_ID := ?, - template (present) OpticalNetworkInfo p_opticalNetworkInfo := ?, + template (present) Json.String p_ponSYS_ID := ?, + template (present) Json.String p_onuId := ?, + template (present) PonTech p_ponTech := ?, + template (present) OperationalState p_operationalState := ?, + template (present) DsRate p_dsRate := ?, + template (present) UsRate p_usRate := ?, template TimeStamp p_timeStamp := * - ) := { + ) := { timeStamp := p_timeStamp, customerPremisesInfo := p_customerPremisesInfo, ponSYS_ID := p_ponSYS_ID, - opticalNetworkInfo := p_opticalNetworkInfo + onuId := p_onuId, + ponTech := p_ponTech, + operationalState := p_operationalState, + dsRate := p_dsRate, + usRate := p_usRate } // End of template mw_pon_info template (omit) SubscriptionLinkList m_subscription_link_list( - in template (value) Links p_links, - in template (omit) Subscriptions p_subscription := omit - ) := { - links := p_links, - subscription := p_subscription + in template (value) SubscriptionLinks p_links + ) := { + links := p_links } // End of template m_subscription_link_list template SubscriptionLinkList mw_subscription_link_list( - template (present) Links p_links := ?, - template Subscriptions p_subscription := * - ) := { - links := p_links, - subscription := p_subscription + template (present) SubscriptionLinks p_links := ? + ) := { + links := p_links } // End of template m_wsubscription_link_list template (omit) OnuAlarmSubscription m_onu_alarm_subscription( in template (value) Json.AnyURI p_callbackReference, in template (value) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit - ) := { - subscriptionType := "OnuAlarmSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaOnuAlarm := p_filterCriteriaOnuAlarm, - expiryDeadline := p_expiryDeadline + ) := { + subscriptionType := "OnuAlarmSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaOnuAlarm := p_filterCriteriaOnuAlarm, + expiryDeadline := p_expiryDeadline } // End of template m_onu_alarm_subscription - + template (omit) OnuAlarmSubscription m_onu_alarm_subscription_bad_request( in template (value) Json.AnyURI p_callbackReference, in template (value) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) modifies m_onu_alarm_subscription := { subscriptionType := "BadSubscriptionType" } // End of template m_onu_alarm_subscription_bad_request - template OnuAlarmSubscription mw_onu_alarm_subscription( - template (present) Json.AnyURI p_callbackReference := ?, - template (present) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm := ?, - template Links p_links := *, - template TimeStamp p_expiryDeadline := * - ) := { - subscriptionType := "OnuAlarmSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaOnuAlarm := p_filterCriteriaOnuAlarm, - expiryDeadline := p_expiryDeadline + template (present) OnuAlarmSubscription mw_onu_alarm_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template (present) FilterCriteriaOnuAlarm p_filterCriteriaOnuAlarm := ?, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "OnuAlarmSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaOnuAlarm := p_filterCriteriaOnuAlarm, + expiryDeadline := p_expiryDeadline } // End of template mw_onu_alarm_subscription template (omit) FilterCriteriaOnuAlarm m_filter_criteria_onu_alarm( in template (value) OnuIds p_onuId := { PX_FAI_ONU_ID }, in template (omit) CpInfo p_customerPremisesIxnfo := omit, - in template (omit) Alarms p_alarms := omit - ) := { + in template (omit) AlarmList p_alarms := omit + ) := { customerPremisesInfo := p_customerPremisesIxnfo, onuId := p_onuId, alarms := p_alarms } // End of template m_filter_criteria_onu_alarm - + template FilterCriteriaOnuAlarm mw_filter_criteria_onu_alarm( template (present) OnuIds p_onuId := ?, template CpInfo p_customerPremisesIxnfo := *, - template Alarms p_alarms := * - ) := { + template AlarmList p_alarms := * + ) := { customerPremisesInfo := p_customerPremisesIxnfo, onuId := p_onuId, alarms := p_alarms } // End of template mw_filter_criteria_onu_alarm - template (value) TimeStamp m_time_stamp( - in UInt32 p_seconds, - in UInt32 p_nanoSeconds := 0 - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of temlate m_time_stamp - - template (present) TimeStamp mw_time_stamp( - template (present) UInt32 p_seconds := ?, - template (present) UInt32 p_nanoSeconds := ? - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of temlate mw_time_stamp - + template (omit) DevInfoSubscription m_dev_info_subscription( + in template (value) Json.AnyURI p_callbackReference, + in template (value) FilterCriteriaDevInfo p_filterCriteriaDevInfo, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "DevInfoSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaDevInfo := p_filterCriteriaDevInfo, + expiryDeadline := p_expiryDeadline + } // End of template m_dev_info_subscription + + template (present) DevInfoSubscription mw_dev_info_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template (present) FilterCriteriaDevInfo p_filterCriteriaDevInfo := ?, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "DevInfoSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaDevInfo := p_filterCriteriaDevInfo, + expiryDeadline := p_expiryDeadline + } // End of template mw_dev_info_subscription + + template (omit) FilterCriteriaDevInfo m_filter_criteria_dev_info( + in template (value) GatewayIdList p_gwId := { PX_FAI_GW_ID }, + in template (omit) DeviceIdList p_deviceId := omit, + in template (omit) DeviceErrStatus p_deviceErrStatus := omit + ) := { + gwId := p_gwId, + deviceId := p_deviceId, + deviceErrStatus := p_deviceErrStatus + } // End of template m_filter_criteria_dev_info + + template (present) FilterCriteriaDevInfo mw_filter_criteria_dev_info( + template (present) GatewayIdList p_gwId := ?, + template DeviceIdList p_deviceId := *, + template DeviceErrStatus p_deviceErrStatus := * + ) := { + gwId := p_gwId, + deviceId := p_deviceId, + deviceErrStatus := p_deviceErrStatus + } // End of template mw_filter_criteria_dev_info + + template (omit) CmConnSubscription m_cm_conn_subscription( + in template (value) Json.AnyURI p_callbackReference, + in template (omit) FilterCriteriaCmConn p_filterCriteriaCmConn := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "CmConnSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaCmConn := p_filterCriteriaCmConn, + expiryDeadline := p_expiryDeadline + } // End of template m_cm_conn_subscription + + template (present) CmConnSubscription mw_cm_conn_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template FilterCriteriaCmConn p_filterCriteriaCmConn := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "CmConnSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaCmConn := p_filterCriteriaCmConn, + expiryDeadline := p_expiryDeadline + } // End of template mw_cm_conn_subscription + + template (omit) FilterCriteriaCmConn m_filter_criteria_cm_conn( + in template (omit) CpInfo p_customerPremisesInfo := omit, + in template (omit) CmIf p_cmIf := omit + ) := { + customerPremisesInfo := p_customerPremisesInfo, + cmIf := p_cmIf + } // End of template m_filter_criteria_cm_conn + + template FilterCriteriaCmConn mw_filter_criteria_cm_conn( + template CpInfo p_customerPremisesInfo := *, + template CmIf p_cmIf := * + ) := { + customerPremisesInfo := p_customerPremisesInfo, + cmIf := p_cmIf + } // End of template mw_filter_criteria_cm_conn + + template (omit) AniAlarmSubscription m_ani_alarm_subscription( + in template (value) Json.AnyURI p_callbackReference, + in template (omit) FilterCriteriaAniAlarm p_filterCriteriaAniAlarm := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "AniAlarmSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAniAlarm := p_filterCriteriaAniAlarm, + expiryDeadline := p_expiryDeadline + } // End of template m_ani_alarm_subscription + + template (present) AniAlarmSubscription mw_ani_alarm_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template FilterCriteriaAniAlarm p_filterCriteriaAniAlarm := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "AniAlarmSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAniAlarm := p_filterCriteriaAniAlarm, + expiryDeadline := p_expiryDeadline + } // End of template mw_ani_alarm_subscription + + template (omit) FilterCriteriaAniAlarm m_filter_criteria_ani_alarm( + in template (value) OnuIds p_onuId, + in template (value) AniId p_aniId, + in template (omit) CpInfo p_customerPremisesInfo := omit + ) := { + customerPremisesInfo := p_customerPremisesInfo, + onuId := p_onuId, + aniId := p_aniId + } // End of template m_filter_criteria_ani_alarm + + template (present) FilterCriteriaAniAlarm mw_filter_criteria_ani_alarm( + template (present) OnuIds p_onuId := ?, + template (present) AniId p_aniId := ?, + template CpInfo p_customerPremisesInfo := * + ) := { + customerPremisesInfo := p_customerPremisesInfo, + onuId := p_onuId, + aniId := p_aniId + } // End of template mw_filter_criteria_ani_alarm + } // End of module FixedAccessInformationServiceAPI_Templates diff --git a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn index d576b822cd4a5f1fb03b77a2b375d24ce3947adf..2145c5c9c2ae46c9d96fd93e09bce788a5d986da 100644 --- a/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/FixedAccessInformationServiceAPI/ttcn/FixedAccessInformationServiceAPI_TypesAndValues.ttcn @@ -1,111 +1,78 @@ +/** + * @author ETSI / STF569 / TTF T027 + * @version $Url$ + * $Id$ + * @desc Types and Values for ETSI GS MEC 029 V2.2.1 (2022-01) + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + */ module FixedAccessInformationServiceAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - - /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 Seconds; + // LibMec + import from LibMec_TypesAndValues all; /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type UInt32 NanoSeconds; - - /** - * @desc - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } - - /** - * @desc This type represents the fixed access information. - * @member timeStamp Time stamp. - * @member customerPremisesInfo The physical location of a customer site. - * @member connectivityInfo The per connectivity domain fixed access information. + * @desc This type represents the fixed access information + * @member timeStamp Time stamp + * @member customerPremisesInfo The physical location of a customer site + * @member lastMileTech An informative field identifying the last mile access technology used + * @member interfaceType The physical interface used for the end customer site + * @member dsbw The bandwidth (in Mbps) from the network towards the customer site + * @member usbw The bandwidth (in Mbps) from the customer site towards the network + * @member latency Maximum baseline latency + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.2-1: Attributes of the FaInfo */ type record FaInfo { - TimeStamp timeStamp optional, - CpInfo customerPremisesInfo, - ConnectivityInfo connectivityInfo optional - } - - /** - * @desc The per connectivity domain fixed access information. - * @member LastMileTech An informative field identifying the last mile access technology used. - * @member InterfaceType The physical interface used for the end customer site – as defined in IEEE802, ITU, Broadband Forum. - * @member dsbw The bandwidth (in Mbps) from the network towards the customer site. - * @member usbw The bandwidth (in Mbps) from the customer site towards the network. - * @member latency Maximum baseline latency (in ms) between customer site and service edge node. - */ - type record ConnectivityInfo { - LastMileTech lastMileTech optional, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo, + LastMileTech lastMileTech, InterfaceType interfaceType, - Json.Number dsbw optional, - Json.Number usbw optional, - Json.Number latency optional + Json.Integer dsbw optional, + Json.Integer usbw optional, + Json.Integer latency optional } - + /** - * @desc An informative field identifying the last mile access technology used. + * @desc An informative field identifying the last mile access technology used + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.2-1: Attributes of the FaInfo */ type enumerated LastMileTech { - ADSL, - VDSL, - GPON, - XGPON, - NGPON2, - XGSPON, - GFAST, - P2PEthernet + ADSL (1), + VDSL (2), + GPON (3), + XGPON (4), + NGPON2 (5), + XGSPON (6), + GFAST (7), + P2PEthernet (8) + } with { + variant "JSON: as number" } /** - * @desc The physical interface used for the end customer site – as defined in IEEE802, ITU, Broadband Forum. + * @desc The physical interface used for the end customer site + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.2-1: Attributes of the FaInfo */ type enumerated InterfaceType { - e_100BASE_TX, - e_1000BASE_TX, - e_1000BASE_LX, - e_1000BASELX10, - e_1000BASEBX10, - e_1000BASE_LH, - e_1000Base_ZX, - ADSL_RJ11, - VDSL_RJ11, - GPON - } - - /** - * @desc Latitude (DATUM=WGS84) -90 to 90 in decimal degree format DDD.ddd - */ - type Json.Number Latitude; - - /** - * @desc Longitude (DATUM=WGS84) -180 to 180 in decimal degree format DDD.ddd - */ - type Json.Number Longitude; - - /** - * @desc Postal code for the location - */ - type Json.String PostalCode; - - type record CpInfo_{ - Latitude latitude optional, - Longitude longitude optional, - PostalCode postalCode optional + e_100BASE_TX (1), + e_1000BASE_TX (2), + e_1000BASE_LX (3), + e_1000BASELX10 (4), + e_1000BASEBX10 (5), + e_1000BASE_LH (6), + e_1000Base_ZX (7), + e_ADSL_RJ11 (8), + e_VDSL_RJ11 (9), + e_GPON (10) + } with { + variant "JSON: as number" } - type record of CpInfo_ CpInfo; - + /** * @desc This type represents the information of the device that is connected to a fixed access network. * @member timeStamp Time stamp. @@ -122,112 +89,86 @@ module FixedAccessInformationServiceAPI_TypesAndValues { * @member traceRouteDiagnostics The result of an IP-layer trace-route test * @member downloadDiagnostics The result of a HTTP and FTP DownloadDiagnostics Test * @member uploadDiagnostics The result of a HTTP and FTP UploadDiagnostics Test + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.3-1: Attributes of the DeviceInfo */ type record DeviceInfo { - TimeStamp timeStamp optional, - GatewayId gwId, - DeviceId deviceId optional, - DeviceStatus deviceStatus, - Json.Number upTime, - Json.Number iPConnectionUpTime, - Json.Number totalBytesSent, - Json.Number totalBytesReceived, - Json.Number totalPacketsSent, - Json.Number totalPacketsReceived, - IPPingDiagnostics iPPingDiagnostics optional, + TimeStamp timeStamp optional, + Json.String gwId, + Json.String deviceId optional, + DeviceStatus deviceStatus, + Json.Number upTime, + Json.Number iPConnectionUpTime, + Json.Number totalBytesSent, + Json.Number totalBytesReceived, + Json.Number totalPacketsSent, + Json.Number totalPacketsReceived, + IPPingDiagnostics iPPingDiagnostics optional, TraceRouteDiagnostics traceRouteDiagnostics optional, - DownloadDiagnostics downloadDiagnostics optional, - UploadDiagnostics uploadDiagnostics optional + DownloadDiagnostics downloadDiagnostics optional, + UploadDiagnostics uploadDiagnostics optional } - - /** - * @desc Information (typically the serial number) to identify an Internet Gateway Device through which the customer premises device is connected. - */ - type record of Json.String GatewayId; - - /** - * @desc Typically, the serial number of the device. - */ - type record of Json.String DeviceId; - + /** * @desc Current operational status of the device. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.3-1: Attributes of the DeviceInfo */ type enumerated DeviceStatus { - Up, - Initializing, - Error, - Disabled + Up (1), + Initializing (2), + Error (3), + Disabled (4) + } with { + variant "JSON: as number" } - - type record IPPingDiagnostics {} - type record TraceRouteDiagnostics {} - type record DownloadDiagnostics{} - type record UploadDiagnostics {} - + /** * @desc This type represents the information of the cable line of a fixed access network - * @member timeStamp Time stamp. - * @member customerPremisesInfo The physical location of a customer site. - * + * @member timeStamp Time stamp + * @member customerPremisesInfo The physical location of a customer site + * @member cmdId Information (typically the serial number) to identify a Cable Modem at subscriber locations intended for use in conveying data communications on a cable data system + * @member cmStatus It provides CM connectivity status information of the CM + * @member cmDpvStats It represents the DOCSIS Path Verify Statistics collected in the cable modem device + * @member serviceFlowStats It describes statistics associated with the Service Flows in a managed device + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo */ type record CableLineInfo { - TimeStamp timeStamp optional, - CpInfo customerPremisesInfo, - CmdInfo cmdInfo - } - - /** - * @desc - * @member cmdId Information (typically the serial number) to identify a Cable Modem at subscriber locations intended for use in conveying data communications on a cable data system. - * @member cmStatus It provides CM connectivity status information of the CM. - * @member cmDpvStats It represents the DOCSIS Path Verify Statistics collected in the cable modem device. - * @member serviceFlowStats It describes statistics associated with the Service Flows in a managed device. - */ - type record CmdInfo_ { - CmdId cmdId, - CmStatus cmStatus optional, - CmDpvStats cmDpvStats optional, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo, + Json.String cmdId, + CmStatus cmStatus optional, + CmDpvStats cmDpvStats optional, ServiceFlowStats serviceFlowStats optional } - type record of CmdInfo_ CmdInfo; - - /** - * @desc Information (typically the serial number) to identify a Cable Modem at subscriber locations intended for use in conveying data communications on a cable data system. - */ - type Json.String CmdId; - + /** - * @desc It provides CM connectivity status information of the CM. - * @member ifIndex It denotes the MAC Domain interface index of the CM. - * @member It defines the CM connectivity state. - * @member resets It denotes the number of times the CM reset or initialized this interface. - * @member lostSyncs It denotes the number of times the CM lost synchronization with the downstream channel. - * @member invalidRegRsps It denotes the number of times the CM received invalid registration response messages. + * @desc It provides CM connectivity status information of the CM + * @member ifIndex It denotes the MAC Domain interface index of the CM + * @member cmRegState It defines the CM connectivity state + * @member resets It denotes the number of times the CM reset or initialized this interface + * @member lostSyncs It denotes the number of times the CM lost synchronization with the downstream channel + * @member invalidRegRsps It denotes the number of times the CM received invalid registration response messages * @member energyMgt1x1OperStatus It indicates whether the CM is currently operating in Energy Management 1x1 Mode * @member emDlsOperStatus It indicates whether the CM is currently operating in Energy Management DLS Mode + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo */ type record CmStatus_ { - IfIndex ifIndex, - CmRegState cmRegState, - Json.Number resets, - Json.Number lostSyncs, - Json.Number invalidRegRsps, - Json.Bool energyMgt1x1OperStatus, - Json.Bool emDlsOperStatus + Json.String ifIndex, + CmRegState cmRegState, + Json.Integer reset, + Json.Integer lostSyncs, + Json.Integer invalidRegRsps, + Json.Bool energyMgt1x1OperStatus, + Json.Bool emDlsOperStatus } type record of CmStatus_ CmStatus; - - /** - * @desc It denotes the MAC Domain interface index of the CM. - */ - type Json.String IfIndex; + type record of Json.String IfIndexList; /** * @desc It defines the CM connectivity state. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo */ type enumerated CmRegState { - other, + other (1), notReady, notSynchronized, phySynchronized, @@ -250,244 +191,664 @@ module FixedAccessInformationServiceAPI_TypesAndValues { dsTopologyResolutionInProgress, rangingInProgress, rfMuteAll + } with { + variant "JSON: as number" } - + type record of CmRegState CmRegStateList; + /** - * @desc It represents the DOCSIS Path Verify Statistics collected in the cable modem device. - * @member ifIndex It denotes the MAC Domain interface index of the CM. - * @member lastMeasLatency The last latency measurement. - * @member lastMeasTime the last measurement time of the last latency measurement. - * @member minLatency the minimum latency measurement. - * @member maxLatency the maximum latency measurement. - * @member avgLatency the average latency measurement. - * @member numMeas The number of latency measurements made. - */ - type record CmDpvStats_ { - IfIndex ifIndex, - Json.Number lastMeasLatency, - TimeStamp lastMeasTime, - Json.Number minLatency, - Json.Number maxLatency, - Json.Number avgLatency, - Json.Number numMeas - } - type record of CmDpvStats_ CmDpvStats; - + * @desc It represents the DOCSIS Path Verify Statistics collected in the cable modem device + * @member ifIndex It represents the interface Index of the Downstream Interface where the measurements are taken + * @member lastMeasLatency The last latency measurement + * @member lastMeasTime The last measurement time of the last latency measurement + * @member minLatency The minimum latency measurement + * @member maxLatency The maximum latency measurement + * @member avgLatency The average latency measurement + * @member numMeas The number of latency measurements made + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo + */ + type record CmDpvStats { + Json.String ifIndex, + Json.Integer lastMeasLatency, + TimeStamp lastMeasTime, + Json.Integer minLatency, + Json.Integer maxLatency, + Json.Integer avgLatency, + Json.Integer numMeas + } + /** - * @desc It describes statistics associated with the Service Flows in a managed device. - * @member ifIndex It denotes the MAC Domain interface index of the CM. - * @member serviceFlowInfo It represents the information of a Service Flow. + * @desc It describes statistics associated with the Service Flows in a managed device + * @member ifIndex It represents the interface index of the MAC Domain of the Service Flow + * @member serviceFlowInfo It represents the information of a Service Flow + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo */ - type record ServiceFlowStats_ { - IfIndex ifIndex, - ServiceFlowInfo serviceFlowInfo + type record ServiceFlowStats { + Json.String ifIndex, + ServiceFlowInfoList serviceFlowInfo } - type record of ServiceFlowStats_ ServiceFlowStats; - + /** - * @desc It represents the information of a Service Flow. - * @member ifIndex It denotes the MAC Domain interface index of the CM. - * @member serviceFlowId It represents an identifier assigned to a Service Flow by CMTS within a MAC Domain. - * @member pkts For outgoing Service Flows, this attribute counts the number of Packet Data PDUs forwarded to this Service Flow. For incoming upstream CMTS service flows, this attribute counts the number of Packet Data PDUs actually received on the Service Flow identified by the SID for which the packet was scheduled. - * @member timeCreated It indicates the time when the service flow was created. - * @member timeActiveIt Indicates the number of seconds that the service flow has been active. - * @member policedDropPkts For upstream service flows, this attribute counts the number of Packet Data PDUs classified to this service flow dropped due to: (1) exceeding the selected Buffer Size for the service flow; or (2) UGS packets dropped due to exceeding the Unsolicited Grant Size with a Request/Transmission policy that requires such packets to be dropped. - * @member policedDelayPkts It counts only outgoing packets delayed in order to maintain the Maximum Sustained Traffic Rate. - * @member aqmDroppedPkts For upstream service flows on which AQM is enabled, this attribute counts the number of Packet Data PDUs classified to this service flow dropped due to Active Queue Management drop decisions. - */ - type record ServiceFlowInfo_ { - Json.Number serviceFlowId, - Json.Number pkts, - TimeStamp timeCreated, - Json.Number timeActive, - Json.Number policedDropPkts, - Json.Number policedDelayPkts, - Json.Number aqmDroppedPkts - } - type record of ServiceFlowInfo_ ServiceFlowInfo; - + * @desc It represents the information of a Service Flow + * @member serviceFlowId It represents an identifier assigned to a Service Flow by CMTS within a MAC Domain + * @member pkts For outgoing Service Flows, this attribute counts the number of Packet Data PDUs forwarded to this Service Flow + * For incoming upstream CMTS service flows, this attribute counts the number of Packet Data PDUs actually received on the Service Flow identified by the SID for which the packet was scheduled + * @member timeCreated It indicates the time when the service flow was created + * @member timeActive It indicates the number of seconds that the service flow has been active + * @member policedDropPkts For upstream service flows, this attribute counts the number of Packet Data PDUs classified to this service flow dropped + * @member policedDelayPkts It counts only outgoing packets delayed in order to maintain the Maximum Sustained Traffic Rate + * @member aqmDroppedPkts this attribute counts the number of Packet Data PDUs classified to this service flow dropped due to Active Queue Management drop decisions + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.4-1: Attributes of the CableLineInfo + */ + type record ServiceFlowInfoList { + Json.Integer serviceFlowId, + Json.Integer pkts, + TimeStamp timeCreated, + Json.Integer timeActive, + Json.Integer policedDropPkts, + Json.Integer policedDelayPkts, + Json.Integer aqmDroppedPkts + } + /** * @desc This type represents the information of the of an optical network (e.g., G-PON, XG-PON, NG-PON2, XGS-PON). * @member timeStamp Time stamp. * @member customerPremisesInfo The physical location of a customer site. * @member ponSYS_ID The 20-bit identity of the optical system within a certain domain. - * @member opticalNetworkInfo - */ - type record PonInfo { - TimeStamp timeStamp optional, - CpInfo customerPremisesInfo, - PonSYS_ID ponSYS_ID, - OpticalNetworkInfo opticalNetworkInfo - } - - type Json.String PonSYS_ID; - - /** - * @desc This type represents the information of the of an optical network (e.g., G-PON, XG-PON, NG-PON2, XGS-PON). - * @member onuId Information to identify an Optical Network Unit. - * @member ponTech An informative field identifying the optical technology used. - * @member operationalState It reports whether the ONU is currently capable of performing its function. + * @member onuId Information to identify an Optical Network Unit + * @member ponTech An informative field identifying the optical technology used + * @member operationalState It reports whether the ONU is currently capable of performing its function * @member dsRate Downstream line rate * @member usRate Upstream line rate + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo */ - type record OpticalNetworkInfo_ { - OnuId onuId, - PonTech ponTech, + type record PonInfo { + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo, + Json.String ponSYS_ID, + Json.String onuId, + PonTech ponTech, OperationalState operationalState, - DsRate dsRate, - UsRate usRate + DsRate dsRate, + UsRate usRate } - type record of OpticalNetworkInfo_ OpticalNetworkInfo; - - /** - * @desc Information to identify an Optical Network Unit. - */ - type Json.String OnuId; - type record of OnuId OnuIds; - + /** * @desc An informative field identifying the optical technology used. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo */ type enumerated PonTech { - GPON, - XGPON, - NGPON2, - XGSPON + GPON (1), + XGPON (2), + NGPON2 (3), + XGSPON (4) + } with { + variant "JSON: as number" } /** * @desc It reports whether the ONU is currently capable of performing its function. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo */ type enumerated OperationalState { - enabled, - disabled + enabled (1), + disabled (2) + } with { + variant "JSON: as number" } /** * @desc Upstream line rate + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo */ type enumerated DsRate { - e_ds_one, // 1 = 2.48832 Gbit/s: G-PON [i.9] or NG-PON2 option 2 [i.8] - e_ds_two // 9.95328 Gbit/s: XG-PON [i.10] or XGS-PON [i.11] or NG-PON2 option 1 [i.8] + e_ds_one (1), // 1 = 2.48832 Gbit/s: G-PON [i.9] or NG-PON2 option 2 [i.8] + e_ds_two (2) // 9.95328 Gbit/s: XG-PON [i.10] or XGS-PON [i.11] or NG-PON2 option 1 [i.8] + } with { + variant "JSON: as number" } /** * @desc Upstream line rate + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.5-1: Attributes of the PonInfo */ type enumerated UsRate { - e_us_one, // 1 = 1.24416 Gbit/s: G-PON option 1 [i.9] - e_us_two, // 2 = 2.48832 Gbit/s: G-PON option 2 [i.9] or XG-PON [i.10] or NG-PON2 option 2 [i.8] - e_us_three // 9.95328 Gbit/s: XGS-PON [i.11] + e_us_one (1), // 1 = 1.24416 Gbit/s: G-PON option 1 [i.9] + e_us_two (2), // 2 = 2.48832 Gbit/s: G-PON option 2 [i.9] or XG-PON [i.10] or NG-PON2 option 2 [i.8] + e_us_three (3) // 9.95328 Gbit/s: XGS-PON [i.11] + } with { + variant "JSON: as number" } - + + /** + * @desc This type represents a subscription to ONU alarm notifications from FAIS + * @member subscriptionType Shall be set to "OnuAlarmSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaOnuAlarm List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.2-1: Attributes of the OnuAlarmSubscription + */ + type record OnuAlarmSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaOnuAlarm filterCriteriaOnuAlarm, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + /** * @desc Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. * @member self_ Self referring URI. The URI shall be unique within the FAI API as it acts as an ID for the subscription. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.2-1: Attributes of the OnuAlarmSubscription */ type record Links { LinkType self_ } with { variant (self_) "name as 'self'"; } - + /** - * @desc This type represents a type of link and may be referenced from data structures. + * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response + * @member customerPremisesInfo Physical locations of the customer sites + * @member onuId Unique identifiers for the optical network units. + * @member alarms In case alarms is not included in the subscription request, the default value -1 = All shall be used and included in the response. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.2-1: Attributes of the OnuAlarmSubscription */ - type record LinkType { - Href href + type record FilterCriteriaOnuAlarm { + CpInfo customerPremisesInfo optional, + OnuIds onuId, + AlarmList alarms optional + } + type record of Json.String OnuIds; + + /** + * @desc In case alarms is not included in the subscription request, the default value -1 = All shall be used and included in the response + */ + type enumerated Alarm { + EquipmentAlarm (1), // (Functional failure on an internal interface) + PoweringAlarm, // (Loss of external power to battery backup unit. This alarm is typically derived through an external interface to a battery backup unit, and indicates that AC is no longer available to maintain battery charge.) + BatteryMissing, // (Battery is provisioned but missing) + BatteryFailure, // (Battery is provisioned and present but cannot recharge) + BatteryLow, // (Battery is provisioned and present but its voltage is too low) + PhysicalIntrusion, // (Applies if the ONU supports detection such as door or box open) + OnuSelfTestFailure, // (ONU has failed autonomous self-test) + DyingGasp, // ()ONU is powering off imminently due to loss of power to the ONU itself.) + TemperatureYellow, // (No service shutdown at present, but the circuit pack is operating beyond its recommended range.) + TemperatureRed, // ()Some services have been shut down to avoid equipment damage.) + VoltageYellow, // (No service shutdown at present, but the line power voltage is below its recommended minimum.) + VoltageRed, // (Some services have been shut down to avoid power collapse.) + OnuManualPowerOff, // (The ONU is shutting down because the subscriber has turned off its power switch.) + InvImage, // (Software image is invalid) + PseOverloadYellow, // (Indicates that the ONU is nearing its maximum ability to supply the known PoE demand of the attached PDs. The thresholds for declaring and clearing this alarm are vendor-specific.) + PseOverloadRed, // (Indicates that the ONU is unable to supply all of the PoE demand of the attached PDs and has removed or reduced power to at least one PD.) + All + } with { + variant "JSON: as number" } + type record of Alarm AlarmList; + + /** + * @desc This type represents a subscription to device information notifications from FAIS + * @member subscriptionType Shall be set to "DevInfoSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaDevInfo List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.3-1: Attributes of the DevInfoSubscription + */ + type record DevInfoSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaDevInfo filterCriteriaDevInfo, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of filtering criteria for the subscription + * @member gwId The identifier of an Internet Gateway Device through which the customer premises device is connected + * @member deviceId The device identifier + * @member deviceErrStatus The abnormal operational status of the device + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.3-1: Attributes of the DevInfoSubscription + */ + type record FilterCriteriaDevInfo { + GatewayIdList gwId optional, + DeviceIdList deviceId optional, + DeviceErrStatus deviceErrStatus optional + } + + /** + * @desc Information (typically the serial number) to identify an Internet Gateway Device through which the customer premises device is connected. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.3-1: Attributes of the DevInfoSubscription + */ + type record of Json.String GatewayIdList; + + /** + * @desc Typically, the serial number of the device. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.3-1: Attributes of the DevInfoSubscription + */ + type record of Json.String DeviceIdList; /** - * @desc URI referring to a resource. + * @desc Current operational status of the device. + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.2.3-1: Attributes of the DeviceInfo */ - type Json.String Href; + type enumerated DeviceErrStatus_ { + Error (1), + Disabled (2) + } with { + variant "JSON: as number" + } + type record of DeviceErrStatus_ DeviceErrStatus; + + /** + * @desc This type represents a subscription to cable modem connectivity state notifications from FAIS + * @member subscriptionType Shall be set to "CmConnSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaCmConn List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.4-1: Attributes of the CmConnSubscription + */ + type record CmConnSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaCmConn filterCriteriaCmConn, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of filtering criteria for the subscription + * @member customerPremisesInfo The physical location of a customer site + * @member cmIf + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.4-1: Attributes of the CmConnSubscription + */ + type record FilterCriteriaCmConn { + CpInfo customerPremisesInfo optional, + CmIf cmIf optional + } + + /** + * @desc + * @member customerPremisesInfo The physical location of a customer site + * @member cmId The identifier of a Cable Modem at subscriber locations intended for use in conveying data communications on a cable data system + * @member ifIndex The MAC Domain interface index of the CM + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.4-1: Attributes of the CmConnSubscription + */ + type record CmIf { + Json.String cmId, + IfIndexList ifIndex, + CmRegStateList cmRegState + } /** - * @desc This type represents a list of links related to currently existing subscriptions for the service consumer. - * @member links List of hyperlinks related to the resource. - * @member subscription A link to a subscription. + * @desc This type represents a list of links related to currently existing subscriptions for the service consumer + * @member links Hyperlink related to the resource + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.5-1: Attributes of the SubscriptionLinkList */ type record SubscriptionLinkList { - Links links, - Subscriptions subscription optional + SubscriptionLinks links } with { variant (links) "name as '_links'"; } - + + /** + * @desc Hyperlink related to the resource + * @member self_ URI of this resource. + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.5-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinks { + LinkType self_, + SubscriptionList subscription optional + } with { + variant (self_) "name as 'self'"; + } + /** * @desc A link to a subscription * @member href The URI referring to the subscription. * @member subscriptionType Type of subscription + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.5-1: Attributes of the SubscriptionLinkList */ type record Subscription_ { - Json.AnyURI href, + Json.AnyURI href, SubscriptionType subscriptionType } - type record of Subscription_ Subscriptions; - + type record of Subscription_ SubscriptionList; + /** * @desc Type of subscription + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.5-1: Attributes of the SubscriptionLinkList */ type enumerated SubscriptionType { - RESERVED, - ONU_ALARM, - DEVICE_ABNORMAL_ALERT, - CM_CONNECTIVITY_STATE, - ANI_ALARM + OnuAlarmSubscription, + DevInfoSubscription, + CmConnSubscription, + AniAlarmSubscription } - + /** - * @desc This type represents a subscription to ONU alarm notifications from FAIS. - */ - type record OnuAlarmSubscription { - Json.String subscriptionType, - Json.AnyURI callbackReference, - Links links optional, - FilterCriteriaOnuAlarm filterCriteriaOnuAlarm, - TimeStamp expiryDeadline optional + * @desc This type represents a subscription to cable modem connectivity state notifications from FAIS + * @member subscriptionType Shall be set to "AniAlarmSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaAniAlarm List of filtering criteria for the subscription + * @member expiryDeadline Identifies a boundary after which the subscription will expire + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.6-1: Attributes of the AniAlarmSubscription + */ + type record AniAlarmSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaAniAlarm filterCriteriaAniAlarm, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } - + /** - * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response - * @member customerPremisesInfo Physical locations of the customer sites - * @member onuId Unique identifiers for the optical network units. - * @member In case alarms is not included in the subscription request, the default value -1 = All shall be used and included in the response. + * @desc List of filtering criteria for the subscription + * @member customerPremisesInfo 0 to N physical locations of the customer sites + * @member onuId 1 to N unique identifiers for the optical network units + * @member aniId + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.6-1: Attributes of the AniAlarmSubscription */ - type record FilterCriteriaOnuAlarm { + type record FilterCriteriaAniAlarm { CpInfo customerPremisesInfo optional, OnuIds onuId, - Alarms alarms optional + AniId aniId } - + /** * @desc + * @member onuId The unique identifiers for the optical network unit + * @member aniId The index of an access network interface supported by the optical network unit + * @member alarms + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.3.6-1: Attributes of the AniAlarmSubscription + */ + type record AniId_ { + OnuIds onuId, + Json.String aniIndex, + AlarmList alarms optional + } + type record of AniId_ AniId + + /** + * @desc This type represents a notification from FAIS with regards to ONU alarms + * @member notificationType Shall be set to "OnuAlarmNotification" + * @member timeStamp Date and time of the generation of the notification + * @member customerPremisesInfo The physical location of the related customer sites\ + * @member onuId The unique identifier for an optical network unit + * @member alarm Indicates the alarm of the ONU + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.2-1: Attributes of the OnuAlarmNotification + */ + type record OnuAlarmNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo optional, + Json.String onuId, + Alarm alarm + } + + /** + * @desc This type represents a notification from FAIS with regards to ONU alarms + * @member notificationType Shall be set to "DevInfoNotification" + * @member timeStamp Date and time of the generation of the notification + * @member deviceId The identifier for a device + * @member deviceErrStatus Indicates the abnormal operational status of the device + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.3-1: Attributes of the DevInfoNotification + */ + type record DevInfoNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Json.String deviceId, + DeviceErrStatus_ deviceErrStatus + } + + /** + * @desc This type represents a notification from FAIS with regards to ONU alarms + * @member notificationType Shall be set to "CmConnNotification" + * @member timeStamp Date and time of the generation of the notification + * @member customerPremisesInfo The physical location of a customer site + * @member cmIf + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.4-1: Attributes of the CmConnNotification + */ + type record CmConnNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo optional, + CmIf cmIf + } + + /** + * @desc This type represents a notification from FAIS with regards to expiry of the existing subscription + * @member timeStamp Date and time of the generation of the notification + * @member links List of hyperlinks related to the resource + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.5-1: Attributes of the ExpiryNotification */ - type enumerated Alarm { - EquipmentAlarm, // (Functional failure on an internal interface) - PoweringAlarm, // (Loss of external power to battery backup unit. This alarm is typically derived through an external interface to a battery backup unit, and indicates that AC is no longer available to maintain battery charge.) - BatteryMissing, // (Battery is provisioned but missing) - BatteryFailure, // (Battery is provisioned and present but cannot recharge) - BatteryLow, // (Battery is provisioned and present but its voltage is too low) - PhysicalIntrusion, // (Applies if the ONU supports detection such as door or box open) - OnuSelfTestFailure, // (ONU has failed autonomous self-test) - DyingGasp, // ()ONU is powering off imminently due to loss of power to the ONU itself.) - TemperatureYellow, // (No service shutdown at present, but the circuit pack is operating beyond its recommended range.) - TemperatureRed, // ()Some services have been shut down to avoid equipment damage.) - VoltageYellow, // (No service shutdown at present, but the line power voltage is below its recommended minimum.) - VoltageRed, // (Some services have been shut down to avoid power collapse.) - OnuManualPowerOff, // (The ONU is shutting down because the subscriber has turned off its power switch.) - InvImage, // (Software image is invalid) - PseOverloadYellow, // (Indicates that the ONU is nearing its maximum ability to supply the known PoE demand of the attached PDs. The thresholds for declaring and clearing this alarm are vendor-specific.) - PseOverloadRed, //(Indicates that the ONU is unable to supply all of the PoE demand of the attached PDs and has removed or reduced power to at least one PD.) - All - } with { - variant "JSON: as number" + type record ExpiryNotification { + TimeStamp timeStamp optional, + Links links, + TimeStamp expiryDeadline + } with { + variant (links) "name as '_links'"; } - type record of Alarm Alarms; + /** + * @desc This type represents a notification from FAIS with regards to ONU alarms + * @member notificationType Shall be set to "AniAlarmNotification" + * @member timeStamp Date and time of the generation of the notification + * @member customerPremisesInfo The physical location of a customer site + * @member onuId The unique identifier for an optical network unit + * @member aniId + * @member alarm Indicates the alarm of the ANI + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.6-1: Attributes of the AniAlarmNotification + */ + type record AniAlarmNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + CpInfo customerPremisesInfo optional, + OnuIds onuId optional, + AniId aniId optional, + Alarm alarm + } + + /** + * @desc This type represents a test notification from a FAIS to determine if the Websocket method is to be utilized to issue notifications for a subscription + * @member notificationType Shall be set to "OnuAlarmNoTestNotificationtification" + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.7-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links_TestNotification links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Hyperlink related to the resource + * @member subscription URI identifying the subscription for the test notification + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.4.7-1: Attributes of the TestNotification + */ + type record Links_TestNotification { + LinkType subscription + } + /** + * @desc This type represents a customer premises (physical location) + * @member latitude Latitude (DATUM=WGS84) + * @member longitude Longitude (DATUM=WGS84) + * @member postalCode Postal code for the location + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.3-1: Attributes of the CpInfo + */ + type record CpInfo_{ + Json.Number latitude optional, + Json.Number longitude optional, + Json.String postalCode optional + } + type record of CpInfo_ CpInfo; + + /** + * @desc This type represents an IP-layer ping test + * @member diagnosticsState The state of the IP ping test + * @member host Host name or address of the host to ping + * @member numberOfRepetitions Number of repetitions of the ping test to perform before reporting the results + * @member timeout_ Timeout in milliseconds for the ping test + * @member dataBlockSize Size of the data block in bytes to be sent for each ping + * @member successCount Result parameter indicating the number of successful pings (those in which a successful response was received prior to the timeout) in the most recent ping test + * @member failureCount Result parameter indicating the number of failed pings in the most recent ping test + * @member averageResponseTime Result parameter indicating the average response time in milliseconds over all repetitions with successful responses of the most recent ping test + * @member minimumResponseTime Result parameter indicating the minimum response time in milliseconds over all repetitions with successful responses of the most recent ping test + * @member maximumResponseTime Result parameter indicating the maximum response time in milliseconds over all repetitions with successful responses of the most recent ping test + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.4-1: Attributes of the IPPingDiagnostics + */ + type record IPPingDiagnostics { + DiagnosticsState diagnosticsState, + Json.String host optional, + Json.Number numberOfRepetitions optional, + Json.Number timeout_ optional, + Json.Number dataBlockSize optional, + Json.Number successCount optional, + Json.Number failureCount optional, + Json.Number averageResponseTime optional, + Json.Number minimumResponseTime optional, + Json.Number maximumResponseTime optional + } + + /** + * @desc The state of the IP ping test + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.4-1: Attributes of the IPPingDiagnostics + */ + type enumerated DiagnosticsState { + None (1), + Requested (2), + Complete (3), + Error_CannotResolveHostName (4), + Error_Internal (5), + Error_Other (6) + } with { + variant "JSON: as number" + } + + /** + * @desc This type represents an IP-layer trace-route test + * @member diagnosticsState The state of the IP ping test + * @member host Host name or address of the host to find a route to + * @member timeout_ Timeout in milliseconds for the trace route test + * @member dataBlockSize Size of the data block in bytes to be sent for each trace route + * @member maxHopCount The maximum number of hop used in outgoing probe packets. The default is 30 hops + * @member responseTime Result parameter indicating the response time in milliseconds the most recent trace route test + * @member numberOfRouteHops Result parameter indicating the number of hops within the discovered route + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.5-1: Attributes of the TraceRouteDiagnostics + */ + type record TraceRouteDiagnostics { + DiagnosticsState diagnosticsState, + Json.String host optional, + Json.Number timeout_ optional, + Json.Number dataBlockSize optional, + Json.Number maxHopCount optional, + Json.Number responseTime optional, + Json.Number numberOfRouteHops optional + } + + /** + * @desc This type represents a HTTP and FTP DownloadDiagnostics test + * @member diagnosticsState The state of the HTTP and FTP download test + * @member downloadURI The URI for the device to perform the download on + * @member rOMTime Request time in UTC, which shall be specified to microsecond precision + * @member bOMTime Begin of transmission time in UTC, which shall be specified to microsecond precision + * @member eOMTime End of transmission in UTC, which shall be specified to microsecond precision + * @member testBytesReceived The test traffic received in bytes during the FTP/HTTP transaction including FTP/HTTP headers,`between bOMTime and eOMTime + * @member totalBytesReceived The total number of bytes received on the Interface between bOMTime and eOMTime + * @member tCPOpenRequestTime Request time in UTC, which shall be specified to microsecond precision + * @member tCPOpenReponseTime Response time in UTC, which shall be specified to microsecond precision + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.6-1: Attributes of the DownloadDiagnostics + */ + type record DownloadDiagnostics { + DiagnosticsState diagnosticsState, + Json.AnyURI downloadURI optional, + TimeStamp rOMTime optional, + TimeStamp bOMTime optional, + TimeStamp eOMTime optional, + Json.Number testBytesReceived optional, + Json.Number totalBytesReceived optional, + TimeStamp tCPOpenRequestTime optional, + TimeStamp tCPOpenReponseTime optional + } + + /** + * @desc This type represents a HTTP and FTP UploadDiagnostics test + * @member diagnosticsState The state of the HTTP and FTP download test + * @member uploadURI The URI for the device to perform the upload to + * @member testFileLength The size of the file (in bytes) to be uploaded to the server + * @member rOMTime Request time in UTC, which shall be specified to microsecond precision + * @member bOMTime Begin of transmission time in UTC, which shall be specified to microsecond precision + * @member eOMTime End of transmission in UTC, which shall be specified to microsecond precision + * @member testBytesSent The test traffic sent in bytes during the FTP/HTTP transaction including FTP/HTTP headers, between bOMTime and eOMTime + * @member tCPOpenRequestTime Request time in UTC, which shall be specified to microsecond precision + * @member tCPOpenReponseTime Response time in UTC, which shall be specified to microsecond precision + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.7-1: Attributes of the UploadDiagnostics + */ + type record UploadDiagnostics { + DiagnosticsState diagnosticsState, + Json.AnyURI uploadURI optional, + Json.Number testFileLength optional, + TimeStamp rOMTime optional, + TimeStamp bOMTime optional, + TimeStamp eOMTime optional, + Json.Number testBytesSent optional, + TimeStamp tCPOpenRequestTime optional, + TimeStamp tCPOpenReponseTime optional + } + + /** + * @desc This type represents a type of link and may be referenced from data structures + * @member href URI referring to a resource + * @see ETSI GS MEC 029 V2.2.1 (2022-01) Table 6.5.8-1: Attributes of the LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @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 029 V2.2.1 (2022-01) Table 6.5.9-1: Attributes of the WebsockNotifConfig + */ + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } + } with { encode "JSON" } // End of module FixedAccessInformationServiceAPI_TypesAndValues diff --git a/ttcn/LibMec/IoTAPI/module.mk b/ttcn/LibMec/IoTAPI/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..150ca462a85824db4939513dce19e7ad94e05e9e --- /dev/null +++ b/ttcn/LibMec/IoTAPI/module.mk @@ -0,0 +1,6 @@ +sources := \ + ttcn/IoTAPI_Pics.ttcn \ + ttcn/IoTAPI_Pixits.ttcn \ + ttcn/IoTAPI_Templates.ttcn \ + ttcn/IoTAPI_Functions.ttcn \ + ttcn/IoTAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..b338fce62ee5e09a3fff9bf683f62cb36063ddc0 --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn @@ -0,0 +1,235 @@ +module IoTAPI_Functions { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + 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/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_Templates all; + + // LibMec/IoTAPI + import from IoTAPI_TypesAndValues all; + import from IoTAPI_Templates all; + import from IoTAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + function f_create_device_info( + out DeviceInfo p_device_info + ) 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_IOT_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_device_info( + m_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_iot_device_info( + mw_device_info( + PX_IOT_DEVICE_ID_1, + PX_IOT_DEVICE_AUTH_1, + false, + PX_IOT_DEVICE_SUPI_1, + PX_IOT_DEVICE_IMSI_1 + )))))) -> value v_response { + tc_ac.stop; + + p_device_info := v_response.response.body.json_body.deviceInfo_iot; + log("f_create_device_info: INFO: IUT successfully responds to the subscription: ", p_device_info); + } + [] tc_ac.timeout { + log("f_create_device_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_device_info + + function f_delete_device_info( + in DeviceInfo p_device_info + ) 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_delete( + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(p_device_info.deviceId, "UTF-8")), + 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_device_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_device_info + + function f_create_device_info_list( + out DeviceInfoList p_device_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_device_info_list); i := i + 1) { + f_create_device_info(p_device_info_list[i]); + } + } // End of function f_create_device_info_list + + function f_delete_device_info_list( + in DeviceInfoList p_device_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_device_info_list); i := i + 1) { + if (p_device_info_list[i].deviceId != "") { + f_delete_device_info(p_device_info_list[i]); + } + } + } // End of function f_delete_device_info_list + + function f_create_iot_platform_info( + out IotPlatformInfo p_iot_platform_info + ) 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_IOT_API_LIST_PLTF_SUB, + v_headers, + m_http_message_body_json( + m_body_json_iot_iot_platform_info( + m_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_iot_iot_platform_info( + mw_iot_platform_info( + PX_IOT_PLTF_ID_1, + { + m_mb_transport_info( + PX_MB_TRANSPORTINFO_ID_1, + PX_MB_TRANSPORTINFO_NAME_1, + PX_MB_TRANSPORTINFO_TYPE_1, + PX_MB_TRANSPORTINFO_PROTOCOL_1, + PX_MB_TRANSPORTINFO_VERSION_1, + m_end_point_uris({ PX_IOT_ENDPOINT_URI_1 }), + m_security_info, + m_impl_specific_info + ) + } + )))))) -> value v_response { + tc_ac.stop; + + p_iot_platform_info := v_response.response.body.json_body.iotPlatformInfo; + log("f_create_iot_platform_info: INFO: IUT successfully responds to the subscription: ", p_iot_platform_info); + } + [] tc_ac.timeout { + log("f_create_iot_platform_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_iot_platform_info + + function f_delete_iot_platform_info( + in IotPlatformInfo p_iot_platform_info + ) 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_delete( + PICS_ROOT_API & PX_IOT_API_LIST_PLTF_SUB & "/" & oct2char(unichar2oct(p_iot_platform_info.iotPlatformId, "UTF-8")), + 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_iot_platform_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_iot_platform_info + + function f_create_iot_platform_info_list( + out IotPlatformInfoList p_iot_platform_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_iot_platform_info_list); i := i + 1) { + f_create_iot_platform_info(p_iot_platform_info_list[i]); + } + } // End of function f_create_iot_platform_info_list + + function f_delete_iot_platform_info_list( + in IotPlatformInfoList p_iot_platform_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_iot_platform_info_list); i := i + 1) { + if (p_iot_platform_info_list[i].iotPlatformId != "") { + f_delete_iot_platform_info(p_iot_platform_info_list[i]); + } + } + } // End of function f_delete_iot_platform_info_list + +} // End of modue IoTAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..52985e139833e394fc076b041564cc46cb3682ee --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pics.ttcn @@ -0,0 +1,8 @@ +module IoTAPI_Pics { + + /** + * @desc Does the IUT support MEC IoT API? + */ + modulepar boolean PICS_IOT_API_SUPPORTED := true; + +} // End of IoTAPI_Pics diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1d9f8ed4046ec0180cb5d2ef3845703341097656 --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn @@ -0,0 +1,87 @@ +module IoTAPI_Pixits { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + modulepar Json.String PX_IOT_DEVICE_ID_1 := ""; + + modulepar Json.String PX_IOT_DEVICE_SUPI_1 := ""; + + modulepar Json.String PX_IOT_DEVICE_IMSI_1 := ""; + + modulepar Json.String PX_IOT_DEVICE_AUTH_1 := ""; + + modulepar Json.String PX_IOT_DEVICE_ID_2 := ""; + + modulepar Json.String PX_IOT_DEVICE_SUPI_2 := ""; + + modulepar Json.String PX_IOT_DEVICE_IMSI_2 := ""; + + modulepar Json.String PX_IOT_DEVICE_AUTH_2 := ""; + + modulepar Json.String PX_IOT_DEVICE_ID_3 := ""; + + modulepar Json.String PX_IOT_DEVICE_SUPI_3 := ""; + + modulepar Json.String PX_IOT_DEVICE_IMSI_3 := ""; + + modulepar Json.String PX_IOT_DEVICE_AUTH_3 := ""; + + modulepar Json.String PX_IOT_DEVICE_ID_UNKNOWN := ""; + + modulepar Json.String PX_IOT_ENDPOINT_URI_1 := ""; + + modulepar Json.String PX_IOT_ENDPOINT_URI_2 := ""; + + modulepar Json.String PX_IOT_ENDPOINT_URI_3 := ""; + + modulepar Json.String PX_REQUESTED_PLTF_ID := ""; + + modulepar Json.String PX_IOT_PLTF_ID_1 := ""; + + modulepar Json.String PX_IOT_PLTF_ID_2 := ""; + + modulepar Json.String PX_IOT_PLTF_ID_3 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_ID_1 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_NAME_1 := ""; + + modulepar EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType PX_MB_TRANSPORTINFO_TYPE_1 + := REST_HTTP; + + modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_1 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_1 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_ID_2 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_NAME_2 := ""; + + modulepar EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType PX_MB_TRANSPORTINFO_TYPE_2 + := REST_HTTP; + + modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_2 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_2 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_ID_3 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_NAME_3 := ""; + + modulepar EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType PX_MB_TRANSPORTINFO_TYPE_3 + := REST_HTTP; + + modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_3 := ""; + + modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_3 := ""; + + modulepar Json.String PX_IOT_PLTF_ID_UNKNOWN := ""; + +} // End of module IoTAPI_Pixits \ No newline at end of file diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..12199bd8eec3167c4fea7dbbf299a4a4d85f10fd --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn @@ -0,0 +1,192 @@ +module IoTAPI_Templates { + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + // LibMec/IoTAPI + import from IoTAPI_TypesAndValues all; + + template (omit) DeviceInfo m_device_info( + in Json.String p_deviceId, + in Json.String p_deviceAuthenticationInfo, + in Json.Bool p_enabled := false, + in template (omit) Json.String p_supi := omit, + in template (omit) Json.String p_imsi := omit, + in template (omit) Json.String p_requestedIotPlatformId := omit, + in template (omit) TrafficRuleDescriptors p_requestedMecTrafficRule := omit, + in template (omit) DeviceMetatData p_deviceMetadata := omit, + in template (omit) Json.String p_gpsi := omit, + in template (omit) Json.String p_pei := omit, + in template (omit) Json.String p_msisdn := omit, + in template (omit) Json.String p_imei := omit, + in template (omit) Json.String p_iccid := omit, + in template (omit) DeviceSpecificMessageFormats p_deviceSpecificMessageFormats := omit, + in template (omit) DownlinkInfo p_downlinkInfo := omit, + in template (omit) Json.String p_clientCertificate := omit + + ) := { + deviceAuthenticationInfo := p_deviceAuthenticationInfo, + deviceMetadata := p_deviceMetadata, + gpsi := p_gpsi, + pei := p_pei, + supi := p_supi, + msisdn := p_msisdn, + imei := p_imei, + imsi := p_imsi, + iccid := p_iccid, + deviceId := p_deviceId, + requestedMecTrafficRule := p_requestedMecTrafficRule, + requestedIotPlatformId := p_requestedIotPlatformId, + deviceSpecificMessageFormats := p_deviceSpecificMessageFormats, + downlinkInfo := p_downlinkInfo, + clientCertificate := p_clientCertificate, + enabled := p_enabled + } // End of template m_device_info + + template (present) DeviceInfo mw_device_info( + template (present) Json.String p_deviceId := ?, + template (present) Json.String p_deviceAuthenticationInfo := ?, + template (present) Json.Bool p_enabled := ?, + template Json.String p_supi := *, + template Json.String p_imsi := *, + template Json.String p_requestedIotPlatformId := *, + template TrafficRuleDescriptors p_requestedMecTrafficRule := *, + template DeviceMetatData p_deviceMetadata := *, + template Json.String p_gpsi := *, + template Json.String p_pei := *, + template Json.String p_msisdn := *, + template Json.String p_imei := *, + template Json.String p_iccid := *, + template DeviceSpecificMessageFormats p_deviceSpecificMessageFormats := *, + template DownlinkInfo p_downlinkInfo := *, + template Json.String p_clientCertificate := * + ) := { + deviceAuthenticationInfo := p_deviceAuthenticationInfo, + deviceMetadata := p_deviceMetadata, + gpsi := p_gpsi, + pei := p_pei, + supi := p_supi, + msisdn := p_msisdn, + imei := p_imei, + imsi := p_imsi, + iccid := p_iccid, + deviceId := p_deviceId, + requestedMecTrafficRule := p_requestedMecTrafficRule, + requestedIotPlatformId := p_requestedIotPlatformId, + deviceSpecificMessageFormats := p_deviceSpecificMessageFormats, + downlinkInfo := p_downlinkInfo, + clientCertificate := p_clientCertificate, + enabled := p_enabled + } // End of template mw_device_info + + template (omit) IotPlatformInfo m_iot_platform_info( + in Json.String p_iotPlatformId, + in template (value) MBTransportInfoList p_userTransportInfo, + in Json.Bool p_enabled := false, + in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_customServicesTransportInfo := omit + + ) := { + iotPlatformId := p_iotPlatformId, + userTransportInfo := p_userTransportInfo, + customServicesTransportInfo := p_customServicesTransportInfo, + enabled := p_enabled + } // End of template m_iot_platform_info + + template (omit) IotPlatformInfo m_iot_platform_info_error( + in Json.String p_iotPlatformId, + in Json.Bool p_enabled := false, + in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_customServicesTransportInfo := omit + + ) := { + iotPlatformId := p_iotPlatformId, + userTransportInfo := omit, + customServicesTransportInfo := p_customServicesTransportInfo, + enabled := p_enabled + } // End of template m_iot_platform_info_error + + template (present) IotPlatformInfo mw_iot_platform_info( + template (present) Json.String p_iotPlatformId := ?, + template (present) MBTransportInfoList p_userTransportInfo := ?, + template (present) Json.Bool p_enabled := ?, + template EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_customServicesTransportInfo := * + + ) := { + iotPlatformId := p_iotPlatformId, + userTransportInfo := p_userTransportInfo, + customServicesTransportInfo := p_customServicesTransportInfo, + enabled := p_enabled + } // End of template mw_iot_platform_info + + template (omit) MBTransportInfo m_mb_transport_info( + in Json.String p_id, + in Json.String p_name, + in EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type, + in Json.String p_protocol, + in Json.String p_version, + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo p_endpoint, + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security, + in template (value) ImplSpecificInfo p_implSpecificInfo, + in template (omit) Json.String p_description := omit + ) := { + id := p_id, + name := p_name, + description := p_description, + type_ := p_type, + protocol := p_protocol, + version := p_version, + endpoint := p_endpoint, + security := p_security, + implSpecificInfo := p_implSpecificInfo + } // End of template m_mb_transport_info + + template (present) MBTransportInfo mw_mb_transport_info( + template (present) Json.String p_id := ?, + template (present) Json.String p_name := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type := ?, + template (present) Json.String p_protocol := ?, + template (present) Json.String p_version := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo p_endpoint := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security := ?, + template (present) ImplSpecificInfo p_implSpecificInfo := ?, + template Json.String p_description := * + ) := { + id := p_id, + name := p_name, + description := p_description, + type_ := p_type, + protocol := p_protocol, + version := p_version, + endpoint := p_endpoint, + security := p_security, + implSpecificInfo := p_implSpecificInfo + } // End of template mw_mb_transport_info + + template (omit) ImplSpecificInfo m_impl_specific_info( + in template (omit) EventTopics p_eventTopics := omit, + in template (omit) UplinkTopics p_uplinkTopics := omit, + in template (omit) DownlinkTopics p_downlinkTopics := omit + ) := { + eventTopics := p_eventTopics, + uplinkTopics := p_uplinkTopics, + downlinkTopics := p_downlinkTopics + } // End of template m_impl_specific_info + + template ImplSpecificInfo mw_impl_specific_info( + template EventTopics p_eventTopics := *, + template UplinkTopics p_uplinkTopics := *, + template DownlinkTopics p_downlinkTopics := * + ) := { + eventTopics := p_eventTopics, + uplinkTopics := p_uplinkTopics, + downlinkTopics := p_downlinkTopics + } // End of template mw_impl_specific_info + +} // End of IoTAPI_Templates diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..20fe1aa1f3a9266e2a7cc8a01fde9cd942173466 --- /dev/null +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn @@ -0,0 +1,192 @@ +/** + * @desc The ETSI MEC ISG MEC033 Radio Network Information API described using OpenAPI + * @see https://www.etsi.org/deliver/etsi_gs/MEC/001_099/033/03.01.01_60/gs_MEC033v030101p.pdf + */ +module IoTAPI_TypesAndValues { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI + import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI + import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; + + /** + * @desc Information associated to an IoT device + * @member deviceAuthenticationInfo Information needed for secondary authentication of the IoT device to the data network + * @member deviceMetadata Additional information about the IoT device + * @member gpsi GPSI of the IoT device if 5G-enabled + * @member pei PEI of the IoT device if 5G-enabled + * @member supi SUPI of the IoT device if 5G-enabled + * @member msisdn MSISDN of the IoT device if LTE-enabled + * @member imei IMEI of the IoT device if LTE-enabled + * @member imsi IMSI of the IoT device if LTE-enabled + * @member iccid ICCID of the IoT device + * @member deviceId Human-readable identifier of the IoT device + * @member requestedMecTrafficRule MEC traffic rules the IoT device is requested to be associated to + * @member requestedIotPlatformId IoT platform to which the IoT device is requested to be associated to + * @member deviceSpecificMessageFormats Format of the messages to be published by the MEC IoTS on the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device + * @member downlinkInfo Downlink communication configuration of the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device + * @member clientCertificate Client-side SSL/TLS certificate to be used by the MEC IoTS to interact with the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device + * @member enabled Indication whether the IoT device has a valid associated traffic rule (TRUE) or not (FALSE) + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.2.2-1: Definition of type DeviceInfo + */ + type record DeviceInfo { + Json.String deviceAuthenticationInfo, + DeviceMetatData deviceMetadata optional, + Json.String gpsi optional, + Json.String pei optional, + Json.String supi optional, + Json.String msisdn optional, + Json.String imei optional, + Json.String imsi optional, + Json.String iccid optional, + Json.String deviceId, + TrafficRuleDescriptors requestedMecTrafficRule optional, + Json.String requestedIotPlatformId optional, + DeviceSpecificMessageFormats deviceSpecificMessageFormats optional, + DownlinkInfo downlinkInfo optional, + Json.String clientCertificate optional, + Json.Bool enabled + } // End of type DeviceInfo + + type record of DeviceInfo DeviceInfoList; + + type record of Json.String DeviceMetatData; + + /** + * @desc + * @member eventMsgFormat Event message format configuration + * @member uplinkMsgFormat Uplink message format configuration + */ + type record DeviceSpecificMessageFormats { + EventMsg eventMsgFormat optional, + UplinkMsg uplinkMsgFormat optional + } // End of type DeviceSpecificMessageFormats + + /** + * @desc Downlink communication configuration of the user transport provided by the associated IoT platform in case the MEC IoTS acts on behalf of the IoT device + * @member downlinkTopic Topic associated to the IoT device + * @member devicePort UDP port to be used by the MEC IoTS for the outgoing downlink packets towards the IoT device + */ + type record DownlinkInfo { + Json.String downlinkTopic optional, + Json.Number devicePort optional + } // End of type DownlinkInfo + + /** + * @desc Information associated to a IoT platform + * @member iotPlatformId Identifier of the IoT platform + * @member userTransportInfoInformation about the user transport(s) provided by the IoT platform + * @member customServicesTransportInfo Transport enabling access to vendor-specific services provided by the IoT platform. The data + * @member enabled Indication whether the IoT platform is capable of providing user transports and vendor-specific services (TRUE) or not (FALSE) + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.2.3-1: Definition of type IotPlatformInfo + */ + type record IotPlatformInfo { + Json.String iotPlatformId, + MBTransportInfoList userTransportInfo optional, // optional on;ly for the 400 Bad Request TP + TransportInfoList customServicesTransportInfo optional, + Json.Bool enabled + } // End of IotPlatformInfo + type record of IotPlatformInfo IotPlatformInfoList; + + /** + * @desc User transport based on a message bus + * @member id The identifier of this transport as per ETSI GS MEC 011 [i.2] + * @member name The name of this transport as per ETSI GS MEC 011 [i.2] + * @member description Human-readable description of this transport as per ETSI GS MEC 011 [i.2] + * @member type_ Type of the transport + * @member protocol The name of the protocol used + * @member version The version of the protocol used as per ETSI GS MEC 011 [i.2] + * @member endpoint Information about the endpoint to access the transport as per ETSI GS MEC 011 [i.2] + * @member security Information about the security used by the transport as per ETSI GS MEC 011 [i.2] + * @member implSpecificInfo Additional implementation specific details of the transport + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.2-1: Definition of type MBTransportInfo + */ + type record MBTransportInfo { + Json.String id, + Json.String name, + Json.String description optional, + EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType type_, + Json.String protocol, + Json.String version , + EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo endpoint, + EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo security, + ImplSpecificInfo implSpecificInfo + } // End of type MBTransportInfo + type record of MBTransportInfo MBTransportInfoList; + + /** + * @desc + * @member eventTopics Topics used to publish events related to the established session between the IoT device(s) and the end IoT application(s) on the user transport + * @member uplinkTopics Topics used to publish data generated by the IoT device(s) on the user transport, in order to be consumed by the end IoT application(s) + * @member downlinkTopics Topics used to publish data generated by the IoT applications(s) on the user transport, in order to be consumed by the end IoT device(s) + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.2-1: Definition of type MBTransportInfo + */ + type record ImplSpecificInfo { + EventTopics eventTopics optional, + UplinkTopics uplinkTopics optional, + DownlinkTopics downlinkTopics optional + } // End of type ImplSpecificInfo + type record of Json.String EventTopics; + type record of Json.String UplinkTopics; + type record of Json.String DownlinkTopics; + + type record of EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfo TransportInfoList; + + /** + * @desc Defines the format of the messages to be published on the user transport in order to provide application-specific information about events related to the established session between the IoT device and the end IoT application(s) + * @member eventTopic Topic where the message containing application-specific information should be published + * @member selectedSerializer Type of serializer to be used for the topic as per ETSI GS MEC 011 [i.2] + * @member includeDeviceAddr Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE) + * @member includeDeviceMetadata Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE) + * @member includeSupi Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE) + * @member includeImsi Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE) + * @member inclueIccid Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE) + * @member includeDeviceId Indication whether to include the humanreadable identified of the IoT device (TRUE) or not (FALSE) + * @member + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.3-1: Definition of type EventMsg + */ + type record EventMsg { + Json.String eventTopic, + EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType selectedSerializer, + Json.Bool includeDeviceAddr optional, + Json.Bool includeDeviceMetadata optional, + Json.Bool includeSupi optional, + Json.Bool includeImsi optional, + Json.Bool includeIccid optional, + Json.Bool includeDeviceId optional + } // End ot type EventMsg + + /** + * @desc Defines the format of the messages containing uplink data generated by the IoT device to be published on the user transport + * @member uplinkTopic Topic where the message containing the data generated by the IoT device(s) should be published, in order to be consumed by the end IoT application(s). + * @member selectedSerializer Type of serializer to be used for the topic as per ETSI GS MEC 011 [i.2] + * @member includeDeviceAddr Indication whether to include the IP address of the IoT device (TRUE) or not (FALSE) + * @member includeDeviceMetadata Indication whether to include the metadata about the IoT device (TRUE) or not (FALSE) + * @member includeSupi Indication whether to include the SUPI of the IoT device (TRUE) or not (FALSE) + * @member includeImsi Indication whether to include the IMSI of the IoT device (TRUE) or not (FALSE) + * @member inclueIccid Indication whether to include the ICCID of the IoT device (TRUE) or not (FALSE) + * @member includeDeviceId Indication whether to include the humanreadable identified of the IoT device (TRUE) or not (FALSE) + * @member + * @see ETSI GS MEC 033 V3.1.1 (2022-12) Table 6.3.4-1: Definition of type UplinkMsg + */ + type record UplinkMsg { + Json.String uplinkTopic, + EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType selectedSerializer, + Json.Bool includeDeviceAddr optional, + Json.Bool includeDeviceMetadata optional, + Json.Bool includeSupi optional, + Json.Bool includeImsi optional, + Json.Bool includeIccid optional, + Json.Bool includeDeviceId optional + } // End ot type UplinkMsg + +} with { + encode "JSON" +} // End of module IoTAPI_TypesAndValues \ No newline at end of file diff --git a/ttcn/LibMec/LocationAPI/json/LocationAPI.json b/ttcn/LibMec/LocationAPI/json/LocationAPI.json deleted file mode 100644 index 5a483d722b686eddd9c37e1988743e07880145c5..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/LocationAPI/json/LocationAPI.json +++ /dev/null @@ -1,4344 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs013-location-api" - }, - "title": "ETSI GS MEC 013 - Location API", - "version": "2.1.1", - "description": "The ETSI MEC ISG MEC013 Location API described using OpenAPI.", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI MEC013 V2.1.1 Location API", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/013/02.01.01_60/gs_mec013v020101p.pdf" - }, - "servers": [ - { - "url": "https://localhost/location/v2" - } - ], - "tags": [ - { - "name": "location" - } - ], - "paths": { - "/queries/distance": { - "get": { - "tags": [ - "location" - ], - "summary": "UE Distance Lookup of a specific UE", - "description": "UE Distance Lookup between terminals or a terminal and a location", - "operationId": "distanceGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.Requester" - }, - { - "$ref": "#/components/parameters/Query.AddressMandatory" - }, - { - "$ref": "#/components/parameters/Query.Latitude" - }, - { - "$ref": "#/components/parameters/Query.Longitude" - } - ], - "responses": { - "200": { - "description": "Successful response to a distance request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "terminalDistance": { - "$ref": "#/components/schemas/TerminalDistance" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/users": { - "get": { - "tags": [ - "location" - ], - "summary": "UE Location Lookup of a specific UE or group of UEs", - "description": "UE Location Lookup of a specific UE or group of UEs", - "operationId": "usersGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.ZoneId" - }, - { - "$ref": "#/components/parameters/Query.AccessPointId" - }, - { - "$ref": "#/components/parameters/Query.Address" - } - ], - "responses": { - "200": { - "description": "Successful response to users request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userList": { - "$ref": "#/components/schemas/UserList" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/zones": { - "get": { - "tags": [ - "location" - ], - "summary": "Zones information Lookup", - "description": "Used to get a list of identifiers for zones authorized for use by the application.", - "operationId": "zonesGET", - "responses": { - "200": { - "description": "Successful response to zones request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneList": { - "$ref": "#/components/schemas/ZoneList" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/zones/{zoneId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Zones information Lookup", - "description": "Used to get the information for an authorized zone for use by the application.", - "operationId": "zonesGetById", - "parameters": [ - { - "$ref": "#/components/parameters/Path.ZoneId" - } - ], - "responses": { - "200": { - "description": "Successful response to an access point Id request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneInfo": { - "$ref": "#/components/schemas/ZoneInfo" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/zones/{zoneId}/accessPoints": { - "get": { - "tags": [ - "location" - ], - "summary": "Radio Node Location Lookup", - "description": "Radio Node Location Lookup to retrieve a list of radio nodes associated to a zone.", - "operationId": "apGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.ZoneId" - }, - { - "$ref": "#/components/parameters/Query.InterestRealm" - } - ], - "responses": { - "200": { - "description": "Successful response to an access point Id request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "accessPointList": { - "$ref": "#/components/schemas/AccessPointList" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/queries/zones/{zoneId}/accessPoints/{accessPointId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Radio Node Location Lookup", - "description": "Radio Node Location Lookup to retrieve a radio node associated to a zone.", - "operationId": "apByIdGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.ZoneId" - }, - { - "$ref": "#/components/parameters/Path.AccessPointId" - } - ], - "responses": { - "200": { - "description": "Successful response to an access point Id request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "accessPointInfo": { - "$ref": "#/components/schemas/AccessPointInfo" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "queries" - } - }, - "/subscriptions/area/circle": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to area change notifications", - "description": "This operation is used for retrieving all active subscriptions to area change notifications.", - "operationId": "areaCircleSubListGET", - "responses": { - "200": { - "description": "Response to retrieve area subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "circleNotificationSubscription": [ - { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for area change notification", - "description": "Creates a subscription to the Location Service for an area change notification.", - "operationId": "areaCircleSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10 - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/circleNotificationSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "circleNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "subscriptionNotification": { - "$ref": "#/components/schemas/SubscriptionNotification" - } - }, - "example": { - "subscriptionNotification": { - "enteringLeavingCriteria": "Entering", - "isFinalNotification": "false,", - "link": { - "rel": "CircleNotificationSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/sub123" - }, - "terminalLocation": { - "address": "acr:10.0.0.1", - "currentLocation": { - "accuracy": 100, - "altitude": 1001, - "latitude": -80.86302, - "longitude": 41.277306, - "timestamp": { - "seconds": 1483231138, - "nanoSeconds\"": 0 - } - }, - "locationRetrievalStatus": "Retrieved" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/area/circle/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "areaCircleSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "circleNotificationSubscription" - ], - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "areaCircleSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "circleNotificationSubscription": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - } - }, - "example": { - "circleNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "checkImmediate": true, - "enteringLeavingCriteria": "Entering", - "frequency": 10, - "latitude": -80.88, - "longitude": 41.277, - "radius": 500, - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/area/circle/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "areaCircleSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/distance": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to distance change notifications", - "description": "This operation is used for retrieving all active subscriptions to a distance change notifications.", - "operationId": "distanceSubListGET", - "responses": { - "200": { - "description": "Response to retrieve area subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "distanceNotificationSubscription": [ - { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/sub123" - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for distance change notification", - "description": "Creates a subscription to the Location Service for a distance change notification.", - "operationId": "distanceSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10 - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/distanceNotificationSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "distanceNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "subscriptionNotification": { - "$ref": "#/components/schemas/SubscriptionNotification" - } - }, - "example": { - "subscriptionNotification": { - "distanceCriteria": "AllWithinDistance", - "isFinalNotification": "false,", - "link": { - "rel": "DistanceNotificationSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/distance/sub123" - }, - "terminalLocation": [ - { - "address": "acr:10.0.0.1", - "currentLocation": { - "accuracy": 100, - "altitude": 1001, - "latitude": -80.86302, - "longitude": 41.277306, - "timestamp": { - "seconds": 1483231138, - "nanoSeconds\"": 0 - } - }, - "locationRetrievalStatus": "Retrieved" - }, - { - "address": "acr:10.0.0.2", - "currentLocation": { - "accuracy": 100, - "altitude": 1001, - "latitude": -80.86301, - "longitude": 41.277306, - "timestamp": { - "seconds": 1483231138, - "nanoSeconds\"": 0 - } - }, - "locationRetrievalStatus": "Retrieved" - } - ] - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/distance/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "distanceSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "distanceNotificationSubscription" - ], - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "distanceSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "distanceNotificationSubscription": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - } - }, - "example": { - "distanceNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "monitoredAddress": [ - "acr:10.0.0.1", - "acr:10.0.0.2" - ], - "checkImmediate": true, - "criteria": "AllWithinDistance", - "distance": 100, - "frequency": 10, - "referenceAddress": "acr:10.0.0.3", - "trackingAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/distance/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "distanceSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/periodic": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to periodic notifications", - "description": "This operation is used for retrieving all active subscriptions to periodic notifications.", - "operationId": "periodicSubListGET", - "responses": { - "200": { - "description": "Response to retrieve area subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "periodicNotificationSubscription": [ - { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for periodic notification", - "description": "Creates a subscription to the Location Service for a periodic notification.", - "operationId": "periodicSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10 - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/periodicNotificationSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "periodicNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "subscriptionNotification": { - "$ref": "#/components/schemas/SubscriptionNotification" - } - }, - "example": { - "subscriptionNotification": { - "isFinalNotification": "false,", - "link": { - "rel": "PeriodicNotificationSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/periodic/sub123" - }, - "terminalLocation": { - "address": "acr:10.0.0.1", - "currentLocation": { - "accuracy": 100, - "altitude": 1001, - "latitude": -80.86302, - "longitude": 41.277306, - "timestamp": { - "seconds": 1483231138, - "nanoSeconds\"": 0 - } - }, - "locationRetrievalStatus": "Retrieved" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/periodic/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "periodicSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "periodicNotificationSubscription" - ], - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "periodicSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "periodicNotificationSubscription": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - } - }, - "example": { - "periodicNotificationSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "callbackData": "1234", - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:10.0.0.1", - "frequency": 10, - "requestedAccuracy": 10, - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/periodic/subscription123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "periodicSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/userTracking": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to user tracking notifications", - "description": "This operation is used for retrieving all active subscriptions to user tracking notifications.", - "operationId": "userTrackingSubListGET", - "responses": { - "200": { - "description": "Response to retrieve user tracking subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "userTrackingSubscription": [ - { - "clientCorrelator": "0123", - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/subscription123", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:192.0.2.1", - "userEventCriteria": [ - "Transferring" - ] - }, - { - "clientCorrelator": "0124", - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/subscription124", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "address": "acr:192.0.2.2", - "userEventCriteria": [ - "Transferring" - ] - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for user tracking notification", - "description": "Creates a subscription to the Location Service for user tracking change notification.", - "operationId": "userTrackingSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/userTrackingSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "userTrackingNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalPresenceNotification": { - "$ref": "#/components/schemas/ZonalPresenceNotification" - } - }, - "example": { - "zonalPresenceNotification": { - "clientCorrelator": "0123", - "zoneId": "zone01", - "address": "acr:10.0.0.1", - "userEventType": "Transferring", - "currentAccessPointId": "ap2", - "previousAccessPointId": "ap1", - "timestamp": { - "seconds": 1483231138, - "nanoseconds": 0 - }, - "link": { - "rel": "UserTrackingSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/userTracking/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "userTrackingSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "userTrackingSubscription" - ], - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "userTrackingSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "userTrackingSubscription": { - "$ref": "#/components/schemas/UserTrackingSubscription" - } - } - }, - "example": { - "userTrackingSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "address": "acr:10.0.0.1", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/userTracking/sub123" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "userTrackingSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/zonalTraffic": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to zonal traffic notifications", - "description": "This operation is used for retrieving all active subscriptions to zonal traffic change notifications.", - "operationId": "zonalTrafficSubListGET", - "responses": { - "200": { - "description": "Response to retrieve zonal traffic subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "zonalTrafficSubscription": [ - { - "clientCorrelator": "0123", - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/subscription123", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ] - }, - { - "clientCorrelator": "0124", - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/subscription124", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "zoneId": "zone02", - "userEventCriteria": [ - "Transferring" - ] - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for zonal traffic notification", - "description": "Creates a subscription to the Location Service for zonal traffic change notification.", - "operationId": "zonalTrafficSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/zonalTrafficSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "zonalTrafficNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalPresenceNotification": { - "$ref": "#/components/schemas/ZonalPresenceNotification" - } - }, - "example": { - "zonalPresenceNotification": { - "clientCorrelator": "0123", - "zoneId": "zone01", - "address": "acr:10.0.0.1", - "userEventType": "Transferring", - "currentAccessPointId": "ap2", - "previousAccessPointId": "ap1", - "timestamp": { - "seconds": 1483231138, - "nanoseconds": 0 - }, - "link": { - "rel": "ZonalTrafficSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/zonalTraffic/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "zonalTrafficSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "zonalTrafficSubscription" - ], - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "zonalTrafficSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zonalTrafficSubscription": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - } - } - }, - "example": { - "zonalTrafficSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "userEventCriteria": [ - "Transferring" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zonalTraffic/sub123" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "zonalTrafficSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/zoneStatus": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieves all active subscriptions to zone status notifications", - "description": "This operation is used for retrieving all active subscriptions to zone status change notifications.", - "operationId": "zoneStatusSubListGET", - "responses": { - "200": { - "description": "Response to retrieve zone status subscriptions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "notificationSubscriptionList" - ], - "properties": { - "notificationSubscriptionList": { - "$ref": "#/components/schemas/NotificationSubscriptionList" - } - }, - "example": { - "notificationSubscriptionList": { - "zoneStatusSubscription": [ - { - "clientCorrelator": "0123", - "resourceURL": "http://example.com/exampleAPI/location/v2/subscriptions/zoneStatus/subscription123", - "callbackReference": { - "notifyURL": "http://clientApp.example.com/location_notifications/123456" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ] - } - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus" - } - } - } - } - } - } - } - }, - "post": { - "tags": [ - "location" - ], - "summary": "Creates a subscription for zone status notification", - "description": "Creates a subscription to the Location Service for zone status change notification.", - "operationId": "zoneStatusSubPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ] - } - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/zoneStatusSubscription.callbackReference.notifyURL}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from Location service, content based on subscription type", - "operationId": "zoneStatusNotificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusNotification": { - "$ref": "#/components/schemas/ZoneStatusNotification" - } - }, - "example": { - "zoneStatusNotification": { - "clientCorrelator": "0123", - "zoneId": "zone01", - "accessPointId": "poa1", - "operationStatus": "Serviceable", - "numberOfUsersInZone": "20", - "numberOfUsersInAP": "12", - "timestamp": { - "seconds": 1483231138, - "nanoseconds": 0 - }, - "link": { - "rel": "ZoneStatusSubscription", - "href": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - }, - "x-swagger-router-controller": "subscriptions" - } - }, - "/subscriptions/zoneStatus/{subscriptionId}": { - "get": { - "tags": [ - "location" - ], - "summary": "Retrieve subscription information", - "description": "Get subscription information.", - "operationId": "zoneStatusSubGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "zoneStatusSubscription" - ], - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "put": { - "tags": [ - "location" - ], - "summary": "Updates a subscription information", - "description": "Updates a subscription.", - "operationId": "zoneStatusSubPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to subscription notifications", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "zoneStatusSubscription": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - } - } - }, - "example": { - "zoneStatusSubscription": { - "clientCorrelator": "0123", - "callbackReference": { - "notifyURL": "http://my.callback.com/location_notifications/some-id" - }, - "zoneId": "zone01", - "numberOfUsersZoneThreshold": 500, - "operationStatus": [ - "Serviceable" - ], - "resourceURL": "http://meAppServer.example.com/location/v2/subscriptions/zoneStatus/sub123" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - }, - "delete": { - "tags": [ - "location" - ], - "summary": "Cancel a subscription", - "description": "Method to delete a subscription.", - "operationId": "zoneStatusSubDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.SubscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "x-swagger-router-controller": "subscriptions" - } - } - }, - "components": { - "responses": { - "200": { - "description": "OK" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized : used when the client did not submit credentials.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable : used to indicate that the server cannot provide the any of the content formats supported by the client.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "414": { - "description": "URI Too Long : used to indicate that the server is refusing to process the request because the request URI is longer than the server is willing or able to process.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type : used to indicate that the server or the client does not support the content type of the entity body.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity : used to indicate that the server understands the content type of the request entity and that the syntax of the request entity is correct but that the server is unable to process the contained instructions. This error condition can occur if an JSON request body is syntactically correct but semantically incorrect, for example if the target area for the request is considered too large. This error condition can also occur if the capabilities required by the request are not supported.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - }, - "example": { - "application/problem+json": { - "type": "https://meAppServer.example.com/rni/v2/probs/too-many targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - } - }, - "429": { - "description": "Too Many Requests : used when a rate limiter has triggered.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Path.AccessPointId": { - "name": "accessPointId", - "in": "path", - "description": "Identifier of access Point", - "required": true, - "schema": { - "type": "string" - }, - "x-exportParamName": "AccessPointId" - }, - "Path.SubscrId": { - "name": "subscriptionId", - "in": "path", - "description": "Subscription Identifier, specifically the \"self\" returned in the subscription request", - "required": true, - "schema": { - "type": "string", - "format": "uri" - }, - "x-exportParamName": "SubscriptionId" - }, - "Path.ZoneId": { - "name": "zoneId", - "in": "path", - "description": "Indentifier of zone", - "required": true, - "schema": { - "type": "string" - }, - "x-exportParamName": "ZoneId" - }, - "Query.AccessPointId": { - "name": "accessPointId", - "in": "query", - "description": "Identifier of access point", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-exportParamName": "AccessPointId" - }, - "Query.Address": { - "name": "address", - "in": "query", - "description": "address of users (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-exportParamName": "Address" - }, - "Query.AddressMandatory": { - "name": "address", - "in": "query", - "description": "address of users (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-exportParamName": "AddressMandatory" - }, - "Query.InterestRealm": { - "name": "interestRealm", - "in": "query", - "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", - "required": false, - "schema": { - "type": "string" - }, - "x-exportParamName": "InterestRealm" - }, - "Query.Latitude": { - "name": "latitude", - "in": "query", - "description": "Latitude geo position", - "required": false, - "schema": { - "type": "number", - "format": "float" - }, - "x-exportParamName": "Latitude" - }, - "Query.Longitude": { - "name": "longitude", - "in": "query", - "description": "Longitude geo position", - "required": false, - "schema": { - "type": "number", - "format": "float" - }, - "x-exportParamName": "Longitude" - }, - "Query.Requester": { - "name": "requester", - "in": "query", - "description": "Entity that is requesting the information", - "required": false, - "schema": { - "type": "string" - }, - "x-exportParamName": "Requester" - }, - "Query.ZoneId": { - "name": "zoneId", - "in": "query", - "description": "Identifier of zone", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-exportParamName": "ZoneId" - } - }, - "schemas": { - "AccessPointInfo": { - "description": "A type containing access point information.", - "properties": { - "accessPointId": { - "description": "Identifier of access point.", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "connectionType": { - "$ref": "#/components/schemas/ConnectionType" - }, - "interestRealm": { - "description": "Interest realm of access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "locationInfo": { - "$ref": "#/components/schemas/LocationInfo" - }, - "numberOfUsers": { - "description": "Number of users currently on the access point.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "integer" - }, - "operationStatus": { - "$ref": "#/components/schemas/OperationStatus" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "timezone": { - "description": "Time zone of access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "dateTimeStamp" - } - }, - "required": [ - "accessPointId", - "connectionType", - "operationStatus", - "numberOfUsers", - "resourceURL" - ], - "type": "object" - }, - "AccessPointList": { - "description": "A type containing list of access points.", - "properties": { - "accessPoint": { - "description": "Collection of the access point information list.", - "items": { - "$ref": "#/components/schemas/AccessPointInfo" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "AccessPointInfo" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "resourceURL" - ], - "type": "object" - }, - "CallbackReference": { - "properties": { - "callbackData": { - "description": "Data the application can register with the server when subscribing to notifications, and that are passed back unchanged in each of the related notifications. These data can be used by the application in the processing of the notification, e.g. for correlation purposes.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "notificationFormat": { - "$ref": "#/components/schemas/NotificationFormat" - }, - "notifyURL": { - "description": "Notify Callback URL", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "anyURI" - } - }, - "required": [ - "notifyURL" - ], - "type": "object" - }, - "CircleNotificationSubscription": { - "description": "A type containing data for notifications, when the area is defined as a circle.", - "properties": { - "address": { - "description": "Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "checkImmediate": { - "description": "Check location immediately after establishing notification.", - "type": "boolean", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "boolean" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "count": { - "description": "Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "duration": { - "description": "Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "enteringLeavingCriteria": { - "$ref": "#/components/schemas/EnteringLeavingCriteria" - }, - "frequency": { - "description": "Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications).", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "int" - }, - "latitude": { - "description": "Latitude of center point.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "longitude": { - "description": "Longitude of center point.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - }, - "radius": { - "description": "Radius circle around center point in meters.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - }, - "requester": { - "description": "Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "trackingAccuracy": { - "description": "Number of meters of acceptable error in tracking distance.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - } - }, - "required": [ - "callbackReference", - "address", - "latitude", - "longitude", - "radius", - "trackingAccuracy", - "enteringLeavingCriteria", - "checkImmediate", - "frequency" - ], - "type": "object" - }, - "ConnectionType": { - "description": "The connection type for the access point", - "enum": [ - "Femto", - "LTE-femto", - "Smallcell", - "LTE-smallcell", - "Wifi", - "Pico", - "Micro", - "Macro", - "Wimax", - "Unknown" - ], - "type": "string" - }, - "DistanceCriteria": { - "enum": [ - "AllWithinDistance", - "AnyWithinDistance", - "AllBeyondDistance", - "AnyBeyondDistance" - ], - "type": "string" - }, - "DistanceNotificationSubscription": { - "description": "A type containing data for distance subscription, with reference to other devices.", - "properties": { - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "checkImmediate": { - "description": "Check location immediately after establishing notification.", - "type": "boolean", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "boolean" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "count": { - "description": "Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "criteria": { - "$ref": "#/components/schemas/DistanceCriteria" - }, - "distance": { - "description": "Distance between devices that shall be monitored.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - }, - "duration": { - "description": "Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "frequency": { - "description": "Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications).", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "int" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "monitoredAddress": { - "description": "Contains addresses of devices to monitor (e.g., 'sip' URI, 'tel' URI, 'acr' URI)", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "anyURI" - }, - "referenceAddress": { - "description": "Indicates address of each device that will be used as reference devices from which the distances towards monitored devices indicated in the Addresses will be monitored (e.g., 'sip' URI, 'tel' URI, 'acr' URI)", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "anyURI" - }, - "requester": { - "description": "Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "trackingAccuracy": { - "description": "Number of meters of acceptable error in tracking distance.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "float" - } - }, - "required": [ - "callbackReference", - "monitoredAddress", - "distance", - "trackingAccuracy", - "criteria", - "checkImmediate", - "frequency" - ], - "type": "object" - }, - "EnteringLeavingCriteria": { - "enum": [ - "Entering", - "Leaving" - ], - "type": "string" - }, - "Link": { - "description": "Link to other resources", - "properties": { - "href": { - "description": "URI", - "format": "anyURI", - "type": "string" - }, - "rel": { - "description": "Describes the relationship between the URI and the resource.", - "type": "string" - } - }, - "required": [ - "rel", - "href" - ], - "type": "object" - }, - "LocationInfo": { - "properties": { - "accuracy": { - "description": "Horizontal accuracy / (semi-major) uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 4, 5 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "accuracyAltitude": { - "description": "Altitude accuracy / uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 3 or 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "accuracySemiMinor": { - "description": "Horizontal accuracy / (semi-major) uncertainty of location provided in meters, as defined in [14]. Present only if \"shape\" equals 4, 5 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "altitude": { - "description": "Location altitude relative to the WGS84 ellipsoid surface.", - "format": "float", - "type": "number", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Float" - }, - "confidence": { - "description": "Confidence by which the position of a target entity is known to be within the shape description, expressed as a percentage and defined in [14]. Present only if \"shape\" equals 1, 4 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "includedAngle": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "innerRadius": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "latitude": { - "description": "Location latitude, expressed in the range -90° to +90°. Cardinality greater than one only if \"shape\" equals 7.", - "items": { - "format": "float", - "type": "number" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Float" - }, - "longitude": { - "description": "Location longitude, expressed in the range -180° to +180°. Cardinality greater than one only if \"shape\" equals 7.", - "items": { - "format": "float", - "type": "number" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Float" - }, - "offsetAngle": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "orientationMajorAxis": { - "description": "Angle of orientation of the major axis, expressed in the range 0° to 180°, as defined in [14]. Present only if \"shape\" equals 4 or 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "shape": { - "description": "Shape information, as detailed in [14], associated with the reported location coordinate:

1 = ELLIPSOID_ARC

2 = ELLIPSOID_POINT

3 = ELLIPSOID_POINT_ALTITUDE

4 = ELLIPSOID_POINT_ALTITUDE_UNCERT_ELLIPSOID

5 = ELLIPSOID_POINT_UNCERT_CIRCLE

6 = ELLIPSOID_POINT_UNCERT_ELLIPSE

7 = POLYGON", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "uncertaintyRadius": { - "description": "Present only if \"shape\" equals 6", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "velocity": { - "description": "Structure with attributes relating to the target entity’s velocity, as defined in [14].", - "properties": { - "bearing": { - "description": "Bearing, expressed in the range 0° to 360°, as defined in [14].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "horizontalSpeed": { - "description": "Horizontal speed, expressed in km/h and defined in [14].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "uncertainty": { - "description": "Horizontal uncertainty, as defined in [14]. Present only if \"velocityType\" equals 3 or 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - }, - "velocityType": { - "description": "Velocity information, as detailed in [14], associated with the reported location coordinate:

1 = HORIZONTAL

2 = HORIZONTAL_VERTICAL

3 = HORIZONTAL_UNCERT

4 = HORIZONTAL_VERTICAL_UNCERT", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "verticalSpeed": { - "description": "Vertical speed, expressed in km/h and defined in [14]. Present only if \"velocityType\" equals 2 or 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Int" - }, - "verticalUncertainty": { - "description": "Vertical uncertainty, as defined in [14]. Present only if \"velocityType\" equals 4", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "UnsignedInt" - } - }, - "required": [ - "velocityType", - "bearing", - "horizontalSpeed" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "latitude", - "longitude", - "shape" - ], - "type": "object", - "x-etsi-ref": "6.5.3" - }, - "NotificationFormat": { - "enum": [ - "XML", - "JSON" - ], - "type": "string" - }, - "NotificationSubscriptionList": { - "properties": { - "circleNotificationSubscription": { - "description": "Collection of CircleNotificationSubscription elements, see note 2.", - "items": { - "$ref": "#/components/schemas/CircleNotificationSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "CircleNotificationSubscription" - }, - "distanceNotificationSubscription": { - "description": "Collection of DistanceNotificationSubscription elements, see note 2.", - "items": { - "$ref": "#/components/schemas/DistanceNotificationSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "DistanceNotificationSubscription" - }, - "periodicNotificationSubscription": { - "description": "Collection of PeriodicNotificationSubscription elements, see note 2.", - "items": { - "$ref": "#/components/schemas/PeriodicNotificationSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "PeriodicNotificationSubscription" - }, - "resourceURL": { - "description": "Self-referring URL, see note 1.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "AnyURI" - }, - "userTrackingSubscription": { - "description": "Collection of UserTrackingSubscription elements, see note 1.", - "items": { - "$ref": "#/components/schemas/UserTrackingSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "UserTrackingSubscription" - }, - "zonalTrafficSubscription": { - "description": "Collection of ZonalTrafficSubscription elements, see note 1.", - "items": { - "$ref": "#/components/schemas/ZonalTrafficSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "ZonalTrafficSubscription" - }, - "zoneStatusSubscription": { - "description": "Collection of ZoneStatusSubscription elements, see note 1.", - "items": { - "$ref": "#/components/schemas/ZoneStatusSubscription" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0.. N", - "x-etsi-mec-origin-type": "ZoneStatusSubscription" - } - }, - "required": [ - "resourceURL" - ], - "type": "object", - "x-etsi-notes": "NOTE 1:\tAs specified in [5], clause 5.2.2.8.\nNOTE 2: \tAs specified in [6], clause 5.2.2.7.", - "x-etsi-ref": "6.3.3" - }, - "OperationStatus": { - "enum": [ - "Serviceable", - "Unserviceable", - "Unknown" - ], - "type": "string" - }, - "PeriodicNotificationSubscription": { - "description": "A type containing data for periodic subscription.", - "properties": { - "address": { - "description": "Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "duration": { - "description": "Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "int" - }, - "frequency": { - "description": "Maximum frequency (in seconds) of notifications (can also be considered minimum time between notifications) per subscription.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "int" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "requestedAccuracy": { - "description": "Accuracy of the provided distance in meters.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "int" - }, - "requester": { - "description": "Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - } - }, - "required": [ - "callbackReference", - "address", - "requestedAccuracy", - "frequency" - ], - "type": "object" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - }, - "RetrievalStatus": { - "enum": [ - "Retrieved", - "NotRetrieved", - "Error" - ], - "type": "string" - }, - "ServiceError": { - "description": "used to indicate a notification termination or cancellation.", - "properties": { - "messageId": { - "description": "Message identifier, either with prefix SVC or with prefix POL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "text": { - "description": "Message text, with replacement variables marked with %n, where n is an index into the list of elements, starting at 1", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "variables": { - "description": "Variables to substitute into text string", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "messageId", - "text" - ], - "type": "object" - }, - "SubscriptionCancellationNotification": { - "description": "A type containing the subscription cancellation notification.", - "properties": { - "address": { - "description": "Address of terminal if the error applies to an individual terminal.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackData": { - "description": "CallbackData if passed by the application in the receiptRequest element during the associated subscription operation", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "reason": { - "$ref": "#/components/schemas/ServiceError" - } - }, - "required": [ - "terminalLocation" - ], - "type": "object" - }, - "SubscriptionNotification": { - "description": "A type containing the notification subscription.", - "properties": { - "callbackData": { - "description": "CallbackData if passed by the application in the receiptRequest element during the associated subscription operation", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "distanceCriteria": { - "$ref": "#/components/schemas/DistanceCriteria" - }, - "enteringLeavingCriteria": { - "$ref": "#/components/schemas/EnteringLeavingCriteria" - }, - "isFinalNotification": { - "description": "Set to true if it is a final notification about location change.", - "type": "boolean", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "boolean" - }, - "link": { - "description": "Link to other resources that are in relationship with the resource.", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "terminalLocation": { - "description": "Collection of the terminal locations.", - "items": { - "$ref": "#/components/schemas/TerminalLocation" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "TerminalLocation" - } - }, - "required": [ - "terminalLocation" - ], - "type": "object" - }, - "TerminalDistance": { - "description": "A type containing information about the distance from a terminal to a location or between two terminals, in addition the accuracy and a timestamp of the information are provided.", - "properties": { - "accuracy": { - "description": "Accuracy of the provided distance in meters", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "integer" - }, - "distance": { - "description": "Distance from terminal to a location or between two terminals specified in meters", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "integer" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - } - }, - "required": [ - "distance" - ], - "type": "object" - }, - "TerminalLocation": { - "description": "A type containing device address, retrieval status and location information.", - "properties": { - "address": { - "description": "Address of the terminal to which the location information applies (e.g., 'sip' URI, 'tel' URI, 'acr' URI).", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "currentLocation": { - "$ref": "#/components/schemas/LocationInfo" - }, - "errorInformation": { - "$ref": "#/components/schemas/ServiceError" - }, - "locationRetrievalStatus": { - "$ref": "#/components/schemas/RetrievalStatus" - } - }, - "required": [ - "address", - "locationRetrievalStatus" - ], - "type": "object" - }, - "TerminalLocationList": { - "description": "Collection of the terminal locations.", - "items": { - "$ref": "#/components/schemas/TerminalLocation" - }, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "TerminalLocation" - }, - "TimeStamp": { - "properties": { - "nanoSeconds": { - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-ref": "6.5.2" - }, - "UserEventType": { - "enum": [ - "Entering", - "Leaving", - "Transferring" - ], - "type": "string" - }, - "UserInfo": { - "properties": { - "accessPointId": { - "description": "The identity of the access point the user is currently on, see note 1.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "address": { - "description": "Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) currently on the access point, see note 1.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "AnyURI" - }, - "ancillaryInfo": { - "description": "Reserved for future use.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "contextLocationInfo": { - "description": "Contextual information of a user location (e.g. aisle, floor, room number, etc.).", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "locationInfo": { - "$ref": "#/components/schemas/LocationInfo" - }, - "resourceURL": { - "description": "Self-referring URL, see note 1.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "zoneId": { - "description": "The identity of the zone the user is currently within, see note 1.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "address", - "accessPointId", - "zoneId", - "resourceURL", - "timestamp" - ], - "type": "object", - "x-etsi-notes": "NOTE 1:\tAs specified in [5], clause 5.2.2.7.\nNOTE 2: \tAs specified in [5], clause 5.2.2.5.", - "x-etsi-ref": "6.2.2" - }, - "UserList": { - "description": "A type containing list of users.", - "properties": { - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "user": { - "description": "Collection of the zone information list.", - "items": { - "$ref": "#/components/schemas/UserInfo" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "UserInfo" - } - }, - "required": [ - "resourceURL" - ], - "type": "object" - }, - "UserTrackingSubscription": { - "description": "A type containing user tracking subscription.", - "properties": { - "address": { - "description": "Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) to monitor", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "userEventCriteria": { - "description": "List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event.", - "items": { - "$ref": "#/components/schemas/UserEventType" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "UserEventType" - } - }, - "required": [ - "callbackReference", - "address" - ], - "type": "object" - }, - "ZonalPresenceNotification": { - "description": "A type containing zonal presence notification", - "properties": { - "address": { - "description": "Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) to monitor", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "callbackData": { - "description": "CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [REST_NetAPI_Common].", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "currentAccessPointId": { - "description": "Identifier of access point.", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - }, - "interestRealm": { - "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "link": { - "description": "Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "previousAccessPointId": { - "description": "Identifier of access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "userEventType": { - "$ref": "#/components/schemas/UserEventType" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "address", - "userEventType", - "currentAccessPointId", - "timestamp" - ], - "type": "object" - }, - "ZonalTrafficSubscription": { - "description": "A type containing zonal traffic subscription", - "properties": { - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "duration": { - "description": "Period (in seconds) of time notifications are provided for. If set to \"0\" (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications. This element MAY be given by the client during resource creation in order to signal the desired lifetime of the subscription. The server MUST return in this element the period of time for which the subscription will still be valid.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "interestRealm": { - "description": "Interest realm of access point (e.g. geographical area, a type of industry etc.).", - "items": { - "type": "string" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "string" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "userEventCriteria": { - "description": "List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event.", - "items": { - "$ref": "#/components/schemas/UserEventType" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "UserEventType" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "callbackReference", - "zoneId" - ], - "type": "object" - }, - "ZoneInfo": { - "description": "A type containing zone information.", - "properties": { - "numberOfAccessPoints": { - "description": "The number of access points within the zone", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "unsignedInt" - }, - "numberOfUnserviceableAccessPoints": { - "description": "Number of inoperable access points within the zone.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "unsignedInt" - }, - "numberOfUsers": { - "description": "The number of users currently on the access point.", - "type": "integer", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "unsignedInt" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "numberOfAccessPoints", - "numberOfUnserviceableAccessPoints", - "numberOfUsers", - "resourceURL" - ], - "type": "object" - }, - "ZoneList": { - "description": "A type containing a list of zones.", - "properties": { - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "anyURI" - }, - "zone": { - "description": "Collection of the zone information list.", - "items": { - "$ref": "#/components/schemas/ZoneInfo" - }, - "type": "array" - } - }, - "required": [ - "resourceURL" - ], - "type": "object" - }, - "ZoneStatusNotification": { - "description": "A type containing zone status notification.", - "properties": { - "accessPointId": { - "description": "Identifier of an access point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "callbackData": { - "description": "CallBackData if passed by the application during the associated ZoneStatusSubscription operation. See [REST_NetAPI_Common].", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "link": { - "description": "Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification", - "items": { - "$ref": "#/components/schemas/Link" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Link" - }, - "numberOfUsersInAP": { - "description": "This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "numberOfUsersInZone": { - "description": "This element shall be present when ZoneStatusSubscription includes numberOfUsersZoneThreshold element and the number of users in a zone exceeds the threshold defined in this subscription.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "operationStatus": { - "$ref": "#/components/schemas/OperationStatus" - }, - "timestamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "zoneId", - "timestamp" - ], - "type": "object" - }, - "ZoneStatusSubscription": { - "description": "A type containing zone status subscription.", - "properties": { - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "clientCorrelator": { - "description": "A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "numberOfUsersAPThreshold": { - "description": "Threshold number of users in an access point which if crossed shall cause a notification", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "numberOfUsersZoneThreshold": { - "description": "Threshold number of users in a zone which if crossed shall cause a notification", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "unsignedInt" - }, - "operationStatus": { - "description": "List of operation status values to generate notifications for (these apply to all access points within a zone).", - "items": { - "$ref": "#/components/schemas/OperationStatus" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "OperationStatus" - }, - "resourceURL": { - "description": "Self referring URL", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "anyURI" - }, - "zoneId": { - "description": "Identifier of zone", - "type": "string", - "x-etsi-mec-cardinality": 1, - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "callbackReference", - "zoneId" - ], - "type": "object" - } - } - } -} diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn index 6035b6abe1060f70d4842f8008261e7c12b1d51a..9f5531fb444b8389048994cc8875099b9a084712 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Functions.ttcn @@ -37,9 +37,11 @@ module LocationAPI_Functions { import from LibMec_Pics all; import from LibMec_Pixits all; - function f_create_user_tracking_subscription( - out UserTrackingSubscription p_user_tracking_subscription - ) runs on HttpComponent { + function f_create_user_location_event_subscription( + out UserLocationEventNotification p_user_location_event_notification, + out charstring p_subscription_id, + in Address p_address := PX_USER + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -47,75 +49,77 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_user_tracking_subscription( - m_user_tracking_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_USER - )))))); + m_body_json_user_location_event_subscription( + m_user_location_event_subscription( + PX_CALLBACK_REF_URL, + p_address + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_user_tracking_subscription( - mw_user_tracking_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_USER - )))))) -> value v_response { + mw_body_json_user_location_event_notification( + mw_user_location_event_notification( + p_address + )))))) -> value v_response { tc_ac.stop; - p_user_tracking_subscription := v_response.response.body.json_body.userTrackingSubscription; - log("f_create_user_tracking_subscription: INFO: IUT successfully responds to the subscription: ", p_user_tracking_subscription); + // 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_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + p_user_location_event_notification := v_response.response.body.json_body.userLocationEventNotification; + log("f_create_user_location_event_subscription: INFO: IUT successfully responds to the subscription: ", p_user_location_event_notification); + log("f_create_user_location_event_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { - log("f_create_user_tracking_subscription: INCONC: Expected message not received"); + log("f_create_user_location_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_user_tracking_subscription + } // End of function f_create_user_location_event_subscription - function f_delete_user_tracking_subscription( - in UserTrackingSubscription p_user_tracking_subscription - ) runs on HttpComponent { + function f_delete_user_location_event_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri :=regexp( - oct2char(unichar2oct(p_user_tracking_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_LOC_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_USERS_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_user_tracking_subscription: INCONC: Expected message not received"); + log("f_delete_user_location_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_user_tracking_subscription + } // End of function f_delete_user_location_event_subscription - function f_create_periodic_notification_subscription( - out PeriodicNotificationSubscription p_periodic_notification_subscription - ) runs on HttpComponent { + function f_create_user_location_periodic_subscription( + out UserLocationPeriodicNotification p_user_location_periodic_notification, + out charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -123,58 +127,55 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_periodic_notification_subscription( - m_periodic_notification_subscription( - { PX_IP_ADDRESS }, - PX_CALLBACK_REF_URL, - -, -, - PX_USER - )))))); + m_body_json_user_location_periodic_subscription( + m_user_location_periodic_subscription( + PX_CALLBACK_REF_URL + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_periodic_notification_subscription( - mw_periodic_notification_subscription( - { PX_IP_ADDRESS }, - PX_CALLBACK_REF_URL, - -, -, - PX_USER, - ? - )))))) -> value v_response { + mw_body_json_user_location_periodic_notification( + mw_user_location_periodic_notification( + PX_CALLBACK_REF_URL + )))))) -> value v_response { tc_ac.stop; - p_periodic_notification_subscription := v_response.response.body.json_body.periodicNotificationSubscription; - log("f_create_periodic_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_periodic_notification_subscription); + // 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_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + p_user_location_periodic_notification := v_response.response.body.json_body.userLocationPeriodicNotification; + log("f_create_user_location_periodic_subscription: INFO: IUT successfully responds to the subscription: ", p_user_location_periodic_notification); + log("f_create_user_location_periodic_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { - log("f_create_periodic_notification_subscription: INCONC: Expected message not received"); + log("f_create_user_location_periodic_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_periodic_notification_subscription + } // End of function f_create_user_location_periodic_subscription - function f_delete_periodic_notification_subscription( - in PeriodicNotificationSubscription p_position_notification_subscription - ) runs on HttpComponent { + function f_delete_user_location_periodic_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_position_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_TRACK_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "/" & p_subscription_id, v_headers ))); tc_ac.start; @@ -186,14 +187,16 @@ module LocationAPI_Functions { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_periodic_notification_subscription: INCONC: Expected message not received"); + log("f_delete_user_location_periodic_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_periodic_notification_subscription + } // End of function f_delete_user_location_periodic_subscription - function f_create_zonal_traffic_subscription( - out ZonalTrafficSubscription p_zonal_traffic_subscription - ) runs on HttpComponent { + function f_create_zone_location_event_subscription( + out ZoneLocationEventNotification p_zone_location_event_notification, + out charstring p_subscription_id, + in Address p_user := PX_USER + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -201,55 +204,58 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_zonal_traffic_subscription( - m_zonal_traffic_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - )))))); + m_body_json_zone_location_event_subscription( + m_zone_location_event_subscription( + PX_CALLBACK_REF_URL, + p_user, + PX_ZONE_ID + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_zonal_traffic_subscription( - mw_zonal_traffic_subscription( - PX_CLIENT_ID, - PX_CALLBACK_REF_URL, - PX_ZONE_ID - )))))) -> value v_response { - tc_ac.stop; + mw_body_json_zone_location_event_notification( + mw_zone_location_event_notification( + // FIXME + )))))) -> value v_response { + tc_ac.stop; - p_zonal_traffic_subscription := v_response.response.body.json_body.zonalTrafficSubscription; - log("f_create_zonal_traffic_subscription: INFO: IUT successfully responds to the subscription: ", p_zonal_traffic_subscription); + // 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_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); + p_zone_location_event_notification := v_response.response.body.json_body.zoneLocationEventNotification; + log("f_create_zone_location_event_subscription: INFO: IUT successfully responds to the subscription: ", p_zone_location_event_notification); + log("f_create_zone_location_event_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { - log("f_create_zonal_traffic_subscription: INCONC: Expected message not received"); + log("f_create_zone_location_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_zonal_traffic_subscription + } // End of function f_create_zone_location_event_subscription - function f_delete_zonal_traffic_subscription( - in ZonalTrafficSubscription p_zonal_traffic_subscription - ) runs on HttpComponent { + function f_delete_zone_location_event_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_zonal_traffic_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_USERS_INF_SUB_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_USERS_INF_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI & "/" & p_subscription_id, v_headers ))); tc_ac.start; @@ -261,14 +267,18 @@ module LocationAPI_Functions { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_zonal_traffic_subscription: INCONC: Expected message not received"); + log("f_delete_zone_location_event_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_zonal_traffic_subscription + } // End of function f_delete_zone_location_event_subscription - function f_create_circle_notification_subscription( - out CircleNotificationSubscription p_circle_notification_subscription - ) runs on HttpComponent { + function f_create_zone_status_subscription( + out ZoneStatusNotification p_zone_status_notification, + out charstring p_subscription_id, + in template (omit) OperationStatus p_operationStatus := Serviceable, + in template (omit) Json.UInteger p_upper_num_user_threshold := omit, + in template (omit) Json.UInteger p_lower_num_user_threshold := omit + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -276,53 +286,146 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_AREA_SUB_URI, + PICS_ROOT_API & PX_LOC_API_ZONES_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_circle_notification_subscription( - m_circle_notification_subscription( - PX_CLIENT_ID, //clientCorrelator - PX_AREA_SUB_CALLBACK_URI, // callbackReference - { PX_IP_ADDRESS } // address - )))))); + m_body_json_zone_status_subscription( + m_zone_status_subscription( + PX_AREA_SUB_CALLBACK_URI, + -, + PX_ZONE_ID, + -, -, -, -, -, + p_upper_num_user_threshold, + p_lower_num_user_threshold, + p_operationStatus + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_circle_notification_subscription( - mw_circle_notification_subscription( - PX_CLIENT_ID - )))))) -> value v_response { + mw_body_json_zone_status_notification( + mw_zone_status_notification( + -, -, + p_operationStatus, + -, + PX_ZONE_ID + )))))) -> value v_response { tc_ac.stop; - p_circle_notification_subscription := v_response.response.body.json_body.circleNotificationSubscription; - log("f_create_circle_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_circle_notification_subscription); - } + // 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_LOC_API_ZONES_SUB_URI & "/(?*)", + 0 + ); + p_zone_status_notification := v_response.response.body.json_body.zoneStatusNotification; + log("f_create_zone_status_subscription: INFO: IUT successfully responds to the subscription: ", p_zone_status_notification); + log("f_create_zone_status_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { - log("f_create_circle_notification_subscription: INCONC: Expected message not received"); + log("f_create_zone_status_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_circle_notification_subscription + } // End of function f_create_zone_status_subscription - function f_delete_circle_notification_subscription( - in CircleNotificationSubscription p_circle_notification_subscription - ) runs on HttpComponent { + function f_delete_zone_status_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_LOC_API_ZONES_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_zone_status_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_zone_status_subscription + + function f_create_user_area_subscription( + out UserAreaNotification p_user_area_notification, + out charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_circle_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_AREA_SUB_URI & "/(?*)", - 0 - ); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_user_area_subscription( + m_user_area_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + PX_USER, + m_area_info( + ELLIPSOID_POINT_UNCERT_CIRCLE, + { m_point({PX_UE_COORD_LAT}, {PX_UE_COORD_LONG}) }, + PX_RADIUS + ), // AreaInfo + PX_TRACKIMNG_ACCURACY // TrackingAccuracy + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_user_area_notification( + mw_user_area_notification( + // FIXME PX_UE_DIST_SUB_CALLBACK_URI + )))))) -> 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_LOC_API_USERS_SUB_URI & "/(?*)", + 0 + ); + p_user_area_notification := v_response.response.body.json_body.userAreaNotification; + log("f_create_user_area_subscription: INFO: IUT successfully responds to the subscription: ", p_user_area_notification); + log("f_create_user_area_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_user_area_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_user_area_subscription + + function f_delete_user_area_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_APP_Q_AREA_SUB_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_AREA_SUB_URI & "/" & p_subscription_id, v_headers ))); tc_ac.start; @@ -334,24 +437,15 @@ module LocationAPI_Functions { tc_ac.stop; } [] tc_ac.timeout { - log("f_delete_circle_notification_subscription: INCONC: Expected message not received"); + log("f_delete_user_area_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_circle_notification_subscription - - - - - - - - + } // End of function f_delete_user_area_subscription - - - function f_create_distance_notification_subscription( - out DistanceNotificationSubscription p_distance_notification_subscription - ) runs on HttpComponent { + function f_create_user_distance_subscription( + out UserDistanceNotification p_user_distance_notification, + out charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -359,75 +453,73 @@ module LocationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI, + PICS_ROOT_API & PX_LOC_API_DISTANCE_SUB_URI, v_headers, m_http_message_body_json( - m_body_json_distance_notification_subscription( - m_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, // checkImmediate - PX_CLIENT_ID, //clientCorrelator - -, // criteria - 10.0, // distance - -, - { PX_UE_MONITORED_IP_ADDRESS } // monitoredAddress - )))))); + m_body_json_user_distance_subscription( + m_user_distance_subscription( + PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference + PX_USER, + { PX_UE_MONITORED_IP_ADDRESS }, + PX_DISTANCE, + PX_TRACKIMNG_ACCURACY + )))))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_201_created( mw_http_message_body_json( - mw_body_json_distance_notification_subscription( - mw_distance_notification_subscription( - PX_UE_DIST_SUB_CALLBACK_URI, // callbackReference - -, - PX_CLIENT_ID, //clientCorrelator - -, -, -, - { PX_UE_MONITORED_IP_ADDRESS } // monitoredAddress - )))))) -> value v_response { + mw_body_json_user_distance_notification( + mw_user_distance_notification( + // FIXME PX_UE_DIST_SUB_CALLBACK_URI + )))))) -> value v_response { tc_ac.stop; - p_distance_notification_subscription := v_response.response.body.json_body.distanceNotificationSubscription; - log("f_create_distance_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_distance_notification_subscription); + // 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_LOC_API_DISTANCE_SUB_URI & "/(?*)", + 0 + ); + p_user_distance_notification := v_response.response.body.json_body.userDistanceNotification; + log("f_create_user_distance_subscription: INFO: IUT successfully responds to the subscription: ", p_user_distance_notification); + log("f_create_user_distance_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { - log("f_create_distance_notification_subscription: INCONC: Expected message not received"); + log("f_create_user_distance_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_create_distance_notification_subscription + } // End of function f_create_user_distance_subscription - function f_delete_distance_notification_subscription( - in DistanceNotificationSubscription p_distance_notification_subscription - ) runs on HttpComponent { + function f_delete_user_distance_subscription( + charstring p_subscription_id + ) runs on HttpComponent { var Headers v_headers; - var HttpMessage v_response; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_distance_notification_subscription.resourceURL)), - "?+" & PX_ME_APP_Q_DIST_URI & "/(?*)", - 0 - ); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_Q_DIST_URI & "/" & v_uri, + PICS_ROOT_API & PX_LOC_API_DISTANCE_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_distance_notification_subscription: INCONC: Expected message not received"); + log("f_delete_user_distance_subscription: INCONC: Expected message not received"); } } // End of 'alt' statement - } // End of function f_delete_distance_notification_subscription + } // End of function f_delete_user_distance_subscription } // End of module LocationAPI_Functions diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn index 46cda7501816511f8a4c3f0659477452ace6ae97..8d6672e1d115ee17f2edfd1404e1dfc7bc97fc93 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn @@ -11,6 +11,8 @@ module LocationAPI_Pixits { modulepar Address PX_USER := "ue1"; + modulepar Address PX_USER_2 := "ue2"; + modulepar Address PX_USER_UNKNOWN := "acr:192.168.5.1.1"; modulepar ClientCorrelator PX_CLIENT_ID := "0123"; @@ -25,9 +27,11 @@ module LocationAPI_Pixits { modulepar ZoneId PX_ZONE_ID := "zone1"; + modulepar ZoneId PX_ZONE_ID_1 := "zone2"; + modulepar ZoneId PX_NON_EXISTENT_ZONE_ID := "zone51"; - modulepar ResourceURL PX_RESOURCE_URL := "http://meep-loc-serv/etsi-013/location/v2/users/ue1"; + modulepar ResourceURL PX_RESOURCE_URL := "http://meep-loc-serv/etsi-013/location/v3/users/ue1"; modulepar NumberOfAccessPoints PX_NB_ACCESS_POINTS := 3; @@ -35,32 +39,48 @@ module LocationAPI_Pixits { modulepar UInt32 PX_NB_USERS := 10; - modulepar CallbackReference PX_CALLBACK_REF_URL := { notifyURL := "http://clientApp.example.com/location_notifications/123456", callbackData := omit, notificationFormat := omit }; + modulepar CallbackReference PX_CALLBACK_REF_URL := "http://clientApp.example.com/location_notifications/123456"; - modulepar CallbackReference PX_UE_PERIODIC_SUB_CALLBACK_URI := { notifyURL := "http://clientApp.example.com/location_notifications/123456", callbackData := omit, notificationFormat := omit }; + modulepar CallbackReference PX_UE_PERIODIC_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; modulepar Address PX_IP_ADDRESS := "acr:10.0.0.3"; - modulepar CallbackReference PX_AREA_SUB_CALLBACK_URI := { notifyURL := "http://clientApp.example.com/location_notifications/123456", callbackData := omit, notificationFormat := omit }; + modulepar Address PX_IP_ADDRESS_1 := "acr:10.0.0.10"; + + modulepar CallbackReference PX_AREA_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; - modulepar CallbackReference PX_UE_DIST_SUB_CALLBACK_URI := { notifyURL := "http://clientApp.example.com/location_notifications/123456", callbackData := omit, notificationFormat := omit }; + modulepar CallbackReference PX_UE_DIST_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; + modulepar CallbackReference PX_UE_NEW_SUB_CALLBACK_URI := "http://clientApp.example.com/new_location_notifications/123456"; + modulepar Address PX_UE_MONITORED_IP_ADDRESS := "acr:10.0.0.1"; modulepar Address PX_ACR_UNKNOWN_IP := "acr:10.0.0.254"; modulepar Address PX_UE_ZONAL_TRAF_SUB_URI := ""; - modulepar Json.AnyURI PX_UE_LOC_QRY_URI := "/location/v2/queries/distance"; + modulepar Json.AnyURI PX_UE_LOC_QRY_URI := "/location/v3/queries/distance"; modulepar Json.Number PX_UE_COORD_LAT := -80.86302; modulepar Json.Number PX_UE_COORD_LONG := 41.277306; + + modulepar Json.Number PX_DISTANCE := 1000.0; + + modulepar Json.UInteger PX_RADIUS := 500; + + modulepar Json.Number PX_TRACKIMNG_ACCURACY := 1000.0; modulepar Address PX_ACR_SOME_IP := ""; - modulepar CallbackReference PX_USERTRACK_SUB_CALLBACK_URI := { "" }; + modulepar CallbackReference PX_USERTRACK_SUB_CALLBACK_URI := ""; - modulepar CallbackReference PX_TRAFFIC_SUB_CALLBACK_URI := { "" }; + modulepar CallbackReference PX_TRAFFIC_SUB_CALLBACK_URI := ""; + + modulepar float PX_NOTIF_EXPIRY := 60.0; + + modulepar Json.UInteger PX_UPPER_NUM_USER_THRESHOLD := 10; + + modulepar Json.UInteger PX_LOWER_NUM_USER_THRESHOLD := 1; } // End of module LocationAPI_Pixits diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn index a169aeb2b773f8a11c4dec0cfe9ecbefb8725130..e4076851cf9019164997c06054f3fd5b79818b2f 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn @@ -1,15 +1,18 @@ module LocationAPI_Templates { - + // JSON import from Json all; - + // LibCommon import from LibCommon_BasicTypesAndValues all; - + + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/LocationAPI import from LocationAPI_TypesAndValues all; import from LocationAPI_Pixits all; - + template (value) UserInfo m_user_info( in Address p_address := PX_USER, in AccessPointId p_access_point_id := PX_ACCESS_POINT_ID, @@ -20,13 +23,14 @@ module LocationAPI_Templates { address_ := p_address, accessPointId := p_access_point_id, zoneId := p_zone_id, - timestamp_ := p_timestamp, resourceURL := p_resource_url, + timestamp_ := p_timestamp, locationInfo := omit, + civicInfo := omit, contextLocationInfo := omit, ancillaryInfo := omit } // End of template m_user_info - + template (present) UserInfo mw_user_info( template (present) Address p_address := ?, template (present) AccessPointId p_access_point_id := ?, @@ -37,9 +41,10 @@ module LocationAPI_Templates { address_ := p_address, accessPointId := p_access_point_id, zoneId := p_zone_id, - timestamp_ := p_timestamp, resourceURL := p_resource_url, + timestamp_ := p_timestamp, locationInfo := *, + civicInfo := *, contextLocationInfo := *, ancillaryInfo := * } // End of template mw_user_info @@ -51,7 +56,7 @@ module LocationAPI_Templates { user := p_userInfo, resourceURL := p_resource_url } // End of template m_user_list - + template UserList mw_user_list( template UserInfos p_userInfo := *, template (present) ResourceURL p_resource_url := ? @@ -59,7 +64,7 @@ module LocationAPI_Templates { user := p_userInfo, resourceURL := p_resource_url } // End of template mw_user_list - + template (value) LocationInfo m_location_info( in Latitude p_latitude, in Longitude p_longitude, @@ -82,7 +87,7 @@ module LocationAPI_Templates { timestamp_ := omit, velocity := omit } // End of template m_location_info - + template (present) LocationInfo mw_location_info( template (present) Latitude p_latitude := ?, template (present) Longitude p_longitude := ?, @@ -104,7 +109,7 @@ module LocationAPI_Templates { timestamp_ := *, velocity := * } // End of template mw_location_info - + template (value) ZoneInfo m_zone_info( in ZoneId p_zone_id := PX_ZONE_ID, in NumberOfAccessPoints p_number_of_access_points := PX_NB_ACCESS_POINTS, @@ -118,7 +123,7 @@ module LocationAPI_Templates { numberOfUsers := p_number_of_users, resourceURL := p_resource_url } // End of template m_zone_info - + template (present) ZoneInfo mw_zone_info( template (present) ZoneId p_zone_id := ?, template (present) NumberOfAccessPoints p_number_of_access_points := ?, @@ -132,7 +137,7 @@ module LocationAPI_Templates { numberOfUsers := p_number_of_users, resourceURL := p_resource_url } // End of template mw_zone_info - + template (omit) AccessPointList m_access_point_list( in ZoneId p_zoneId := PX_ZONE_ID, in ResourceURL p_resourceURL, @@ -142,267 +147,708 @@ module LocationAPI_Templates { accessPoint := p_accessPoint, resourceURL := p_resourceURL } // End of template m_access_point_list - - template AccessPointList mw_access_point_list( - template (present) ZoneId p_zoneId := ?, - template (present) ResourceURL p_resourceURL := ?, - template AccessPointInfos p_accessPoint := * - ) := { + + template (present) AccessPointList mw_access_point_list( + template (present) ZoneId p_zoneId := ?, + template (present) ResourceURL p_resourceURL := ?, + template AccessPointInfos p_accessPoint := * + ) := { zoneId := p_zoneId, accessPoint := p_accessPoint, resourceURL := p_resourceURL } // End of template mw_access_point_list - - template (value) UserTrackingSubscription m_user_tracking_subscription( - in ClientCorrelator p_clientCorrelator, - in CallbackReference p_callbackReference, - in Address p_address := PX_USER, - in UserEventCriteria p_userEventCriteria := { Entering } - ) := { - clientCorrelator := p_clientCorrelator, - callbackReference := p_callbackReference, - address_ := p_address, - userEventCriteria := p_userEventCriteria, - resourceURL := omit - } // End of template m_user_tracking_subscription - - template (present) UserTrackingSubscription mw_user_tracking_subscription( - template (present) ClientCorrelator p_clientCorrelator := ?, - template (present) CallbackReference p_callbackReference := ?, - template (present) Address p_address := PX_USER, - template (present) UserEventCriteria p_userEventCriteria := { Entering }, - template (present) ResourceURL p_resourceURL := ? - ) := { - clientCorrelator := p_clientCorrelator, - callbackReference := p_callbackReference, - address_ := p_address, - userEventCriteria := p_userEventCriteria, - resourceURL := p_resourceURL - } // End of template mw_user_tracking_subscription - - template (value) PeriodicTrackingSubscription m_periodic_tracking_subscription( - in ClientCorrelator p_clientCorrelator, - in CallbackReference p_callbackReference, - in Address p_address := PX_USER, - in Json.Number p_frequency := 10.0, - in Json.Number p_requestedAccuracy := 10.0 - ) := { - clientCorrelator := p_clientCorrelator, - callbackReference := p_callbackReference, - address_ := p_address, - frequency := p_frequency, - requestedAccuracy := p_requestedAccuracy, - resourceURL := omit - } // End of template m_periodic_tracking_subscription - - template (present) PeriodicTrackingSubscription mw_periodic_tracking_subscription( - template (present) ClientCorrelator p_clientCorrelator := ?, - template (present) CallbackReference p_callbackReference := ?, - template (present) Address p_address := PX_USER, - template (present) Json.Number p_frequency := ?, - template (present) Json.Number p_requestedAccuracy := ? + + template (omit) AccessPointInfo m_access_point_info( + in AccessPointId p_accessPointId, + in ConnectionType p_connectionType, + in OperationStatus p_operationStatus, + in NumberOfUsers p_numberOfUsers, + in template (value) ResourceURL p_resourceURL, + in template (omit) LocationInfo p_locationInfo := omit, + in template (omit) InterestRealm p_interestRealm := omit, + in template (omit) DateTimeStamp p_timezone := omit + ) := { + accessPointId := p_accessPointId, + locationInfo := p_locationInfo, + connectionType := p_connectionType, + operationStatus := p_operationStatus, + numberOfUsers := p_numberOfUsers, + interestRealm := p_interestRealm, + timezone := p_timezone, + resourceURL := p_resourceURL + } // End of template m_access_point_info + + template (present) AccessPointInfo mw_access_point_info( + template (present) AccessPointId p_accessPointId := ?, + template (present) ConnectionType p_connectionType := ?, + template (present) OperationStatus p_operationStatus := ?, + template (present) NumberOfUsers p_numberOfUsers := ?, + template (present) ResourceURL p_resourceURL := ?, + template LocationInfo p_locationInfo := *, + template InterestRealm p_interestRealm := *, + template DateTimeStamp p_timezone := * + ) := { + accessPointId := p_accessPointId, + locationInfo := p_locationInfo, + connectionType := p_connectionType, + operationStatus := p_operationStatus, + numberOfUsers := p_numberOfUsers, + interestRealm := p_interestRealm, + timezone := p_timezone, + resourceURL := p_resourceURL + } // End of template mw_access_point_info + + template (omit) Subscription m_subscription( + in Json.String p_subscriptionType, + in template (omit) Json.AnyURI p_href := omit + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template m_subscription + + template (present) Subscription mw_subscription( + template (present) Json.String p_subscriptionType := ?, + template Json.AnyURI p_href := * + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template mw_subscription + + template (omit) NotificationSubscriptionList m_notification_subscription_list( + in template (value) ResourceURL p_resourceURL, + in template (omit) Subscriptions p_subscription := omit + ) := { + subscription := p_subscription, + resourceURL := p_resourceURL + } // End of template m_notification_subscription_list + + template (present) NotificationSubscriptionList mw_notification_subscription_list( + template (present) ResourceURL p_resourceURL := ?, + template Subscriptions p_subscription := * ) := { - clientCorrelator := p_clientCorrelator, - callbackReference := p_callbackReference, - address_ := p_address, - frequency := p_frequency, - requestedAccuracy := p_requestedAccuracy, - resourceURL := * - } // End of template mw_periodic_tracking_subscription - - template (value) ZonalTrafficSubscription m_zonal_traffic_subscription( - in ClientCorrelator p_client_correlator, - in CallbackReference p_callback_reference, - in ZoneId p_zone_id, - in UserEventCriteria p_user_event_criteria := { Entering } - ) := { - clientCorrelator := p_client_correlator, - callbackReference := p_callback_reference, - zoneId := p_zone_id, - interestRealm := omit, - userEventCriteria := p_user_event_criteria, - duration := omit, - resourceURL := omit - } // End of template m_zonal_traffic_subscription - - template (present) ZonalTrafficSubscription mw_zonal_traffic_subscription( - template (present) ClientCorrelator p_client_correlator := ?, - template (present) CallbackReference p_callback_reference := ?, - template (present) ZoneId p_zone_id := ? - ) := { - clientCorrelator := p_client_correlator, - callbackReference := p_callback_reference, - zoneId := p_zone_id, - interestRealm := *, - userEventCriteria := *, - duration := *, - resourceURL := * - } // End of template mw_zonal_traffic_subscription - - template (omit) CircleNotificationSubscription m_circle_notification_subscription( - in template (omit) ClientCorrelator p_clientCorrelator := omit, - in template (value) CallbackReference p_callbackReference, - in template (value) Addresses p_address, - in template (value) Json.Number p_latitude := PX_UE_COORD_LAT, - in template (value) Json.Number p_longitude := PX_UE_COORD_LONG, - in template (value) Json.Number p_radius := 200.0, - in template (value) Json.Number p_trackingAccuracy := 10.0, - in template (value) EnteringLeavingCriteria p_enteringLeavingCriteria := Entering, - in template (value) Json.Bool p_checkImmediate := true, - in template (value) UInt32 p_frequency := 10, - in template (omit) ResourceURL p_resourceURL := omit - ) := { + subscription := p_subscription, + resourceURL := p_resourceURL + } // End of template mw_notification_subscription_list + + template (omit) UserAreaNotification m_user_area_notification( + in template (value) Address p_address_, + in template (value) LocationEventType p_userLocationEvent, + in template (value) Links p_links_, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) LocationInfo p_locationInfo := omit, + in template (omit) CivicAddress p_civicInfo := omit, + in template (omit) RelativeLocationInfo p_relativeLocationInfo := omit + ) :={ + notificationType := "UserAreaNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + userLocationEvent := p_userLocationEvent, + links_ := p_links_ + } // End of template m_user_area_notification + + template (present) UserAreaNotification mw_user_area_notification( + template (present) Address p_address_ := ?, + template (present) LocationEventType p_userLocationEvent := ?, + template (present) Links p_links_ := ?, + template TimeStamp p_timeStamp := *, + template LocationInfo p_locationInfo := *, + template CivicAddress p_civicInfo := *, + template RelativeLocationInfo p_relativeLocationInfo := * + ) :={ + notificationType := "UserAreaNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + userLocationEvent := p_userLocationEvent, + links_ := p_links_ + } // End of template mw_user_area_notification + + template (omit) UserLocationEventSubscription m_user_location_event_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) UserEventPara p_userEventPara := omit, + in template (omit) LocationEventCriteria p_locationEventCriteria := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserLocationEventSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, address_ := p_address, + userEventPara := p_userEventPara, + locationEventCriteria := p_locationEventCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_user_location_event_subscription + + template (omit) UserLocationEventSubscription m_user_location_event_subscription_error( + in Address p_address := PX_USER, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) UserEventPara p_userEventPara := omit, + in template (omit) LocationEventCriteria p_locationEventCriteria := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserLocationEventSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := omit, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + address_ := p_address, + userEventPara := p_userEventPara, + locationEventCriteria := p_locationEventCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_user_location_event_subscription_error + + template (present) UserLocationEventSubscription mw_user_location_event_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) Links p_links_ := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template UserEventPara p_userEventPara := *, + template LocationEventCriteria p_locationEventCriteria := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "UserLocationEventSubscription", + clientCorrelator := p_clientCorrelator, callbackReference := p_callbackReference, - checkImmediate := p_checkImmediate, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + address_ := p_address, + userEventPara := p_userEventPara, + locationEventCriteria := p_locationEventCriteria, + expiryDeadline := p_expiryDeadline + } // End of template mw_user_location_event_subscription + + template (omit) UserLocationPeriodicSubscription m_user_location_periodic_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) PeriodicEventInfo p_periodicEventInfo := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserLocationPeriodicSubscription", clientCorrelator := p_clientCorrelator, - count := omit, - duration := omit, - enteringLeavingCriteria := p_enteringLeavingCriteria, - frequency := p_frequency, - latitude := p_latitude, - link := omit, - longitude := p_longitude, - radius := p_radius, - requester := omit, - resourceURL := p_resourceURL, - trackingAccuracy := p_trackingAccuracy - } // End of template m_circle_notification_subscription - - template CircleNotificationSubscription mw_circle_notification_subscription( - template ClientCorrelator p_clientCorrelator := *, - template (present) CallbackReference p_callbackReference := ?, - template (present) Addresses p_address := ?, - template (present) Json.Number p_latitude := ?, - template (present) Json.Number p_longitude := ?, - template (present) Json.Number p_radius := ?, - template (present) Json.Number p_trackingAccuracy := ?, - template (present) EnteringLeavingCriteria p_enteringLeavingCriteria := ?, - template (present) Json.Bool p_checkImmediate := ?, - template (present) UInt32 p_frequency := ?, - template ResourceURL p_resourceURL := * - ) := { + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + address_ := p_address, + periodicEventInfo := p_periodicEventInfo, + expiryDeadline := p_expiryDeadline + } // End of template m_user_location_periodic_subscription + + template (present) UserLocationPeriodicSubscription mw_user_location_periodic_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) Links p_links_ := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template PeriodicEventInfo p_periodicEventInfo := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "UserLocationPeriodicSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, address_ := p_address, + periodicEventInfo := p_periodicEventInfo, + expiryDeadline := p_expiryDeadline + } // End of template mw_user_location_periodic_subscription + + template (omit) ZoneLocationEventSubscription m_zone_location_event_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in ZoneId p_zoneId, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) LocationEventCriteria p_locationEventCriteria := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "ZoneLocationEventSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + zoneId := p_zoneId, + locationEventCriteria := p_locationEventCriteria, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template m_zone_location_event_subscription + + template (present) ZoneLocationEventSubscription mw_zone_location_event_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) ZoneId p_zoneId := ?, + template (present) Links p_links_ := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template LocationEventCriteria p_locationEventCriteria := *, + template ReportingCtrl p_reportingCtrl := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "ZoneLocationEventSubscription", + clientCorrelator := p_clientCorrelator, callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + zoneId := p_zoneId, + locationEventCriteria := p_locationEventCriteria, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template mw_zone_location_event_subscription + + template (omit) ZoneStatusSubscription m_zone_status_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in ZoneId p_zoneId, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Json.UInteger p_upperNumberOfUsersZoneThreshold := omit, + in template (omit) Json.UInteger p_lowerNumberOfUsersZoneThreshold := omit, + in template (omit) Json.UInteger p_upperNumberOfUsersAPThreshold := omit, + in template (omit) Json.UInteger p_lowerNumberOfUsersAPThreshold := omit, + in template (omit) OperationStatus p_operationStatus := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "ZoneStatusSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + zoneId := p_zoneId, + upperNumberOfUsersZoneThreshold := p_upperNumberOfUsersZoneThreshold, + lowerNumberOfUsersZoneThreshold := p_lowerNumberOfUsersZoneThreshold, + upperNumberOfUsersAPThreshold := p_upperNumberOfUsersAPThreshold, + lowerNumberOfUsersAPThreshold := p_lowerNumberOfUsersAPThreshold, + operationStatus := p_operationStatus, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template m_zone_status_subscription + + template (present) ZoneStatusSubscription mw_zone_status_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) ZoneId p_zoneId := ?, + template (present) Links p_links_ := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template Json.UInteger p_upperNumberOfUsersZoneThreshold := *, + template Json.UInteger p_lowerNumberOfUsersZoneThreshold := *, + template Json.UInteger p_upperNumberOfUsersAPThreshold := *, + template Json.UInteger p_lowerNumberOfUsersAPThreshold := *, + template OperationStatus p_operationStatus := *, + template ReportingCtrl p_reportingCtrl := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "ZoneStatusSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + zoneId := p_zoneId, + upperNumberOfUsersZoneThreshold := p_upperNumberOfUsersZoneThreshold, + lowerNumberOfUsersZoneThreshold := p_lowerNumberOfUsersZoneThreshold, + upperNumberOfUsersAPThreshold := p_upperNumberOfUsersAPThreshold, + lowerNumberOfUsersAPThreshold := p_lowerNumberOfUsersAPThreshold, + operationStatus := p_operationStatus, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template mw_zone_status_subscription + + template (omit) UserAreaSubscription m_user_area_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in template (value) AreaInfo p_areaDefine, + in Json.Number p_trackingAccuracy, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) LocationEventCriteria p_locationEventCriteria := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) Json.Bool p_reportingLocationReq := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserAreaSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + areaDefine := p_areaDefine, + trackingAccuracy := p_trackingAccuracy, + locationEventCriteria := p_locationEventCriteria, + reportingCtrl := p_reportingCtrl, + reportingLocationReq := p_reportingLocationReq, + expiryDeadline := p_expiryDeadline + } // End of template m_user_area_subscription + + template (present) UserAreaSubscription mw_user_area_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Address p_address := ?, + template (present) Links p_links_ := ?, + template (present) AreaInfo p_areaDefine := ?, + template (present) Json.Number p_trackingAccuracy := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template LocationEventCriteria p_locationEventCriteria := *, + template ReportingCtrl p_reportingCtrl := *, + template Json.Bool p_reportingLocationReq := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "UserAreaSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + areaDefine := p_areaDefine, + trackingAccuracy := p_trackingAccuracy, + locationEventCriteria := p_locationEventCriteria, + reportingCtrl := p_reportingCtrl, + reportingLocationReq := p_reportingLocationReq, + expiryDeadline := p_expiryDeadline + } // End of template mw_user_area_subscription + + template (omit) UserDistanceSubscription m_user_distance_subscription( + in CallbackReference p_callbackReference, + in Address p_address := PX_USER, + in template (value) Json.AnyURIArray p_monitoredAddress, + in Json.Number p_distance, + in Json.Number p_trackingAccuracy, + in template (value) DistanceCriteria p_criteria := AllWithinDistance, + in Json.Bool p_checkImmediate := true, + in template (omit) ClientCorrelator p_clientCorrelator := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Json.AnyURI p_referenceAddress := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "UserAreaSubscription", + clientCorrelator := p_clientCorrelator, + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := omit, + referenceAddress := p_referenceAddress, + monitoredAddress := p_monitoredAddress, + distance := p_distance, + trackingAccuracy := p_trackingAccuracy, + criteria := p_criteria, checkImmediate := p_checkImmediate, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template m_user_distance_subscription + + template (present) UserDistanceSubscription mw_user_distance_subscription( + template (present) CallbackReference p_callbackReference := ?, + template (present) Links p_links_ := ?, + template (present) Address p_address := ?, + template (present) Json.AnyURIArray p_monitoredAddress := ?, + template (present) Json.Number p_distance := ?, + template (present) Json.Number p_trackingAccuracy := ?, + template (present) DistanceCriteria p_criteria := ?, + template (present) Json.Bool p_checkImmediate := ?, + template ClientCorrelator p_clientCorrelator := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template Json.AnyURI p_referenceAddress := *, + template ReportingCtrl p_reportingCtrl := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "UserAreaSubscription", clientCorrelator := p_clientCorrelator, - count := *, - duration := *, - enteringLeavingCriteria := p_enteringLeavingCriteria, - frequency := p_frequency, - latitude := p_latitude, - link := *, - longitude := p_longitude, - radius := p_radius, - requester := *, - resourceURL := p_resourceURL, - trackingAccuracy := p_trackingAccuracy - } // End of template m_wcircle_notification_subscription - + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links_ := p_links_, + referenceAddress := p_referenceAddress, + monitoredAddress := p_monitoredAddress, + distance := p_distance, + trackingAccuracy := p_trackingAccuracy, + criteria := p_criteria, + checkImmediate := p_checkImmediate, + reportingCtrl := p_reportingCtrl, + expiryDeadline := p_expiryDeadline + } // End of template mw_user_distance_subscription + + template (omit) UserDistanceNotification m_user_distance_notification( + in template (value) UserList p_monitoredUsers, + in template (value) DistanceCriteria p_distanceEvent, + in template (value) Links p_links_, + in template (omit) TimeStamp p_timeStamp := omit + ) := { + notificationType := "UserDistanceNotification", + timeStamp := p_timeStamp, + monitoredUsers := p_monitoredUsers, + distanceEvent := p_distanceEvent, + links_ := p_links_ + } // End of template m_user_distance_notification + + template (present) UserDistanceNotification mw_user_distance_notification( + template (present) UserList p_monitoredUsers := ?, + template (present) DistanceCriteria p_distanceEvent := ?, + template (present) Links p_links_ := ?, + template TimeStamp p_timeStamp := * + ) := { + notificationType := "UserDistanceNotification", + timeStamp := p_timeStamp, + monitoredUsers := p_monitoredUsers, + distanceEvent := p_distanceEvent, + links_ := p_links_ + } // End of template mw_user_distance_notification + + template (omit) UserLocationEventNotification m_user_location_event_notification( + in template (value) Address p_address_, + in template (value) LocationEventType p_userLocationEvent, + in template (value) Links p_links_, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) LocationInfo p_locationInfo := omit, + in template (omit) CivicAddress p_civicInfo := omit, + in template (omit) RelativeLocationInfo p_relativeLocationInfo := omit, + in template (omit) ZoneId p_zoneId := omit, + in template (omit) AccessPointId p_accessPointId := omit + ) :={ + notificationType := "UserLocationEventNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + links_ := p_links_ + } // End of template m_user_location_event_notification + + template (present) UserLocationEventNotification mw_user_location_event_notification( + template (present) Address p_address_ := ?, + template (present) LocationEventType p_userLocationEvent := ?, + template (present) Links p_links_ := ?, + template TimeStamp p_timeStamp := *, + template LocationInfo p_locationInfo := *, + template CivicAddress p_civicInfo := *, + template RelativeLocationInfo p_relativeLocationInfo := *, + template ZoneId p_zoneId := *, + template AccessPointId p_accessPointId := * + ) :={ + notificationType := "UserLocationEventNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + links_ := p_links_ + } // End of template mw_user_location_event_notification + + template (omit) UserLocationPeriodicNotification m_user_location_periodic_notification( + in template (value) Address p_address_, + in template (value) LocationEventType p_userLocationEvent, + in template (value) Links p_links_, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) LocationInfo p_locationInfo := omit, + in template (omit) CivicAddress p_civicInfo := omit, + in template (omit) RelativeLocationInfo p_relativeLocationInfo := omit, + in template (omit) ZoneId p_zoneId := omit, + in template (omit) AccessPointId p_accessPointId := omit, + in template (omit) Json.Bool p_isFinalNotification := omit + ) :={ + notificationType := "UserLocationPeriodicNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + isFinalNotification := p_isFinalNotification, + links_ := p_links_ + } // End of template m_user_location_periodic_notification + + template (present) UserLocationPeriodicNotification mw_user_location_periodic_notification( + template (present) Address p_address_ := ?, + template (present) LocationEventType p_userLocationEvent := ?, + template (present) Links p_links_ := ?, + template TimeStamp p_timeStamp := *, + template LocationInfo p_locationInfo := *, + template CivicAddress p_civicInfo := *, + template RelativeLocationInfo p_relativeLocationInfo := *, + template ZoneId p_zoneId := *, + template AccessPointId p_accessPointId := *, + template Json.Bool p_isFinalNotification := * + ) :={ + notificationType := "UserLocationPeriodicNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + locationInfo := p_locationInfo, + civicInfo := p_civicInfo, + relativeLocationInfo := p_relativeLocationInfo, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + isFinalNotification := p_isFinalNotification, + links_ := p_links_ + } // End of template mw_user_location_periodic_notification + + template (omit) ZoneLocationEventNotification m_zone_location_event_notification( + in template (value) Address p_address_, + in template (value) Links p_links_, + in template (value) LocationEventType p_userLocationEvent, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) ZoneId p_zoneId := omit + ) := { + notificationType := "ZoneLocationEventNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + zoneId := p_zoneId, + links_ := p_links_ + } // End of template m_zone_location_event_notification + + template (present) ZoneLocationEventNotification mw_zone_location_event_notification( + template (present) Address p_address_ := ?, + template (present) Links p_links_ := ?, + template (present) LocationEventType p_userLocationEvent := ?, + template TimeStamp p_timeStamp := *, + template ZoneId p_zoneId := * + ) := { + notificationType := "ZoneLocationEventNotification", + timeStamp := p_timeStamp, + address_ := p_address_, + userLocationEvent := p_userLocationEvent, + zoneId := p_zoneId, + links_ := p_links_ + } // End of template mw_zone_location_event_notification + + template (omit) ZoneStatusNotification m_zone_status_notification( + in template (value) Links p_links_, + in template (omit) UserNumEvent p_userNumEvent := omit, + in template (omit) OperationStatus p_operationStatus := omit, + in template (omit) TimeStamp p_timeStamp := omit, + in template (omit) ZoneId p_zoneId := omit, + in template (omit) AccessPointId p_accessPointId := omit + ) := { + notificationType := "ZoneStatusNotification", + timeStamp := p_timeStamp, + userNumEvent := p_userNumEvent, + operationStatus := p_operationStatus, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + links_ := p_links_ + } // End of template m_zone_status_notification + + template (present) ZoneStatusNotification mw_zone_status_notification( + template (present) Links p_links_ := ?, + template UserNumEvent p_userNumEvent := *, + template OperationStatus p_operationStatus := *, + template TimeStamp p_timeStamp := *, + template ZoneId p_zoneId := *, + template AccessPointId p_accessPointId := * + ) := { + notificationType := "ZoneStatusNotification", + timeStamp := p_timeStamp, + userNumEvent := p_userNumEvent, + operationStatus := p_operationStatus, + zoneId := p_zoneId, + accessPointId := p_accessPointId, + links_ := p_links_ + } // End of template mw_zone_status_notification + + template (value) TestNotification m_test_notification( + in template (value) LinksSubscription p_links_ + ) := { + notificationType := "TestNotification", + links_ := p_links_ + } // End of template m_test_notification + + template (present) TestNotification mw_test_notification( + template (present) LinksSubscription p_links_ := ? + ) := { + notificationType := "TestNotification", + links_ := p_links_ + } // End of template mw_test_notification + + template (omit) AreaInfo m_area_info( + in template (value) Shape p_shape, + in template (value) Points p_points, + in template (omit) Json.UInteger p_radius := omit + ) := { + shape := p_shape, + points := p_points, + radius := p_radius + } // End of template m_area_info + + template (present) AreaInfo mw_area_info( + template (present) Shape p_shape := ?, + template (present) Points p_points := ?, + template Json.UInteger p_radius := * + ) := { + shape := p_shape, + points := p_points, + radius := p_radius + } // End of template mw_area_info + + template (value) Point m_point( + in Latitude p_latitude, + in Longitude p_longitude + ) := { + latitude := p_latitude, + longitude := p_longitude + } // End of template m_point + + template (present) Point mw_point( + template (present) Latitude p_latitude := ?, + template (present) Longitude p_longitude := ? + ) := { + latitude := p_latitude, + longitude := p_longitude + } // End of template mw_point + template (value) TerminalDistance m_terminal_distance(in Json.Number p_distance) := { distance := p_distance, accuracy := omit, timestamp_ := omit } // End of template m_terminal_distance - + template (present) TerminalDistance mw_terminal_distance(template (present) Json.Number p_distance := ?) := { distance := p_distance, accuracy := *, timestamp_ := * } // End of template mw_terminal_distance - - template (omit) DistanceNotificationSubscription m_distance_notification_subscription( - in template (value) CallbackReference p_callbackReference, - in template (value) Json.Bool p_checkImmediate := true, - in template (omit) ClientCorrelator p_clientCorrelator := omit, - in template (value) DistanceCriteria p_criteria := AllWithinDistance, - in template (value) Json.Number p_distance, - in template (value) UInt32 p_frequency := 10, - in template (value) Addresses p_monitoredAddress, - in template (omit) Addresses p_referenceAddress := omit, - in template (value) Json.Number p_trackingAccuracy := 10.0, - in template (omit) ResourceURL p_resourceURL := omit - ) := { - callbackReference := p_callbackReference, - checkImmediate := p_checkImmediate, - clientCorrelator := p_clientCorrelator, - count := omit, - criteria := p_criteria, - distance := p_distance, - duration := omit, - frequency := p_frequency, - link := omit, - monitoredAddress := p_monitoredAddress, - referenceAddress := p_referenceAddress, - requester := omit, - resourceURL := p_resourceURL, - trackingAccuracy := p_trackingAccuracy - } // End of template m_distance_notification_subscription - - template DistanceNotificationSubscription mw_distance_notification_subscription( - template (present) CallbackReference p_callbackReference := ?, - template (present) Json.Bool p_checkImmediate := ?, - template ClientCorrelator p_clientCorrelator := *, - template (present) DistanceCriteria p_criteria := ?, - template (present) Json.Number p_distance := ?, - template (present) UInt32 p_frequency := ?, - template (present) Addresses p_monitoredAddress := ?, - template Addresses p_referenceAddress := *, - template (present) Json.Number p_trackingAccuracy := ?, - template ResourceURL p_resourceURL := * - ) := { - callbackReference := p_callbackReference, - checkImmediate := p_checkImmediate, - clientCorrelator := p_clientCorrelator, - count := *, - criteria := p_criteria, - distance := p_distance, - duration := *, - frequency := p_frequency, - link := *, - monitoredAddress := p_monitoredAddress, - referenceAddress := p_referenceAddress, - requester := *, - resourceURL := p_resourceURL, - trackingAccuracy := p_trackingAccuracy - } // End of template mw_distance_notification_subscription - - template (omit) PeriodicNotificationSubscription m_periodic_notification_subscription( - in template (value) Addresses p_address, - in template (value) CallbackReference p_callbackReference, - in template (value) UInt32 p_frequency := 10, - in template (value) UInt32 p_requestedAccuracy := 1, - in template (omit) ClientCorrelator p_clientCorrelator := omit, - in template (omit) ResourceURL p_resourceURL := omit - ) := { - address_ := p_address, - callbackReference := p_callbackReference, - clientCorrelator := p_clientCorrelator, - duration := omit, - frequency := p_frequency, - link := omit, - requestedAccuracy := p_requestedAccuracy, - requester := omit, - resourceURL := p_resourceURL - } // End of template m_periodic_notification_subscription - - template PeriodicNotificationSubscription mw_periodic_notification_subscription( - template (present) Addresses p_address := ?, - template (present) CallbackReference p_callbackReference := ?, - template (present) UInt32 p_frequency := ?, - template (present) UInt32 p_requestedAccuracy := ?, - template ClientCorrelator p_clientCorrelator := *, - template ResourceURL p_resourceURL := * - ) := { - address_ := p_address, - callbackReference := p_callbackReference, - clientCorrelator := p_clientCorrelator, - duration := *, - frequency := p_frequency, - link := *, - requestedAccuracy := p_requestedAccuracy, - requester := *, - resourceURL := p_resourceURL - } // End of template mw_periodic_notification_subscription } // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn index 7206dfabc294d3ab08434e6413473c077d5b1c47..e5c9bad79744abe3e6fc3a5ace9547e647e9286c 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn @@ -1,8 +1,8 @@ /** - * @author ETSI / STF569 + * @author ETSI / STF569 / TTF T027 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 013 V2.1.1 (2019-09) + * @desc Types ANd Values for ETSI GS MEC 013 V3.1.1 (2019-09) * @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. @@ -13,81 +13,104 @@ module LocationAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc This type represents a list of UserInfo. + * @member user Collection of the user location information list. + * @member resourceURL Self referring URL. + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.5 Type: UserList */ - type UInt32 Seconds; + type record UserList { + UserInfos user optional, + ResourceURL resourceURL optional + } + type record of UserInfo UserInfos; /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @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 013 V3.1.1 (2023-01) Clause 6.5.4 Type: WebsockNotifConfig */ - type UInt32 NanoSeconds; + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } /** - * @desc - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.5.2 Type: TimeStamp + * @desc This type represents some requirements about reporting the event of user locationreportingLocationReq This IE shall be set to true if a location estimate is required for each event report + * @member accessPointList One or more access points forming a monitoring area that could be any shape + * @member zoneId Identifier of zone (e.g. zone001) to monitor + * @member occurrenceInfo One time only report indication + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.5 Type: UserEventPara + */ + type record UserEventPara { + Json.Bool reportingLocationReq optional, + AccessPointList accessPointList optional, + ZoneId zoneId optional, + OccurrenceInfo occurrenceInfo optional + } // End of type UserEventPara + + +/** + * @desc Indicates whether event reporting is one time + * @see ETSI TS 129 572 V16.7.0 (2021-08) Clause 6.1.6.3.16 Enumeration: OccurrenceInfo */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds + type enumerated OccurrenceInfo { + ONE_TIME_EVENT, + MULTIPLE_TIME_EVENT } /** - * @desc A type containing list of users. - * @member user Collection of the zone information list. - * @member resourceURL Self referring URL. - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.2.2 Type: UserInfo + * @desc This type represents the parameters that control the report times and frequency + * @member minimumInterval Minimum interval between reports in case frequently reporting. Unit is second. + * @member maximumFrequency Maximum frequency (in seconds) of notifications per subscription + * @member maximumCount Maximum number of notifications. For no maximum, either do not include this element or specify a value of zero. Default value is 0 + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.6 Type: ReportingCtrl */ - type record of UserInfo UserInfos; - type record UserList { - UserInfos user optional, - ResourceURL resourceURL - } + type record ReportingCtrl { + Json.UInteger minimumInterval optional, + Json.UInteger maximumFrequency optional, + Json.UInteger maximumCount optional + } // End of type ReportingCtrl /** - * @desc Shape information, as detailed in [14], associated with the reported location coordinate - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Table 6.5.3-1: Definition of type LocationInfo + * @desc This type represents the parameters that describe an area + * @member shape The shape of the area monitored + * @member points Shall include one point if the shape is CIRCLE + * @member radius + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.7 Type: AreaInfo */ - type enumerated Shape { - ELLIPSOID_ARC (1), - ELLIPSOID_POINT (2), - ELLIPSOID_POINT_ALTITUDE (3), - ELLIPSOID_POINT_ALTITUDE_UNCERT_ELLIPSOID (4), - ELLIPSOID_POINT_UNCERT_CIRCLE (5), - ELLIPSOID_POINT_UNCERT_ELLIPSE (6), - POLYGON (7) - } with { - variant "JSON: as number" - } + type record AreaInfo { + Shape shape, + Points points, + Json.UInteger radius optional + } // End of type AreaInfo /** - * @desc Velocity information, as detailed in [14], associated with the reported location coordinate - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Table 6.5.3-1: Definition of type LocationInfo + * @desc Location latitude, expressed in the range -90° to +90° */ - type enumerated VelocityType { - HORIZONTAL (1), - HORIZONTAL_VERTICAL (2), - HORIZONTAL_UNCERT (3), - HORIZONTAL_VERTICAL_UNCERT (4) - } - - type record Velocity { - VelocityType velocityType, - UInt32 bearing, - UInt32 horizontalSpeed, - Int32 verticalSpeed optional, - UInt32 verticalUncertainty optional - } - type record of Json.Number Latitude; + /** + * @desc Location longitude, expressed in the range -180° to +180° + */ type record of Json.Number Longitude; + /** + * @desc This type represents the geographical location of a point + * @member latitude Location latitude, expressed in the range -90° to +90° + * @member longitude Location longitude, expressed in the range -180° to +180° + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.8 Type: Point + */ + type record Point { + Latitude latitude, + Longitude longitude + } // End of type Point + type record of Point Points; + /** * @desc A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. * @member latitude Location latitude, expressed in the range -90° to +90°. Cardinality greater than one only if "shape" equals 7. @@ -104,28 +127,85 @@ module LocationAPI_TypesAndValues { * @member includedAngle Present only if \"shape\" equals 6 * @member shape Shape information, as detailed in [14], associated with the reported location coordinate * @member velocity Structure with attributes relating to the target entity’s velocity, as defined in [14] - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.5.3 Type: LocationInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.3 Type: LocationInfo */ type record LocationInfo { - Latitude latitude, - Longitude longitude, - Json.Number altitude optional, - UInt32 accuracy optional, - UInt32 accuracySemiMinor optional, - UInt32 accuracyAltitude optional, - UInt32 orientationMajorAxis optional, - UInt32 confidence optional, - UInt32 innerRadius optional, - UInt32 uncertaintyRadius optional, - UInt32 offsetAngle optional, - UInt32 includedAngle optional, - Shape shape, - TimeStamp timestamp_ optional, - Velocity velocity optional + Latitude latitude, + Longitude longitude, + Json.Number altitude optional, + Json.UInteger accuracy optional, + Json.UInteger accuracySemiMinor optional, + Json.UInteger accuracyAltitude optional, + Json.UInteger orientationMajorAxis optional, + Json.UInteger confidence optional, + Json.UInteger innerRadius optional, + Json.UInteger uncertaintyRadius optional, + Json.UInteger offsetAngle optional, + Json.UInteger includedAngle optional, + Shape shape, + TimeStamp timestamp_ optional, + Velocity velocity optional } with { variant (timestamp_) "name as 'timestamp'"; } // End of type LocationInfo + /** + * @desc Shape information, as detailed in [14], associated with the reported location coordinate + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Table 6.5.3-1: Definition of type LocationInfo + */ + type enumerated Shape { + ELLIPSOID_ARC (1), + ELLIPSOID_POINT (2), + ELLIPSOID_POINT_ALTITUDE (3), + ELLIPSOID_POINT_ALTITUDE_UNCERT_ELLIPSOID (4), + ELLIPSOID_POINT_UNCERT_CIRCLE (5), + ELLIPSOID_POINT_UNCERT_ELLIPSE (6), + POLYGON (7) + } with { + variant "JSON: as number" + } + + /** + * @desc Velocity information, as detailed in [14], associated with the reported location coordinate + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Table 6.5.3-1: Definition of type LocationInfo + */ + type enumerated VelocityType { + HORIZONTAL (1), + HORIZONTAL_VERTICAL (2), + HORIZONTAL_UNCERT (3), + HORIZONTAL_VERTICAL_UNCERT (4), + ELLIPSOID_POINT_UNCERT_CIRCLE (5), + ELLIPSOID_POINT_UNCERT_ELLIPSE (6), + POLYGON (7) + } with { + variant "JSON: as number" + } + + /** + * @desc Structure with attributes relating to the target entity's velocity + * @member velocityType Velocity information + * @member bearing Bearing, expressed in the range 0° to 360° + * @member horizontalSpeed Horizontal speed + * @member uncertainty Horizontal uncertainty + * @member verticalSpeed Vertical speed, expressed in km/h + * @member verticalUncertainty Vertical uncertainty + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Table 6.5.3-1: Definition of type LocationInfo + */ + type record Velocity { + VelocityType velocityType, + Json.UInteger bearing, + Json.UInteger horizontalSpeed, + Json.UInteger uncertainty optional, + Json.Integer verticalSpeed optional, + Json.UInteger verticalUncertainty optional + } // End of type Velocity + + /** + * @desc Identifier of access point, (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.6.1 accessPointId + */ + type Json.String AccessPointId; + /** * @desc A type containing zone information. * @member zoneId Identifier of zone @@ -133,33 +213,31 @@ module LocationAPI_TypesAndValues { * @member numberOfUnservicableAccessPoints Number of inoperable access points within the zone. * @member numberOfUsers The number of users currently on the access point. * @member resourceURL Self referring URL. + * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.2 Type: ZoneInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record ZoneInfo { - ZoneId zoneId, - NumberOfAccessPoints numberOfAccessPoints, + ZoneId zoneId, + NumberOfAccessPoints numberOfAccessPoints, NumberOfUnserviceableAccessPoints numberOfUnservicableAccessPoints, - NumberOfUsers numberOfUsers, - ResourceURL resourceURL + NumberOfUsers numberOfUsers, + ResourceURL resourceURL } + type record of ZoneInfo ZoneInfos; /** * @desc Collection of the zone information list. * @member zone Collection of the zone information list. * @member resourceURL Self referring URL. + * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.1 Type: ZoneList + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ - type record of ZoneInfo ZoneInfos; type record ZoneList { ZoneInfos zone optional, ResourceURL resourceURL } - /** - * @desc Identifier of access point, (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element - * @see ETSI GS MEC 013 V2.1.1 (2019-09) 6.6.1 accessPointId - */ - type Json.String AccessPointId; - - type UInt32 DateTimeStamp; // FIXME To be reviewed + type Json.UInteger DateTimeStamp; // FIXME To be reviewed /** * @desc A type containing access point information. @@ -170,17 +248,20 @@ module LocationAPI_TypesAndValues { * @member interestRealm Interest realm of access point * @member timezone Time zone of access point * @member resourceURL Self referring URL. + * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.4 Type: AccessPointInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record AccessPointInfo { - AccessPointId accessPointId, - LocationInfo locationInfo optional, - ConnectionType connectionType, + AccessPointId accessPointId, + LocationInfo locationInfo optional, + ConnectionType connectionType, OperationStatus operationStatus, - NumberOfUsers numberOfUsers, - InterestRealm interestRealm optional, - DateTimeStamp timezone optional, - ResourceURL resourceURL + NumberOfUsers numberOfUsers, + InterestRealm interestRealm optional, + DateTimeStamp timezone optional, + ResourceURL resourceURL } + /** * @desc Collection of the access point information list */ @@ -191,15 +272,17 @@ module LocationAPI_TypesAndValues { * @member zoneId Identifier of zone * @member accessPoint Collection of the access point information list. * @member resourceURL Self referring URL + * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.3 Type: AccessPointList + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types */ type record AccessPointList { - ZoneId zoneId, + ZoneId zoneId, AccessPointInfos accessPoint optional, - ResourceURL resourceURL + ResourceURL resourceURL } /** - * @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). + * @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) */ type Json.AnyURI Address type record of Address Addresses; @@ -209,31 +292,10 @@ module LocationAPI_TypesAndValues { */ type Json.String AncillaryInfo; - /** - * @desc CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [\ -REST_NetAPI_Common]. - */ - type Json.String CallbackData; - - /** - * @desc Notification serialization format - */ - type enumerated NotificationFormat { - JSON (1), - XML (2) - } - /** * @desc CallbackData description - * @member callbackData Data the application can register with the server when subscribing to notifications, and that are passed back unchanged in each of the related notifications. These data can be used by the application in the processing of the notification, e.g. for correlation purposes - * @member notificationFormat - * @member notifyURL Notify Callback URL - */ - type record CallbackReference { - NotifyURL notifyURL, - CallbackData callbackData optional, - NotificationFormat notificationFormat optional - } + */ + type Json.AnyURI CallbackReference; /** * @desc Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription. @@ -241,19 +303,20 @@ REST_NetAPI_Common]. type Json.String ClientCorrelator; /** - * @desc The connection type for the access point + * @desc This enumeration represents the connection type of an access point. + * @member LTE Access point provides a LTE-Femto connection + * @member Wifi Access point provides a Wifi® connection + * @member Wimax Access point provides a Wimax® connection + * @member FiveG_NR Access point provides a 5G NR connection + * @member UNKNOWN Access point connection type is unknown + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.7.5 Enumeration: ConnectionType */ type enumerated ConnectionType { - Femto, - LTE_femto, - Smallcell, - LTE_smallcell, + LTE, Wifi, - Pico, - Micro, - Macro, Wimax, - Unknown + FiveG_NR, + UNKNOWN } /** @@ -277,54 +340,86 @@ REST_NetAPI_Common]. type Json.String InterestRealm; /** - * @desc Link to other resources - * @member rel Describes the relationship between the URI and the resource. - * @member href UTI + * @desc This type represents a type of link and may be referenced from data structures + * @member href URI referring to a resource + * @see ETSI TS 129 572 V16.7.0 (2021 08) Clause 6.7.2 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc This type represents specified event types for UE location report + * @member ENTERING_AREA_EVENT Entering area reporting event + * @member LEAVING_AREA_EVENT Leaving area reporting event + * @see ETSI TS 129 572 V16.7.0 (2021 08) Clause 6.7.3 Enumeration: LocationEventType */ - type record Link { - Json.String rel, - Json.String href + type enumerated LocationEventType { + ENTERING_AREA_EVENT, + LEAVING_AREA_EVENT + } + type record of LocationEventType LocationEventCriteria; + + /** + * @desc This enumeration represents the result of a localization associated with a notification + * @member SUCCESS Localization is successful + * @member ABNORMAL Localization is failed due to timeout or other unspecific errors + * @see ETSI TS 129 572 V16.7.0 (2021 08) 6.7.4 Enumeration: NotificationResult + */ + type enumerated NotificationResult { + SUCCESS, + ABNORMAL } /** * @desc The URL of your own listener application. */ - type Json.String NotifyURL; + type Json.AnyURI NotifyURL; + + /** + * @desc Hyperlink related to the resource + * @member self_ Self-referring URI + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } /** * @desc The number of access points within the zone */ - type UInt32 NumberOfAccessPoints; + type Json.UInteger NumberOfAccessPoints; /** * @desc Number of inoperable access points within the zone. */ - type UInt32 NumberOfUnserviceableAccessPoints; + type Json.UInteger NumberOfUnserviceableAccessPoints; /** * @desc The number of users currently on the access point. */ - type UInt32 NumberOfUsers; + type Json.UInteger NumberOfUsers; /** * @desc Threshold number of users in an access point which if crossed shall cause a notification. */ - type UInt32 NumberOfUsersAPThreshold; + type Json.UInteger NumberOfUsersAPThreshold; /** * @desc This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription. */ - type UInt32 NumberOfUsersInAP; + type Json.UInteger NumberOfUsersInAP; /** * @desc Threshold number of users in a zone which if crossed shall cause a notification. */ - type UInt32 NumberOfUsersInZone; + type Json.UInteger NumberOfUsersInZone; /** * @desc Threshold number of users in a zone which if crossed shall cause a notification. */ - type UInt32 NumberOfUsersZoneThreshold; + type Json.UInteger NumberOfUsersZoneThreshold; /** * @desc The operation status of the access point @@ -373,199 +468,152 @@ REST_NetAPI_Common]. */ type record of UserEventType UserEventCriteria; + /** + * @desc Definition of type CivicAddress + * @member country The two-letter ISO 3166 country code in capital ASCII letters + * @member A1 National subdivisions + * @member A2 County, parish + * @member A3 City, township + * @member A4 City division, borough, city district + * @member A5 Neighbourhood + * @member A6 Group of streets below the neighbourhood level IETF RFC 4776 [6] + * @member PRD Leading street direction IETF RFC 4776 [6] + * @member POD Trailing street suffix IETF RFC 4776 [6] + * @member STS Street suffix or type IETF RFC 4776 [6] + * @member HNO House number IETF RFC 4776 [6] + * @member HNS House number suffix IETF RFC 4776 [6] + * @member LMK Landmark or vanity address IETF RFC 4776 [6] + * @member LOC Additional location information IETF RFC 4776 [6] + * @member NAM Name (residence and office occupant) IETF RFC 4776 [6] + * @member PC Postal/zip code IETF RFC 4776 [6] + * @member BLD Building (structure) IETF RFC 5139 [7] + * @member UNIT Unit (apartment, suite) IETF RFC 5139 [7] + * @member FLR Floor IETF RFC 4776 [6] + * @member Room Place-type IETF RFC 5139 [7] + * @member PCN Postal community name IETF RFC 5139 [7] + * @member POBOX Post office box (P.O. box) IETF RFC 5139 [7] + * @member ADDCODE Additional code IETF RFC 5139 [7] + * @member SEAT Seat (desk, cubicle, workstation) IETF RFC 5139 [7] + * @member RD Primary road or street IETF RFC 5139 [7] + * @member RDSEC Road clause IETF RFC 5139 [7] + * @member RDBR Road branch IETF RFC 5139 [7] + * @member RDSUBBR Road sub-branch IETF RFC 5139 [7] + * @member PRM Road pre-modifier IETF RFC 5139 [7] + * @member POM Road post-modifier IETF RFC 5139 [7] + * @member usageRules When present, this IE shall carry the value of "usagerules" Element of the PIDL-LO XML document + * @member method When present, this IE shall contain the method token, carried by the "method" Element of the PIDLLO XML document. IETF RFC 4119 [25] providedBy string O 0..1 When present, this IE shall carry the value of "provided-by" Element of the PIDL-LO XML document + * @member providedBy When present, this IE shall carry the value of "provided-by" Element of the PIDL-LO XML document + * @see ETSI TS 129 572 V16.7.0 (2021 08) Table 6.1.6.2.14-1 + */ + type record CivicAddress { + Json.String country, + Json.String A1 optional, + Json.String A3 optional, + Json.String A4 optional, + Json.String A5 optional, + Json.String A6 optional, + Json.String PRD optional, + Json.String POD optional, + Json.String STS optional, + Json.String HNO optional, + Json.String HNS optional, + Json.String LMK optional, + Json.String LOC optional, + Json.String NAM optional, + Json.String PC optional, + Json.String BLD optional, + Json.String UNIT optional, + Json.String FLR optional, + Json.String Room optional, + Json.String PCN optional, + Json.String POBOX optional, + Json.String ADDCODE optional, + Json.String SEAT optional, + Json.String RD optional, + Json.String RDSEC optional, + Json.String RDBR optional, + Json.String RDSUBBR optional, + Json.String PRM optional, + Json.String POM optional, + Json.String usageRules optional, + Json.String method optional, + Json.String providedBy + } + /** * @desc A type containing user information. * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI). * @member accessPointId Identifier of access point, (reference ETSI TS 129 171). - * @member zoneId Identifier of zone - * @member timestamp + * @member zoneId The identity of the zone the user is currently within, + * @member timestamp Date and time that location was collected * @member resourceURL Self referring URL. * @member locationInfo A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided. + * @member civicInfo Contextual information of a user location * @member contextLocationInfo Contextual information of a user location (e.g. aisle, floor, room number, etc.). * @member ancillaryInfo Reserved for future use - * @see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.2.2 Type: UserInfo + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.2 Type: UserInfo */ type record UserInfo { - Address address_, - AccessPointId accessPointId, - ZoneId zoneId, - TimeStamp timestamp_, - ResourceURL resourceURL, - LocationInfo locationInfo optional, + Address address_, + AccessPointId accessPointId, + ZoneId zoneId, + ResourceURL resourceURL optional, + TimeStamp timestamp_, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, ContextLocationInfo contextLocationInfo optional, - AncillaryInfo ancillaryInfo optional + AncillaryInfo ancillaryInfo optional } with { variant (address_) "name as 'address'"; variant (timestamp_) "name as 'timestamp'"; } // End of type UserInfo /** - * @desc A type containing user tracking subscription. - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member callbackReference - * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) to monitor - * @member userEventCriteria List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event - * @member resourceURL Self referring URL + * @desc Represents the relative location in a reference system that is a Cartesian coordinate system and described by a map + * @member mapInfo Indicates a map corresponding to a location area + * @member X Indicates the value (in the unit of meters) on x-axis of the relative location in the Cartesian system + * @member Y Indicates the value (in the unit of meters) on y-axis of the relative location in the Cartesian system + * @member Z Indicates the value (in the unit of meters) on z-axis of the relative location in the Cartesian system for a 3D-Point + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.3 */ - type record UserTrackingSubscription { - ClientCorrelator clientCorrelator optional, - CallbackReference callbackReference, - Address address_, - UserEventCriteria userEventCriteria optional, - ResourceURL resourceURL optional - } with { - variant (address_) "name as 'address'"; + type record RelativeLocationInfo { + MapInfo mapInfo, + Json.Number X, + Json.Number Y, + Json.Number Z optional } /** - * @desc A type containing periodic tracking subscription. - * @member + * @desc Indicates the location of the map origin in the local Cartesian coordinate system + * @member latitude Location latitude, expressed in the range -90° to +90° + * @member longitude Location longitude, expressed in the range -180° to +180° + * @member Location altitude relative to the WGS84 ellipsoid surface + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.4 */ - type record PeriodicTrackingSubscription { - ClientCorrelator clientCorrelator optional, - CallbackReference callbackReference, - Address address_, - Json.Number frequency, - Json.Number requestedAccuracy, - ResourceURL resourceURL optional - } with { - variant (address_) "name as 'address'"; + type record MapInfoOrigin { + Latitude latitude, + Longitude longitude, + Json.Number altitude optional } /** - * @desc A type containing zonal presence notification - * @member callbackData CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See - * @member zoneId Identifier of zone - * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) to monitor - * @member interestRealm Interest realm of access point (e.g. geographical area, a type of industry etc.) - * @member userEventType - * @member currentAccessPointId Identifier of access point - * @member previousAccessPointId Identifier of access point - * @member timestamp_ - * @member link Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification. - */ - type record ZonalPresenceNotification { - CallbackData callbackData optional, - ZoneId zoneId, - Address address_, - InterestRealm interestRealm optional, - UserEventType userEventType, - CurrentAccessPointId currentAccessPointId, - PreviousAccessPointId previousAccessPointId optional, - TimeStamp timestamp_, - Link link optional - } with { - variant (address_) "name as 'address'"; - variant (timestamp_) "name as 'timestamp'"; - } - - /** - * @desc A type containing zonal traffic subscription - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member callbackReference - * @member zoneId Identifier of zone - * @member interestRealm Interest realms of access points within a zone (e.g. geographical area, a type of industry etc.). - * @member userEventCriteria List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event. - * @member duration Period (in seconds) of time notifications are provided for - * @member resourceURL Self referring URL + * @desc This type represents a map that may incorporates an origin + * @member mapId Indicates the ID of the map + * @member Indicates the location of the map origin in the local Cartesian coordinate system + * @member ancillaryMapInfo Ancillary map information may be used to convert coordinates between different coordinate systems + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.4 */ - type record ZonalTrafficSubscription { - ClientCorrelator clientCorrelator optional, - CallbackReference callbackReference, - ZoneId zoneId, - InterestRealm interestRealm optional, - UserEventCriteria userEventCriteria optional, - Duration duration optional, - ResourceURL resourceURL optional + type record MapInfo { + Json.String mapId, + MapInfoOrigin origin optional, + AncillaryMapInfo ancillaryMapInfo optional } + type Json.String AncillaryMapInfo; /** * @desc Identifier of zone */ type Json.String ZoneId; - - /** - * @desc A type containing zone status notification. - * @member callbackData CallBackData if passed by the application during the associated ZoneStatusSubscription operation - * @member zoneId Identifier of zone - * @member accessPointId Identifier of an access point - * @member numberOfUsersInZone This element shall be present when ZoneStatusSubscription includes numberOfUsersZoneThreshold element and the number of users in a zone exceeds the threshold defined in this subscription - * @member numberOfUsersInAP This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription - * @member operationStatus - * @member timestamp_ - * @member link Link to other resources that are in relationship with this notification - */ - type record ZoneStatusNotification { - CallbackData callbackData optional, - ZoneId zoneId, - AccessPointId accessPointId optional, - NumberOfUsersInZone numberOfUsersInZone optional, - NumberOfUsersInAP numberOfUsersInAP optional, - OperationStatus operationStatus optional, - TimeStamp timestamp_, - Link link optional - } with { - variant (timestamp_) "name as 'timestamp'"; - } - - /** - * @desc A type containing zone status subscription. - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member resourceURL Self referring URL - * @member callbackReference - * @member zoneId Identifier of zone - * @member numberOfUsersZoneThreshold Threshold number of users in a zone which if crossed shall cause a notification - * @member numberOfUsersAPThreshold Threshold number of users in an access point which if crossed shall cause a notification - * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone). - */ - type record ZoneStatusSubscription { - ClientCorrelator clientCorrelator optional, - ResourceURL resourceURL optional, - CallbackReference callbackReference, - ZoneId zoneId, - NumberOfUsersZoneThreshold numberOfUsersZoneThreshold optional, - NumberOfUsersAPThreshold numberOfUsersAPThreshold optional, - OperationStatus operationStatus optional - } - - /** - * @desc A type containing data for notifications, when the area is defined as a circle - * @member address Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member callbackReference - * @member checkImmediate Check location immediately after establishing notification - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member count Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0 - * @member duration Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications - * @member enteringLeavingCriteria - * @member frequency Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications) - * @member latitude Latitude of center point - * @member link Link to other resources that are in relationship with the resource - * @member longitude Longitude of center point - * @member radius Radius circle around center point in meters - * @member requester Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member resourceURL Self referring URL - * @member trackingAccuracy Number of meters of acceptable error in tracking distance - */ - type record CircleNotificationSubscription { - Addresses address_, - CallbackReference callbackReference, - Json.Bool checkImmediate, - ClientCorrelator clientCorrelator optional, - UInt32 count optional, - UInt32 duration optional, - EnteringLeavingCriteria enteringLeavingCriteria, - UInt32 frequency, - Json.Number latitude, - Link link optional, - Json.Number longitude, - Json.Number radius, - Json.AnyURI requester optional, - ResourceURL resourceURL optional, - Json.Number trackingAccuracy - } with { - variant (address_) "name as 'address'"; - } - type enumerated EnteringLeavingCriteria { Entering, Leaving @@ -576,17 +624,23 @@ REST_NetAPI_Common]. * @member distance Distance from terminal to a location or between two terminals specified in meters * @member accuracy Accuracy of the provided distance in meters * @member timestamp Date and time that location from which distance is calculated was collected + * @see OMA-TS-REST_NetAPI_TerminalLocation-V1_0_1-20151029-A Clause 5.2.2.5 Type: TerminalDistance */ type record TerminalDistance { Json.Number distance, Json.Number accuracy optional, - TimeStamp timestamp_ optional + TimeStamp timestamp_ optional } with { variant (timestamp_) "name as 'timestamp'"; } /** * @desc Distance criterium + * @member AllWithinDistance All monitored devices are within the specified distance + * @member AnyWithinDistance Any of monitored devices gets within the specified distance + * @member AllBeyondDistance All monitored devices are beyond the specified distance + * @member AnyBeyondDistance Any of monitored devices gets beyond the specified distance + * @see OMA-TS-REST_NetAPI_TerminalLocation-V1_0_1-20151029-A Clause 5.2.3.2 Enumeration: DistanceCriteria */ type enumerated DistanceCriteria { AllWithinDistance, @@ -596,147 +650,466 @@ REST_NetAPI_Common]. } /** - * @desc A type containing data for distance subscription, with reference to other devices - * @member callbackReference - * @member checkImmediate Check location immediately after establishing notification - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member count Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0 - * @member criteria - * @member distance Distance between devices that shall be monitored - * @member duration Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications - * @member frequency Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications) - * @member link Link to other resources that are in relationship with the resource - * @member monitoredAddress Contains addresses of devices to monitor (e.g., 'sip' URI, 'tel' URI, 'acr' URI) - * @member referenceAddress Indicates address of each device that will be used as reference devices from which the distances towards monitored devices indicated in the Addresses will be monitored (e.g., 'sip' URI, 'tel' URI, 'acr' URI) - * @member requester Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member resourceURL Self referring URL - * @member trackingAccuracy Number of meters of acceptable error in tracking distance - */ - type record DistanceNotificationSubscription { - CallbackReference callbackReference, - Json.Bool checkImmediate, - ClientCorrelator clientCorrelator optional, - UInt32 count optional, - DistanceCriteria criteria, - Json.Number distance, - UInt32 duration optional, - UInt32 frequency, - Link link optional, - Addresses monitoredAddress, - Addresses referenceAddress optional, - Json.AnyURI requester optional, - ResourceURL resourceURL optional, - Json.Number trackingAccuracy - } - - /** - * @desc A type containing data for periodic subscription - * @member address_ Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member callbackReference - * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server - * @member duration Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications - * @member frequency Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications) - * @member link Link to other resources that are in relationship with the resource - * @member monitoredAddress Contains addresses of devices to monitor (e.g., 'sip' URI, 'tel' URI, 'acr' URI) - * @member requestedAccuracy Accuracy of the provided distance in meters - * @member requester Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) - * @member resourceURL Self referring URL + * @desc A type containing device address, retrieval status and location information + * @member address_ Address of the terminal to which the location information applies (e.g., 'sip' URI, 'tel' URI, 'acr' URI) + * @member locationRetrievalStatus Status of retrieval for this terminal address + * @member currentLocation Location of terminal + * @member errorInformation Used to indicate a notification termination or cancellation + * @see OMA-TS-REST_NetAPI_TerminalLocation-V1_0_1-20151029-A Clause 5.2.2.1 Type: TerminalLocation + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1A Terminal location data types */ - type record PeriodicNotificationSubscription { - Addresses address_, - CallbackReference callbackReference, - ClientCorrelator clientCorrelator optional, - UInt32 duration optional, - UInt32 frequency, - Link link optional, - UInt32 requestedAccuracy, - Json.AnyURI requester optional, - ResourceURL resourceURL optional + type record TerminalLocation { + Address address_, + RetrievalStatus locationRetrievalStatus, + LocationInfo currentLocation optional, + ServiceError errorInformation optional } with { variant (address_) "name as 'address'"; - } + } // End of type TerminalLocation + type record of TerminalLocation TerminalLocationList - type record of Json.String Variables; /** - * @desc Used to indicate a notification termination or cancellation + * @desc Indicate a notification termination or cancellation * @member messageId Message identifier, either with prefix SVC or with prefix POL * @member text Message text, with replacement variables marked with %n, where n is an index into the list of elements, starting at 1 * @member variables Variables to substitute into text string + * @see OMA-TS-REST_NetAPI_Common-V1_0-20180116-A Clause B.1.4 Type: ServiceError + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1A Terminal location data types */ type record ServiceError { Json.String messageId, Json.String text, - Variables variables optional + Json.String variables optional + } // End of type ServiceError + + /** + * @desc This type contains a list of subscriptions + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.3 Type: NotificationSubscriptionList + */ + type record Subscription { + Json.AnyURI href optional, + Json.String subscriptionType } + type record of Subscription Subscriptions; /** - * @desc A type containing device address, retrieval status and location information - * @member address_ Address of the terminal to which the location information applies (e.g., 'sip' URI, 'tel' URI, 'acr' URI) - * @member currentLocation - * @member errorInformation Used to indicate a notification termination or cancellation - * @member locationRetrievalStatus + * @desc This type contains a list of subscriptions + * @member subscription Subscription elements + * @member resourceURL Self-referring URL + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.3 Type: NotificationSubscriptionList */ - type record TerminalLocation { - Address address_, - LocationInfo currentLocation optional, - ServiceError errorInformation optional, - RetrievalStatus locationRetrievalStatus + type record NotificationSubscriptionList { + Subscriptions subscription optional, + ResourceURL resourceURL + } + + /** + * @desc This type represents a subscription to the notifications from location server about events related with user location + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member address Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) to monitor + * @member userEventPara Requirements for user event reporting. + * @member locationEventCriteria List of user event values to generate notifications for (these apply to address specified). + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.4 Type: UserLocationEventSubscription + */ + type record UserLocationEventSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + Address address_, + UserEventPara userEventPara optional, + LocationEventCriteria locationEventCriteria optional, + TimeStamp expiryDeadline optional + } with { + variant (links_) "name as '_links'"; + variant (address_) "name as 'address'"; + } // End of type UserLocationEventSubscription + + /** + * @desc This type represents a subscription to the notifications from location server about events triggered by timer expiration + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member address_ Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) to monitor + * @member periodicEventInfo Information for periodic event reporting + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.5 Type: UserLocationPeriodicSubscription + */ + type record UserLocationPeriodicSubscription{ + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + Address address_, + PeriodicEventInfo periodicEventInfo, + TimeStamp expiryDeadline optional } with { + variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; + } // End of type UserLocationPeriodicSubscription + + /** + * @desc Information for periodic event reporting + * @member reportingAmount Number of event reports + * @member reportingInterval Interval of event reports + * @see ETSI TS 129 572 V16.7.0 Clause 6.1.6.2.24 Type: PeriodicEventInfo + */ + type record PeriodicEventInfo { + ReportingAmount reportingAmount, + ReportingInterval reportingInterval + } // End of type PeriodicEventInfo + + /** + * @desc Number of required periodic event reports. + * Minimum: 1. Maximum: 8639999. + * @see ETSI TS 129 572 V16.7.0 Clause 6.1.6.3.2 Simple data types + */ + type integer ReportingAmount; + + /** + * @desc Event reporting periodic interval in seconds. + * Minimum: 1. Maximum: 8639999. + * @remark ReportingInterval * ReportingAmount shall not exceed 8639999 + * @see ETSI TS 129 572 V16.7.0 Clause 6.1.6.3.2 Simple data types + */ + type integer ReportingInterval; + + /** + * @desc This type represents a subscription to the notifications from location server about user location events happened in the zone + * @desc This type represents a subscription to the notifications from location server about events related with user location + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member zoneId Identifier of zone (e.g. zone001) to monitor + * @member reportingCtrl Provides parameters that ctrl the reporting + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.6 Type: ZoneLocationEventSubscription + */ + type record ZoneLocationEventSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + ZoneId zoneId, + LocationEventCriteria locationEventCriteria optional, + ReportingCtrl reportingCtrl optional, + TimeStamp expiryDeadline optional + } with { + variant (links_) "name as '_links'"; + } // End of type ZoneLocationEventSubscription + + /** + * @desc This type represents a subscription to the notifications from location server about the number of users reaching the threshold or the status of access points changing + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member zoneId Identifier of zone (e.g. zone001) to monitor + * @member upperNumberOfUsersZoneThreshold Threshold number of users in a zone which if crossed upward shall cause a notification + * @member lowerNumberOfUsersZoneThreshold Threshold number of users in a zone which if crossed downward shall cause a notification + * @member upperNumberOfUsersAPThreshold Threshold number of users in an access point which if crossed upward shall cause a notification + * @member lowerNumberOfUsersAPThresholdThreshold number of users in an access point which ifcrossed downward shall cause a notification + * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone) + * @member reportingCtrl Provides parameters that ctrl the reporting + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.7 Type: ZoneStatusSubscription + */ + type record ZoneStatusSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + ZoneId zoneId, + Json.UInteger upperNumberOfUsersZoneThreshold optional, + Json.UInteger lowerNumberOfUsersZoneThreshold optional, + Json.UInteger upperNumberOfUsersAPThreshold optional, + Json.UInteger lowerNumberOfUsersAPThreshold optional, + OperationStatus operationStatus optional, + ReportingCtrl reportingCtrl optional, + TimeStamp expiryDeadline optional + } with { + variant (links_) "name as '_links'"; + } // End of type ZoneStatusSubscription + + /** + * @desc This type represents a subscription to the notifications from location server about user location events happened in the area. + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member areaDefine The parameters describing the area to subscribe + * @member trackingAccuracy Number of meters of acceptable error + * @member reportingCtrl Provides parameters that ctrl the reporting + * @member locationEventCriteria List of user event values to generate notifications for (these apply to address specified) + * @member reportingLocationReq This IE shall be set to true if a location estimate is required for each event report + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.8 Type: UserAreaSubscription + */ + type record UserAreaSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + AreaInfo areaDefine, + Json.Number trackingAccuracy, + LocationEventCriteria locationEventCriteria optional, + ReportingCtrl reportingCtrl optional, + Json.Bool reportingLocationReq optional, + TimeStamp expiryDeadline optional + } with { + variant (links_) "name as '_links'"; + } // End of type UserAreaSubscription + + /** + * @desc This type represents a subscription to the notifications from location server about changes in the geographical relationships between monitored users or between monitored users and reference users + * @member subscriptionType Shall be set to "UserLocationEventSubscription" + * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server + * @member callbackReference URI exposed by the client on which to receive notifications via HTTP + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4] + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @member _links Hyperlink related to the resource + * @member referenceAddress If specified, indicates address of each user that will be used as reference users from which the distances towards monitored users indicated in the Addresses will be monitored + * @member monitoredAddress Contains addresses of users to monitor (e.g. 'sip' URI, 'tel' URI, 'acr' URI). Reference to a group could be provided here if supported by implementation + * @member distance Distance between users that shall be monitored. The unit is meter + * @member trackingAccuracy Number of meters of acceptable error in tracking distance + * @member criteria Indicates whether the notification should occur when the geographical relationship between monitored and referenced users' changes + * @member checkImmediate Check location immediately after establishing notification + * @member reportingCtrl Provides parameters that ctrl the reporting + * @member locationEventCriteria List of user event values to generate notifications for (these apply to address specified) + * @member expiryDeadline The expiration time of the subscription determined by the UE Location Subscribe Service + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.9 Type: UserDistanceSubscription + */ + type record UserDistanceSubscription { + Json.String subscriptionType, + Json.String clientCorrelator optional, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links_ optional, + Json.AnyURI referenceAddress optional, + Json.AnyURIArray monitoredAddress, + Json.Number distance, + Json.Number trackingAccuracy, + DistanceCriteria criteria, + Json.Bool checkImmediate, + ReportingCtrl reportingCtrl optional, + TimeStamp expiryDeadline optional + } with { + variant (links_) "name as '_links'"; + } // End of type UserDistanceSubscription + + /** + * @desc This type represents a test notification from a location server to determine if the Websocket method is to be utilized for the location server to issue notifications for a subscription, as defined in clause 6.12a of ETSI GS MEC 009 [4] + * @member notificationType Shall be set to "TestNotification" + * @member _links Hyperlink related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.3 Type: TestNotification + */ + type record TestNotification { + Json.String notificationType, + LinksSubscription links_ + } with { + variant (links_) "name as '_links'"; } - type record of TerminalLocation TerminalLocationList /** - * @desc A type containing the notification subscription - * @member callbackData CallbackData if passed by the application in the receiptRequest element during the associated subscription operation - * @member link Link to other resources that are in relationship with the resource - * @member isFinalNotification Set to true if it is a final notification about location change - * @member terminalLocation Collection of the terminal locations + * @desc Hyperlink related to the resource + * @member Identifying the subscription for the test notification + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.3 Type: TestNotification + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.4 Type: UserLocationEventNotification */ - type record SubscriptionNotification { - CallbackData callbackData optional, - DistanceCriteria distanceCriteria optional, - Json.Bool isFinalNotification optional, - Link link optional, - TerminalLocationList terminalLocation + type record LinksSubscription { + LinkType subscription } /** - * @desc A type containing the subscription cancellation notification - * @member address_ Address of terminal if the error applies to an individual terminal - * @member callbackData CallbackData if passed by the application in the receiptRequest element during the associated subscription operation - * @member link Link to other resources that are in relationship with the resource - * @member reason Used to indicate a notification termination or cancellation + * @desc This type represents a notification from location server with regards to UE location event. + * @member notificationType Shall be set to "UserLocationEventNotification" + * @member timeStamp TimeStamp + * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) + * @member userLocationEvent The specific event triggering this notification + * @member locationInfo The geographical coordinates where the user is + * @member civicInfo Contextual information of a user location + * @member relativeLocationInfo The relative location in a reference system + * @member zoneId The identity of the zone + * @member accessPointId The identity of the access point + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.4 Type: UserLocationEventNotification */ - type record SubscriptionCancellationNotification { - Address address_, - CallbackData callbackData optional, - Link link optional, - ServiceError reason + type record UserLocationEventNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationEventType userLocationEvent, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, + RelativeLocationInfo relativeLocationInfo optional, + ZoneId zoneId optional, + AccessPointId accessPointId optional, + Links links_ } with { + variant (links_) "name as '_links'"; variant (address_) "name as 'address'"; + } // End of type UserLocationEventNotification + + /** + * @desc This type represents a notification from location server with regards to UE location periodic reporting. + * @member notificationType Shall be set to "UserLocationPeriodicNotification" + * @member timeStamp TimeStamp + * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) + * @member userLocationEvent The specific event triggering this notification + * @member locationInfo The geographical coordinates where the user is + * @member civicInfo Contextual information of a user location + * @member relativeLocationInfo The relative location in a reference system + * @member zoneId The identity of the zone + * @member accessPointId The identity of the access point + * @member isFinalNotification Shall be set to true if it is a final notification + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.5 Type: UserLocationPeriodicNotification + */ + type record UserLocationPeriodicNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationEventType userLocationEvent, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, + RelativeLocationInfo relativeLocationInfo optional, + ZoneId zoneId optional, + AccessPointId accessPointId optional, + Json.Bool isFinalNotification optional, + Links links_ + } with { + variant (links_) "name as '_links'"; + variant (address_) "name as 'address'"; + } // End of type UserLocationPeriodicNotification + + /** + * @desc This type represents a notification from location server with regards to UE location periodic reporting. + * @member notificationType Shall be set to "ZoneLocationEventNotification" + * @member timeStamp TimeStamp + * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) + * @member userLocationEvent The specific event triggering this notification + * @member zoneId The identity of the zone + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.6 Type: ZoneLocationEventNotification + */ + type record ZoneLocationEventNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationEventType userLocationEvent, + ZoneId zoneId optional, + Links links_ + } with { + variant (links_) "name as '_links'"; + variant (address_) "name as 'address'"; + } // End of type ZoneLocationEventNotification + + /** + * @desc This type represents a notification from location server with regards to status changing event or user number threshold event happened in a zone + * @member notificationType Shall be set to "ZoneStatusNotification" + * @member timeStamp TimeStamp + * @member userNumEvent + * @member operationStatus The specific event triggering this notification + * @member zoneId The identity of the zone + * @member accessPointId The identity of the access point + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.7 Type: ZoneStatusNotification + */ + type record ZoneStatusNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + UserNumEvent userNumEvent optional, + OperationStatus operationStatus optional, + ZoneId zoneId optional, + AccessPointId accessPointId optional, + Links links_ + } with { + variant (links_) "name as '_links'"; + } // End of type ZoneStatusNotification + + type enumerated UserNumEvent { + OVER_ZONE_UPPER_THD, + UNDER_ZONE_LOWER_THD, + OVER_AP_UPPER_THD, + UNDER_AP_LOWER_THD + } with { + variant "JSON: as number" } /** - * @desc This type contains a list of subscriptions - * @member zonalTrafficSubscription Collection of ZonalTrafficSubscription elements - * @member userTrackingSubscription Collection of UserTrackingSubscription elements - * @member periodicTrackingSubscription Collection of PeriodicNotificationSubscription elements - * @member zoneStatusSubscription Collection of ZoneStatusSubscription elements - * @member circleNotificationSubscription Collection of CircleNotificationSubscription elements - * @member distanceNotificationSubscription Collection of DistanceNotificationSubscription elements - * @member resourceURL Self-referring URL - * @ see ETSI GS MEC 013 V2.1.1 (2019-09) Clause 6.3.3 Type: NotificationSubscriptionList + * @desc This type represents a notification from location server with regards to UE location events happened in an area. + * @member notificationType Shall be set to "UserAreaNotification" + * @member timeStamp TimeStamp + * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI) + * @member locationInfo The geographical coordinates where the user is + * @member civicInfo Contextual information of a user location + * @member relativeLocationInfo The relative location in a reference system + * @member userLocationEvent The specific event triggering this notification + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.8 Type: UserAreaNotification */ - type record NotificationSubscriptionList { - ZonalTrafficSubscription zonalTrafficSubscription optional, - UserTrackingSubscription userTrackingSubscription optional, - PeriodicTrackingSubscription periodicTrackingSubscription optional, - ZoneStatusSubscription zoneStatusSubscription optional, - CircleNotificationSubscription circleNotificationSubscription optional, - DistanceNotificationSubscription distanceNotificationSubscription optional, - ResourceURL resourceURL - } + type record UserAreaNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Address address_, + LocationInfo locationInfo optional, + CivicAddress civicInfo optional, + RelativeLocationInfo relativeLocationInfo optional, + LocationEventType userLocationEvent, + Links links_ + } with { + variant (links_) "name as '_links'"; + variant (address_) "name as 'address'"; + } // End of type UserAreaNotification + + /** + * @desc This type represents a notification from location server with regards to UE location events happened in an area. + * @member notificationType Shall be set to "UserDistanceNotification" + * @member timeStamp TimeStamp + * @member monitoredUsers Indicates the location information related to monitored users + * @member distanceEvent Indicates the distance event triggering the notification + * @member _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.9 Type: UserDistanceNotification + */ + type record UserDistanceNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + UserList monitoredUsers, + DistanceCriteria distanceEvent, + Links links_ + } with { + variant (links_) "name as '_links'"; + } // End of type UserDistanceNotification + } with { encode "JSON" } // End of module LocationAPI_TypesAndValues diff --git a/ttcn/LibMec/RnisAPI/json/RnisAPI.json b/ttcn/LibMec/RnisAPI/json/RnisAPI.json deleted file mode 100644 index a6c7ee5b57b7e59b66c46d5ef82f603628852885..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/RnisAPI/json/RnisAPI.json +++ /dev/null @@ -1,6574 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "description": "The ETSI MEC ISG MEC012 Radio Network Information API described using OpenAPI", - "version": "1.1.1", - "title": "RNI API", - "license": { - "name": "ETSI Forge copyright notice", - "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" - } - }, - "externalDocs": { - "description": "ETSI GS MEC012 Radio Network Information API, V1.1.1", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/012/01.01.01_60/gs_mec012v010101p.pdf" - }, - "host": "127.0.0.1:8081", - "basePath": "/rni/v1", - "schemes": [ - "http", - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "OauthSecurity": [ - "all" - ] - } - ], - "securityDefinitions": { - "OauthSecurity": { - "type": "oauth2", - "flow": "application", - "tokenUrl": "https://oauth.exampleAPI/token", - "scopes": { - "all": "Single oauth2 scope for API" - } - } - }, - "parameters": { - "Body.CellChangeSubscriptionPost": { - "name": "CellChangeSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to cell change notifications based on the\n filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscriptionPost" - } - } - } - }, - "Body.CellChangeSubscription": { - "name": "CellChangeSubscription", - "in": "body", - "description": "Use to creates a subscription to cell change notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscription" - } - } - } - }, - "Body.S1BearerSubscriptionPost": { - "name": "S1BearerSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to S1 Bearer notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscriptionPost" - } - } - } - }, - "Body.S1BearerSubscription": { - "name": "S1BearerSubscription", - "in": "body", - "description": "Use to creates a subscription to S1 Bearer notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscription" - } - } - } - }, - "Body.MeasTaSubscriptionPost": { - "name": "MeasTaSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to UE Timing Advance notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscriptionPost" - } - } - } - }, - "Body.MeasTaSubscription": { - "name": "MeasTaSubscription", - "in": "body", - "description": "Use to creates a subscription to UE Timing Advance notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscription" - } - } - } - }, - "Body.MeasRepUeSubscriptionPost": { - "name": "MeasRepUeSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to UE measurement report notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscriptionPost" - } - } - } - }, - "Body.MeasRepUeSubscription": { - "name": "MeasRepUeSubscription", - "in": "body", - "description": "Use to creates a subscription to UE measurement report notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscription" - } - } - } - }, - "Body.RabEstSubscriptionPost": { - "name": "RabEstSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to RAB establishment notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscriptionPost" - } - } - } - }, - "Body.RabEstSubscription": { - "name": "RabEstSubscription", - "in": "body", - "description": "Use to creates a subscription to RAB establishment notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscription" - } - } - } - }, - "Body.RabModSubscriptionPost": { - "name": "RabEstSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to RAB Modification notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscriptionPost" - } - } - } - }, - "Body.RabModSubscription": { - "name": "RabEstSubscription", - "in": "body", - "description": "Use to creates a subscription to RAB Modification notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscription" - } - } - } - }, - "Body.RabRelSubscriptionPost": { - "name": "RabRelSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to RAB Release notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscriptionPost" - } - } - } - }, - "Body.RabRelSubscription": { - "name": "RabRelSubscription", - "in": "body", - "description": "Use to creates a subscription to RAB Release notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscription" - } - } - } - }, - "Body.CaReConfSubscriptionPost": { - "name": "CaReConfSubscriptionPost", - "in": "body", - "description": "Use to creates a subscription to Carrier Aggregation Reconfiguration notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscriptionPost" - } - } - } - }, - "Body.CaReConfSubscription": { - "name": "CaReConfSubscription", - "in": "body", - "description": "Use to creates a subscription to Carrier Aggregation Reconfiguration notifications based on the filter criteria", - "required": true, - "schema": { - "type": "object", - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscription" - } - } - } - }, - "Path.subscrId": { - "name": "subscriptionId", - "in": "path", - "description": "Subscription Id, specifically the \"self\" returned in the subscription request", - "required": true, - "type": "string", - "format": "uri" - }, - "Query.AppInsId": { - "name": "app_ins_id", - "in": "query", - "description": "Application instance identifier", - "required": false, - "type": "string" - }, - "Query.AppInsIdArr": { - "name": "app_ins_id", - "in": "query", - "description": "Application instance identifier", - "required": true, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.UeIpv4Address": { - "name": "ue_ipv4_address", - "in": "query", - "description": "Comma separated list of IE IPv4 addresses as defined for the type for AssociateId", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.UeIpv6Address": { - "name": "ue_ipv6_address", - "in": "query", - "description": "Comma separated list of IE IPv6 addresses as defined for the type for AssociateId", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.NatedIpAddress": { - "name": "nated_ip_address", - "in": "query", - "description": "Comma separated list of IE NATed IP addresses as defined for the type for AssociateId", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.GtpTeId": { - "name": "gtp_teid", - "in": "query", - "description": "Comma separated list of GTP TEID addresses as defined for the type for AssociateId", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.CellId": { - "name": "cell_id", - "in": "query", - "description": "E-UTRAN Cell Identity as a bit string (size (28)), as defined in ETSI TS 136 413", - "required": false, - "type": "array", - "items": { - "type": "string" - } - }, - "Query.ErabGbrDl": { - "name": "erab_gbr_dl", - "in": "query", - "description": "Guaranteed downlink E-RAB Bit Rate as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.ErabGbrUl": { - "name": "erab_gbr_ul", - "in": "query", - "description": "Guaranteed uplink E-RAB Bit Rate as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.ErabId": { - "name": "erab_id", - "in": "query", - "description": "E-RAB identifier", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.ErabIdArr": { - "name": "erab_id", - "in": "query", - "description": "E-RAB identifier", - "required": false, - "type": "array", - "items": { - "type": "integer", - "format": "uint32" - } - }, - "Query.ErabMbrDl": { - "name": "erab_mbr_dl", - "in": "query", - "description": "Maximum downlink E-RAB Bit Rate as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.ErabMbrUl": { - "name": "erab_mbr_ul", - "in": "query", - "description": "Maximum uplink E-RAB Bit Rate as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.Qci": { - "name": "qci", - "in": "query", - "description": "QoS Class Identifier as defined in ETSI TS 123 401", - "required": false, - "type": "integer", - "format": "uint32" - }, - "Query.TempUeId": { - "name": "temp_ue_id", - "in": "query", - "description": "The temporary identifier allocated for the specific UE as defined in ETSI TS 136 413", - "required": false, - "type": "array", - "items": { - "type": "string" - } - } - }, - "paths": { - "/resources/rab_info": { - "get": { - "description": "Gets information on existing E-RABs that are associated with a specific mobile edge application instance", - "operationId": "rab_infoGET", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Query.AppInsId" - }, - { - "$ref": "#/parameters/Query.CellId" - }, - { - "$ref": "#/parameters/Query.UeIpv4Address" - }, - { - "$ref": "#/parameters/Query.UeIpv6Address" - }, - { - "$ref": "#/parameters/Query.NatedIpAddress" - }, - { - "$ref": "#/parameters/Query.GtpTeId" - }, - { - "$ref": "#/parameters/Query.ErabId" - }, - { - "$ref": "#/parameters/Query.Qci" - }, - { - "$ref": "#/parameters/Query.ErabMbrDl" - }, - { - "$ref": "#/parameters/Query.ErabMbrUl" - }, - { - "$ref": "#/parameters/Query.ErabGbrDl" - }, - { - "$ref": "#/parameters/Query.ErabGbrUl" - } - ], - "responses": { - "200": { - "description": "Successful response to rab_info request", - "schema": { - "type": "object", - "required": [ - "RabInfo" - ], - "properties": { - "RabInfo": { - "$ref": "#/definitions/RabInfo" - } - } - }, - "examples": { - "application/json": { - "RabInfo": { - "timeStamp": { - "seconds": 1577836800, - "nanoSeconds": 0 - }, - "appInId": "01", - "requestId": "01", - "cellUserInfo": { - "ecgi": { - "plmn": { - "mcc": "001", - "mnc": "01" - }, - "cellId": "0x800000A" - }, - "ueInfo": { - "associateId": null, - "type": "1", - "value": "192.0.2.0", - "erabInfo": { - "erabId": 10 - }, - "erabQosParameters": { - "qci": 7, - "qosInformation": { - "erabMbrDl": 10, - "erabMbrUl": 10, - "erabGbrDl": 10, - "erabGbrUl": 10 - } - } - } - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/resources/plmn_info": { - "get": { - "description": "Gets the information on Mobile Network(s) that are associated with a specific mobile edge application instance", - "operationId": "plmn_infoGET", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Query.AppInsIdArr" - } - ], - "responses": { - "200": { - "description": "Successful response to rab_info request", - "schema": { - "type": "object", - "properties": { - "PlmnInfo": { - "$ref": "#/definitions/PlmnInfo" - } - } - }, - "examples": { - "application/json": { - "PlmnInfo": { - "timeStamp": { - "seconds": 1577836800, - "nanoSeconds": 0 - }, - "appInId": "01", - "ecgi": { - "plmn": { - "mcc": "001", - "mnc": "01" - }, - "cellId": "0x800000A" - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/resources/s1_bearer_info": { - "get": { - "description": "Gets information on existing E-RABs that are associated with a specific mobile edge application instance", - "operationId": "s1_bearer_infoGET", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Query.TempUeId" - }, - { - "$ref": "#/parameters/Query.UeIpv4Address" - }, - { - "$ref": "#/parameters/Query.UeIpv6Address" - }, - { - "$ref": "#/parameters/Query.NatedIpAddress" - }, - { - "$ref": "#/parameters/Query.GtpTeId" - }, - { - "$ref": "#/parameters/Query.CellId" - }, - { - "$ref": "#/parameters/Query.ErabIdArr" - } - ], - "responses": { - "200": { - "description": "Successful response to s1_bearer_info request", - "schema": { - "type": "object", - "required": [ - "S1BearerInfo" - ], - "properties": { - "S1BearerInfo": { - "$ref": "#/definitions/S1BearerInfo" - } - } - }, - "examples": { - "application/json": { - "S1BearerInfo": { - "timeStamp": { - "seconds": 1577836800, - "nanoSeconds": 0 - }, - "s1UeInfo": [ - { - "tempUeId": { - "mmec": "0", - "mtmsi": "1234" - }, - "associateId": [ - { - "type": "1", - "value": "192.0.2.0" - }, - { - "type": "3", - "value": "198.51.100.0" - } - ], - "ecgi": { - "plmn": { - "mcc": "001", - "mnc": "01" - }, - "cellId": "0x800000A" - }, - "s1BearerInfoDetailed": [ - { - "erabId": 1, - "s1EnbInfo": { - "ipAddress": "192.0.2.0", - "tunnelId": "1111" - }, - "sGwInfo": { - "ipAddress": "192.0.2.1", - "tunnelId": "2222" - } - } - ] - }, - { - "tempUeId": { - "mmec": "0", - "mtmsi": "1234" - }, - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "ecgi": { - "plmn": { - "mcc": "001", - "mnc": "01" - }, - "cellId": "0x800000B" - }, - "s1BearerInfoDetailed": [ - { - "erabId": 2, - "s1EnbInfo": { - "ipAddress": "192.0.2.0", - "tunnelId": "3333" - }, - "sGwInfo": { - "ipAddress": "192.0.2.1", - "tunnelId": "4444" - } - } - ] - } - ] - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/": { - "get": { - "description": "The GET method can be used to request information about the subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "subscriptionType": "CELL_CHANGE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/MeasTa/77777", - "subscriptionType": "MEAS_TIMING_ADVANCE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/cell_change": { - "get": { - "description": "The GET method can be used to request information about the cell_change subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_cc_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors cell_change subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/cell_change", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "subscriptionType": "CELL_CHANGE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77778", - "subscriptionType": "CELL_CHANGE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to cell change notifications from Radio Network Information Service", - "operationId": "CellChange_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.CellChangeSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to response to UE cell change notifications", - "schema": { - "type": "object", - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscription" - } - } - }, - "examples": { - "application/json": { - "CellChangeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/cell_change/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/cell_change/{subscriptionId}": { - "get": { - "description": "Get cell change subscription information", - "operationId": "CellChange_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding cell change notifications", - "schema": { - "type": "object", - "required": [ - "CellChangeSubscription" - ], - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscription" - } - } - }, - "examples": { - "application/json": { - "CellChangeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/cell_change/sub123" - }, - "filterCriteria": { - "appInsId": "01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "hoStatus": 3 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to cell change notifications from Radio Network Information Service", - "operationId": "CellChange_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.CellChangeSubscription" - }, - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to cell change notifications", - "schema": { - "type": "object", - "properties": { - "CellChangeSubscription": { - "$ref": "#/definitions/CellChangeSubscription" - } - } - }, - "examples": { - "application/json": { - "CellChangeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/cell_change/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/cell_change/sub123" - }, - "filterCriteria": { - "appInsId": "01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "hoStatus": 3 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "CellChange_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/s1_bearer": { - "get": { - "description": "The GET method can be used to request information about the s1_bearer subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_s1_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors s1_bearer subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/s1_bearer", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77777", - "subscriptionType": "S1_BEARER" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77778", - "subscriptionType": "S1_BEARER" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to S1 bearer notifications from Radio Network Information Service", - "operationId": "S1BearerSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.S1BearerSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to response to S1 Bearer notifications", - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscription" - } - } - }, - "examples": { - "application/json": { - "S1BearerSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/s1_bearer/sub123" - }, - "eventType": 1, - "s1BearerSubscriptionCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "erabId": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/s1_bearer/{subscriptionId}": { - "get": { - "description": "Gets a subscription to S1 bearer notifications from Radio Network Information Service", - "operationId": "S1BearerSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to S1 Bearer notifications", - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscription" - } - } - }, - "examples": { - "application/json": { - "S1BearerSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/s1_bearer/sub123" - }, - "eventType": 1, - "s1BearerSubscriptionCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "erabId": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to S1 bearer notifications from Radio Network Information Service", - "operationId": "S1BearerSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.S1BearerSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription update to response to S1 Bearer notifications", - "schema": { - "type": "object", - "properties": { - "S1BearerSubscription": { - "$ref": "#/definitions/S1BearerSubscription" - } - } - }, - "examples": { - "application/json": { - "S1BearerSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/s1_bearer/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/s1_bearer/sub123" - }, - "eventType": 1, - "s1BearerSubscriptionCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "erabId": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "S1Bearer_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/ta": { - "get": { - "description": "The GET method can be used to request information about the ta subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_ta_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors ta subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ta", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/ta/77777", - "subscriptionType": "MEAS_REPORT_UE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/ta/77778", - "subscriptionType": "MEAS_REPORT_UE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to UE Timing Advance notifications from Radio Network Information Service", - "operationId": "MeasTa_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.MeasTaSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to response to UE Timing Advance notifications", - "schema": { - "type": "object", - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasTaSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ta/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ta/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/ta/{subscriptionId}": { - "get": { - "description": "Gets UE Timing Advance subscription information from Radio Network Information Service", - "operationId": "MeasTa_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding UE Timing Advance notifications", - "schema": { - "type": "object", - "required": [ - "MeasTaSubscription" - ], - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasTaSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ta/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ta/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to UE Timing Advance notifications from Radio Network Information Service", - "operationId": "MeasTa_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.MeasTaSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to UE Timing Advance notifications", - "schema": { - "type": "object", - "properties": { - "MeasTaSubscription": { - "$ref": "#/definitions/MeasTaSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasTaSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ta/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ta/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "MeasTa_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/meas_rep_ue": { - "get": { - "description": "The GET method can be used to request information about the meas_rep_ue subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_mr_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors meas_rep_ue subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/meas_rep_ue", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77777", - "subscriptionType": "MEAS_REPORT_UE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77778", - "subscriptionType": "MEAS_REPORT_UE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to UE measurement report notifications from Radio Network Information Service", - "operationId": "MeasRepUe_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.MeasRepUeSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to response to UE measurement report notifications", - "schema": { - "type": "object", - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasRepUeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/meas_rep_ue/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/meas_rep_ue/{subscriptionId}": { - "get": { - "description": "Gets a subscription to UE measurement report notifications from Radio Network Information Service", - "operationId": "MeasRepUe_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription to response to UE measurement report notifications", - "schema": { - "type": "object", - "required": [ - "MeasRepUeSubscription" - ], - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasRepUeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/meas_rep_ue/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to UE measurement report notifications from Radio Network Information Service", - "operationId": "MeasRepUeReport_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.MeasRepUeSubscription" - } - ], - "responses": { - "200": { - "description": "Successful update subscription to response to UE measurement report notifications", - "schema": { - "type": "object", - "properties": { - "MeasRepUeSubscription": { - "$ref": "#/definitions/MeasRepUeSubscription" - } - } - }, - "examples": { - "application/json": { - "MeasRepUeSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/meas_rep_ue/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/meas_rep_ue/sub123" - }, - "filterCriteria": { - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "appInsId": "01", - "trigger": 6, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "MeasRepUe_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content. Successful deletion of UE Measurment Report subscription" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_est": { - "get": { - "description": "The GET method can be used to request information about the rab_est subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_re_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors rab_est subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_est", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77777", - "subscriptionType": "RAB_ESTABLISHMENT" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77778", - "subscriptionType": "RAB_ESTABLISHMENT" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to RAB establishment notifications from Radio Network Information Service", - "operationId": "RabEstSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.RabEstSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to RAB establishment notifications", - "schema": { - "type": "object", - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscription" - } - } - }, - "examples": { - "application/json": { - "RabEstSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_est/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_est/{subscriptionId}": { - "get": { - "description": "Gets a subscription to RAB establishment notifications from Radio Network Information Service", - "operationId": "RabEstSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding RAB establishment notifications", - "schema": { - "type": "object", - "required": [ - "RabEstSubscription" - ], - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscription" - } - } - }, - "examples": { - "application/json": { - "RabEstSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_est/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to RAB establishment notifications from Radio Network Information Service", - "operationId": "RabEstSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.RabEstSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription update to RAB establishment notifications", - "schema": { - "type": "object", - "properties": { - "RabEstSubscription": { - "$ref": "#/definitions/RabEstSubscription" - } - } - }, - "examples": { - "application/json": { - "RabEstSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_est/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_est/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "RabEst_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content. Successful deletion of Rab Establishment subscription" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_mod": { - "get": { - "description": "The GET method can be used to request information about the rab_mod subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_rm_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors rab_mod subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_mod", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77777", - "subscriptionType": "RAB_MODIFICATION" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77778", - "subscriptionType": "RAB_MODIFICATION" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to RAB Modification notifications from Radio Network Information Service", - "operationId": "RabModSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.RabModSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to RAB Modification notifications", - "schema": { - "type": "object", - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscription" - } - } - }, - "examples": { - "application/json": { - "RabModSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_mod/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_mod/{subscriptionId}": { - "get": { - "description": "Gets a subscription to RAB Modification notifications from Radio Network Information Service", - "operationId": "RabModSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding RAB Modification notifications", - "schema": { - "type": "object", - "required": [ - "RabModSubscription" - ], - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscription" - } - } - }, - "examples": { - "application/json": { - "RabModSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_mod/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to RAB Modification notifications from Radio Network Information Service", - "operationId": "RabModSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.RabModSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription update to RAB Modification notifications", - "schema": { - "type": "object", - "properties": { - "RabModSubscription": { - "$ref": "#/definitions/RabModSubscription" - } - } - }, - "examples": { - "application/json": { - "RabModSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_mod/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_mod/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "RabMod_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content. Successful deletion of Rab Modification subscription" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_rel": { - "get": { - "description": "The GET method can be used to request information about the rab_rel subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_rr_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors rab_rel subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_rel", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77777", - "subscriptionType": "RAB_RELEASE" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77778", - "subscriptionType": "RAB_RELEASE" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to RAB Release notifications from Radio Network Information Service", - "operationId": "RabRelSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.RabRelSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to RAB Release notifications", - "schema": { - "type": "object", - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscription" - } - } - }, - "examples": { - "application/json": { - "RabRelSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_rel/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/rab_rel/{subscriptionId}": { - "get": { - "description": "Gets a subscription to RAB Release notifications from Radio Network Information Service", - "operationId": "RabRelSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding RAB Release notifications", - "schema": { - "type": "object", - "required": [ - "RabRelSubscription" - ], - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscription" - } - } - }, - "examples": { - "application/json": { - "RabRelSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_rel/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to RAB Release notifications from Radio Network Information Service", - "operationId": "RabRelSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.RabRelSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription update to RAB Release notifications", - "schema": { - "type": "object", - "properties": { - "RabRelSubscription": { - "$ref": "#/definitions/RabRelSubscription" - } - } - }, - "examples": { - "application/json": { - "RabRelSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/rab_rel/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/rab_rel/sub123" - }, - "filterCriteriaAssocQci": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B", - "qci": 1 - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "RabRel_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content. Successful deletion of Rab Release subscription" - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/ca_reconf": { - "get": { - "description": "The GET method can be used to request information about the ca_reconf subscriptions for this requestor", - "operationId": "SubscriptionLinkList_subscriptions_cr_GET", - "produces": [ - "application/json", - "application/problem+json" - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors ca_reconf subscriptions.", - "schema": { - "type": "object", - "required": [ - "SubscriptionLinkList" - ], - "properties": { - "SubscriptionLinkList": { - "$ref": "#/definitions/SubscriptionLinkList" - } - } - }, - "examples": { - "application/json": { - "SubscriptionLinkList": { - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ca_reconf", - "susbcription": [ - { - "href": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77777", - "subscriptionType": "CA_RECONF" - }, - { - "href": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77778", - "subscriptionType": "CA_RECONF" - } - ] - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - }, - "post": { - "description": "Creates a subscription to Carrier Aggregation Reconfiguration notifications from Radio Network Information Service", - "operationId": "CaReConfSubscription_subscriptionsPOST", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Body.CaReConfSubscriptionPost" - } - ], - "responses": { - "201": { - "description": "Successful subscription to Carrier Aggregation Reconfiguration notifications", - "schema": { - "type": "object", - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscription" - } - } - }, - "examples": { - "application/json": { - "CaReConfSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ca_reconf/sub123" - }, - "filterCriteriaAssoc": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - }, - "x-swagger-router-controller": "Default" - } - }, - "/subscriptions/ca_reconf/{subscriptionId}": { - "get": { - "description": "Gets a subscription to Carrier Aggregation Reconfiguration notifications from Radio Network Information Service", - "operationId": "CaReConfSubscription_subscriptionsGET", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding Carrier Aggregation Reconfiguration notifications", - "schema": { - "type": "object", - "required": [ - "CaReConfSubscription" - ], - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscription" - } - } - }, - "examples": { - "application/json": { - "CaReConfSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ca_reconf/sub123" - }, - "filterCriteriaAssoc": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "put": { - "description": "Updates a subscription to Carrier Aggregation Reconfiguration notifications from Radio Network Information Service", - "operationId": "CaReConfSubscription_subscriptionsPUT", - "produces": [ - "application/json", - "application/problem+json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - }, - { - "$ref": "#/parameters/Body.CaReConfSubscription" - } - ], - "responses": { - "200": { - "description": "Successful subscription to Carrier Aggregation Reconfiguration notifications", - "schema": { - "type": "object", - "properties": { - "CaReConfSubscription": { - "$ref": "#/definitions/CaReConfSubscription" - } - } - }, - "examples": { - "application/json": { - "CaReConfSubscription": { - "callbackReference": "http://meAppClient.example.com/rni/v1/notifications/ca_reconf/77777", - "_links": { - "self": "http://meAppServer.example.com/rni/v1/subscriptions/ca_reconf/sub123" - }, - "filterCriteriaAssoc": { - "appInsId": "app01", - "associateId": { - "type": "1", - "value": "192.0.2.0" - }, - "plmn": { - "mnc": "01", - "mcc": "001" - }, - "cellId": "0x800000B" - }, - "expiryDeadline": { - "seconds": 1577836800, - "nanoSeconds": 0 - } - } - } - } - }, - "400": { - "description": "Bad Request", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden", - "schema": { - "type": "object", - "required": [ - "ProblemDetails" - ], - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - }, - "examples": { - "application/problem+json": { - "ProblemDetails": { - "type": "https://meAppServer.example.com/rni/v1/probs/too-many-targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - }, - "429": { - "description": "Too Many Requests", - "schema": { - "type": "object", - "properties": { - "ProblemDetails": { - "$ref": "#/definitions/ProblemDetails" - } - } - } - } - } - }, - "delete": { - "description": "Method to delete a subscription", - "operationId": "CaReConf_subscriptionsSubscrIdDELETE", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "description": "No Content" - } - }, - "x-swagger-router-controller": "Default" - } - } - }, - "definitions": { - "ProblemDetails": { - "type": "object", - "properties": { - "type": { - "$ref": "#/definitions/Problem.type" - }, - "title": { - "$ref": "#/definitions/Problem.title" - }, - "status": { - "$ref": "#/definitions/Problem.status" - }, - "detail": { - "$ref": "#/definitions/Problem.detail" - }, - "instance": { - "$ref": "#/definitions/Problem.instance" - } - } - }, - "Problem.type": { - "type": "string", - "format": "uri", - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" - }, - "Problem.title": { - "type": "string", - "description": "A short, human-readable summary of the problem type" - }, - "Problem.status": { - "type": "integer", - "format": "uint32", - "description": "The HTTP status code for this occurrence of the problem" - }, - "Problem.detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem" - }, - "Problem.instance": { - "type": "string", - "format": "uri", - "description": "A URI reference that identifies the specific occurrence of the problem" - }, - "PlmnInfo": { - "type": "object", - "required": [ - "appInsId", - "plmn" - ], - "properties": { - "timeStamp": { - "$ref": "#/definitions/TimeStamp" - }, - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "plmn": { - "type": "array", - "items": { - "$ref": "#/definitions/Plmn" - } - } - } - }, - "RabInfo": { - "type": "object", - "required": [ - "appInsId", - "requestId" - ], - "properties": { - "timeStamp": { - "$ref": "#/definitions/TimeStamp" - }, - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "requestId": { - "$ref": "#/definitions/RequestId" - }, - "cellUserInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/CellUserInfo" - } - } - } - }, - "S1BearerInfo": { - "type": "object", - "required": [ - "s1UeInfo" - ], - "properties": { - "timeStamp": { - "$ref": "#/definitions/TimeStamp" - }, - "s1UeInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/S1UeInfo" - } - } - } - }, - "S1UeInfo": { - "type": "object", - "required": [ - "ecgi", - "s1BearerInfoDetailed" - ], - "properties": { - "tempUeId": { - "type": "array", - "items": { - "$ref": "#/definitions/TempUeId" - } - }, - "associateId": { - "type": "array", - "items": { - "$ref": "#/definitions/AssociateId" - } - }, - "ecgi": { - "type": "array", - "items": { - "$ref": "#/definitions/Ecgi" - } - }, - "s1BearerInfoDetailed": { - "type": "array", - "items": { - "$ref": "#/definitions/S1BearerInfoDetailed" - } - } - }, - "description": "The information on users per cell." - }, - "S1BearerInfoDetailed": { - "type": "object", - "required": [ - "erabId", - "enbInfo", - "sGwInfo" - ], - "properties": { - "erabId": { - "$ref": "#/definitions/ErabId" - }, - "enbInfo": { - "$ref": "#/definitions/S1EnbInfo" - }, - "sGwInfo": { - "$ref": "#/definitions/SGwInfo" - } - }, - "description": "Information on UEs in the specific cell." - }, - "ErabId": { - "type": "integer", - "format": "int32", - "description": "The element that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413", - "example": 10 - }, - "TempUeId": { - "type": "object", - "required": [ - "mmec", - "mtmsi" - ], - "properties": { - "mmec": { - "$ref": "#/definitions/Mmec" - }, - "mtmsi": { - "$ref": "#/definitions/Mtmsi" - } - } - }, - "Mmec": { - "type": "string", - "description": "MMEC as defined in ETSI TS 136 413", - "example": "0" - }, - "Mtmsi": { - "type": "string", - "description": "M-TMSI as defined in ETSI TS 136 413", - "example": "1234" - }, - "S1EnbInfo": { - "type": "object", - "required": [ - "ipAddress", - "tunnelId" - ], - "properties": { - "ipAddress": { - "type": "string", - "description": "eNB transport layer address of this S1 bearer.", - "example": "192.0.2.0" - }, - "tunnelId": { - "type": "string", - "description": "eNB GTP-U TEID of this S1 bearer.", - "example": "1111" - } - } - }, - "SGwInfo": { - "type": "object", - "required": [ - "ipAddress", - "tunnelId" - ], - "properties": { - "ipAddress": { - "type": "string", - "description": "SGW transport layer address of this S1 bearer.", - "example": "192.0.2.1" - }, - "tunnelId": { - "type": "string", - "description": "SGW GTP-U TEID of this S1 bearer.", - "example": "2222" - } - } - }, - "TimeStamp": { - "type": "object", - "required": [ - "nanoSeconds", - "seconds" - ], - "properties": { - "seconds": { - "type": "integer", - "format": "uint32", - "description": "The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 1577836800 - }, - "nanoSeconds": { - "type": "integer", - "format": "uint32", - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "example": 0 - } - } - }, - "AppInsId": { - "type": "string", - "format": "string", - "description": "Unique identifier for the mobile edge application instance", - "example": "01" - }, - "RequestId": { - "type": "string", - "format": "string", - "description": "Unique identifier allocated by the Mobile Edge application for the Information request.", - "example": "01" - }, - "CellUserInfo": { - "type": "object", - "required": [ - "ecgi", - "ueInfo" - ], - "properties": { - "ecgi": { - "$ref": "#/definitions/Ecgi" - }, - "ueInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/UeInfo" - } - } - }, - "description": "The information on users per cell." - }, - "Ecgi": { - "type": "object", - "required": [ - "cellId", - "plmn" - ], - "properties": { - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - } - }, - "description": "E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413" - }, - "Plmn": { - "type": "object", - "required": [ - "mcc", - "mnc" - ], - "properties": { - "mcc": { - "type": "string", - "format": "string", - "description": "The Mobile Country Code part of PLMN Identity as defined in 3GPP TS 36.413", - "example": "001" - }, - "mnc": { - "type": "string", - "format": "string", - "description": "The Mobile Network Code part of PLMN Identity as defined in 3GPP TS 36.413", - "example": "01" - } - } - }, - "CellId": { - "type": "array", - "items": { - "type": "string", - "format": "binary" - }, - "description": "The E-UTRAN Cell Identity as a bit string (size (28)), as defined in 3GPP TS 36.413", - "example": "0x800000A" - }, - "UeInfo": { - "type": "object", - "required": [ - "erabInfo" - ], - "properties": { - "associateId": { - "type": "array", - "items": { - "$ref": "#/definitions/AssociateId" - } - }, - "erabInfo": { - "type": "array", - "items": { - "$ref": "#/definitions/ErabQosParameters" - } - } - }, - "description": "Information on UEs in the specific cell." - }, - "AssociateId": { - "type": "object", - "required": [ - "type", - "value" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "RESERVED", - "UE_IPV4_ADDRESS", - "UE_IPV6_ADDRESS", - "NATED_IP_ADDRESS", - "GTP_TEID" - ], - "description": "Numeric value (0-255) corresponding to specified type of identifier", - "example": "UE_IPV4_ADDRESS" - }, - "value": { - "type": "String", - "format": "String", - "description": "Value for the identifier", - "example": "192.0.0.2" - } - } - }, - "ErabQosParameters": { - "type": "object", - "properties": { - "qci": { - "$ref": "#/definitions/Qci" - }, - "qosInformation": { - "type": "array", - "items": { - "$ref": "#/definitions/QosInformation" - } - } - } - }, - "Qci": { - "type": "integer", - "format": "int32", - "description": "QoS Class Identifier as defined in TS 23.401", - "example": 7 - }, - "QosInformation": { - "type": "object", - "required": [ - "erabGbrDl", - "erabGbrUl", - "erabMbrDl", - "erabMbrUl" - ], - "properties": { - "erabMbrDl": { - "type": "integer", - "format": "int32", - "description": "This IE indicates the maximum downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer.", - "example": 10 - }, - "erabMbrUl": { - "type": "integer", - "format": "int32", - "description": "This IE indicates the maximum uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer.", - "example": 10 - }, - "erabGbrDl": { - "type": "integer", - "format": "int32", - "description": "This IE indicates the guaranteed downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer.", - "example": 10 - }, - "erabGbrUl": { - "type": "integer", - "format": "int32", - "description": "This IE indicates the guaranteed uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer.", - "example": 10 - } - } - }, - "SubscriptionLinkList": { - "type": "object", - "required": [ - "_links" - ], - "properties": { - "_links": { - "$ref": "#/definitions/Link" - }, - "subscription": { - "type": "array", - "items": { - "$ref": "#/definitions/Subscription" - } - } - } - }, - "MeasRepUeSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocTri" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "MeasRepUeSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocTri" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "S1BearerSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "s1BearerSubscriptionCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "eventType": { - "$ref": "#/definitions/EventType" - }, - "s1BearerSubscriptionCriteria": { - "$ref": "#/definitions/S1BearerSubscriptionCriteria" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "S1BearerSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "s1BearerSubscriptionCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "eventType": { - "$ref": "#/definitions/EventType" - }, - "s1BearerSubscriptionCriteria": { - "$ref": "#/definitions/S1BearerSubscriptionCriteria" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabEstSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabEstSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabModSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabModSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabRelSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "RabRelSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocQci" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CaReConfSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssoc" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CaReConfSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssoc" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CellChangeSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocHo" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CellChangeSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssocHo" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "MeasTaSubscriptionPost": { - "type": "object", - "required": [ - "callbackReference", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssoc" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "MeasTaSubscription": { - "type": "object", - "required": [ - "callbackReference", - "_links", - "filterCriteria" - ], - "properties": { - "callbackReference": { - "$ref": "#/definitions/CallbackReference" - }, - "_links": { - "$ref": "#/definitions/Link" - }, - "filterCriteria": { - "$ref": "#/definitions/FilterCriteriaAssoc" - }, - "expiryDeadline": { - "$ref": "#/definitions/TimeStamp" - } - } - }, - "CallbackReference": { - "type": "string", - "format": "uri", - "description": "URL selected by the Mobile Edge application to receive notifications on the subscribed RNIS information.", - "example": "http://meAppClient.example.com/rni/v1/" - }, - "Link": { - "type": "object", - "properties": { - "self": { - "$ref": "#/definitions/LinkType" - } - }, - "description": "List of hyperlinks related to the resource" - }, - "LinkType": { - "description": "URI referring to a resource", - "type": "string", - "format": "uri", - "example": "http://meAppClient.example.com/rni/v1/" - }, - "Subscription": { - "type": "object", - "required": [ - "href", - "subscriptionType" - ], - "properties": { - "href": { - "$ref": "#/definitions/LinkType" - }, - "subscriptionType": { - "$ref": "#/definitions/SubscriptionType" - } - }, - "description": "A link to a subscription." - }, - "SubscriptionType": { - "type": "string", - "description": "Numeric value corresponding to specified type of subscription.", - "enum": [ - "RESERVED", - "CELL_CHANGE", - "RAB_ESTABLISHMENT", - "RAB_MODIFICATION", - "RAB_RELEASE", - "MEAS_REPORT_UE", - "MEAS_TIMING_ADVANCE", - "CA_RECONF", - "S1_BEARE" - ], - "example": "CELL_CHANGE" - }, - "FilterCriteriaAssoc": { - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "FilterCriteriaAssocQci": { - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - }, - "qci": { - "$ref": "#/definitions/Qci" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "FilterCriteriaAssocHo": { - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - }, - "hoStatus": { - "$ref": "#/definitions/HoStatus" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "FilterCriteriaAssocTri": { - "type": "object", - "properties": { - "appInsId": { - "$ref": "#/definitions/AppInsId" - }, - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - }, - "trigger": { - "$ref": "#/definitions/Trigger" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "S1BearerSubscriptionCriteria": { - "type": "object", - "properties": { - "associateId": { - "$ref": "#/definitions/AssociateId" - }, - "plmn": { - "$ref": "#/definitions/Plmn" - }, - "cellId": { - "$ref": "#/definitions/CellId" - }, - "erabId": { - "$ref": "#/definitions/ErabId" - } - }, - "description": "List of filtering criteria for the subscription." - }, - "HoStatus": { - "type": "string", - "description": "Description of the subscribed to event", - "enum": [ - "RESERVED", - "IN_PREPARATION", - "IN_EXECUTION", - "COMPLETED", - "REJECTED", - "CANCELLED" - ], - "example": "COMPLETED" - }, - "EventType": { - "type": "string", - "description": "Description of the subscribed event.", - "enum": [ - "RESERVED", - "S1_BEARER_ESTABLISH", - "S1_BEARER_MODIFY", - "S1_BEARER_RELEASE" - ], - "example": "S1_BEARER_ESTABLISH" - }, - "Trigger": { - "type": "string", - "description": "Unique identifier for the mobile edge application instance", - "enum": [ - "NOT_AVAILABLE", - "PERIODICAL_REPORT_STRONGEST_CELLS", - "PERIODICAL_REPORT_STRONGEST_CELLS_FOR_SON", - "PERIODICAL_REPORT_CGI", - "EVENT_A1", - "EVENT_A2", - "EVENT_A3", - "EVENT_A4", - "EVENT_A5", - "EVENT_A6", - "EVENT_B1", - "EVENT_B2", - "EVENT_C1", - "EVENT_C2", - "EVENT_W1", - "EVENT_W2", - "EVENT_W3" - ], - "example": "EVENT_A3" - } - } -} diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn index c34cee9ed7f6ddcdaf79dffed2ab9aa3af50c0ab..3277c32b57f5accadedcec8df0c6f12e3406b47a 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn @@ -13,7 +13,7 @@ module RnisAPI_Pixits { modulepar Json.String PX_UNKNOWN_SUBSCRIPTION_ID := "0666"; - modulepar Link PX_LINKS_SELF := { self_ := { href := "http://example.com/exampleAPI/rni/v2/subscriptions" } }; + modulepar Links PX_LINKS_SELF := { self_ := { href := "http://example.com/exampleAPI/rni/v2/subscriptions" } }; modulepar charstring PX_CALLBACK_URI := "/"; @@ -21,9 +21,9 @@ module RnisAPI_Pixits { modulepar Json.String PX_ASSOCIATE_ID_VALUE := "192.0.0.2"; - modulepar CellId PX_CELL_ID := "0x0800000A"; + modulepar CellId PX_V2X_CELL_ID := "0x0800000A"; - modulepar CellId PX_UNKNOWN_CELL_ID := "0x0800000A"; + modulepar CellId PX_V2X_UNKNOWN_CELL_ID := "0x0800000A"; modulepar CellId PX_C_ID := "0xFFFFFFFF"; diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn index d31b301beb45c447b93ce1f1f57e0390ad4d0f11..83d31c10e80c358f22dec3474de2d830292ab522 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn @@ -59,20 +59,26 @@ module RnisAPI_Templates { template (omit) CellChangeSubscription m_cell_change_subscription( in template (value) CallbackReference p_callbackReference, in template (value) FilterCriteriaAssocHo p_filterCriteriaAssocHo, - in template (omit) Link p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - subscriptionType := "CellChangeSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssocHo := p_filterCriteriaAssocHo, - expiryDeadline := p_expiryDeadline + subscriptionType := "CellChangeSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssocHo := p_filterCriteriaAssocHo, + expiryDeadline := p_expiryDeadline } // End of template m_cell_change_subscription template (omit) CellChangeSubscription m_cell_change_subscription_wrong_subscription_type( in template (value) CallbackReference p_callbackReference, in template (value) FilterCriteriaAssocHo p_filterCriteriaAssocHo, - in template (omit) Link p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) modifies m_cell_change_subscription := { subscriptionType := "CellChangeSubscription_invalid" @@ -80,15 +86,19 @@ module RnisAPI_Templates { template CellChangeSubscription mw_cell_change_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) FilterCriteriaAssocHo p_filterCriteriaAssocHo := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "CellChangeSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssocHo := p_filterCriteriaAssocHo, - expiryDeadline := p_expiryDeadline + subscriptionType := "CellChangeSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssocHo := p_filterCriteriaAssocHo, + expiryDeadline := p_expiryDeadline } // End of template mw_cell_change_subscription } // End of group subscriptions @@ -98,133 +108,173 @@ module RnisAPI_Templates { template (omit) RabEstSubscription m_rab_est_subscription( in template (value) CallbackReference p_callbackReference, in template (value) RabEstSubscription_FilterCriteriaQci p_filterCriteriaQci, - in template (omit) Link p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - subscriptionType := "RabEstSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabEstSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template m_rab_est_subscription template (present) RabEstSubscription mw_rab_est_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) RabEstSubscription_FilterCriteriaQci p_filterCriteriaQci := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "RabEstSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabEstSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template mw_rab_est_subscription template (omit) RabModSubscription m_rab_mod_subscription( in template (value) CallbackReference p_callbackReference, in template (value) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci, - in template (omit) Link p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - subscriptionType := "RabModSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabModSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template m_rab_mod_subscription template (present) RabModSubscription mw_rab_mod_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "RabModSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabModSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template mw_rab_mod_subscription template (omit) RabRelSubscription m_rab_rel_subscription( in template (value) CallbackReference p_callbackReference, in template (value) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci, - in template (omit) Link p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - subscriptionType := "RabRelSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabRelSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template m_rab_rel_subscription template (present) RabRelSubscription mw_rab_rel_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) RabModSubscription_FilterCriteriaQci p_filterCriteriaQci := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "RabRelSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaQci := p_filterCriteriaQci, - expiryDeadline := p_expiryDeadline + subscriptionType := "RabRelSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaQci := p_filterCriteriaQci, + expiryDeadline := p_expiryDeadline } // End of template mw_rab_rel_subscription template (present) MeasRepUeSubscription mw_meas_rep_ue_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) FilterCriteriaAssocTri p_filterCriteriaAssocTri := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "MeasRepUeSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssocTri := p_filterCriteriaAssocTri, - expiryDeadline := p_expiryDeadline + subscriptionType := "MeasRepUeSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssocTri := p_filterCriteriaAssocTri, + expiryDeadline := p_expiryDeadline } // End of template mw_meas_rep_ue_subscription template (present) MeasTaSubscription mw_meas_ta_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, - template (present) FilterCriteriaAssocHo p_filterCriteriaAssocHo := ?, + template (present) Links p_links := ?, + template (present) FilterCriteriaAssoc p_filterCriteriaAssoc := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "MeasTaSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssocHo := p_filterCriteriaAssocHo, - expiryDeadline := p_expiryDeadline + subscriptionType := "MeasTaSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssoc := p_filterCriteriaAssoc, + expiryDeadline := p_expiryDeadline } // End of template mw_meas_ta_subscription template (present) CaReConfSubscription mw_ca_reconfig_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) FilterCriteriaAssoc p_filterCriteriaAssoc := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "CaReConfSubscription", - callbackReference := p_callbackReference, - links := p_links, - filterCriteriaAssoc := p_filterCriteriaAssoc, - expiryDeadline := p_expiryDeadline + subscriptionType := "CaReConfSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteriaAssoc := p_filterCriteriaAssoc, + expiryDeadline := p_expiryDeadline } // End of template mw_ca_reconfig_subscription template (present) S1BearerSubscription mw_s1_bearer_subscription( template (present) CallbackReference p_callbackReference := ?, - template (present) Link p_links := ?, + template (present) Links p_links := ?, template (present) EventType p_eventType := ?, template (present) S1BearerSubscriptionCriteria p_s1BearerSubscriptionCriteria := ?, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - subscriptionType := "S1BearerSubscription", - callbackReference := p_callbackReference, - links := p_links, - eventType := p_eventType, + subscriptionType := "S1BearerSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + eventType := p_eventType, s1BearerSubscriptionCriteria := p_s1BearerSubscriptionCriteria, - expiryDeadline := p_expiryDeadline + expiryDeadline := p_expiryDeadline } // End of template mw_s1_bearer_subscription } // End of group notifications @@ -269,7 +319,7 @@ module RnisAPI_Templates { template (omit) PlmnInfo m_plmn_info( in AppInstanceId p_appInstanceId, - in template (value) Plmns p_plmn, + in template (value) Plmn_list p_plmn, in template (omit) TimeStamp p_timeStamp := omit ) := { timeStamp := p_timeStamp, @@ -279,7 +329,7 @@ module RnisAPI_Templates { template (present) PlmnInfo mw_plmn_info( template (present) AppInstanceId p_appInstanceId := ?, - template (present) Plmns p_plmn := ?, + template (present) Plmn_list p_plmn := ?, template TimeStamp p_timeStamp := * ) := { timeStamp := p_timeStamp, @@ -398,22 +448,6 @@ module RnisAPI_Templates { s1BearerInfoDetailed := p_s1BearerInfoDetailed } // End of mw_s1_ue_info - template (value) TimeStamp m_time_stamp( - in UInt32 p_seconds, - in UInt32 p_nanoSeconds := 0 - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of temlate m_time_stamp - - template (present) TimeStamp mw_time_stamp( - template (present) UInt32 p_seconds := ?, - template (present) UInt32 p_nanoSeconds := ? - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of temlate mw_time_stamp - template (value) FilterCriteriaAssoc m_filter_criteria( in AppInstanceId p_appInstanceId, in template (value) AssociateId p_associateId, diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn index 06c1e57905fe6b5efdd7ae06fe2b859bfbbd27fa..f5066a6ad74fee6042caaf95d8fdc960ccf7d377 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn @@ -1,37 +1,29 @@ /** - * @desc The ETSI MEC ISG MEC012 Radio Network Information API described using OpenAPI - * @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/012/01.01.01_60/gs_mec012v010101p.pdf + * @author ETSI / STF569 / TTF T027 + * @version $Url$ + * $Id$ + * @desc Types ANd Values for ETSI GS MEC 012 V2.2.1 (2022-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. + * All rights reserved. */ module RnisAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - - /** - * @desc Represents a time stamp - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.3-1: Attributes of the TimeStamp - */ - type record TimeStamp { - UInt32 seconds, - UInt32 nanoSeconds - } - /** * @desc This type represents the information on Mobile Network(s), which a MEC application instance is associated to. * @member timeStamp Time stamp * @member appInsId Unique identifier for the MEC application instance * @member plmn Public Land Mobile Network Identity - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.2-1: Attributes of the PlmnInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.2-1: Attributes of the PlmnInfo */ type record PlmnInfo { TimeStamp timeStamp optional, AppInstanceId appInstanceId, - Plmns plmn + Plmn_list plmn } type record of PlmnInfo PlmnInfos; @@ -41,7 +33,7 @@ module RnisAPI_TypesAndValues { * @member appInstanceId Unique identifier for the MEC application instance * @member requestId Unique identifier allocated by the service consumer for the RAB Information request * @member cellUserInfo The information on users per cell as defined below - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo */ type record RabInfo { TimeStamp timeStamp optional, @@ -54,7 +46,7 @@ module RnisAPI_TypesAndValues { * @desc The information on users per cell * @member ecgi E-UTRAN CelI Global Identifier * @member ueInfo Information on UEs in the specific cell - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo */ type record RabInfo_CellUserInfo_ { Ecgi ecgi, @@ -62,11 +54,67 @@ module RnisAPI_TypesAndValues { } type record of RabInfo_CellUserInfo_ RabInfo_CellUserInfo; + /** + * @desc Information on UEs in the specific cell + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow. + * @member erabInfo Information on E-RAB as defined below + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo + */ + type record UeInfo_ { + AssociateId associateId optional, + ErabInfo erabInfo + } + type record of UeInfo_ UeInfo; + + /** + * @desc Information on E-RAB + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE as defined in ETSI TS 136 413 + * @member erabQosParameters QoS parameters for the E-RAB + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo + */ + type record ErabInfo_ { + Json.UInteger erabId, + ErabQosParameters erabQosParameters optional + } + type record of ErabInfo_ ErabInfo; + + /** + * @desc QoS parameters for the E-RAB + * @member qci QoS Class Identifier as defined in TS 23.401 + * @member qci_information The QoS information for the E-RAB + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo + */ + type record ErabQosParameters { + Qci qci, + QosInformation qosInformation optional + } + + /** + * @desc QoS Class Identifier as defined in TS 23.401 + */ + type Json.UInteger Qci; + + /** + * @desc The QoS information for the E-RAB + * @member erabGbrDl This IE indicates the maximum downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer + * @member erabGbrUl This IE indicates the maximum uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer + * @member erabGbrDl This IE indicates the guaranteed downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer + * @member erabMbrUl This IE indicates the guaranteed uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.3-1: Attributes of the RabInfo + */ + type record QosInformation_ { + Json.UInteger erabMbrDl, + Json.UInteger erabMbrUl, + Json.UInteger erabGbrDl, + Json.UInteger erabGbrUl + } + type record of QosInformation_ QosInformation; + /** * @desc This type represents the information on S1-U bearer. * @member timeStamp Time stamp * @member S1UeInfo Information on a specific UE - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ type record S1BearerInfo { TimeStamp timeStamp optional, @@ -79,37 +127,21 @@ module RnisAPI_TypesAndValues { * @member associateId 1 to N identifiers to associate the information for a specific UE or flow * @member ecgi E-UTRAN CelI Global Identifier * @member s1BearerInfoDetailed S1 bearer information - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ type record S1UeInfo_ { TempUeId tempUeId optional, - AssociateId associateId, + AssociateId associateId optional, Ecgi ecgi, S1BearerInfoDetailed s1BearerInfoDetailed } type record of S1UeInfo_ S1UeInfo; - /** - * @desc Information on UEs in the specific cell - * @member erabId The element that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413 - * @member enbInfo S1 bearer information on eNB side - * @member sGwInfo S1 bearer information on GW side - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo - */ - type record S1BearerInfoDetailed_ { - UInt32 erabId, - S1EnbInfo s1EnbInfo, - SGwInfo sGwInfo - } - type record of S1BearerInfoDetailed_ S1BearerInfoDetailed; - - type record of UInt32 ErabId; - /** * @desc The temporary identifier allocated for the specific UE * @member mmec MMEC as defined in ETSI TS 136 413 * @member mtmsi M-TMSI as defined in ETSI TS 136 413 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ type record TempUeId_ { Mmec mmec, @@ -122,33 +154,49 @@ module RnisAPI_TypesAndValues { type Json.String Mtmsi; /** - * @desc S1 bearer information on eNB side - * @member ipAddress eNB transport layer address of this S1 bearer - * @member tunnelId eNB GTP-U TEID of this S1 bearer - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @desc Information on UEs in the specific cell + * @member erabId The element that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413 + * @member enbInfo S1 bearer information on eNB side + * @member sGwInfo S1 bearer information on GW side + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ - type record S1EnbInfo { - Json.String ipAddress, - Json.String tunnelId + type record S1BearerInfoDetailed_ { + Json.UInteger erabId, + S1EnbInfo s1EnbInfo, + SGwInfo sGwInfo } + type record of S1BearerInfoDetailed_ S1BearerInfoDetailed; + + type record of Json.UInteger ErabId; /** * @desc S1 bearer information on GW side * @member ipAddress SGW transport layer address of this S1 bearer * @member tunnelId SGW GTP-U TEID of this S1 bearer - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4-1 Attributes of the S1BearerInfo + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo */ type record SGwInfo { Json.String ipAddress, Json.String tunnelId } + /** + * @desc S1 bearer information on eNB side + * @member ipAddress eNB transport layer address of this S1 bearer + * @member tunnelId eNB GTP-U TEID of this S1 bearer + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4-1 Attributes of the S1BearerInfo + */ + type record S1EnbInfo { // FIXME Check if it is usefull somewhere + Json.String ipAddress, + Json.String tunnelId + } + /** * @desc This type represents the information on the Layer 2 measurements information from one or more eNBs that are associated with the requested MEC application instance. * @member timestamp Time stamp * @member cellInfo The per cell measurement information * @member cellUEInfo The per cell per UE layer 2 measurements information - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4a-1: Attributes of the L2Meas + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4a-1: Attributes of the L2Meas */ type record L2Meas { TimeStamp timeStamp optional, @@ -156,198 +204,7 @@ module RnisAPI_TypesAndValues { L2Meas_CellUEInfo cellUEInfo optional } - /** - * @desc Unique identifier for the mobile edge application instance", - */ - type Json.String AppInstanceId; - - /** - * @desc Unique identifier allocated by the Mobile Edge application for the Information request - */ - type Json.String RequestId; - - /** - * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 - * @member ecgi Public Land Mobile Network Identity - * @member cellId E-UTRAN CelI Global Identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.6-1: Attributes of the Ecgi - */ - type record Ecgi { - Plmn plmn, - CellId cellId - } - type record of Ecgi Ecgi_list; - - /** - * @desc New Radio CelI Global Identifier as defined in ETSI TS 138 423 - * @member ecgi Public Land Mobile Network Identity - * @member NrCellId NR CelI Global Identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.6-1: Attributes of the Ecgi - */ - type record NRcgi { - Plmn plmn, - NrCellId nrcellId - } - type record of NRcgi NRcgi_list; - - /** - * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 - * @member resultsSsbIndexes Beam level measurement results based on SS/PBCH related measurements - * @member resultsCsiRsIndexes Beam level measurement results based on CSI-RS related measurements - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.8-1: Attributes of the RsIndexResults - */ - type record RsIndexResults { - ResultsPerSsbIndexList resultsSsbIndexes, - ResultsPerCsiRsIndexList resultsCsiRsIndexes - } - - /** - * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.9-1: Attributes of the ResultsPerSsbIndexList - */ - type record ResultsPerSsbIndexList { - ResultsPerSsbIndex resultsPerSsbIndex optional - } - type record ResultsPerSsbIndex { - UInt8 ssbIndex, - MeasQuantityResultsNr ssbResults optional - } - - /** - * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.10-1: Attributes of the ResultsPerCsiRsIndexList - */ - type record ResultsPerCsiRsIndexList { - ResultsPerCsiRsIndex resultsPerCsiRsIndex optional - } - type record ResultsPerCsiRsIndex { - UInt8 csiRsIndex, - MeasQuantityResultsNr csiRsResults optional - } - - /** - * @desc Collection of UE reported NR measurement quantity results as defined in ETSI TS 138 331 - @member rsrp Reference Signal Received Power as defined in ETSI TS 138 331 - @member rsrq Reference Signal Received Quality as defined in ETSI TS 138 331 - @member sinr Reference Signal to Interference & Noise Ratio as defined in ETSI TS 138 331 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.11-1: Attributes of the MeasQuantityResultsNr - */ - type record MeasQuantityResultsNr { - UInt8 rsrp optional, - UInt8 rsrq optional, - UInt8 sinr optional - } - - /** - * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 - * @member mcc The Mobile Country Code part of PLMN Identity as defined in 3GPP TS 36.413 - * @member mnc The Mobile Network Code part of PLMN Identity as defined in 3GPP TS 36.413 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.5-1: Attributes of the Plmn - */ - type record Plmn { - Json.String mcc, - Json.String mnc - } - type record of Plmn Plmns; - - /** - * @desc The E-UTRAN Cell Identity as a bit string (size (28)), as defined in 3GPP TS 36.413 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.6.2-1: CellId - */ - type Json.String CellId; - - /** - * @desc the NR Cell Identity. Encoded as a bit string (size (36)) as defined in ETSI TS 138 423 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.6.2-1: CellId - */ - type Json.String NrCellId; - - /** - * @desc Information on UEs in the specific cell - * @member associateId 0 to N identifiers to associate the event for a specific UE or flow. - * @member erabInfo Information on E-RAB as defined below - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo - */ - type record UeInfo_ { - AssociateId associateId optional, - ErabInfo erabInfo - } - type record of UeInfo_ UeInfo; - - /** - * @desc Information on UEs in the specific cell - * @member type Numeric value (0-255) corresponding to specified type of identifier - * @member value Value for the identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.4-1: Attributes of the AssociateId - */ - type record AssociateId_ { - AssociateId_type type_, - Json.String value_ - } with { - variant (type_) "name as 'type'"; - variant (value_) "name as 'value'"; - } - type record of AssociateId_ AssociateId; - - /** - * @desc Numeric value (0-255) corresponding to specified type of identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.4-1: Attributes of the AssociateId - */ - type enumerated AssociateId_type { - RESERVED (0), - UE_IPV4_ADDRESS (1), - UE_IPV6_ADDRESS (2), - NATED_IP_ADDRESS (3), - GTP_TEID (4) - } with { - variant "JSON: as number" - } - - /** - * @desc Information on E-RAB - * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE as defined in ETSI TS 136 413 - * @member erabQosParameters QoS parameters for the E-RAB - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo - */ - type record ErabInfo_ { - UInt32 erabId, - ErabQosParameters erabQosParameters optional - } - type record of ErabInfo_ ErabInfo; - - /** - * @desc QoS parameters for the E-RAB - * @member qci QoS Class Identifier as defined in TS 23.401 - * @member qci_information The QoS information for the E-RAB - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo - */ - type record ErabQosParameters { - Qci qci, - QosInformation qosInformation optional - } - - /** - * @desc QoS Class Identifier as defined in TS 23.401 - */ - type UInt32 Qci; - - /** - * @desc The QoS information for the E-RAB - * @member erabGbrDl This IE indicates the maximum downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer - * @member erabGbrUl This IE indicates the maximum uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer - * @member erabGbrDl This IE indicates the guaranteed downlink E-RAB Bit Rate as defined in TS 23.401 for this bearer - * @member erabMbrUl This IE indicates the guaranteed uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.3-1: Attributes of the RabInfo - */ - type record QosInformation_ { - UInt32 erabMbrDl, - UInt32 erabMbrUl, - UInt32 erabGbrDl, - UInt32 erabGbrUl - } - type record of QosInformation_ QosInformation; - - type integer UInt100 (0 .. 100) with {variant "unsigned 100 bit"}; + type integer UInt100 with {variant "unsigned 100 bit"}; /** * @desc The per cell measurement information @@ -369,7 +226,7 @@ module RnisAPI_TypesAndValues { * @member ul_gbr_pdr_cell It indicates the packet discard rate in percentage of the uplink GBR traffic in a cell, as defined in ETSI TS 136 314 * @member dl_nongbr_pdr_cell It indicates the packet discard rate in percentage of the downlink non-GBR traffic in a cell, as defined in ETSI TS 136 314 * @member ul_nongbr_pdr_cell It indicates the packet discard rate in percentage of the uplink non-GBR traffic in a cell, as defined in ETSI TS 136 314 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4a-1: Attributes of the L2Meas + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4a-1: Attributes of the L2Meas */ type record L2Meas_CellInfo_ { Ecgi ecgi optional, @@ -413,7 +270,7 @@ module RnisAPI_TypesAndValues { * @member ul_gbr_data_volume_ue It indicates the data volume of the uplink GBR traffic of a UE, as defined in ETSI TS 136 314 * @member dl_nongbr_data_volume_ue It indicates the data volume of the downlink non-GBR traffic of a UE, as defined in ETSI TS 136 314 * @member ul_nongbr_data_volume_ue It indicates the data volume of the uplink non-GBR traffic of a UE, as defined in ETSI TS 136 314 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.2.4a-1: Attributes of the L2Meas + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.2.4a-1: Attributes of the L2Meas */ type record L2Meas_CellUEInfo_ { Ecgi ecgi, @@ -438,132 +295,122 @@ module RnisAPI_TypesAndValues { type record of L2Meas_CellUEInfo_ L2Meas_CellUEInfo; /** - * @desc subscription to 5G UE measurement report notifications from Radio Network Information Service for UEs served by NR Cells - * @member subscriptionType Shall be set to "NrMeasRepUeSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @desc Subscription to cell change notifications from Radio Network Information Service + * @member subscriptionType Shall be set to "CellChangeSubscription" + * @member callbackReference URI selected by the service consumerto receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource - * @member filterCriteriaAssocTri List of filtering criteria for the subscription + * @member filterCriteriaAssocHo List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.11-1: Attributes of the NrMeasRepUeSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record NrMeasRepUeSubscription { - Json.String subscriptionType, - CallbackReference callbackReference, - Link links optional, - FilterCriteriaNrMrs filterCriteriaNrMrs, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; - } - - /** - * @desc List of links related to currently existing subscriptions for the service consumer - * @member links List of hyperlinks related to the resource - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.10-1: Attributes of the SubscriptionLinkList - */ - type record SubscriptionLinkList { - SubscriptionLinkList_Link links + type record CellChangeSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaAssocHo filterCriteriaAssocHo, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } /** * @desc List of hyperlinks related to the resource - * @member self_ - * @member subscription A link to a subscription - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.10-1: Attributes of the SubscriptionLinkList + * @member self_ URI referring to a resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record SubscriptionLinkList_Link { - LinkType self_, - Subscription subscription optional + type record Links { + LinkType self_ } with { variant (self_) "name as 'self'"; } /** - * @desc A link to a subscription - * @member The URI referring to the subscription - * @member Type of the subscription - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.10-1: Attributes of the SubscriptionLinkList + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member associateId 0 to N identifiers to associate the information for a specific UE or flow + * @member ecgi E-UTRAN CelI Global Identifier + * @member hoStatus Indicate the status of the UE handover procedure + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record Subscription_ { - LinkType href, - Json.String subscriptionType + type record FilterCriteriaAssocHo { + AppInstanceId appInstanceId optional, + AssociateId associateId optional, + Ecgi_list ecgi optional, + HoStatus_list hoStatus optional } - type record of Subscription_ Subscription; /** - * @desc Subscription to UE measurement report notifications from Radio Network Information Service for UEs served by E-UTRA Cells - * @member subscriptionType Shall be set to "MeasRepUeSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information - * @member links Hyperlink related to the resource - * @member filterCriteriaAssocTri List of filtering criteria for the subscription - * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.6-1: Attributes of the MeasRepUeSubscription - */ - type record MeasRepUeSubscription { - Json.String subscriptionType, - CallbackReference callbackReference, - Link links optional, - FilterCriteriaAssocTri filterCriteriaAssocTri, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; - } - - /** - * @desc Subscription to S1-U bearer information notification from Radio Network Information Service - * @member subscriptionType Shall be set to "S1BearerSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information - * @member links Hyperlink related to the resource - * @member eventType Description of the subscribed event - * @member s1BearerSubscriptionCriteria List of filtering criteria for the subscription - * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.9-1: Attributes of the S1BearerSubscription + * @desc Description of the subscribed to event + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.2-1: Attributes of the CellChangeSubscription */ - type record S1BearerSubscription { - Json.String subscriptionType, - CallbackReference callbackReference, - Link links optional, - EventType eventType, - S1BearerSubscriptionCriteria s1BearerSubscriptionCriteria, - TimeStamp expiryDeadline optional + type enumerated HoStatus { + IN_PREPARATION (1), + IN_EXECUTION (2), + COMPLETED (3), + REJECTED (4), + CANCELLED (5) } with { - variant (links) "name as '_links'"; + variant "JSON: as number" } + type record of HoStatus HoStatus_list; /** * @desc Subscription to RAB establishment notifications from Radio Network Information Service * @member subscriptionType Shall be set to "RabEstSubscription" * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource * @member filterCriteriaQci List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.3-1: Attributes of the RabEstSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.3-1: Attributes of the RabEstSubscription */ type record RabEstSubscription { Json.String subscriptionType, CallbackReference callbackReference, - Link links optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, RabEstSubscription_FilterCriteriaQci filterCriteriaQci, TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member ecgi E-UTRAN CelI Global Identifier + * @member qci QoS Class Identifier as defined in ETSI TS 123 401 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.3-1: Attributes of the RabEstSubscription + */ + type record RabEstSubscription_FilterCriteriaQci { + AppInstanceId appInstanceId optional, + Ecgi_list ecgi optional, + Qci qci + } + /** * @desc Subscription to RAB modification notifications from Radio Network Information Service * @member subscriptionType Shall be set to "RabModSubscription" * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource * @member filterCriteriaQci List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.4-1: Attributes of the RabModSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.4-1: Attributes of the RabModSubscription */ type record RabModSubscription { Json.String subscriptionType, CallbackReference callbackReference, - Link links optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, RabModSubscription_FilterCriteriaQci filterCriteriaQci, TimeStamp expiryDeadline optional } with { @@ -574,34 +421,133 @@ module RnisAPI_TypesAndValues { * @desc Subscription to RAB release notifications from Radio Network Information Service * @member subscriptionType Shall be set to "RabRelSubscription" * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource * @member filterCriteriaQci List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.5-1: Attributes of the RabRelSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.5-1: Attributes of the RabRelSubscription */ type record RabRelSubscription { Json.String subscriptionType, CallbackReference callbackReference, - Link links optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, RabModSubscription_FilterCriteriaQci filterCriteriaQci, TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE as defined in ETSI TS 136 413 + * @member ecgi E-UTRAN CelI Global Identifier + * @member qci QoS Class Identifier as defined in ETSI TS 123 401 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.4-1: Attributes of the RabModSubscription + */ + type record RabModSubscription_FilterCriteriaQci { + AppInstanceId appInstanceId optional, + Json.UInteger erabId, + Ecgi_list ecgi optional, + Qci qci + } + + /** + * @desc Subscription to UE measurement report notifications from Radio Network Information Service for UEs served by E-UTRA Cells + * @member subscriptionType Shall be set to "MeasRepUeSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaAssocTri List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.6-1: Attributes of the MeasRepUeSubscription + */ + type record MeasRepUeSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaAssocTri filterCriteriaAssocTri, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member associateId 0 to N identifiers to associate the information for a specific UE or flow + * @member ecgi E-UTRAN CelI Global Identifier + * @member trigger_ Corresponds to a specific E-UTRAN UE Measurement Report trigger + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.6-1: Attributes of the MeasRepUeSubscription + */ + type record FilterCriteriaAssocTri { + AppInstanceId appInstanceId optional, + AssociateId associateId optional, + Ecgi_list ecgi optional, + Trigger trigger_ optional + } with { + variant (trigger_) "name as 'trigger'"; + } + + /** + * @desc This type represents a subscription to UE timing advance notifications from Radio Network Information Service + * @member subscriptionType Shall be set to "MeasRepUeSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaAssoc List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.7 Type: MeasTaSubscription + */ + type record MeasTaSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links, + FilterCriteriaAssoc filterCriteriaAssoc, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc List of filtering criteria for the subscription + * @member appInstanceId Unique identifier for the MEC application instance + * @member associateId 0 to N identifiers to associate the information for a specific UE or flow + * @member ecgi E-UTRAN CelI Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.7 Type: MeasTaSubscription + */ + type record FilterCriteriaAssoc { + AppInstanceId appInstanceId optional, + AssociateId associateId optional, + Ecgi_list ecgi optional + } + /** * @desc Subscription to UE carrier aggregation reconfiguration notifications from Radio Network Information Service * @member subscriptionType Shall be set to "CaReConfSubscription" * @member callbackReference URI selected by the service consumerto receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource * @member filterCriteriaAssoc List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.8-1: Attributes of the CaReconfSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.8-1: Attributes of the CaReconfSubscription */ type record CaReConfSubscription { Json.String subscriptionType, CallbackReference callbackReference, - Link links optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, FilterCriteriaAssoc filterCriteriaAssoc, TimeStamp expiryDeadline optional } with { @@ -609,196 +555,828 @@ module RnisAPI_TypesAndValues { } /** - * @desc Subscription to cell change notifications from Radio Network Information Service - * @member subscriptionType Shall be set to "CellChangeSubscription" - * @member callbackReference URI selected by the service consumerto receive notifications on the subscribed RNIS information + * @desc Subscription to S1-U bearer information notification from Radio Network Information Service + * @member subscriptionType Shall be set to "S1BearerSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications * @member links Hyperlink related to the resource - * @member filterCriteriaAssocHo List of filtering criteria for the subscription + * @member eventType Description of the subscribed event + * @member s1BearerSubscriptionCriteria List of filtering criteria for the subscription * @member expiryDeadline Time stamp - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.2-1: Attributes of the CellChangeSubscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.9-1: Attributes of the S1BearerSubscription */ - type record CellChangeSubscription { - Json.String subscriptionType, - CallbackReference callbackReference, - Link links optional, - FilterCriteriaAssocHo filterCriteriaAssocHo, - TimeStamp expiryDeadline optional + type record S1BearerSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + EventType eventType, + S1BearerSubscriptionCriteria s1BearerSubscriptionCriteria, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } /** - * @desc - * @member callbackReference - * @member links - * @member filterCriteria - * @member expiryDeadline + * @desc Description of the subscribed event + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.9-1: Attributes of the S1BearerSubscription */ - type record MeasTaSubscription { - Json.String subscriptionType, - CallbackReference callbackReference, - Link links, - FilterCriteriaAssocHo filterCriteriaAssocHo, - TimeStamp expiryDeadline optional + type enumerated EventType_ { + RESERVED (0), + S1_BEARER_ESTABLISH (1), + S1_BEARER_MODIFY (2), + S1_BEARER_RELEASE (3) } with { - variant (links) "name as '_links'"; + variant "JSON: as number" } - + type record of EventType_ EventType; + /** - * @desc URL selected by the Mobile Edge application to receive notifications on the subscribed RNIS information + * @desc List of filtering criteria for the subscription + * @member associateId 0 to N identifiers to associate the events for a specific UE or a flow + * @member ecgi E-UTRAN CelI Global Identifier + * @member erabId The attribute that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.9-1: Attributes of the S1BearerSubscription */ - type Json.AnyURI CallbackReference; + type record S1BearerSubscriptionCriteria { + AssociateId associateId optional, + Ecgi ecgi optional, + ErabId erabId optional + } /** * @desc List of hyperlinks related to the resource - * @member self_ URI referring to a resource + * @member self_ + * @member subscription A link to a subscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.10-1: Attributes of the SubscriptionLinkList */ - type record Link { - LinkType self_ + type record SubscriptionLinkList_Link { + LinkType self_, + Subscription subscription optional } with { variant (self_) "name as 'self'"; } /** - * @desc URI referring to a resource - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.5.2-1: Attributes of the LinkType + * @desc A link to a subscription + * @member The URI referring to the subscription + * @member Type of the subscription + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.10-1: Attributes of the SubscriptionLinkList */ - type record LinkType { - Json.AnyURI href + type record Subscription_ { + LinkType href, + Json.String subscriptionType } + type record of Subscription_ Subscription; /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member associateId 0 to N identifiers to associate the information for a specific UE or flow - * @member ecgi E-UTRAN CelI Global Identifier - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.8-1: Attributes of the CaReconfSubscription + * @desc List of links related to currently existing subscriptions for the service consumer + * @member links List of hyperlinks related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.10-1: Attributes of the SubscriptionLinkList */ - type record FilterCriteriaAssoc { - AppInstanceId appInstanceId, - AssociateId associateId optional, - Ecgi_list ecgi optional + type record SubscriptionLinkList { + SubscriptionLinkList_Link links + } with { + variant (links) "name as '_links'"; } /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member ecgi E-UTRAN CelI Global Identifier - * @member qci QoS Class Identifier as defined in ETSI TS 123 401 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.3-1: Attributes of the RabEstSubscription + * @desc subscription to 5G UE measurement report notifications from Radio Network Information Service for UEs served by NR Cells + * @member subscriptionType Shall be set to "NrMeasRepUeSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteriaAssocTri List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.11-1: Attributes of the NrMeasRepUeSubscription */ - type record RabEstSubscription_FilterCriteriaQci { - AppInstanceId appInstanceId optional, - Ecgi_list ecgi optional, - Qci qci + type record NrMeasRepUeSubscription { + Json.String subscriptionType, + CallbackReference callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteriaNrMrs filterCriteriaNrMrs, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; } /** * @desc List of filtering criteria for the subscription * @member appInstanceId Unique identifier for the MEC application instance - * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE as defined in ETSI TS 136 413 - * @member ecgi E-UTRAN CelI Global Identifier - * @member qci QoS Class Identifier as defined in ETSI TS 123 401 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.4-1: Attributes of the RabModSubscription + * @member associateId 0 to N identifiers to associate the information for a specific UE or flow + * @member nrcgi NR Cell Global Identier + * @member triggerNr Corresponds to a specific 5G UE Measurement Report trigger + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.11-1: Attributes of the NrMeasRepUeSubscription */ - type record RabModSubscription_FilterCriteriaQci { + type record FilterCriteriaNrMrs { AppInstanceId appInstanceId optional, - UInt32 erabId, - Ecgi_list ecgi optional, - Qci qci + AssociateId associateId optional, + NRcgi_list nrcgi optional, + TriggerNr triggerNr optional } - + /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member associateId 0 to N identifiers to associate the information for a specific UE or flow - * @member ecgi E-UTRAN CelI Global Identifier - * @member hoStatus - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.2-1: Attributes of the CellChangeSubscription + * @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 012 V2.2.1 (2022-02) Clause 6.3.12 Type: WebsockNotifConfig */ - type record FilterCriteriaAssocHo { - AppInstanceId appInstanceId optional, - AssociateId associateId optional, - Ecgi_list ecgi optional, - HoStatus_list hoStatus optional + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional } /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member associateId 0 to N identifiers to associate the information for a specific UE or flow - * @member ecgi E-UTRAN CelI Global Identifier - * @member trigger_ Corresponds to a specific E-UTRAN UE Measurement Report trigger - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.6-1: Attributes of the MeasRepUeSubscription + * @desc Unique identifier for the mobile edge application instance", */ - type record FilterCriteriaAssocTri { - AppInstanceId appInstanceId optional, - AssociateId associateId optional, - Ecgi_list ecgi optional, - Trigger trigger_ optional + type Json.String AppInstanceId; + + /** + * @desc Unique identifier allocated by the Mobile Edge application for the Information request + */ + type Json.String RequestId; + + /** + * @desc This type represents a subscription to 5G UE measurement report notifications from Radio Network Information Service for UEs served by NR Cells + * @member notificationType Shall be set to "CellChangeNotification" + * @member timeStamp Time stamp + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member srcEcgi E-UTRAN Cell Global Identifier of the source cell + * @member trgEcgi E-UTRAN Cell Global Identifier of the target cell + * @member hoStatus Indicate the status of the UE handover procedure + * @member tempUeId The temporary identifier allocated for the specific UE + * @member links Links to resources related to this notification + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.2-1: Attributes of the CellChangeNotification + */ + type record CellChangeNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + AssociateId associateId, + Ecgi srcEcgi, + Ecgi_list trgEcgi, + HoStatus hoStatus, + TempUeId_ tempUeId, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a subscription to 5G UE measurement report notifications from Radio Network Information Service for UEs served by NR Cells + * @member notificationType Shall be set to "RabEstNotification"." + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE + * @member erabQosParameters QoS parameters for the E-RAB + * @member tempUeId The temporary identifier allocated for the specific UE + * @member links Links to resources related to this notification + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.3-1: Attributes of the RabEstNotification + */ + type record RabEstNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + ErabId erabId, + ErabQosParameters erabQosParameters, + TempUeId_ tempUeId, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to RAB modification procedure + * @member notificationType Shall be set to "RabModNotification"." + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE + * @member erabQosParameters QoS parameters for the E-RAB + * @member links Links to resources related to this notification + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.4-1: Attributes of the RabModNotification + */ + type record RabModNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + ErabId erabId, + ErabQosParameters erabQosParameters, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to RAB release procedure + * @member notificationType Shall be set to "RabModNRabRelNotificationotification"." + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member erabReleaseInfo The release information for the E-RAB + * @member links Links to resources related to this notification + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.5-1: Attributes of the RabRelNotification + */ + type record RabRelNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + ErabReleaseInfo erabReleaseInfo, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc The release information for the E-RAB + * @member erabId The attribute that uniquely identifies a Radio Access bearer for specific UE + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.5-1: Attributes of the RabRelNotification + */ + type record ErabReleaseInfo { + ErabId erabId + } + + /** + * @desc Subscription to UE measurement report notifications from Radio Network Information Service for UEs served by E-UTRA Cells + * @member notificationType Shall be set to "MeasRepUeNotification" + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member rsrp Reference Signal Received Power + * @member rsrpEx Extended Reference Signal Received Power + * @member rsrq Reference Signal Received Quality + * @member rsrqEx Extended Reference Signal Received Quality + * @member sinr Reference Signal "Signal to Interference plus Noise Ratio" + * @member trigger Corresponds to a specific E-UTRAN UE Measurement Report trigger + * @member eutranNeighbourCell This parameter can be repeated to contain information of all the neighbouring cells + * @member carrierAggregationMeasInfo This parameter can be repeated to contain information of all the carriers assign for Carrier Aggregation + * @member heightUe Indicates height of the UE in meters relative to the sea + * @member newRadioMeasInfo 5G New Radio secondary serving cells measurement information + * @member newRadioMeasNeiInfo Measurement quantities concerning the 5G NR neighbours + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record MeasRepUeNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + Json.UInt8 rsrp, + Json.UInt8 rsrpEx optional, + Json.UInt8 rsrq, + Json.UInt8 rsrqEx optional, + Json.UInt8 sinr optional, + Trigger trigger_, + EutraNeighbourCellMeasInfo eutraNeighbourCellMeasInfo optional, + CarrierAggregationMeasInfo carrierAggregationMeasInfo optional, + Json.Integer heightUe optional, + NewRadioMeasInfo newRadioMeasInfo optional, + NewRadioMeasNeiInfo newRadioMeasNeiInfo optional, + Links links optional } with { variant (trigger_) "name as 'trigger'"; + variant (links) "name as '_links'"; } /** - * @desc List of filtering criteria for the subscription - * @member appInstanceId Unique identifier for the MEC application instance - * @member associateId 0 to N identifiers to associate the information for a specific UE or flow - * @member nrcgi NR Cell Global Identier + * @desc This parameter can be repeated to contain information of all the neighbouring cells + * @member ecgi E-UTRAN Cell Global Identifier + * @member rsrp Reference Signal Received Power + * @member rsrpEx Extended Reference Signal Received Power + * @member rsrq Reference Signal Received Quality + * @member rsrqEx Extended Reference Signal Received Quality + * @member sinr Reference Signal "Signal to Interference plus Noise Ratio" + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record EutraNeighbourCellMeasInfo_ { + Ecgi ecgi, + Json.UInt8 rsrp optional, + Json.UInt8 rsrpEx optional, + Json.UInt8 rsrq optional, + Json.UInt8 rsrqEx optional, + Json.UInt8 sinr optional + } + type record of EutraNeighbourCellMeasInfo_ EutraNeighbourCellMeasInfo; + + /** + * @desc This parameter can be repeated to contain information of all the carriers assign for Carrier Aggregation + * @member cellIdSrv E-UTRAN Cell Identity of a Secondary serving Cell (SCell) + * @member rsrpSrv Reference Signal Received Power + * @member rsrpSrvEx Extended Reference Signal Received Power + * @member rsrqSrv Reference Signal Received Quality + * @member rsrqSrvEx Extended Reference Signal Received Quality + * @member sinrSrv Reference Signal "Signal to Interference plus Noise Ratio" + * @member cellIdNei E-UTRAN Cell Identity of the best neighbouring cell (NCell) associated with the SCell + * @member rsrpNei Reference Signal Received Power + * @member rsrpNeiEx Extended Reference Signal Received Power + * @member rsrqNei Reference Signal Received Quality + * @member rsrqNeiEx Extended Reference Signal Received Quality + * @member sinrNei Reference Signal "Signal to Interference plus Noise Ratio" + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record CarrierAggregationMeasInfo_ { + CellId cellIdSrv, + Json.UInt8 rsrpSrv optional, + Json.UInt8 rsrpSrvEx optional, + Json.UInt8 rsrqSrv optional, + Json.UInt8 rsrqSrvEx optional, + Json.UInt8 sinrSrv optional, + CellId cellIdNei, + Json.UInt8 rsrpNei optional, + Json.UInt8 rsrpNeiEx optional, + Json.UInt8 rsrqNei optional, + Json.UInt8 rsrqNeiEx optional, + Json.UInt8 sinrNei optional + } + type record of CarrierAggregationMeasInfo_ CarrierAggregationMeasInfo; + + /** + * @desc 5G New Radio secondary serving cells measurement information + * @member nrCarrierFreq ARFCN applicable for a downlink, uplink or bi-directional (TDD) NR carrier frequency + * @member nrSCs Measurement quantities concerning the secondary serving cells + * @member nrBNCs Measurement quantities concerning the best neighbours of the secondary serving cells + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NewRadioMeasInfo_ { + Json.UInteger nrCarrierFreq, + NrSCs nrSCs, + NrBNCs nrBNCs optional + } + type record of NewRadioMeasInfo_ NewRadioMeasInfo; + + /** + * @desc Measurement quantities concerning the 5G NR neighbours + * @member nrNCellInfo 5G NR neighbour cell info + * @member nrNCellRsrp Reference Signal Received Power measurement + * @member nrNCellRsrq Reference Signal Received Quality measurement + * @member nrNCellRssi Reference signal SINR measurement + * @member rsIndexResults Beam level measurements results of a NR cell + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NewRadioMeasNeiInfo_ { + NrNCellInfo nrNCellInfo, + Json.UInt8 nrNCellRsrp optional, + Json.UInt8 nrNCellRsrq optional, + Json.UInt8 nrNCellRssi optional, + RsIndexResults rsIndexResults optional + } + type record of NewRadioMeasNeiInfo_ NewRadioMeasNeiInfo; + + /** + * @desc 5G NR neighbour cell info + * @member nrNCellPlmn Public land mobile network identities + * @member nrNCellGId Cell Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NrNCellInfo_ { + Plmn_list nrNCellPlmn, + NrCellId nrNCellGId + } + type record of NrNCellInfo_ NrNCellInfo; + + /** + * @desc Measurement quantities concerning the secondary serving cells + * @member nrSCellInfo Secondary serving cell(s) info + * @member nrSCellGId Cell Global Identifier + * @member nrSCellRsrp Reference Signal Received Power measurement + * @member nrSCellRsrq Reference Signal Received Quality measurement + * @member nrSCellRssi Reference signal SINR measurement + * @member + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NrSCs { + NrSCellInfo nrSCellInfo, + Json.UInt8 nrSCellRsrp optional, + Json.UInt8 nrSCellRsrq optional, + Json.UInt8 nrSCellRssi optional + } + + /** + * @desc Secondary serving cell(s) info + * @member nrSCellInfo Secondary serving cell(s) info + * @member nrSCellPlmn Public land mobile network identities + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NrSCellInfo_ { + Plmn_list nrSCellInfo, + NrCellId_list nrSCellPlmn + } + type record of NrSCellInfo_ NrSCellInfo; + + /** + * @desc Measurement quantities concerning the best neighbours of the secondary serving cells + * @member nrBNCellInfo Best neighbours of the secondary serving cell(s) info + * @member nrBNCellRsrp Reference Signal Received Power measurement + * @member nrBNCellRsrq Reference Signal Received Quality measurement + * @member nrBNCellRssi Reference signal SINR measurement + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + * @member + */ + type record NrBNCs { + NrBNCellInfo nrBNCellInfo, + Json.UInt8 nrBNCellRsrp optional, + Json.UInt8 nrBNCellRsrq optional, + Json.UInt8 nrBNCellRss optional + } + + /** + * @desc Best neighbours of the secondary serving cell(s) info + * @member nrBNCellPlmn Public land mobile network identities + * @member nrBNCellGId Cell Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.6-1: Attributes of the MeasRepUeNotification + */ + type record NrBNCellInfo_ { + Plmn_list nrBNCellPlmn, + NrCellId nrBNCellGId + } + type record of NrBNCellInfo_ NrBNCellInfo; + + /** + * @desc This type represents a notification from RNIS with regards to UE Timing Advance measurements + * @member notificationType Shall be set to "MeasTaNotification" + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member timingAdvance The timing advance + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.7-1: Attributes of the MeasTaNotification + */ + type record MeasTaNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + Json.Integer timingAdvance optional, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to UE carrier aggregation reconfigurations + * @member notificationType Shall be set to "CaReconfNotification" + * @member timeStamp Time stamp + * @member ecgi E-UTRAN Cell Global Identifier + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow + * @member secondaryCellAdd + * @member secondaryCellRemove + * @member carrierAggregationMeasInfo This parameter can be repeated to contain information of all the carriers assign for Carrier Aggregation + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.8-1: Attributes of the CaReconfNotification + */ + type record CaReconfNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Ecgi ecgi, + AssociateId associateId, + SecondaryCellAdd secondaryCellAdd optional, + SecondaryCellRemove secondaryCellRemove optional, + CarrierAggregationMeasInfo_CaReconfNotification + carrierAggregationMeasInfo optional, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc + * @member ecgi E-UTRAN Cell Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.8-1: Attributes of the CaReconfNotification + */ + type record SecondaryCellAdd_ { + Ecgi ecgi + } + type record of SecondaryCellAdd_ SecondaryCellAdd; + + /** + * @desc + * @member ecgi E-UTRAN Cell Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.8-1: Attributes of the CaReconfNotification + */ + type record SecondaryCellRemove_ { + Ecgi ecgi + } + type record of SecondaryCellRemove_ SecondaryCellRemove; + + /** + * @desc This parameter can be repeated to contain information of all the carriers assign for Carrier Aggregation + * @member cellIdSrv E-UTRAN Cell Identity of a Secondary serving Cell (SCell) + * @member rsrpSrv Reference Signal Received Power + * @member rsrqSrv Reference Signal Received Quality + * @member cellIdNei E-UTRAN Cell Identity of the best neighbouring cell (NCell) associated with the SCell + * @member rsrpNei Reference Signal Received Power + * @member rsrqNei Reference Signal Received Quality + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.8-1: Attributes of the CaReconfNotification + */ + type record CarrierAggregationMeasInfo_CaReconfNotification_ { + CellId cellIdSrv, + Json.UInt8 rsrpSrv optional, + Json.UInt8 rsrqSrv optional, + CellId cellIdNei, + Json.UInt8 rsrpNei optional, + Json.UInt8 rsrqNei optional + } + type record of CarrierAggregationMeasInfo_CaReconfNotification_ CarrierAggregationMeasInfo_CaReconfNotification; + + /** + * @desc This type represents a notification from RNIS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "ExpiryNotification" + * @member timeStamp Time stamp + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.9-1: Attributes of the ExpiryNotification + */ + type record ExpiryNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "S1BearerNotification" + * @member timeStamp Time stamp + * @member s1Event The subscribed event that triggered this notification in S1BearerSubscription + * @member s1UeInfo Information on specific UE that matches the criteria in S1BearerSubscription + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.10-1 Attributes of the S1BearerNotification + */ + type record S1BearerNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + EventType s1Event, + S1UeInfo_ s1UeInfo, + Links links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from RNIS with regards to 5G UE measurement report for UEs. + * @member notificationType Shall be set to "NrMeasRepUeNotification" + * @member timeStamp Time stamp + * @member associateId 0 to N identifiers to associate the event for a specific UE or flow * @member triggerNr Corresponds to a specific 5G UE Measurement Report trigger - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.11-1: Attributes of the NrMeasRepUeSubscription + * @member servCellMeasInfo This parameter can be repeated to contain information of all the serving cells + * @member nrNeighCellMeasInfo This parameter can be repeated to contain measurement information of all the neighbouring cells + * @member eutraNeighCellMeasInfo This parameter can be repeated to contain measurement information of all the neighbouring cells + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification */ - type record FilterCriteriaNrMrs { - AppInstanceId appInstanceId optional, - AssociateId associateId optional, - NRcgi_list nrcgi optional, - TriggerNr triggerNr optional + type record NrMeasRepUeNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + AssociateId associateId, + TriggerNr triggerNr, + ServCellMeasInfo servCellMeasInfo optional, + NrNeighCellMeasInfo nrNeighCellMeasInfo optional, + EutraNeighbourCellMeasInfo_NrMeasRepUeNotification_ + eutraNeighCellMeasInfo optional, + Links links optional + } with { + variant (links) "name as '_links'"; } /** - * @desc List of filtering criteria for the subscription - * @member associateId 0 to N identifiers to associate the events for a specific UE or a flow - * @member ecgi E-UTRAN CelI Global Identifier - * @member erabId The attribute that uniquely identifies a S1 bearer for a specific UE, as defined in ETSI TS 136 413 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.9-1: Attributes of the S1BearerSubscription + * @desc This parameter can be repeated to contain information of all the serving cells + * @member nrcgi NR Cell Global Identifier + * @member sCell Measurement information relating to this serving cell + * @member nCell Measurement information relating to the best neighbour of this serving cell + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification */ - type record S1BearerSubscriptionCriteria { - AssociateId associateId optional, - Ecgi ecgi optional, - ErabId erabId optional + type record ServCellMeasInfo { + Nrcgi nrcgi, + SCell sCell, + NCell nCell optional } /** - * @desc Description of the subscribed to event - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.2-1: Attributes of the CellChangeSubscription + * @desc Measurement information relating to this serving cell + * @member measQuantityResultsSsbCellM easurement quantity results relating to the Synchronization Signal Block + * @member measQuantityResultsCsiRsCell Measurement quantity results relating to the Channel State Information Reference Signal + * @member rsIndexResults Beam level measurement information + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification */ - type enumerated HoStatus { - IN_PREPARATION (1), - IN_EXECUTION (2), - COMPLETED (3), - REJECTED (4), - CANCELLED (5) + type record SCell { + MeasQuantityResultsNr measQuantityResultsSsbCell optional, + MeasQuantityResultsNr measQuantityResultsCsiRsCell optional, + RsIndexResults rsIndexResults optional + } + + /** + * @desc Measurement information relating to the best neighbour of this serving cell + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification + */ + type SCell NCell; + + /** + * @desc This parameter can be repeated to contain measurement information of all the neighbouring cells + * @member nrcgi NR Cell Global Identifier + * @member measQuantityResultsSsbCellM easurement quantity results relating to the Synchronization Signal Block + * @member measQuantityResultsCsiRsCell Measurement quantity results relating to the Channel State Information Reference Signal + * @member rsIndexResults Beam level measurement information + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification + */ + type record NrNeighCellMeasInfo { + Nrcgi nrcgi, + MeasQuantityResultsNr measQuantityResultsSsbCell optional, + MeasQuantityResultsNr measQuantityResultsCsiRsCell optional, + RsIndexResults rsIndexResults optional + } + + /** + * @desc This parameter can be repeated to contain information of all the neighbouring cells + * @member ecgi E-UTRAN Cell Global Identifier + * @member rsrp Reference Signal Received Power + * @member rsrq Reference Signal Received Quality + * @member sinr Reference Signal "Signal to Interference plus Noise Ratio" + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.11-1: Attributes of the NrMeasRepUeNotification + */ + type record EutraNeighbourCellMeasInfo_NrMeasRepUeNotification_ { + Ecgi ecgi, + Json.UInt8 rsrp optional, + Json.UInt8 rsrq optional, + Json.UInt8 sinr optional + } + type record of EutraNeighbourCellMeasInfo_NrMeasRepUeNotification_ EutraNeighbourCellMeasInfo_NrMeasRepUeNotification; + + /** + * @desc This type represents a notification from RNIS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "TestNotification" + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.4.12-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links links optional } with { - variant "JSON: as number" + variant (links) "name as '_links'"; } - type record of HoStatus HoStatus_list; /** - * @desc Description of the subscribed event - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.3.9-1: Attributes of the S1BearerSubscription + * @desc the NR Cell Identity. Encoded as a bit string (size (36)) as defined in ETSI TS 138 423 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.6.2-1: CellId */ - type enumerated EventType { - RESERVED (0), - S1_BEARER_ESTABLISH (1), - S1_BEARER_MODIFY (2), - S1_BEARER_RELEASE (3) + type Json.String NrCellId; + type record of NrCellId NrCellId_list; + + /** + * @desc Numeric value (0-255) corresponding to specified type of identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.4-1: Attributes of the AssociateId + */ + type enumerated AssociateId_type { + RESERVED (0), + UE_IPV4_ADDRESS (1), + UE_IPV6_ADDRESS (2), + NATED_IP_ADDRESS (3), + GTP_TEID (4) } with { variant "JSON: as number" } + + /** + * @desc URL selected by the Mobile Edge application to receive notifications on the subscribed RNIS information + */ + type Json.AnyURI CallbackReference; + + /** + * @desc URI referring to a resource + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.2-1: Attributes of the LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc Represents a time stamp + * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.3-1: Attributes of the TimeStamp + */ + type record TimeStamp { + Json.UInteger seconds, + Json.UInteger nanoSeconds + } + + /** + * @desc Information on UEs in the specific cell + * @member type Numeric value (0-255) corresponding to specified type of identifier + * @member value Value for the identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.4-1: Attributes of the AssociateId + */ + type record AssociateId_ { + AssociateId_type type_, + Json.String value_ + } with { + variant (type_) "name as 'type'"; + variant (value_) "name as 'value'"; + } + type record of AssociateId_ AssociateId; + + /** + * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 + * @member mcc The Mobile Country Code part of PLMN Identity as defined in 3GPP TS 36.413 + * @member mnc The Mobile Network Code part of PLMN Identity as defined in 3GPP TS 36.413 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.5-1: Attributes of the Plmn + */ + type record Plmn { + Json.String mcc, + Json.String mnc + } + type record of Plmn Plmn_list; + + /** + * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 + * @member ecgi Public Land Mobile Network Identity + * @member cellId E-UTRAN CelI Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.5-1: Attributes of the Ecgi + */ + type record Ecgi { + Plmn plmn, + CellId cellId + } + type record of Ecgi Ecgi_list; + + /** + * @desc New Radio CelI Global Identifier as defined in ETSI TS 138 423 + * @member ecgi Public Land Mobile Network Identity + * @member NrCellId NR CelI Global Identifier + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.6-1: Attributes of the Ecgi + */ + type record Nrcgi { + Plmn plmn, + NrCellId nrcellId + } + type record of Nrcgi NRcgi_list; + + /** + * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 + * @member resultsSsbIndexes Beam level measurement results based on SS/PBCH related measurements + * @member resultsCsiRsIndexes Beam level measurement results based on CSI-RS related measurements + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.8-1: Attributes of the RsIndexResults + */ + type record RsIndexResults { + ResultsPerSsbIndexList resultsSsbIndexes, + ResultsPerCsiRsIndexList resultsCsiRsIndexes + } + + /** + * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.9-1: Attributes of the ResultsPerSsbIndexList + */ + type record ResultsPerSsbIndexList { + ResultsPerSsbIndex resultsPerSsbIndex optional + } + type record ResultsPerSsbIndex { + UInt8 ssbIndex, + MeasQuantityResultsNr ssbResults optional + } + + /** + * @desc Beam level measurement results for a NR cell as defined in ETSI TS 138 331 + * @member resultsPerCsiRsIndex + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.10-1: Attributes of the ResultsPerCsiRsIndexList + */ + type record ResultsPerCsiRsIndexList { + ResultsPerCsiRsIndex resultsPerCsiRsIndex optional + } + type record ResultsPerCsiRsIndex_ { + UInt8 csiRsIndex, + MeasQuantityResultsNr csiRsResults optional + } + type record of ResultsPerCsiRsIndex_ ResultsPerCsiRsIndex; + + /** + * @desc Collection of UE reported NR measurement quantity results as defined in ETSI TS 138 331 + * @member rsrp Reference Signal Received Power as defined in ETSI TS 138 331 + * @member rsrq Reference Signal Received Quality as defined in ETSI TS 138 331 + * @member sinr Reference Signal to Interference & Noise Ratio as defined in ETSI TS 138 331 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.5.11-1: Attributes of the MeasQuantityResultsNr + */ + type record MeasQuantityResultsNr { + UInt8 rsrp optional, + UInt8 rsrq optional, + UInt8 sinr optional + } + /** + * @desc The E-UTRAN Cell Identity as a bit string (size (28)), as defined in 3GPP TS 36.413 + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.6.2-1: CellId + */ + type Json.String CellId; + /** * @desc Unique identifier for the mobile edge application instance - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.6.3-1: Enumeration Trigger + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.6.3-1: Enumeration Trigger */ type enumerated Trigger { NOT_AVAILABLE (0), @@ -832,7 +1410,7 @@ module RnisAPI_TypesAndValues { /** * @desc specified triggers for a 5G UE Measurement Report. Full details can be found in ETSI TS 138 331 - * @see ETSI GS MEC 012 V2.1.1 (2019-12) Table 6.6.4-1: Enumeration TriggerNr + * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.6.4-1: Enumeration TriggerNr */ type enumerated TriggerNr { NOT_AVAILABLE (0), diff --git a/ttcn/LibMec/TrafficManagementAPI/json/BwManagementApi.json b/ttcn/LibMec/TrafficManagementAPI/json/BwManagementApi.json deleted file mode 100644 index 12010d61681535518f6f016b684d3c422a5d0f8b..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/TrafficManagementAPI/json/BwManagementApi.json +++ /dev/null @@ -1,629 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api" - }, - "title": "ETSI GS MEC 015 Bandwidth Management API", - "version": "2.1.1", - "description": "The ETSI MEC ISG Bandwidth Management API described using OpenAPI.", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI GS MEC015 V2.1.1 Traffic Management APIs", - "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf" - }, - "servers": [ - { - "url": "https://localhost/bwm/v1" - } - ], - "tags": [ - { - "name": "bwm" - } - ], - "paths": { - "/bw_allocations": { - "get": { - "tags": [ - "bwm" - ], - "summary": "Retrieve information about a list of bandwidthAllocation resources", - "description": "Retrieves information about a list of bandwidthAllocation resources. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5.", - "operationId": "bandwidthAllocationListGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.app_instance_id" - }, - { - "$ref": "#/components/parameters/Query.app_name" - }, - { - "$ref": "#/components/parameters/Query.session_id" - } - ], - "responses": { - "200": { - "description": "Upon success, a response body containing an array of the bandwidthAllocations is returned.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "post": { - "tags": [ - "bwm" - ], - "summary": "Create a bandwidthAllocation resource", - "description": "Used to create a bandwidthAllocation resource. Typically used in 'Register to Bandwidth Management Service' procedure as described in clause 6.2.1.", - "operationId": "bandwidthAllocationPOST", - "parameters": [], - "requestBody": { - "description": "Entity body in the request contains BwInfo to be created.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "responses": { - "201": { - "description": "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/bw_allocations/{allocationId}": { - "get": { - "tags": [ - "bwm" - ], - "summary": "Retrieve information about a specific bandwidthAllocation", - "description": "Retrieves information about a bandwidthAllocation resource. Typically used in 'Get configured bandwidth allocation from Bandwidth Management Service' procedure as described in clause 6.2.5.", - "operationId": "bandwidthAllocationGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.allocationId" - } - ], - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "put": { - "tags": [ - "bwm" - ], - "summary": "Update the information about a specific bandwidthAllocation", - "description": "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics.", - "operationId": "bandwidthAllocationPUT", - "requestBody": { - "description": "BwInfo with updated information is included as entity body of the request.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.allocationId" - } - ], - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "412": { - "$ref": "#/components/responses/412" - } - } - }, - "patch": { - "tags": [ - "bwm" - ], - "summary": "Modify the information about a specific existing bandwidthAllocation by sending updates on the data structure", - "description": "Updates the information about a bandwidthAllocation resource. As specified in ETSI GS MEC 009 [6], the PATCH HTTP method updates a resource on top of the existing resource state by just including the changes ('deltas') in the request body.", - "operationId": "bandwidthAllocationPATCH", - "requestBody": { - "description": "Description of the changes to instruct the server how to modify the resource representation.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfoDeltas" - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.allocationId" - } - ], - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BwInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "412": { - "$ref": "#/components/responses/412" - } - } - }, - "delete": { - "tags": [ - "bwm" - ], - "summary": "Remove a specific bandwidthAllocation", - "description": "Used in 'Unregister from Bandwidth Management Service' procedure as described in clause 6.2.3.", - "operationId": "bandwidthAllocationDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.allocationId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - } - }, - "components": { - "responses": { - "204": { - "description": "Upon success, a response 204 No Content without any response body is returned." - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Path.allocationId": { - "name": "allocationId", - "in": "path", - "description": "Represents a bandwidth allocation instance", - "required": true, - "schema": { - "type": "string" - } - }, - "Query.app_instance_id": { - "name": "app_instance_id", - "in": "query", - "description": "A MEC application instance may use multiple app_instance_ids as an input parameter to query the bandwidth allocation of a list of MEC application instances. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.app_name": { - "name": "app_name", - "in": "query", - "description": "A MEC application instance may use multiple app_names as an input parameter to query the bandwidth allocation of a list of MEC application instances. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.session_id": { - "name": "session_id", - "in": "query", - "description": "A MEC application instance may use session_id as an input parameter to query the bandwidth allocation of a list of sessions. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "schemas": { - "BwInfo": { - "properties": { - "allocationDirection": { - "description": "The direction of the requested BW allocation: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "appInsId": { - "description": "Application instance identifier", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "fixedAllocation": { - "description": "Size of requested fixed BW allocation in [bps]", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "fixedBWPriority": { - "description": "Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document", - "enum": [ - "SEE_DESCRIPTION" - ], - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Enum" - }, - "requestType": { - "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_BW_ALLOCATION 1 = SESSION_SPECIFIC_BW_ALLOCATION", - "type": "integer", - "enum": [ - 0, - 1 - ], - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "sessionFilter": { - "description": "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", - "items": { - "type": "object", - "properties": { - "dstAddress": { - "description": "Destination address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "dstPort": { - "description": "Destination port identity of session", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - }, - "protocol": { - "description": "Protocol number", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourceIp": { - "description": "Source address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourcePort": { - "description": "Source port identity of session", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - } - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "timeStamp": { - "description": "Time stamp to indicate when the corresponding information elements are sent", - "properties": { - "nanoSeconds": { - "description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "format": "uint32", - "type": "integer", - "description": "The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "appInsId", - "requestType", - "fixedAllocation", - "allocationDirection" - ], - "type": "object", - "x-etsi-ref": "7.2.2" - }, - "BwInfoDeltas": { - "properties": { - "allocationDirection": { - "description": "The direction of the requested BW allocation: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "appInsId": { - "description": "Application instance identifier", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "fixedAllocation": { - "description": "Size of requested fixed BW allocation in [bps]", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "fixedBWPriority": { - "description": "Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document", - "enum": [ - "SEE DESCRIPTION" - ], - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "requestType": { - "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_BW_ALLOCATION 1 = SESSION_SPECIFIC_BW_ALLOCATION", - "type": "string", - "enum": [ - 0, - 1 - ], - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "sessionFilter": { - "description": "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", - "items": { - "type": "object", - "properties": { - "dstAddress": { - "description": "Destination address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "dstPort": { - "description": "Destination port identity of session", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - }, - "protocol": { - "description": "Protocol number", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourceIp": { - "description": "Source address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourcePort": { - "description": "Source port identity of session ", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - } - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "appInsId", - "requestType" - ], - "type": "object", - "x-etsi-ref": "7.2.3" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - } - } - } -} diff --git a/ttcn/LibMec/TrafficManagementAPI/json/TrafficSteeringApi.json b/ttcn/LibMec/TrafficManagementAPI/json/TrafficSteeringApi.json deleted file mode 100644 index 2a5b2920b6c2d95274a201a002527de07bf7c70b..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/TrafficManagementAPI/json/TrafficSteeringApi.json +++ /dev/null @@ -1,657 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs015-bandwith-mgmt-api" - }, - "title": "ETSI GS MEC 015 Multi-access Traffic Steering APIs", - "version": "2.1.1", - "description": "The present document focuses on the Multi-access Traffic Steering multi-access edge service. It describes the related application policy information including authorization and access control, information flows, required information and service aggregation patterns. The present document specifies the necessary API with the data model and data format.", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI GS MEC015 V2.1.1 Traffic Management APIs", - "url": "https://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/02.01.01_60/gs_MEC015v020101p.pdf" - }, - "servers": [ - { - "url": "https://localhost/mts/v1" - } - ], - "tags": [ - { - "name": "mts" - } - ], - "paths": { - "/mts_capability_info": { - "get": { - "tags": [ - "mts" - ], - "summary": "Retrieve the MTS capability informations", - "description": "Used to query information about the MTS information. Typically used in the 'Get MTS service Info from the MTS Service' procedure as described in clause 6.2.6.", - "operationId": "mtsCapabilityInfoGET", - "parameters": [], - "responses": { - "200": { - "description": "Upon success, a response body containing the MTS capability information is returned.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsCapabilityInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/mts_sessions": { - "get": { - "tags": [ - "mts" - ], - "summary": "Retrieve information about a list of MTS sessions", - "description": "Retrieves information about a list of MTS sessions. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10.", - "operationId": "mtsSessionsListGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.app_instance_id" - }, - { - "$ref": "#/components/parameters/Query.app_name" - }, - { - "$ref": "#/components/parameters/Query.session_id" - } - ], - "responses": { - "200": { - "description": "Upon success, a response body containing an array of the MTS sessions is returned.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "post": { - "tags": [ - "mts" - ], - "summary": "Create a MTS session", - "description": "Used to create a MTS session. This method is typically used in 'Register application to the MTS Service' procedure as described in clause 6.2.7.", - "operationId": "mtsSessionPOST", - "parameters": [], - "requestBody": { - "description": "Entity body in the request contains MtsSessionInfo to be created.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "responses": { - "201": { - "description": "Upon success, the HTTP response shall include a 'Location' HTTP header that contains the resource URI of the created resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - }, - "/mts_sessions/{sessionId}": { - "get": { - "tags": [ - "mts" - ], - "summary": "Retrieve information about specific MTS session", - "description": "Retrieves information about an individual MTS session. Typically used in the 'Get configured MTS Session Info from the MTS Service' procedure as described in clause 6.2.10.", - "operationId": "mtsSessionGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.sessionId" - } - ], - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - }, - "put": { - "tags": [ - "mts" - ], - "summary": "Update the information about specific MTS session", - "description": "Updates the information about an individual MTS session. As specified in ETSI GS MEC 009 [6], the PUT HTTP method has 'replace' semantics. ", - "operationId": "mtsSessionPUT", - "parameters": [ - { - "$ref": "#/components/parameters/Path.sessionId" - } - ], - "requestBody": { - "description": "MtsSessionInfo with updated information is included as entity body of the request.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "responses": { - "200": { - "description": "Used to indicate nonspecific success. The response body contains a representation of the resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MtsSessionInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "412": { - "$ref": "#/components/responses/412" - } - } - }, - "delete": { - "tags": [ - "mts" - ], - "summary": "Remove specific MTS session", - "description": "DELETE method is typically used in 'Unregister from the MTS Service' procedure as described in clause 6.2.8.", - "operationId": "mtsSessionDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.sessionId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - } - } - } - } - }, - "components": { - "responses": { - "204": { - "description": "Upon success, a response 204 No Content without any response body is returned." - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Path.sessionId": { - "name": "sessionId", - "in": "path", - "description": "Represents a MTS session instance", - "required": true, - "schema": { - "type": "string" - } - }, - "Query.app_instance_id": { - "name": "app_instance_id", - "in": "query", - "description": "A MEC application instance may use multiple app_instance_ids as an input parameter to query the MTS session of a list of MEC application instances. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.app_name": { - "name": "app_name", - "in": "query", - "description": "A MEC application instance may use multiple app_names as an input parameter to query the MTS session of a list of MEC application instances. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.session_id": { - "name": "session_id", - "in": "query", - "description": "A MEC application instance may use session_id as an input parameter to query the information of a list of MTS sessions. See note.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "schemas": { - "MtsCapabilityInfo": { - "properties": { - "mtsAccessInfo": { - "description": "The information on access network connection as defined below", - "items": { - "type": "object", - "properties": { - "accessId": { - "format": "uint32", - "type": "integer", - "description": "Unique identifier for the access network connection", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "accessType": { - "format": "uint32", - "type": "integer", - "description": "Numeric value (0-255) corresponding to specific type of access network as following: 0 = Unknown 1 = Any IEEE802.11-based WLAN technology 2 = Any 3GPP-based Cellular technology 3 = Any Fixed Access 11 = IEEE802.11 a/b/g WLAN 12 = IEEE 802.11 a/b/g/n WLAN 13 = IEEE 802.11 a/b/g/n/ac WLAN 14 = IEEE 802.11 a/b/g/n/ac/ax WLAN (Wi-Fi 6) 15 = IEEE 802.11 b/g/n WLAN 31 = 3GPP GERAN/UTRA (2G/3G) 32 = 3GPP E-UTRA (4G/LTE) 33 = 3GPP NR (5G)", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "metered": { - "format": "uint32", - "type": "integer", - "description": "Numeric value (0-255) corresponding to the following: 0: the connection is not metered (see note) 1: the connection is metered 2: unknown ", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - } - }, - "required": [ - "accessId", - "accessType", - "metered" - ], - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "mtsMode": { - "description": "Numeric value corresponding to a specific MTS operation supported by the TMS 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency 2 = high throughput, i.e. using the access network connection with higher throughput, or/and multiple access network connection simultaneously if supported 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for highreliability and low-latency applications 4 = QoS, i.e. performing MTS based on the specific QoS requirements from the app", - "items": { - "type": "integer", - "format": "uint32" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Uint32" - }, - "timeStamp": { - "description": "Time stamp to indicate when the corresponding information elements are sent", - "properties": { - "nanoSeconds": { - "format": "uint32", - "type": "integer", - "description": "Time in nanoseconds in Unix-time since January 1, 1970, 00:00:00 UTC", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "description": "Time in seconds in Unix-time since January 1, 1970, 00:00:00 UTC", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - } - }, - "required": [ - "mtsAccessInfo", - "mtsMode" - ], - "type": "object", - "x-etsi-notes": "NOTE:\tA metered connection is a network connection that has a maximum data usage in a specific period, e.g. per hour/day/week/month. The user may get billed extra charges if they go over the allotted amount.", - "x-etsi-ref": "7.2.4" - }, - "MtsSessionInfo": { - "properties": { - "appInsId": { - "description": "Application instance identifier", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "flowFilter": { - "description": "Traffic flow filtering criteria, applicable only if when requestType is set as FLOW_SPECIFIC_MTS_SESSION. Any filtering criteria shall define a single session only. In case multiple sessions match flowFilter the request shall be rejected. If the flowFilter field is included, at least one of its subfields shall be included. Any flowFilter subfield that is not included shall be ignored in traffic flow filtering", - "items": { - "type": "object", - "properties": { - "dscp": { - "format": "uint32", - "type": "integer", - "description": "DSCP in the IPv4 header or Traffic Class in the IPv6 header", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dstIp": { - "description": "Destination address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "dstPort": { - "description": "Destination port identity of session", - "items": { - "type": "integer", - "format": "uint32" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Uint32" - }, - "flowlabel": { - "format": "uint32", - "type": "integer", - "description": "Flow Label in the IPv6 header, applicable only if the flow is IPv6", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "protocol": { - "format": "uint32", - "type": "integer", - "description": "Protocol number", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "sourceIp": { - "description": "Source address identity of session (including range)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "sourcePort": { - "description": "Source port identity of session", - "items": { - "type": "integer", - "format": "uint32" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "Uint32" - } - } - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "mtsMode": { - "format": "uint32", - "type": "integer", - "description": "Numeric value (0 - 255) corresponding to a specific MTS mode of the MTS session: 0 = low cost, i.e. using the unmetered access network connection whenever it is available 1 = low latency, i.e. using the access network connection with lower latency 2 = high throughput, i.e. using the access network connection with higher throughput, or multiple access network connection simultaneously 3 = redundancy, i.e. sending duplicated (redundancy) packets over multiple access network connections for high-reliability and low-latency applications 4 = QoS, i.e. performing MTS based on the QoS requirement (qosD)", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "qosD": { - "description": "QoS requirement description of the MTS session, applicable only if mtsMode = 4 (QoS). If the qosD field is included, at least one of its subfields shall be included. Any qosD subfield that is not included shall be ignored in Multi-access Traffic Steering (MTS)", - "properties": { - "maxJitter": { - "description": "tolerable jitter in [10 nanoseconds]", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "maxLatency": { - "description": "tolerable (one-way) delay in [10 nanoseconds]", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "maxLoss": { - "description": "tolerable packet loss rate in [1/10^x]", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "minTpt": { - "description": "minimal throughput in [kbps]", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "priority": { - "description": "numeric value (0 - 255) corresponding to the traffic priority 0: low; 1: medium; 2: high; 3: critical", - "type": "integer", - "format": "uint32", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "type": "object", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Structure" - }, - "requestType": { - "description": "Numeric value (0 - 255) corresponding to specific type of consumer as following: 0 = APPLICATION_SPECIFIC_MTS_SESSION 1 = FLOW_SPECIFIC_MTS_SESSION", - "enum": [ - 0, - 1 - ], - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Enum_inlined" - }, - "timeStamp": { - "description": "Time stamp to indicate when the corresponding information elements are sent ", - "properties": { - "nanoSeconds": { - "format": "uint32", - "type": "integer", - "description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "format": "uint32", - "type": "integer", - "description": "The seconds part of the Time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "trafficDirection": { - "description": "The direction of the requested MTS session: 00 = Downlink (towards the UE) 01 = Uplink (towards the application/session) 10 = Symmetrical (see note) ", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "appInsId", - "requestType", - "flowFilter", - "qosD", - "mtsMode", - "trafficDirection" - ], - "type": "object", - "x-etsi-notes": "NOTE:\tFor the downlink direction of a symmetrical flow, \"sourceIp\" and \"sourcePort\" in the \"flowFilter\" structure are used for source address and port, respectively; \"dstIp\" and \"dstPort\" are used for destination address and port, respectively. For the uplink direction of a symmetrical flow, \"sourceIp\" and \"sourcePort\" are used for destination address and port, respectively; \"dstIp\" and \"dstPort\" are used for source address and port, respectively.", - "x-etsi-ref": "7.2.5" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - } - } - } -} diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn index c9a0eb40410b51e00046bca77943bd5031628e67..c678558f380be9b27c0f26c9050a524438f96f1f 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn @@ -40,7 +40,7 @@ module TrafficManagementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PX_ME_BWM_URI, + PICS_ROOT_API & PX_ME_BWM_URI, v_headers, m_http_message_body_json( m_body_json_bw_info( @@ -60,16 +60,18 @@ module TrafficManagementAPI_Functions { mw_bw_info( p_app_instance_id )))))) -> value v_response { - var charstring_list v_bw_allocation_id; + var charstring_list v_header_location; tc_ac.stop; log("f_create_bw_allocation_resource: BwInfo resource created: ", v_response); - f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id); - if (lengthof(v_bw_allocation_id) != 0) { - p_bw_allocation_id := v_bw_allocation_id[0]; - p_bw_info := v_response.response.body.json_body.bwInfo; - } + f_get_header(valueof(v_response.response.header), "Location", v_header_location); + p_bw_allocation_id := regexp( + v_header_location[0], + "?+" & PX_ME_BWM_URI & "/(?*)", + 0 + ); + p_bw_info := v_response.response.body.json_body.bwInfo; } [] tc_ac.timeout { log("f_create_bw_allocation_resource: Expected message not received"); @@ -87,7 +89,7 @@ module TrafficManagementAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PX_ME_BWM_URI & "/" & p_bw_allocation_id, + PICS_ROOT_API & PX_ME_BWM_URI & "/" & p_bw_allocation_id, v_headers ))); tc_ac.start; @@ -117,22 +119,16 @@ module TrafficManagementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PX_ME_MTS_SESSIONS_URI, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI, v_headers, m_http_message_body_json( m_body_json_mts_session_info( m_mts_session_info( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_MTS_ALLOCATION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd, // QoS LowCost, // MtsMode - Downlink, // TrafficDirection - { - m_session_filter( - "10.10.10.10", - {"1010"} - ) - } // FlowFilter + Downlink // TrafficDirection )))))); tc_ac.start; alt { @@ -162,16 +158,16 @@ module TrafficManagementAPI_Functions { } // End of function f_create_mts_session_info_resource function f_delete_mts_session_info_resource( - in Json.String p_app_instance_id, - in charstring p_mts_session_id - ) runs on HttpComponent { + in Json.String p_app_instance_id, + in charstring p_mts_session_id + ) runs on HttpComponent { var Headers v_headers; f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PX_ME_MTS_SESSIONS_URI & "/" & p_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & p_mts_session_id, v_headers ))); tc_ac.start; diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn index fa8cf88ce21d803c7f09b04e4a62c9d20fd33f7a..7250495f4187d559de3f0b0f59eb0a9de4bec0a2 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn @@ -5,4 +5,9 @@ module TrafficManagementAPI_Pics { */ modulepar boolean PICS_BWMANAGEMENT_API_SUPPORTED := true; + /** + * @desc Does the IUT support Multi-access Traffic Steering API? + */ + modulepar boolean PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED := true; + } // End of module TrafficManagementAPI_Pics diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn index 352ca84aa1568c13d9ce340d77526da01ede5aaa..02851fdecdb13a0274855ef4beccda0731e7b4df 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn @@ -1,5 +1,8 @@ module TrafficManagementAPI_Pixits { + // JSON + import from Json all; + // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -8,9 +11,21 @@ module TrafficManagementAPI_Pixits { // LibMec/LocationAPI import from LocationAPI_TypesAndValues all; - modulepar Address PX_APP_INSTANCE_ID := "appInst01"; + modulepar Json.String PX_APP_INSTANCE_ID := "appInst01"; + + modulepar Json.String PX_APP_INSTANCE_ID_2 := "appInst02"; + + modulepar Json.String PX_APP_ALLOCATION_ID := "appAllocationId01"; + + modulepar Json.String PX_APP_NAME := "appName01"; + + modulepar Json.String PX_UNKNOWN_APP_INSTANCE_ID := "appInst99"; + + modulepar Json.String PX_UNKNOWN_APP_NAME := "appName99"; + + modulepar Json.String PX_UNKNOWN_APP_ALLOCATION_ID := "appAllocationId99"; - modulepar Address PX_UNKNOWN_APP_INSTANCE_ID := "appInst99"; + modulepar Json.String PX_UNKNOWN_BW_ALLOCATION_ID := "bwAllocationId99"; modulepar ResourceURL PX_RESOURCE_URL := "http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1"; diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn index d4dbaf5ad533990bd85e824f3dc3edb1e8c51960..7eb39f08ece78a067f43eb9ea40cd5ec6bd2cb42 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn @@ -6,6 +6,9 @@ module TrafficManagementAPI_Templates { // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/TrafficManagementAPI import from TrafficManagementAPI_TypesAndValues all; import from TrafficManagementAPI_Pixits all; @@ -15,11 +18,15 @@ module TrafficManagementAPI_Templates { in BwRequestType p_requestType, in FixedAllocation p_fixedAllocation, in AllocationDirection p_allocationDirection, + in template (omit) Json.String p_appName := omit, + in template (omit) AllocationId p_allocationId := omit, in template (omit) SessionFilter p_sessionFilter := omit, in template (omit) FixedBWPriority p_fixedBWPriority := omit ) := { + allocationId := p_allocationId, timeStamp := omit, appInsId := p_appInsId, + appName := p_appName, requestType := p_requestType, sessionFilter := p_sessionFilter, fixedBWPriority := p_fixedBWPriority, @@ -32,11 +39,15 @@ module TrafficManagementAPI_Templates { template (present) BwRequestType p_requestType := ?, template (present) FixedAllocation p_fixedAllocation := ?, template (present) AllocationDirection p_allocationDirection := ?, + template Json.String p_appName := *, + template AllocationId p_allocationId := *, template SessionFilter p_sessionFilter := *, template FixedBWPriority p_fixedBWPriority := * ) := { + allocationId := p_allocationId, timeStamp := *, appInsId := p_appInsId, + appName := p_appName, requestType := p_requestType, sessionFilter := p_sessionFilter, fixedBWPriority := p_fixedBWPriority, @@ -47,11 +58,13 @@ module TrafficManagementAPI_Templates { template (omit) BwInfoDeltas m_bw_info_deltas( in AppInsId p_appInsId := PX_APP_INSTANCE_ID, in BwRequestType p_requestType, + in template (omit) AllocationId p_allocationId := omit, in template (omit) SessionFilter p_sessionFilter := omit, in template (omit) FixedAllocation p_fixedAllocation := omit, in template (omit) AllocationDirection p_allocationDirection := omit, in template (omit) FixedBWPriority p_fixedBWPriority := omit ) := { + allocationId := p_allocationId, appInsId := p_appInsId, requestType := p_requestType, sessionFilter := p_sessionFilter, @@ -66,8 +79,10 @@ module TrafficManagementAPI_Templates { template (present) SessionFilter p_sessionFilter := ?, template (present) FixedAllocation p_fixedAllocation := ?, template (present) AllocationDirection p_allocationDirection := ?, + template AllocationId p_allocationId := *, template FixedBWPriority p_fixedBWPriority := * ) := { + allocationId := p_allocationId, appInsId := p_appInsId, requestType := p_requestType, sessionFilter := p_sessionFilter, @@ -76,7 +91,7 @@ module TrafficManagementAPI_Templates { allocationDirection := p_allocationDirection } // End of template mw_bw_info_deltas - template (omit) SessionFilterItems m_session_filter( + template (omit) SessionFilterItem m_session_filter( in template (value) SourceIp p_sourceIp, in template (value) SourcePort p_sourcePort, in template (omit) DstAddress p_dstAddress := omit, @@ -90,7 +105,7 @@ module TrafficManagementAPI_Templates { protocol := p_protocol } // End of template m_session_filter - template SessionFilterItems mw_session_filter( + template SessionFilterItem mw_session_filter( template (present) SourceIp p_sourceIp := ?, template (present) SourcePort p_sourcePort := ?, template DstAddress p_dstAddress := *, @@ -130,29 +145,37 @@ module TrafficManagementAPI_Templates { in template (value) QosD p_qosD, in template (value) MtsMode p_mtsMode, in template (value) TrafficDirection p_trafficDirection, + in template (omit) SessionId p_sessionId := omit, + in template (omit) Json.String p_appName := omit, in template (omit) FlowFilter p_flowFilter := omit, in template (omit) TimeStamp p_timeStamp := omit ) := { + sessionId := p_sessionId, timeStamp := p_timeStamp, appInsId := p_appInsId, + appName := p_appName, requestType := p_requestType, flowFilter := p_flowFilter, qosD := p_qosD, mtsMode := p_mtsMode, trafficDirection := p_trafficDirection } // End of template m_mts_session_info - + template MtsSessionInfo mw_mts_session_info( template (present) AppInsId p_appInsId := ?, template (present) MtsRequestType p_requestType := ?, template (present) QosD p_qosD := ?, template (present) MtsMode p_mtsMode := ?, template (present) TrafficDirection p_trafficDirection := ?, + template SessionId p_sessionId := *, + template Json.String p_appName := *, template FlowFilter p_flowFilter := *, template TimeStamp p_timeStamp := * ) := { + sessionId := p_sessionId, timeStamp := p_timeStamp, appInsId := p_appInsId, + appName := p_appName, requestType := p_requestType, flowFilter := p_flowFilter, qosD := p_qosD, @@ -160,6 +183,42 @@ module TrafficManagementAPI_Templates { trafficDirection := p_trafficDirection } // End of template mw_mts_session_info + template (omit) FlowFilterItem m_flow_filter( + in template (value) SourceIp p_sourceIp, + in template (value) SourcePort p_sourcePort, + in template (omit) DstAddress p_dstIp := omit, + in template (omit) DstPort p_dstPort := omit, + in template (omit) Protocol p_protocol := omit, + in template (omit) Dscp p_dscp := omit, + in template (omit) Flowlabel p_flowlabel := omit + ) := { + sourceIp := p_sourceIp, + sourcePort := p_sourcePort, + dstIp := p_dstIp, + dstPort := p_dstPort, + protocol := p_protocol, + dscp := p_dscp, + flowlabel := p_flowlabel + } // End of template m_flow_filter + + template FlowFilterItem mw_flow_filter( + template (present) SourceIp p_sourceIp := ?, + template (present) SourcePort p_sourcePort := ?, + template DstAddress p_dstIp := *, + template DstPort p_dstPort := *, + template Protocol p_protocol := *, + template Dscp p_dscp := omit, + template Flowlabel p_flowlabel := omit + ) := { + sourceIp := p_sourceIp, + sourcePort := p_sourcePort, + dstIp := p_dstIp, + dstPort := p_dstPort, + protocol := p_protocol, + dscp := p_dscp, + flowlabel := p_flowlabel + } // End of template mw_flow_filter + template (value) QosD m_qosd( in UInt32 p_minTpt := 128, in UInt32 p_maxLatency := 128, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index ad3225923e9b102597b609fa7d5a716e1517f141..52fde89d05bcc0a0bc34e76ee29857e424cd0c28 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -2,12 +2,13 @@ module TrafficManagementAPI_TypesAndValues { // JSON import from Json all; - - // LibCommon - import from LibCommon_BasicTypesAndValues all; + + // LibMec + import from LibMec_TypesAndValues all; /** * @desc Information of bandwidth resource + * @member allocationId Bandwidth allocation instance identifier * @member timeStamp Time stamp to indicate when the corresponding information elements are sent * @member appInsId Application instance identifier * @member sessionFilter Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only @@ -15,10 +16,13 @@ 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 */ type record BwInfo { + AllocationId allocationId optional, TimeStamp timeStamp optional, - AppInsId appInsId, + AppInsId appInsId optional, + Json.String appName, BwRequestType requestType, SessionFilter sessionFilter optional, FixedBWPriority fixedBWPriority optional, @@ -29,14 +33,17 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Conform to JSON merge patch format and processing rules specified IETF RFC 7396 [8], this type represents the attributes whose value are allowed to be updated with HTTP PATCH method in content format JSON + * @member allocationId Bandwidth allocation instance identifier * @member appInsId Application instance identifier * @member requestType Numeric value (0 - 255) corresponding to specific type of consumer * @member sessionFilter Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION * @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 */ type record BwInfoDeltas { + Json.String allocationId, AppInsId appInsId, BwRequestType requestType, SessionFilter sessionFilter optional, @@ -46,22 +53,20 @@ module TrafficManagementAPI_TypesAndValues { } /** - * @desc Time stamp description - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc Bandwidth allocation instance identifier + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds - } + type Json.String AllocationId; /** * @desc Application instance identifier + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 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 */ type enumerated BwRequestType { APPLICATION_SPECIFIC_BW_ALLOCATION (0), @@ -70,17 +75,22 @@ module TrafficManagementAPI_TypesAndValues { variant "JSON: as number" } + /** + * @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 + */ type enumerated MtsRequestType { - APPLICATION_SPECIFIC_MTS_ALLOCATION (0), - SESSION_SPECIFIC_MTS_ALLOCATION (1) + APPLICATION_SPECIFIC_MTS_SESSION (0), + FLOW_SPECIFIC_MTS_SESSION (1) } with { variant "JSON: as number" } /** * @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 */ - type record of SessionFilterItems SessionFilter; + type record of SessionFilterItem SessionFilter; /** * @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 * @member sourceIp Source address identity of session (including range) @@ -88,8 +98,9 @@ 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 */ - type record SessionFilterItems { + type record SessionFilterItem { SourceIp sourceIp optional, SourcePort sourcePort optional, DstAddress dstAddress optional, @@ -98,7 +109,8 @@ module TrafficManagementAPI_TypesAndValues { } /** - * @desc Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document + * @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 */ type enumerated FixedBWPriority { reserved @@ -106,22 +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 */ 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 */ - type UInt32 Seconds; + 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 */ - type UInt32 NanoSeconds; + 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 */ type enumerated AllocationDirection { Downlink, @@ -131,26 +147,31 @@ 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 */ 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 */ - type record of Json.String SourcePort; + 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 */ 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 */ - type record of Json.String DstPort; + type Json.UInteger DstPort; /** * @desc Protocol number + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo */ type Json.String Protocol; @@ -159,19 +180,24 @@ module TrafficManagementAPI_TypesAndValues { * @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 */ type record MtsCapabilityInfo { - TimeStamp timeStamp optional, + TimeStamp timeStamp optional, MtsAccessInfos mtsAccessInfo, - MtsModes mtsMode + MtsModes mtsMode } + /** + * @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 + */ type enumerated MtsMode { - LowCost (0), - LowLatency (1), + LowCost (0), + LowLatency (1), HighThroughput (2), - Redundancy (3), - QoS (4) + Redundancy (3), + QoS (4) } with { variant "JSON: as number" } @@ -182,84 +208,147 @@ 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 */ type record MtsAccessInfo { - AccessId accessId, + AccessId accessId, AccessType accessType, - Metered metered + Metered metered } type record of MtsAccessInfo MtsAccessInfos; - type UInt32 AccessId; + /** + * @desc Unique identifier for the access network connection + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 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 + */ type enumerated AccessType { - Unknown (0), - IEEE802_11_Based (1), - ThreeGPP_Based (2), - Fixed_Access (3), - IEEE802_11abg (11), - IEEE802_11abgn (12), - IEEE802_11abgnac (13), - IEEE802_11abgnacax (14), - IEEE802_11bgn (15), + Unknown (0), + IEEE802_11_Based (1), + ThreeGPP_Based (2), + Fixed_Access (3), + IEEE802_11abg (11), + IEEE802_11abgn (12), + IEEE802_11abgnac (13), + IEEE802_11abgnacax (14), + IEEE802_11bgn (15), ThreeGPP_GERAN_UTRA (31), - ThreeGPP_E_UTRA (32), - Three3GPP_NR (33) + ThreeGPP_E_UTRA (32), + Three3GPP_NR (33) } with { variant "JSON: as number" } + + /** + * @desc Numeric value (0-255) + * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + */ type enumerated Metered { CxNotMetered (0), - CxMetered (1), - Unknown (2) + CxMetered (1), + Unknown (2) } with { variant "JSON: as number" } /** * @desc The information on access network connection as defined below + * @member sessionId MTS session instance identifier * @member timeStamp Time stamp to indicate when the corresponding information elements are sent * @member appInsId Application instance identifier + * @member appName Name of the application * @member requestType Numeric value (0 - 255) corresponding to specific type of consumer * @member flowFilter Traffic flow filtering criteria, applicable only * @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 */ type record MtsSessionInfo { - TimeStamp timeStamp optional, - AppInsId appInsId, - MtsRequestType requestType, - FlowFilter flowFilter optional, - QosD qosD, - MtsMode mtsMode, + SessionId sessionId optional, + TimeStamp timeStamp optional, + AppInsId appInsId, + Json.String appName optional, + MtsRequestType requestType, + FlowFilter flowFilter, + QosD qosD, + MtsMode mtsMode, TrafficDirection trafficDirection } type record of MtsSessionInfo MtsSessionInfos - type SessionFilter FlowFilter; + /** + * @desc MTS session instance identifier + * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + */ + type Json.String SessionId; + + /** + * @desc Traffic flow filtering criteria, applicable only if when requestType is set as FLOW_SPECIFIC_MTS_SESSION + * @member sourceIp Source address identity of session (including range) + * @member sourcePort Source port identity of session + * @member dstAddress Destination address identity of session (including range) + * @member dstPort Destination port identity of session + * @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 + */ + type record FlowFilterItem { + SourceIp sourceIp optional, + SourcePort sourcePort optional, + DstAddress dstIp optional, + DstPort dstPort optional, + Protocol protocol optional, + Dscp dscp optional, + Flowlabel flowlabel optional + } + type record of FlowFilterItem FlowFilter; + /** + * @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 + */ type AllocationDirection TrafficDirection; /** - * @desc + * @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 + */ + 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 + */ + type Json.UInteger Flowlabel; + + /** + * @desc QoS requirement description of the MTS session, applicable only if mtsMode = 4 (QoS) * @member minTpt Minimal throughput in [kbps] * @member maxLatency Tolerable (one-way) delay in [10 nanoseconds] * @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 */ type record QosD { - UInt32 minTpt optional, - UInt32 maxLatency optional, - UInt32 maxLoss optional, - UInt32 maxJitter optional, - Priority priority optional + Json.UInteger minTpt optional, + Json.UInteger maxLatency optional, + Json.UInteger maxLoss optional, + Json.UInteger maxJitter optional, + Priority priority optional } type enumerated Priority { - Low (0), - Medium (1), - High (2), + Low (0), + Medium (1), + High (2), Critical (3) } with { variant "JSON: as number" diff --git a/ttcn/LibMec/UEAppInterfaceAPI/json/UEAppInterfaceAPI.json b/ttcn/LibMec/UEAppInterfaceAPI/json/UEAppInterfaceAPI.json deleted file mode 100644 index c5ee3fcda73baa582e50733f936af0fb7c26a484..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/UEAppInterfaceAPI/json/UEAppInterfaceAPI.json +++ /dev/null @@ -1,618 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "UE Application Interface API", - "version": "1.1.1", - "description": "The ETSI MEC ISG MEC016 UE Application Interface API described using OpenAPI", - "license": { - "name": "ETSI Forge copyright notice", - "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" - }, - "contact": { - "email": "cti_support@etsi.org" - } - }, - "externalDocs": { - "description": "ETSI GS MEC016 UE Application Interface API, V1.1.1", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/016/01.01.01_60/gs_MEC016v010101p.pdf" - }, - "security": [ - { - "OauthSecurity": [ - "all" - ] - } - ], - "servers": [ - { - "url": "http://127.0.0.1:8081/mx2/v1" - }, - { - "url": "https://127.0.0.1:8081/mx2/v1" - } - ], - "tags": [ - { - "name": "appList" - }, - { - "name": "appContext" - } - ], - "paths": { - "/app_list": { - "get": { - "description": "Used to query information about the available MEC applications.", - "operationId": "AppList_GET", - "tags": [ - "appList" - ], - "parameters": [ - { - "$ref": "#/components/parameters/Query.AppName" - }, - { - "$ref": "#/components/parameters/Query.AppProvider" - }, - { - "$ref": "#/components/parameters/Query.AppSoftVersion" - }, - { - "$ref": "#/components/parameters/Query.ServiceCont" - }, - { - "$ref": "#/components/parameters/Query.VendorId" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/AppList" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "401": { - "$ref": "#/components/responses/Error.401" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/app_contexts": { - "post": { - "description": "The POST method can be used to create a new application context. Upon success, the response contains entity body describing the created application context.", - "operationId": "AppContext_POST", - "tags": [ - "appContext" - ], - "requestBody": { - "$ref": "#/components/requestBodies/AppContext" - }, - "responses": { - "201": { - "$ref": "#/components/responses/AppContext" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "401": { - "$ref": "#/components/responses/Error.401" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - }, - "/app_contexts/{contextId}": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.ContextId" - } - ], - "put": { - "description": "The PUT method is used to update the callback reference of the existing application context. Upon successful operation, the target resource is updated with new callback reference.", - "operationId": "AppContextId_PUT", - "tags": [ - "appContext" - ], - "requestBody": { - "$ref": "#/components/requestBodies/AppContext" - }, - "responses": { - "204": { - "description": "No Content." - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "401": { - "$ref": "#/components/responses/Error.401" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "delete": { - "description": "The DELETE method is used to delete the resource that represents the existing application context.", - "operationId": "AppContextId_DEL", - "tags": [ - "appContext" - ], - "responses": { - "204": { - "description": "No Content" - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "401": { - "$ref": "#/components/responses/Error.401" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - } - } - }, - "components": { - "parameters": { - "Query.AppName": { - "name": "appName", - "in": "query", - "description": "Name to identify the MEC application", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.AppProvider": { - "name": "appProvider", - "in": "query", - "description": "Provider of the MEC application", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.AppSoftVersion": { - "name": "appSoftVersion", - "in": "query", - "description": "Software version of the MEC application", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.ServiceCont": { - "name": "serviceCont", - "in": "query", - "description": "Required service continuity mode for this application", - "required": false, - "schema": { - "type": "string", - "enum": [ - "SERVICE_CONTINUITY_NOT_REQUIRED", - "SERVICE_CONTINUITY_REQUIRED" - ] - } - }, - "Query.VendorId": { - "name": "vendorId", - "in": "query", - "description": "Vendor identifier", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Path.ContextId": { - "name": "contextId", - "in": "path", - "description": "Uniquely identifies the application context in the MEC system. It is assigned by the MEC system and included in the response to an AppContext create.", - "required": true, - "schema": { - "type": "string" - } - } - }, - "requestBodies": { - "AppContext": { - "description": "Uniquely identifies the application context in the MEC system. It is assigned by the MEC system and included in the response to an AppContext create.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - }, - "required": true - } - }, - "responses": { - "AppContext": { - "description": "The response body contains the Application Context as it was created by the MEC system", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AppContext" - } - } - } - }, - "AppList": { - "description": "The response body contains the ApplicationList resource available for the querying UE application", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApplicationList" - } - } - } - }, - "Error.400": { - "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.401": { - "description": "Unauthorized. It is used when the client did not submit the appropriate credentials.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.403": { - "description": "Forbidden. The operation is not allowed given the current status of the resource. ", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "Error.404": { - "description": "Not Found. It is used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - }, - "securitySchemes": { - "OauthSecurity": { - "type": "oauth2", - "flows": { - "clientCredentials": { - "tokenUrl": "https://oauth.exampleAPI/token", - "scopes": { - "all": "Single oauth2 scope for API" - } - } - } - } - }, - "schemas": { - "Empty": { - "description": "Empty schema" - }, - "ProblemDetails": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/Problem.type" - }, - "title": { - "$ref": "#/components/schemas/Problem.title" - }, - "status": { - "$ref": "#/components/schemas/Problem.status" - }, - "detail": { - "$ref": "#/components/schemas/Problem.detail" - }, - "instance": { - "$ref": "#/components/schemas/Problem.instance" - } - } - }, - "Problem.type": { - "type": "string", - "format": "uri", - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" - }, - "Problem.title": { - "type": "string", - "description": "A short, human-readable summary of the problem type" - }, - "Problem.status": { - "type": "integer", - "format": "uint32", - "description": "The HTTP status code for this occurrence of the problem" - }, - "Problem.detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem" - }, - "Problem.instance": { - "type": "string", - "format": "uri", - "description": "A URI reference that identifies the specific occurrence of the problem" - }, - "ApplicationList": { - "description": "Information on available applications", - "type": "object", - "properties": { - "appInfo": { - "$ref": "#/components/schemas/AppInfo" - }, - "vendorSpecificExt": { - "$ref": "#/components/schemas/VendorSpecificExt" - } - } - }, - "AppContext": { - "description": "Information on application context created by the MEC system", - "type": "object", - "required": [ - "contextId", - "associateUeAppId", - "appInfo" - ], - "properties": { - "contextId": { - "$ref": "#/components/schemas/ContextId" - }, - "associateUeAppId": { - "$ref": "#/components/schemas/AssociateUeAppId" - }, - "callbackReference": { - "$ref": "#/components/schemas/CallbackReference" - }, - "appInfo": { - "$ref": "#/components/schemas/RequiredAppInfo" - } - } - }, - "NotificationEvent": { - "description": "The parameters used in the method \"Receiving notification events\".", - "type": "object", - "required": [ - "referenceURI" - ], - "properties": { - "referenceURI": { - "$ref": "#/components/schemas/ReferenceURL" - } - } - }, - "VendorSpecificExtList": { - "description": "Extension for vendor specific information.", - "type": "array", - "minItems": 0, - "items": { - "$ref": "#/components/schemas/VendorSpecificExt" - } - }, - "VendorSpecificExt": { - "description": "Extension for vendor-specific information", - "required": [ - "vendorId" - ], - "properties": { - "vendorId": { - "$ref": "#/components/schemas/VendorId" - } - } - }, - "ContextId": { - "description": "Uniquely identifies the application context in the MEC system. Assigned by the MEC system and included in the response. The length of the value shall not exceed 32 characters.", - "type": "string" - }, - "AssociateUeAppId": { - "description": "Uniquely identifies the UE application. Included in the request. The length of the value shall not exceed 32 characters.", - "type": "string" - }, - "VendorId": { - "description": "Vendor identifier. The length of the value shall not exceed 32 characters. The rest of the structure of this vendor specific extension is not defined", - "type": "string" - }, - "AppInfo": { - "description": "User applications available for the UE application", - "type": "array", - "items": { - "$ref": "#/components/schemas/AppInfoList" - } - }, - "AppInfoList": { - "type": "object", - "required": [ - "appName", - "appProvider", - "appDescription" - ], - "properties": { - "appName": { - "$ref": "#/components/schemas/AppName" - }, - "appProvider": { - "$ref": "#/components/schemas/AppProvider" - }, - "appSoftVersion": { - "$ref": "#/components/schemas/AppSoftVersion" - }, - "appDescription": { - "$ref": "#/components/schemas/AppDescription" - }, - "appCharcs": { - "$ref": "#/components/schemas/AppCharcs" - } - } - }, - "RequiredAppInfo": { - "description": "Included in the request", - "type": "object", - "required": [ - "appName", - "appProvider", - "referenceURL" - ], - "properties": { - "appName": { - "$ref": "#/components/schemas/AppName" - }, - "appProvider": { - "$ref": "#/components/schemas/AppProvider" - }, - "appSoftVersion": { - "$ref": "#/components/schemas/AppSoftVersion" - }, - "appDescription": { - "$ref": "#/components/schemas/AppDescription" - }, - "referenceURL": { - "$ref": "#/components/schemas/ReferenceURL" - }, - "appPackageSource": { - "$ref": "#/components/schemas/AppPackageSource" - } - } - }, - "AppCharcs": { - "description": "The application characteristics relate to the system resources consumed by the application. UE application can use this information e.g., for estimating the cost of use of the application or for the expected user experience", - "type": "object", - "properties": { - "memory": { - "$ref": "#/components/schemas/Memory" - }, - "storage": { - "$ref": "#/components/schemas/Storage" - }, - "latency": { - "$ref": "#/components/schemas/Latency" - }, - "bandwidth": { - "$ref": "#/components/schemas/Bandwidth" - }, - "serviceCont": { - "$ref": "#/components/schemas/ServiceCont" - } - } - }, - "Memory": { - "description": "The maximum size in Mbytes of the memory resource reserved for the MEC application instance in the MEC system", - "type": "integer", - "format": "uint32" - }, - "Storage": { - "description": "The maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system", - "type": "integer", - "format": "uint32" - }, - "Latency": { - "description": "The target round trip time in milliseconds supported by the MEC system for the MEC application instance", - "type": "integer", - "format": "uint32" - }, - "Bandwidth": { - "description": "The required connection bandwidth in kbit/s for the use of the mobile edge application instance", - "type": "integer", - "format": "uint32" - }, - "ServiceCont": { - "description": "Required service continuity mode for this application.", - "type": "string", - "enum": [ - "SERVICE_CONTINUITY_NOT_REQUIRED", - "SERVICE_CONTINUITY_REQUIRED" - ] - }, - "AppName": { - "description": "Name of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string" - }, - "AppProvider": { - "description": "Provider of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string" - }, - "AppSoftVersion": { - "description": "Software version of the MEC application. The length of the value shall not exceed 32 characters.", - "type": "string" - }, - "AppDescription": { - "description": "Human readable description of the MEC application. NOTE the language support may be limited. The length of the value shall not exceed 128 characters.", - "type": "string" - }, - "CallbackReference": { - "description": "URI assigned by the UE application to receive application lifecycle related notifications. Included in the request. This subscription stays alive for the lifetime of the application context.", - "type": "string", - "format": "uri" - }, - "ReferenceURL": { - "description": "Address of the user application. Used as the reference URL for the application. Assigned by the MEC system and included in the response", - "type": "string", - "format": "uri" - }, - "AppPackageSource": { - "description": "URI of the application package. Included in the request if the application is not one in the ApplicationList. appPackageSource enables on-boarding of the application package into the MEC system. The application package shall comply with the definitions in clause 6.2.1.2 of ETSI GS MEC 010-2", - "type": "string", - "format": "uri" - } - } - } -} \ No newline at end of file diff --git a/ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json b/ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json deleted file mode 100644 index cc5098e9ed472c9dec4e55745584d9e974327ce8..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/UEidentityAPI/json/UEidentityAPI.json +++ /dev/null @@ -1,310 +0,0 @@ -{ - "openapi": "3.0.2", - "info": { - "title": "UE Identity API", - "version": "1.1.1", - "description": "The ETSI MEC ISG MEC014 UE Identity API described using OpenAPI", - "license": { - "name": "ETSI Forge copyright notice", - "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt" - }, - "contact": { - "email": "cti_support@etsi.org" - } - }, - "externalDocs": { - "description": "ETSI GS MEC014 UE Identity API, V1.1.1", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/014/01.01.01_60/gs_mec014v010101p.pdf" - }, - "security": [ - { - "OauthSecurity": [ - "all" - ] - } - ], - "servers": [ - { - "url": "http://127.0.0.1:8081/ui/v1" - }, - { - "url": "https://127.0.0.1:8081/ui/v1" - } - ], - "tags": [ - { - "name": "ueIdentityTagInfo" - } - ], - "paths": { - "/{appInstanceId}/ue_identity_tag_info": { - "parameters": [ - { - "$ref": "#/components/parameters/Path.AppInstanceId" - } - ], - "get": { - "description": "Retrieves information about a specific UeIdentityTagInfo resource", - "operationId": "UeIdentityTagInfo_GET", - "tags": [ - "ueIdentityTagInfo" - ], - "parameters": [ - { - "$ref": "#/components/parameters/Query.UeIdentityTag" - } - ], - "responses": { - "200": { - "description": "It is used to indicate nonspecific success. The response body contains a representation of the UeIdentityTagInfo resource.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UeIdentityTagInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - } - } - }, - "put": { - "description": "Register/De-register the information about specific a UeIdentityTagInfo resource", - "operationId": "UeIdentityTagInfo_PUT", - "tags": [ - "ueIdentityTagInfo" - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UeIdentityTagInfo" - } - } - }, - "description": "'The updated \"state\" for each included UE Identity tag is included in the entity body of the request'", - "required": true - }, - "responses": { - "200": { - "description": "It is used to indicate success. The response body contains a representation of the UeIdentityTagInfo resource", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UeIdentityTagInfo" - } - } - } - }, - "400": { - "$ref": "#/components/responses/Error.400" - }, - "403": { - "$ref": "#/components/responses/Error.403" - }, - "404": { - "$ref": "#/components/responses/Error.404" - }, - "412": { - "$ref": "#/components/responses/Error.412" - } - } - } - } - }, - "components": { - "parameters": { - "Path.AppInstanceId": { - "name": "appInstanceId", - "in": "path", - "description": "Represents a mobile edge application instance", - "required": true, - "schema": { - "type": "string" - } - }, - "Query.UeIdentityTag": { - "name": "ueIdentityTag", - "in": "query", - "description": "Represents a UE", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "responses": { - "Error.400": { - "description": "Bad Request. Incorrect parameters were passed in the request.In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.403": { - "description": "Forbidden. The operation is not allowed given the current status of the resource. More information should be provided in the \"detail\" attribute of the \"ProblemDetails\" structure.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "Error.404": { - "description": "Not Found. The client provided a URI that cannot be mapped to a valid resource URL. In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - }, - "Error.412": { - "description": "Precondition Failed. It is used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts.In the returned ProblemDetails structure, the \"detail\" attribute should convey more information about the error.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - }, - "text/plain": { - "schema": { - "$ref": "#/components/schemas/Empty" - } - } - } - } - }, - "securitySchemes": { - "OauthSecurity": { - "type": "oauth2", - "flows": { - "clientCredentials": { - "tokenUrl": "https://oauth.exampleAPI/token", - "scopes": { - "all": "Single oauth2 scope for API" - } - } - } - } - }, - "schemas": { - "Empty": { - "description": "Empty schema" - }, - "ProblemDetails": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/Problem.type" - }, - "title": { - "$ref": "#/components/schemas/Problem.title" - }, - "status": { - "$ref": "#/components/schemas/Problem.status" - }, - "detail": { - "$ref": "#/components/schemas/Problem.detail" - }, - "instance": { - "$ref": "#/components/schemas/Problem.instance" - } - } - }, - "Problem.type": { - "type": "string", - "format": "uri", - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type" - }, - "Problem.title": { - "type": "string", - "description": "A short, human-readable summary of the problem type" - }, - "Problem.status": { - "type": "integer", - "format": "uint32", - "description": "The HTTP status code for this occurrence of the problem" - }, - "Problem.detail": { - "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem" - }, - "Problem.instance": { - "type": "string", - "format": "uri", - "description": "A URI reference that identifies the specific occurrence of the problem" - }, - "UeIdentityTagInfo": { - "description": "information of UE identity tag used in UE Identity feature", - "type": "object", - "required": [ - "ueIdentityTags" - ], - "properties": { - "ueIdentityTags": { - "$ref": "#/components/schemas/UeIdentityTags" - } - } - }, - "UeIdentityTags": { - "description": "1 to N tags presented by a ME Application instance to a ME Platform", - "type": "array", - "items": { - "required": [ - "ueIdentityTag", - "state" - ], - "properties": { - "ueIdentityTag": { - "$ref": "#/components/schemas/UeIdentityTag" - }, - "state": { - "$ref": "#/components/schemas/State" - } - } - } - }, - "UeIdentityTag": { - "description": "Specific tag presented by a ME Application instance to a ME Platform", - "type": "string", - "example": "UeTagA" - }, - "State": { - "description": "Status of the resource ueIdentityTagInfo", - "type": "string", - "enum": [ - "UNREGISTERED", - "REGISTERED" - ], - "example": "REGISTERED" - } - } - } -} \ No newline at end of file diff --git a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn index 14e9cb1ae3f6cba67b3ecfe651ce6a867e5af4fa..5b1af3a541dd844b513591fc973c533c0c40d736 100644 --- a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn @@ -1,8 +1,8 @@ /** - * @author ETSI / STF569 + * @author ETSI / STF569 / TTF T027 * @version $URL$ * $Id$ - * @desc Module containing types and values for UeIdentiyAPI protocol + * @desc Module containing types and values for ETSI GS MEC 014 V3.1.1 (2023-06) * @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. @@ -13,13 +13,10 @@ module UEidentityAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; - /** * @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 Clause 7.2 Global definitions and resource structure + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record UeIdentityTagInfo { UeIdentityTags ueIdentityTags @@ -27,13 +24,13 @@ module UEidentityAPI_TypesAndValues { /** * @desc Specific tag presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type Json.String UeIdentityTag; /** * @desc Status of the resource ueIdentityTagInfo - * @see ETSI GS MEC 014 Clause 6.2.2 Type: UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type enumerated State { UNREGISTERED, @@ -45,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 Clause 6.2.2 Type: UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record UeIdentityTagItem { Json.String ueIdentityTag, @@ -54,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 Clause 6.2.2 Type: UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record of UeIdentityTagItem UeIdentityTags; diff --git a/ttcn/LibMec/V2XInformationServiceAPI/json/MEC030_V2XInformationService.yaml b/ttcn/LibMec/V2XInformationServiceAPI/json/MEC030_V2XInformationService.yaml deleted file mode 100644 index 4dc7cf39c11dac42c53e343a293c427dd1285efe..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/V2XInformationServiceAPI/json/MEC030_V2XInformationService.yaml +++ /dev/null @@ -1,1568 +0,0 @@ -info: - title: "ETSI GS MEC 030 V2X Information Service API" - version: 2.1.1 - description: "ETSI GS MEC 030 V2X Information Service API described using OpenAPI." - contact: - name: ETSI Forge - email: cti_support@etsi.org - url: https://forge.etsi.org/rep/mec/gs030-vis-api - license: - name: BSD-3-Clause - url: 'https://forge.etsi.org/legal-matters' -externalDocs: - description: "ETSI GS MEC 030 V2X Information Service API, v2.1.1" - url: 'https://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.01.01_60/gs_mec030v020101p.pdf' -openapi: 3.0.0 -servers: - - url: 'https://localhost/vis/v1' -tags: - - name: queries - description: Queries - - name: subscription - description: Subscription - -paths: - /queries/uu_unicast_provisioning_info: - get: - tags: - - 'queries' - summary: 'Used to query provisioning information for V2X communication over Uu unicast.' - description: 'Used to query provisioning information for V2X communication over Uu unicast.' - operationId: prov_info_uu_unicastGET - parameters: - - in: query - name: location_info - schema: - type: string - required: true - description: 'Comma separated list of locations to identify a cell of a base station or a particular geographical area' - - responses: - '200': - description: 'A response body containing the Uu unicast provisioning information. ' - content: - application/json: - schema: - $ref: '#/components/schemas/UuUnicastProvisioningInfo' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - /queries/uu_mbms_provisioning_info: - get: - tags: - - 'queries' - summary: 'retrieve information required for V2X communication over Uu MBMS.' - description: 'retrieve information required for V2X communication over Uu MBMS.' - operationId: prov_info_uu_mbmsGET - parameters: - - in: query - name: location_info - schema: - type: string - required: true - description: 'omma separated list of locations to identify a cell of a base station or a particular geographical area' - - responses: - '200': - description: 'A response body containing the Uu unicast provisioning information. ' - content: - application/json: - schema: - $ref: '#/components/schemas/UuMbmsProvisioningInfo' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - /queries/pc5_provisioning_info: - get: - tags: - - 'queries' - summary: 'Query provisioning information for V2X communication over PC5.' - description: 'Query provisioning information for V2X communication over PC5.' - operationId: prov_infoGET - parameters: - - in: query - name: location_info - schema: - type: string - required: true - description: 'Comma separated list of locations to identify a cell of a base station or a particular geographical area' - responses: - '200': - description: 'A response body containing the PC5 provisioning information is returned.' - content: - application/json: - schema: - $ref: '#/components/schemas/Pc5ProvisioningInfo' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - /provide_predicted_qos: - post: - tags: - - 'QoS' - summary: 'Request the predicted QoS correspondent to potential routes of a vehicular UE.' - description: 'Request the predicted QoS correspondent to potential routes of a vehicular UE.' - operationId: predicted_qosPOST - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/PredictedQos' - responses: - '200': - description: 'The response body shall contain the predicted QoS corresponding to potential routes of a vehicular UE' - content: - application/json: - schema: - $ref: '#/components/schemas/PredictedQos' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - - /publish_v2x_message: - post: - tags: - - 'V2X_msg' - summary: 'Used to publish a V2X message.' - description: 'Used to publish a V2X message.' - operationId: v2x_messagePOST - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/V2xMsgPublication' - responses: - '204': - $ref: '#/components/responses/204' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - /subscriptions: - get: - tags: - - 'subscription' - summary: 'Request information about the subscriptions for this requestor.' - description: 'Request information about the subscriptions for this requestor.' - operationId: subGET - parameters: - - in: query - name: subscription_type - description: 'Query parameter to filter on a specific subscription type. Permitted values: prov_chg_uu_uni: provisioning information change for V2X communication over Uuunicast prov_chg_uu_mbms: provisioning information change for V2X communication over Uu MBMS prov_chg_uu_pc5: provisioning information change for V2X communication over PC5. v2x_msg: V2X interoperability message' - schema: - type: string - required: false - responses: - '200': - description: 'A response body containing the list of links to requestor subscriptions is returned.' - content: - application/json: - schema: - $ref: '#/components/schemas/SubscriptionLinkList' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - post: - tags: - - 'subscription' - summary: ' create a new subscription to VIS notifications.' - description: ' create a new subscription to VIS notifications.' - operationId: subPOST - requestBody: - required: true - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - responses: - '201': - description: 'In the returned NotificationSubscription structure, the created subscription is described using the appropriate data type.' - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '415': - $ref: '#/components/responses/415' - '422': - $ref: '#/components/responses/422' - '429': - $ref: '#/components/responses/429' - - callbacks: - notification: - '{$request.body#/callbackReference}': - post: - summary: 'Callback POST used to send a notification' - description: 'A notification from VIS.' - operationId: notificationPOST - requestBody: - description: Subscription notification - required: true - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniNotification' - - $ref: '#/components/schemas/ProvChgUuMbmsNotification' - - $ref: '#/components/schemas/ProvChgPc5Notification' - - $ref: '#/components/schemas/V2xMsgNotification' - responses: - '204': - $ref: '#/components/responses/204' - - /subscriptions/{subscriptionId}: - parameters: - - in: path - name: subscriptionId - description: 'Refers to created subscription, where the VIS API allocates a unique resource name for this subscription' - schema: - type: string - required: true - - - get: - tags: - - 'subscription' - summary: 'Retrieve information about this subscription.' - description: 'Retrieve information about this subscription.' - operationId: individualSubscriptionGET - - responses: - '200': - description: 'A response body containing the data type describing the specific RNI event subscription is returned' - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '406': - $ref: '#/components/responses/406' - '429': - $ref: '#/components/responses/429' - - put: - tags: - - 'subscription' - summary: 'Used to update the existing subscription.' - description: 'Used to update the existing subscription.' - operationId: individualSubscriptionPUT - requestBody: - required: true - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - responses: - '200': - description: 'A response body containing data type describing the updated subscription is returned' - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/ProvChgUuUniSubscription' - - $ref: '#/components/schemas/ProvChgUuMbmsSubscription' - - $ref: '#/components/schemas/ProvChgPc5Subscription' - - $ref: '#/components/schemas/V2xMsgSubscription' - '400': - $ref: '#/components/responses/400' - '401': - $ref: '#/components/responses/401' - - '403': - $ref: '#/components/responses/403' - - '404': - $ref: '#/components/responses/404' - - '406': - $ref: '#/components/responses/406' - - '412': - $ref: '#/components/responses/412' - - '422': - $ref: '#/components/responses/422' - - '429': - $ref: '#/components/responses/429' - delete: - tags: - - 'subscription' - summary: 'Used to cancel the existing subscription.' - description: 'Used to cancel the existing subscription.' - operationId: individualSubscriptionDELETE - responses: - '204': - $ref: '#/components/responses/204' - '401': - $ref: '#/components/responses/401' - '403': - $ref: '#/components/responses/403' - '404': - $ref: '#/components/responses/404' - '429': - $ref: '#/components/responses/429' - - # /notifitication_end_point_provided_by_client - #post: - -components: - schemas: - CellId: - properties: - cellId: - description: E-UTRAN Cell Identity as a bit string (size (28)). - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - cellId - type: object - x-etsi-ref: 6.6.2 - Earfcn: - properties: - earfcn: - description: E-UTRA Absolute Radio Frequency Channel Number, range (0... 65535) - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Integer - required: - - earfcn - type: object - x-etsi-ref: 6.6.3 - Ecgi: - properties: - cellId: - # description': The E-UTRAN Cell Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': CellId - $ref: '#/components/schemas/CellId' - plmn: - # description': Public Land Mobile Network Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Plmn - $ref: '#/components/schemas/Plmn' - required: - - plmn - - cellId - type: object - x-etsi-ref: 6.5.5 - FddInfo: - properties: - dlEarfcn: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Earfcn - $ref: '#/components/schemas/Earfcn' - dlTransmissionBandwidth: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TransmissionBandwidth - $ref: '#/components/schemas/TransmissionBandwidth' - ulEarfcn: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Earfcn - $ref: '#/components/schemas/Earfcn' - ulTransmissionBandwidth: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TransmissionBandwidth - $ref: '#/components/schemas/TransmissionBandwidth' - required: - - ulEarfcn - - dlEarfcn - - ulTransmissionBandwidth - - dlTransmissionBandwidth - type: object - x-etsi-ref: 6.5.6 - - LocationInfo.geoArea: - description: Information of a geographical area. - properties: - latitude: - description: 'Latitude (DATUM = WGS84) -90 to 90 in decimal degree format DDD.ddd' - format: Float - type: number - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Float - longitude: - description: 'Longitude (DATUM = WGS84)-180 to 180 in decimal degree format DDD.ddd' - format: Float - type: number - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Float - required: - - latitude - - longitude - type: object - x-etsi-mec-cardinality: 0..1 - - LocationInfo: - properties: - ecgi: - # description': E-UTRAN CelI Global Identifier of the serving cell. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': Ecgi - $ref: '#/components/schemas/Ecgi' - geoArea: - $ref: '#/components/schemas/LocationInfo.geoArea' - type: object - x-etsi-notes: "NOTE:\tEither ecgi or geoArea shall be present, but not both." - x-etsi-ref: 6.5.3 - Pc5NeighbourCellInfo: - properties: - ecgi: - # description': E-UTRAN CelI Global Identifier. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Ecgi - $ref: '#/components/schemas/Ecgi' - plmn: - # description': Public Land Mobile Network Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Plmn - $ref: '#/components/schemas/Plmn' - siV2xConfig: - description: V2X sidelink communication configuration, as defined in ETSI TS 136 331 [i.11]. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': SystemInformationBlockType21 (as defined in ETSI TS 136 331 [i.11]) - type: string - required: - - plmn - - ecgi - - siV2xConfig - type: object - x-etsi-ref: 6.5.12 - - - Pc5ProvisioningInfo.proInfoPc5: - description: The provisioning information per location as defined below. - - properties: - dstLayer2Id: - description: "For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID, see ETSI TS\_136\_321 [i.12].\nPLMN operators coordinate to make sure Destination Layer-2 ID(s) for different V2X services are configured in a consistent manner." - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5. - items: - $ref: '#/components/schemas/Pc5NeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: Pc5NeighbourCellInfo - required: - - locationInfo - - dstLayer2Id - - Pc5ProvisioningInfo: - properties: - proInfoPc5: - type: array - items: - $ref: '#/components/schemas/Pc5ProvisioningInfo.proInfoPc5' - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - required: - - proInfoPc5 - type: object - x-etsi-ref: 6.2.4 - - Plmn: - properties: - mcc: - description: The Mobile Country Code part of PLMN Identity. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - mnc: - description: The Mobile Network Code part of PLMN Identity. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - mcc - - mnc - type: object - x-etsi-ref: 6.5.4 - - PredictedQos.routes.routeInfo: - required: - - location - properties: - location: - $ref: '#/components/schemas/LocationInfo' - time: - $ref: '#/components/schemas/TimeStamp' - rsrp: - description: 'Reference Signal Received Quality as defined in ETSI TS 136 214 [i.13]. Shall only be included in the response' - type: integer - format: Uint8 - - rsrq: - description: 'Reference Signal Received Quality as defined in ETSI TS 136 214 [i.13]. Shall only be included in the response' - type: integer - format: Uint8 - - PredictedQos.routes: - properties: - routeinfo: - description: 'Information relating to a specific route. The first structure shall relate to the route origin and the last to the route destination. Intermediate waypoint locations may also be provided. ' - type: array - minItems: 2 - items: - $ref: '#/components/schemas/PredictedQos.routes.routeInfo' - required: - - routeinfo - - PredictedQos: - description: 'predicted QoS of a vehicular UE' - properties: - timeGranularity: - $ref: '#/components/schemas/TimeStamp' - locationGranularity: - description: 'Granularity of visited location. Measured in meters' - type: string - routes: - type: array - items: - $ref: '#/components/schemas/PredictedQos.routes' - required: - - locationGranularity - - routes - type: object - x-etsi-mec-cardinality: 0..1 - - - ProvChgPc5Notification: - properties: - dstLayer2Id: - description: For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID, see ETSI TS 136 321 [i.12]. - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: String - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5. - items: - $ref: '#/components/schemas/Pc5NeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: Pc5NeighbourCellInfo - notificationType: - description: Shall be set to "ProvChgPc5Notification". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - required: - - notificationType - - locationInfo - type: object - x-etsi-ref: 6.4.4 - - ProvChgPc5Subscription.links: - description: Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - properties: - self: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - self - type: object - x-etsi-mec-cardinality: 0..1 - - ProvChgPc5Subscription.filterCriteria: - description: List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response. - properties: - dstLayer2Id: - description: For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID, see ETSI TS 136 321 [i.12]. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5. - items: - $ref: '#/components/schemas/Pc5NeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: Pc5NeighbourCellInfo - required: - - locationInfo - - dstLayer2Id - type: object - x-etsi-mec-cardinality: '1' - ProvChgPc5Subscription: - properties: - _links: - $ref: '#/components/schemas/ProvChgPc5Subscription.links' - callbackReference: - description: URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - expiryDeadline: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - filterCriteria: - $ref: '#/components/schemas/ProvChgPc5Subscription.filterCriteria' - subscriptionType: - description: Shall be set to "ProvChgPc5Subscription". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - subscriptionType - - callbackReference - - filterCriteria - type: object - x-etsi-ref: 6.3.4 - ProvChgUuMbmsNotification: - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS. - items: - $ref: '#/components/schemas/UuMbmsNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuMbmsNeighbourCellInfo - notificationType: - description: Shall be set to "ProvChgUuMbmsNotification". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - v2xServerUsd: - # description': User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': V2xServerUsd - $ref: '#/components/schemas/V2xServerUsd' - required: - - notificationType - - locationInfo - type: object - x-etsi-ref: 6.4.3 - ProvChgUuMbmsSubscription.links: - description: Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - properties: - self: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - self - type: object - x-etsi-mec-cardinality: 0..1 - - ProvChgUuMbmsSubscription.filterCriteria: - description: List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response. - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS. - items: - $ref: '#/components/schemas/UuMbmsNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuMbmsNeighbourCellInfo - v2xServerUsd: - # description': User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': V2xServerUsd - $ref: '#/components/schemas/V2xServerUsd' - required: - - locationInfo - - v2xServerUsd - type: object - x-etsi-mec-cardinality: '1' - - ProvChgUuMbmsSubscription: - properties: - _links: - $ref: '#/components/schemas/ProvChgUuMbmsSubscription.links' - callbackReference: - description: URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - expiryDeadline: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - filterCriteria: - $ref: '#/components/schemas/ProvChgUuMbmsSubscription.filterCriteria' - subscriptionType: - description: Shall be set to "ProvChgUuMbmsSubscription". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - subscriptionType - - callbackReference - - filterCriteria - type: object - x-etsi-ref: 6.3.3 - ProvChgUuUniNotification: - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast. - items: - $ref: '#/components/schemas/UuUniNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuUniNeighbourCellInfo - notificationType: - description: Shall be set to "ProvChgUuUniNotification". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - v2xApplicationServer: - # description': V2X Application Server address (consisting of IP address and UDP port) for unicast. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': V2xApplicationServer - $ref: '#/components/schemas/V2xApplicationServer' - required: - - notificationType - - locationInfo - type: object - x-etsi-ref: 6.4.2 - ProvChgUuUniSubscription.links: - description: Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - properties: - self: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - self - type: object - x-etsi-mec-cardinality: 0..1 - - ProvChgUuUniSubscription.filterCriteria: - description: List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response. - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast. - items: - $ref: '#/components/schemas/UuUniNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuUniNeighbourCellInfo - v2xApplicationServer: - # description': V2X Application Server address (consisting of IP address and UDP port) for unicast. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': V2xApplicationServer - $ref: '#/components/schemas/V2xApplicationServer' - required: - - locationInfo - - v2xApplicationServer - type: object - x-etsi-mec-cardinality: '1' - - ProvChgUuUniSubscription: - properties: - _links: - $ref: '#/components/schemas/ProvChgUuUniSubscription.links' - callbackReference: - description: URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - expiryDeadline: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - filterCriteria: - $ref: '#/components/schemas/ProvChgUuUniSubscription.filterCriteria' - subscriptionType: - description: Shall be set to "ProvChgUuUniSubscription". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - subscriptionType - - callbackReference - - filterCriteria - type: object - x-etsi-ref: 6.3.2 - - SubscriptionLinkList.links.subscriptions: - description: "The service consumer\u2019s subscriptions." - properties: - href: - description: The URI referring to the subscription. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - subscriptionType: - description: Type of the subscription. The values are as defined in the \"subscriptionType\" attribute for each different V2X information event subscription data type. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - href - - subscriptionType - x-etsi-mec-cardinality: 0..N - - SubscriptionLinkList.links: - description: List of hyperlinks related to the resource. - properties: - self: - # description': URI of this resource. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - subscriptions: - type: array - items: - $ref: '#/components/schemas/SubscriptionLinkList.links.subscriptions' - type: object - required: - - self - x-etsi-mec-cardinality: '1' - - SubscriptionLinkList: - properties: - _links: - $ref: '#/components/schemas/SubscriptionLinkList.links' - required: - - _links - type: object - x-etsi-ref: 6.3.6 - - TddInfo: - properties: - earfcn: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Earfcn - $ref: '#/components/schemas/Earfcn' - subframeAssignment: - description: Uplink-downlink subframe configuration information. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - transmissionBandwidth: - # description': '' - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TransmissionBandwidth - $ref: '#/components/schemas/TransmissionBandwidth' - required: - - earfcn - - transmissionBandwidth - - subframeAssignment - type: object - x-etsi-ref: 6.5.7 - TimeStamp: - properties: - nanoSeconds: - description: The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC. - format: Uint32 - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Uint32 - seconds: - description: The seconds part of the time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC. - format: Uint32 - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Uint32 - required: - - seconds - - nanoSeconds - type: object - x-etsi-ref: 6.5.2 - TransmissionBandwidth.transmissionBandwidth: - description: 'Numeric value corresponding to the transmission bandwidth expressed in units of resource blocks as follows:1 = bw6 (6 resource blocks)2 = bw15 (15 resource blocks) 3 = bw25 (25 resource blocks) 4 = bw50 (50 resource blocks) 5 = bw75 (75 resource blocks) 6 = bw100 (100 resource blocks)' - enum: - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Enum - - TransmissionBandwidth: - properties: - transmissionBandwidth: - $ref: '#/components/schemas/TransmissionBandwidth.transmissionBandwidth' - required: - - transmissionBandwidth - type: object - x-etsi-ref: 6.6.4 - UuMbmsNeighbourCellInfo: - properties: - ecgi: - # description': E-UTRAN CelI Global Identifier. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Ecgi - $ref: '#/components/schemas/Ecgi' - fddInfo: - # description': Information for FDD operation. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': FddInfo - $ref: '#/components/schemas/FddInfo' - mbmsServiceAreaIdentity: - description: Supported MBMS Service Area Identities in the cell. - items: - type: string - minItems: 1 - type: array - x-etsi-mec-cardinality: 1..N - x-etsi-mec-origin-type: String - pci: - description: Physical Cell Identifier. - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Integer - plmn: - # description': Public Land Mobile Network Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Plmn - $ref: '#/components/schemas/Plmn' - tddInfo: - # description': Information for TDD operation. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TddInfo - $ref: '#/components/schemas/TddInfo' - required: - - plmn - - ecgi - - pci - - fddInfo - - tddInfo - - mbmsServiceAreaIdentity - type: object - x-etsi-ref: 6.5.11 - - UuMbmsProvisioningInfo.proInfoUuMbms: - description: The provisioning information per location as defined below. - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS. - type: array - items: - $ref: '#/components/schemas/UuMbmsNeighbourCellInfo' - minItems: 0 - - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuMbmsNeighbourCellInfo - v2xServerUsd: - # description': User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': V2xServerUsd - $ref: '#/components/schemas/V2xServerUsd' - required: - - locationInfo - - v2xServerUsd - - UuMbmsProvisioningInfo: - properties: - proInfoUuMbms: - $ref: '#/components/schemas/UuMbmsProvisioningInfo.proInfoUuMbms' - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - required: - - proInfoUuMbms - type: object - x-etsi-ref: 6.2.3 - - UuUniNeighbourCellInfo: - properties: - ecgi: - # description': E-UTRAN CelI Global Identifier. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Ecgi - $ref: '#/components/schemas/Ecgi' - fddInfo: - # description': Information for FDD operation. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': FddInfo - $ref: '#/components/schemas/FddInfo' - pci: - description: Physical Cell Identifier. - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Integer - plmn: - # description': Public Land Mobile Network Identity. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': Plmn - $ref: '#/components/schemas/Plmn' - tddInfo: - # description': Information for TDD operation. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': TddInfo - $ref: '#/components/schemas/TddInfo' - required: - - plmn - - ecgi - - pci - - fddInfo - - tddInfo - type: object - x-etsi-ref: 6.5.9 - - UuUnicastProvisioningInfo.proInfoUuUnicast: - description: The provisioning information per location as defined below. - properties: - locationInfo: - # description': Location information to identify a cell of a base station or a particular geographical area. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LocationInfo - $ref: '#/components/schemas/LocationInfo' - neighbourCellInfo: - description: The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast. - items: - $ref: '#/components/schemas/UuUniNeighbourCellInfo' - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: UuUniNeighbourCellInfo - v2xApplicationServer: - # description': V2X Application Server address (consisting of IP address and UDP port) for unicast. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': V2xApplicationServer - $ref: '#/components/schemas/V2xApplicationServer' - required: - - locationInfo - - v2xApplicationServer - x-etsi-mec-cardinality: 1..N - UuUnicastProvisioningInfo: - properties: - proInfoUuUnicast: - type: array - items: - $ref: '#/components/schemas/UuUnicastProvisioningInfo.proInfoUuUnicast' - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - required: - - proInfoUuUnicast - type: object - x-etsi-ref: 6.2.2 - V2xApplicationServer: - properties: - ipAddress: - description: '' - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - udpPort: - description: '' - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - ipAddress - - udpPort - type: object - x-etsi-ref: 6.5.8 - - - msgType: - description: '− denm(1): Decentralized Environmental Notification Message (DENM) as specified in ETSI EN 302 637-3 [i.3], − cam(2): Cooperative Awareness Message (CAM) as specified in ETSI EN 302 637-2 [i.2], − poi(3): Point of Interest message as specified in ETSI TS 101 556-1 [i.11], − spat(4): Signal Phase And Timing (SPAT) message as specified in SAE J2735 [i.12], − map(5): MAP message as specified in SAE J2735 [i.12], − ivi(6): In Vehicle Information (IVI) message as defined in ISO TS 19321 [i.13], − ev-rsr(7): Electric vehicle recharging spot reservation message, as defined in ETSI TS 101 556-3 [i.14], ' - enum: - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - type: integer - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Enum - - V2xMsgPublication: - properties: - msgContent: - description: Published V2X message content. Its format is defined by the standardization organization indicated by the attribute stdOrganization. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - msgEncodeFormat: - description: The encode format of the V2X message, for example base64. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - msgType: - $ref: '#/components/schemas/msgType' - #x-etsi-mec-origin-type: Enum - stdOrganization: - description: "Standardization organization which defines the published V2X message type: \nETSI: European Telecommunications Standards Institute. \nSee note 1." - enum: - - ETSI - type: string - x-etsi-mec-cardinality: '1' - #-etsi-mec-origin-type: Enum - required: - - stdOrganization - - msgType - - msgEncodeFormat - - msgContent - type: object - x-etsi-notes: "NOTE 1: Other standardization organizations could be added as needed.NOTE 2:The V2X message types of ETSI shall be used as specified in ETSI TS 102 894-2 [6], clause A.114." - x-etsi-ref: 6.2.6 - - V2xMsgSubscription.links: - description: Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests. - properties: - self: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - self - type: object - x-etsi-mec-cardinality: 0..1 - - V2xMsgSubscription.filterCriteria: - description: List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response. - properties: - msgType: - description: Subscribed V2X message type. Its value is defined by the standardization organization indicated by the attribute stdOrganization. See note 2. - items: - type: string - minItems: 0 - type: array - x-etsi-mec-cardinality: 0..N - x-etsi-mec-origin-type: Enum - stdOrganization: - description: "Standardization organization which defines the subscribed V2X message type: \nETSI: European Telecommunications Standards Institute. \nSee note 1." - enum: - - ETSI - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: Enum - required: - - stdOrganization - type: object - x-etsi-mec-cardinality: '1' - - V2xMsgSubscription: - properties: - _links: - $ref: '#/components/schemas/V2xMsgSubscription.links' - callbackReference: - description: URI selected by the service consumer to receive notifications on the subscribed V2X message. This shall be included both in the request and in response. - format: uri - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: URI - expiryDeadline: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - filterCriteria: - $ref: '#/components/schemas/V2xMsgSubscription.filterCriteria' - subscriptionType: - description: Shall be set to "V2xMsgSubscription". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - subscriptionType - - callbackReference - - filterCriteria - type: object - x-etsi-notes: "NOTE 1:\tOther standardization organizations could be added as needed.\nNOTE 2:\tThe V2X message types of ETSI shall be used as specified in ETSI TS 102 894-2 [6], clause A.114." - x-etsi-ref: 6.3.5 - - - V2xMsgNotification.links: - description: 'Links to resources related to this notification.' - properties: - subscription: - # description': Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription. - # x-etsi-mec-cardinality': '1' - # x-etsi-mec-origin-type': LinkType - $ref: '#/components/schemas/LinkType' - required: - - subscription - type: object - x-etsi-mec-cardinality: 0..1 - - V2xMsgNotification: - properties: - notificationType: - description: Shall be set to "V2xMsgNotification". - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - timeStamp: - # description': Time stamp. - # x-etsi-mec-cardinality': 0..1 - # x-etsi-mec-origin-type': TimeStamp - $ref: '#/components/schemas/TimeStamp' - stdOrganization: - description: 'Standardization organization which defines the published V2X message type ETSI: European Telecommunications Standards Institute. See note 1.' - enum: - - "ETSI" - type: string - msgType: - $ref: '#/components/schemas/msgType' - msgEncodeFormat: - description: 'The encode format of the V2X message, for example base64 ' - type: string - msgContent: - description: 'Published V2X message content. The format of the string is defined by the standardization organization indicated by the attribute stdOrganization.' - type: string - _links: - $ref: '#/components/schemas/V2xMsgNotification.links' - required: - - notificationType - - timeStamp - - stdOrganization - - msgType - - msgEncodeFormat - - msgContent - - _links - type: object - x-etsi-notes: "NOTE 1: Other standardization organizations could be added as needed. NOTE 2: The V2X message types of ETSI shall be used as specified in ETSI TS 102 894-2 [6], clause A.114" - - V2xServerUsd.sdpInfo: - description: SDP with IP multicast address and port number used for V2X communication via MBMS. - properties: - ipMulticastAddress: - description: '' - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - portNumber: - description: '' - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - ipMulticastAddress - - portNumber - type: object - x-etsi-mec-cardinality: '1' - V2xServerUsd.tmgi: - description: Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services. - properties: - mbmsServiceId: - description: MBMS Service ID consisting of three octets. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - mcc: - description: The Mobile Country Code part of PLMN Identity. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - mnc: - description: The Mobile Network Code part of PLMN Identity. - type: string - x-etsi-mec-cardinality: '1' - x-etsi-mec-origin-type: String - required: - - mbmsServiceId - - mcc - - mnc - type: object - x-etsi-mec-cardinality: '' - - V2xServerUsd: - properties: - sdpInfo: - $ref: '#/components/schemas/V2xServerUsd.sdpInfo' - serviceAreaIdentifier: - description: A list of service area identifier for the applicable MBMS broadcast area. - items: - type: string - minItems: 1 - type: array - x-etsi-mec-cardinality: 1..N - x-etsi-mec-origin-type: String - tmgi: - $ref: '#/components/schemas/V2xServerUsd.tmgi' - required: - - tmgi - - serviceAreaIdentifier - - sdpInfo - type: object - x-etsi-ref: 6.5.10 - - LinkType: - description: >- - 'This data type represents a type of link' - type: object - required: - - href - properties: - href: - $ref: '#/components/schemas/Href' - Href: - description: >- - The URI referring to the subscription. - type: string - format: uri - ProblemDetails: - properties: - detail: - description: A human-readable explanation specific to this occurrence of the problem - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: String - instance: - description: A URI reference that identifies the specific occurrence of the problem - format: uri - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: URI - status: - description: The HTTP status code for this occurrence of the problem - format: uint32 - type: integer - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: Uint32 - title: - description: A short, human-readable summary of the problem type - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: String - type: - description: A URI reference according to IETF RFC 3986 that identifies the problem type - format: uri - type: string - x-etsi-mec-cardinality: 0..1 - x-etsi-mec-origin-type: URI - type: object - responses: - 204: - description: No Content - 206: - description: Partial content - 400: - description: 'Bad Request : used to indicate that incorrect parameters were passed to the request.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 401: - description: 'Unauthorized : used when the client did not submit credentials.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 403: - description: 'Forbidden : operation is not allowed given the current status of the resource.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 404: - description: 'Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 406: - description: 'Not Acceptable : used to indicate that the server cannot provide the any of the content formats supported by the client.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 409: - description: 'Conflict : The operation cannot be executed currently, due to a conflict with the state of the resource' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 412: - description: 'Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 415: - description: 'Unsupported Media Type : used to indicate that the server or the client does not support the content type of the entity body.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 422: - description: 'Unprocessable Entity : used to indicate that the server understands the content type of the request entity and that the syntax of the request entity is correct but that the server is unable to process the contained instructions. This error condition can occur if an JSON request body is syntactically correct but semantically incorrect, for example if the target area for the request is considered too large. This error condition can also occur if the capabilities required by the request are not supported.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' - 429: - description: 'Too Many Requests : used when a rate limiter has triggered.' - content: - application/json: - schema: - $ref: '#/components/schemas/ProblemDetails' diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn index 9af204123253c6c03008bb95cbed2b711db2e14a..7f606ceebb656d1dc57cf243bac20e2b370b082e 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Functions.ttcn @@ -38,7 +38,8 @@ module V2XInformationServiceAPI_Functions { import from LibMec_Pixits all; function f_create_prov_uu_uni_subscription( - out ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription + out ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -47,16 +48,15 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_uni", + PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_uni_subscription( m_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, m_prov_chg_uu_uni_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, @@ -65,7 +65,9 @@ module V2XInformationServiceAPI_Functions { m_v2x_application_server( oct2char(unichar2oct(PX_V2X_SERVER_IP_ADDRESS, "UTF-8")), oct2char(unichar2oct(PX_V2X_SERVER_UDP_PORT, "UTF-8")) - )))))))); + )), + PX_PROV_UU_UNI_SUB_CALLBACK + )))))); tc_ac.start; alt { @@ -75,14 +77,24 @@ module V2XInformationServiceAPI_Functions { mw_http_message_body_json( mw_body_json_prov_chg_uu_uni_subscription( mw_prov_chg_uu_uni_subscription( - PX_PROV_UU_UNI_SUB_CALLBACK, -, + PX_PROV_UU_UNI_SUB_CALLBACK, ? - )))))) -> value v_response { + )))))) -> 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_V2X_URI_SUB & "/(?*)", + 0 + ); p_prov_chg_uu_uni_subscription := v_response.response.body.json_body.provChgUuUniSubscription; - log("f_create_prov_uu_uni_subscription: IUT successfully registers subscription: ", p_prov_chg_uu_uni_subscription); + log("f_create_prov_uu_uni_subscription: INFO: IUT successfully registers subscription: ", p_prov_chg_uu_uni_subscription); + log("f_create_prov_uu_uni_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_uu_uni_subscription: Expected message not received"); @@ -92,7 +104,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_uu_uni_subscription function f_delete_prov_uu_uni_subscription( - in ProvChgUuUniSubscription p_prov_chg_uu_uni_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; @@ -100,16 +112,16 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & p_prov_chg_uu_uni_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & 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 { @@ -120,7 +132,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_uu_uni_subscription function f_create_prov_uu_mbms_subscription( - out ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription + out ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -129,33 +142,34 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_uu_mbms", + PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_uu_mbms_subscription( m_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, m_prov_chg_uu_mbms_filter_criteria( m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, 10.41 )), - m_v2x_server_usd( - { PX_V2X_MBMS_SERVICE_ID }, - m_sdp_info( - PX_V2X_MC_SERVER, - PX_V2X_MC_PORT - ), - m_tmgi( - PX_V2X_SERVICE_AREA_ID, - PX_MCC, - PX_MNC + m_v2x_server_usd( + { PX_V2X_MBMS_SERVICE_ID }, + m_sdp_info( + PX_V2X_MC_SERVER, + PX_V2X_MC_PORT + ), + m_tmgi( + PX_V2X_SERVICE_AREA_ID, + PX_MCC, + PX_MNC ) - )))))))); + )), + PX_PROV_UU_MBMS_SUB_CALLBACK + )))))); tc_ac.start; alt { @@ -165,14 +179,24 @@ module V2XInformationServiceAPI_Functions { mw_http_message_body_json( mw_body_json_prov_chg_uu_mbms_subscription( mw_prov_chg_uu_mbms_subscription( - PX_PROV_UU_MBMS_SUB_CALLBACK, -, + PX_PROV_UU_MBMS_SUB_CALLBACK, ? )))))) -> 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_V2X_URI_SUB & "/(?*)", + 0 + ); p_prov_chg_uu_mbms_subscription := v_response.response.body.json_body.provChgUuMbmsSubscription; log("f_create_prov_uu_mbms_subscription: IUT successfully registers subscription: ", p_prov_chg_uu_mbms_subscription); + log("f_create_prov_uu_mbms_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_uu_mbms_subscription: Expected message not received"); @@ -182,15 +206,15 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_uu_mbms_subscription function f_delete_prov_uu_mbms_subscription( - in ProvChgUuMbmsSubscription p_prov_chg_uu_mbms_subscription - ) runs on HttpComponent { + 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_V2X_URI & "/subscriptions/" & p_prov_chg_uu_mbms_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & p_subscription_id, v_headers ))); @@ -199,7 +223,7 @@ module V2XInformationServiceAPI_Functions { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { @@ -210,7 +234,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_uu_mbms_subscription function f_create_prov_pc5_subscription( - out ProvChgPc5Subscription p_prov_chg_pc5_subscription + out ProvChgPc5Subscription p_prov_chg_pc5_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -219,22 +244,23 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/prov_chg_pc5", + PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_prov_chg_pc5_subscription( m_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, m_filter_criteria( PX_V2X_DST_LAYER_2_ID, m_location_info( m_ecgi( - PX_CELL_ID,m_plmn(PX_MCC, PX_MNC) + PX_V2X_CELL_ID,m_plmn(PX_MCC, PX_MNC) ), m_location_info_geo_area( 43.72, 10.41 - ))))))))); + ))), + PX_PROV_PC5_SUB_CALLBACK + )))))); tc_ac.start; alt { @@ -243,15 +269,25 @@ module V2XInformationServiceAPI_Functions { mw_http_response_201_created( mw_http_message_body_json( mw_body_json_prov_chg_pc5_subscription( - mw_prov_chg_pc5_subscription( - PX_PROV_PC5_SUB_CALLBACK, - -, - ? - )))))) -> value v_response { + mw_prov_chg_pc5_subscription( + -, + PX_PROV_PC5_SUB_CALLBACK, + ? + )))))) -> 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_V2X_URI_SUB & "/(?*)", + 0 + ); p_prov_chg_pc5_subscription := v_response.response.body.json_body.provChgPc5Subscription; - log("f_create_prov_pc5_subscription: IUT successfully registers subscription: ", p_prov_chg_pc5_subscription); + log("f_create_prov_pc5_subscription: INFO: IUT successfully registers subscription: ", p_prov_chg_pc5_subscription); + log("f_create_prov_pc5_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_prov_pc5_subscription: Expected message not received"); @@ -261,7 +297,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_prov_pc5_subscription function f_delete_prov_pc5_subscription( - in ProvChgPc5Subscription p_prov_chg_pc5_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; @@ -269,16 +305,16 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/" & p_prov_chg_pc5_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & 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 { @@ -289,7 +325,8 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_prov_pc5_subscription function f_create_v2x_msg_subscription( - out V2xMsgSubscription p_v2x_msg_subscription + out V2xMsgSubscription p_v2x_msg_subscription, + out charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -298,14 +335,14 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/V2xMsgSubscription", + PICS_ROOT_API & PX_ME_V2X_URI_SUB, v_headers, m_http_message_body_json( m_body_json_v2x_msg_subscription( m_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, - m_v2x_msg_subscription_filter_criteria - )))))); + m_v2x_msg_subscription_filter_criteria, + PX_PROV_V2X_SUB_CALLBACK + )))))); tc_ac.start; alt { @@ -315,14 +352,24 @@ module V2XInformationServiceAPI_Functions { mw_http_message_body_json( mw_body_json_v2x_msg_subscription( mw_v2x_msg_subscription( - PX_PROV_V2X_SUB_CALLBACK, -, + PX_PROV_V2X_SUB_CALLBACK, ? - )))))) -> value v_response { + )))))) -> 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_V2X_URI_SUB & "/(?*)", + 0 + ); p_v2x_msg_subscription := v_response.response.body.json_body.v2xMsgSubscription; - log("f_create_v2x_msg_subscription: IUT successfully registers subscription: ", p_v2x_msg_subscription); + log("f_create_v2x_msg_subscription: INFO: IUT successfully registers subscription: ", p_v2x_msg_subscription); + log("f_create_v2x_msg_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_v2x_msg_subscription: Expected message not received"); @@ -332,7 +379,7 @@ module V2XInformationServiceAPI_Functions { } // End of function f_create_v2x_msg_subscription function f_delete_v2x_msg_subscription( - in V2xMsgSubscription p_v2x_msg_subscription + in charstring p_subscription_id ) runs on HttpComponent { var Headers v_headers; @@ -340,16 +387,16 @@ module V2XInformationServiceAPI_Functions { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & p_v2x_msg_subscription.links.self_, + PICS_ROOT_API & PX_ME_V2X_URI_SUB & "/" & 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 { @@ -359,4 +406,86 @@ module V2XInformationServiceAPI_Functions { } // End of function f_delete_v2x_msg_subscription + function f_create_pred_qos_subscription( + out PredQosSubscription p_pred_qos_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_V2X_URI_SUB, + v_headers, + m_http_message_body_json( + m_body_json_pred_qos_subscription( + m_pred_qos_subscription( + m_qos_pred_filter_criteria, + PX_PRED_QOS_SUB_CALLBACK + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_pred_qos_subscription( + mw_pred_qos_subscription( + -, + PX_PRED_QOS_SUB_CALLBACK, + ? + )))))) -> 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_V2X_URI_SUB & "/(?*)", + 0 + ); + p_pred_qos_subscription := v_response.response.body.json_body.predQosSubscription; + log("f_create_pred_qos_subscription: INFO: IUT successfully registers subscription: ", p_pred_qos_subscription); + log("f_create_pred_qos_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_pred_qos_subscription: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_pred_qos_subscription + + function f_delete_pred_qos_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_V2X_URI_SUB & "/" & 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_pred_qos_subscription: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_pred_qos_subscription + } // End of module V2XInformationServiceAPI_Functions diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn index fb98a4a6eba39bc13fdd8a34f73f284addac500e..e58c57590065a85691de6cd7b77467754a791139 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn @@ -6,26 +6,32 @@ module V2XInformationServiceAPI_Pixits { // JSON import from Json all; - modulepar charstring PX_V2X_ECGI := "ecgi,135792468"; + modulepar charstring PX_V2X_ECGI := "268804901557"; - modulepar charstring PX_V2X_UNKNOWN_ECGI := "ecgi,1357924689"; + modulepar charstring PX_V2X_CELL_ID := "101010101"; - modulepar charstring PX_V2X_LATITUDE := "latitude,000.000,001.000,longitude,000.000,001.000"; + modulepar Json.Number PX_V2X_ECGI_LAT := 43.730846; - modulepar charstring PX_LOC_GRANULARITY := "17"; + modulepar Json.Number PX_V2X_ECGI_LONG := 7.415385; + + modulepar charstring PX_V2X_UNKNOWN_ECGI := "1357924689"; - modulepar charstring PX_CELL_ID := "4680"; + modulepar charstring PX_V2X_UNKNOWN_CELL_ID := "666666666"; - modulepar charstring PX_UNKNOWN_CELL_ID := "4680"; + modulepar charstring PX_V2X_LATITUDE := "latitude,43.730846,longitude,7.415385"; + + modulepar charstring PX_LOC_GRANULARITY := "17"; - modulepar charstring PX_MCC := "135"; + modulepar charstring PX_MCC := "1"; - modulepar charstring PX_MNC := "792"; + modulepar charstring PX_MNC := "1"; modulepar charstring PX_UNKNOWN_MCC := "136"; modulepar charstring PX_UNKNOWN_MNC := "796"; + modulepar charstring PX_NON_EXISTENT_SUBSCRIPTION_ID := "subscription0666"; + modulepar Json.AnyURI PX_PROV_UU_UNI_SUB_CALLBACK := ""; modulepar Json.AnyURI PX_PROV_UU_MBMS_SUB_CALLBACK := ""; @@ -34,18 +40,26 @@ module V2XInformationServiceAPI_Pixits { modulepar Json.AnyURI PX_PROV_V2X_SUB_CALLBACK := ""; + modulepar Json.AnyURI PX_PRED_QOS_SUB_CALLBACK := ""; + modulepar charstring PX_V2X_SERVER_IP_ADDRESS := ""; modulepar charstring PX_V2X_SERVER_UDP_PORT := ""; modulepar charstring PX_V2X_MBMS_SERVICE_ID := ""; - modulepar charstring PX_V2X_MC_SERVER := ""; + modulepar charstring PX_V2X_MC_SERVER := "test.mosquito.org"; - modulepar charstring PX_V2X_MC_PORT := ""; + modulepar charstring PX_V2X_MC_PORT := "1338"; modulepar charstring PX_V2X_SERVICE_AREA_ID := ""; modulepar charstring PX_V2X_DST_LAYER_2_ID := ""; + modulepar charstring PX_PROT_IMPLEMENTATION := ""; + + modulepar Json.String PX_V2X_MSG_DISTRIBUTION_SERVER_IP_ADDRESS := "10.8.0.1"; + + modulepar Json.UInt16 PX_V2X_MSG_DISTRIBUTION_SERVER_PORT := 12345; + } // End of module V2XInformationServiceAPI_Pixits diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn index f031f6405ea226f5092b5ffc722edbc915e54d51..dc06b5659b0d8b8ae84513776cd908f2309b0f7f 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn @@ -16,6 +16,9 @@ module V2XInformationServiceAPI_Templates { // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/V2XInformationServiceAPI import from V2XInformationServiceAPI_TypesAndValues all; import from V2XInformationServiceAPI_Pixits all; @@ -24,104 +27,228 @@ module V2XInformationServiceAPI_Templates { in template (value) ProInfoUuUnicastList p_proInfoUuUnicast, in template (omit) TimeStamp p_timeStamp := omit ) := { - proInfoUuUnicast := p_proInfoUuUnicast, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoUuUnicast := p_proInfoUuUnicast } // End of template m_uu_unicast_provisioning_info template (present) UuUnicastProvisioningInfo mw_uu_unicast_provisioning_info( template (present) ProInfoUuUnicastList p_proInfoUuUnicast := ?, template TimeStamp p_timeStamp := * ) := { - proInfoUuUnicast := p_proInfoUuUnicast, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoUuUnicast := p_proInfoUuUnicast } // End of template mw_uu_unicast_provisioning_info template (omit) UuMbmsProvisioningInfo m_uu_mbms_provisioning_info( in template (value) ProInfoUuMbmsList p_proInfoUuMbms, in template (omit) TimeStamp p_timeStamp := omit ) := { - proInfoUuMbms := p_proInfoUuMbms, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoUuMbms := p_proInfoUuMbms } // End of template m_uu_mbms_provisioning_info template (present) UuMbmsProvisioningInfo mw_uu_mbms_provisioning_info( template (present) ProInfoUuMbmsList p_proInfoUuMbms := ?, template TimeStamp p_timeStamp := * ) := { - proInfoUuMbms := p_proInfoUuMbms, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoUuMbms := p_proInfoUuMbms } // End of template mw_uu_mbms_provisioning_info template (omit) Pc5ProvisioningInfo m_pc5_provisioning_info( in template (value) Pc5ProvisioningInfoProInfoPc5List p_proInfoPc5, in template (omit) TimeStamp p_timeStamp := omit ) := { - proInfoPc5 := p_proInfoPc5, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoPc5 := p_proInfoPc5 } // End of template m_pc5_provisioning_info template (present) Pc5ProvisioningInfo mw_pc5_provisioning_info( template (present) Pc5ProvisioningInfoProInfoPc5List p_proInfoPc5 := ?, template TimeStamp p_timeStamp := * ) := { - proInfoPc5 := p_proInfoPc5, - timeStamp := p_timeStamp + timeStamp := p_timeStamp, + proInfoPc5 := p_proInfoPc5 } // End of template mw_pc5_provisioning_info + template (omit) ProInfoUuUnicast m_proInfoUuUnicast( + in template (value) LocationInfo p_locationInfo, + in template (value) V2xApplicationServer p_v2xApplicationServer, + in template (omit) UuUniNeighbourCellInfoList p_neighbourCellInfo := omit + ) := { + locationInfo := p_locationInfo, + v2xApplicationServer := p_v2xApplicationServer, + neighbourCellInfo := p_neighbourCellInfo + } // End of template m_proInfoUuUnicast + + template (present) ProInfoUuUnicast mw_proInfoUuUnicast( + template (present) LocationInfo p_locationInfo := ?, + template (present) V2xApplicationServer p_v2xApplicationServer := ?, + template UuUniNeighbourCellInfoList p_neighbourCellInfo := omit + ) := { + locationInfo := p_locationInfo, + v2xApplicationServer := p_v2xApplicationServer, + neighbourCellInfo := p_neighbourCellInfo + } // End of template mw_proInfoUuUnicast + + template (omit) V2xMsgDistributionServerInfo m_v2x_msg_distribution_server_info( + in template (value) V2xMsgDistributionServers p_v2xMsgDistributionServer, + in template (omit) LocationInfo p_locationInfo := omit + ) := { + v2xMsgDistributionServer := p_v2xMsgDistributionServer, + locationInfo := p_locationInfo + } // End of template m_v2x_msg_distribution_server_info + + template (present) V2xMsgDistributionServerInfo mw_v2x_msg_distribution_server_info( + template (present) V2xMsgDistributionServers p_v2xMsgDistributionServer := ?, + template LocationInfo p_locationInfo := * + ) := { + v2xMsgDistributionServer := p_v2xMsgDistributionServer, + locationInfo := p_locationInfo + } // End of template mw_v2x_msg_distribution_server_info + + template (omit) V2xMsgDistributionServer m_v2x_msg_distribution_server( + in template (value) InfoProtocol p_infoProtocol, + in template (omit) InfoConnection p_infoConnection := omit + ) := { + infoProtocol := p_infoProtocol, + infoConnection := p_infoConnection + } // End of template m_v2x_msg_distribution_server + + template (present) V2xMsgDistributionServer mw_v2x_msg_distribution_server( + template (present) InfoProtocol p_infoProtocol := ?, + template InfoConnection p_infoConnection := * + ) := { + infoProtocol := p_infoProtocol, + infoConnection := p_infoConnection + } // End of template mw_v2x_msg_distribution_server + + template (value) InfoProtocol m_info_protocol( + in MsgProtocols p_msgProtocol := { MQTT_v3_1_1 }, + in Json.String p_protImplementation := PX_PROT_IMPLEMENTATION + ) := { + msgProtocol := p_msgProtocol, + protImplementation := p_protImplementation + } // End of template m_info_protocol + + template (present) InfoProtocol mw_info_protocol( + template (present) MsgProtocols p_msgProtocol := { MQTT_v3_1_1 }, + template (present) Json.String p_protImplementation := PX_PROT_IMPLEMENTATION + ) := { + msgProtocol := p_msgProtocol, + protImplementation := p_protImplementation + } // End of template mw_info_protocol + + template (value) InfoConnection m_info_connection( + in Json.String p_ipAddress, + in Json.UInt16 p_port_number + ) := { + ipAddress := p_ipAddress, + port_number := p_port_number + } // End of template m_info_connection + + template (present) InfoConnection mw_info_connection( + template (present) Json.String p_ipAddress := ?, + template (present) Json.UInt16 p_port_number := ? + ) := { + ipAddress := p_ipAddress, + port_number := p_port_number + } // End of template mw_info_connection + template (omit) PredictedQos m_predicted_qos( + in template (value) PredictionTarget p_predictionTarget := E2E_APPLICATION_INSTANCE_PREDICTION, in template (value) Json.String p_locationGranularity, - in template (value) PredictedQosRoutesList p_routes, + in template (value) Qos p_qos, + in template (omit) TimeStamp p_noticePeriod := omit, + in template (omit) PredictionArea p_predictionArea := omit, + in template (omit) Routes p_routes := omit, in template (omit) TimeStamp p_timeGranularity := omit ) := { + predictionTarget := p_predictionTarget, timeGranularity := p_timeGranularity, locationGranularity := p_locationGranularity, - routes := p_routes + noticePeriod := p_noticePeriod, + predictionArea := p_predictionArea, + routes := p_routes, + qos := p_qos } // End of template m_predicted_qos template PredictedQos mw_predicted_qos( + template (present) PredictionTarget p_predictionTarget := ?, template (present) Json.String p_locationGranularity := ?, - template (present) PredictedQosRoutesList p_routes := ?, + template (present) Qos p_qos := ?, + template TimeStamp p_noticePeriod := *, + template PredictionArea p_predictionArea := *, + template Routes p_routes := *, template TimeStamp p_timeGranularity := * - ) := { + ) := { + predictionTarget := p_predictionTarget, timeGranularity := p_timeGranularity, locationGranularity := p_locationGranularity, - routes := p_routes + noticePeriod := p_noticePeriod, + predictionArea := p_predictionArea, + routes := p_routes, + qos := p_qos } // End of template mw_predicted_qos - template (value) PredictedQosRoutes m_predicted_qos_routes( - in template (value) RouteInfoList p_routeinfo - ) := { - routeinfo := p_routeinfo - } // End of template m_predicted_qos_routes - - template (present) PredictedQosRoutes mw_predicted_qos_routes( - template (present) RouteInfoList p_routeinfo := ? - ) := { - routeinfo := p_routeinfo - } // End of template mw_predicted_qos_routes + template (value) Qos m_qos( + in template (value) StreamList p_stream + ) := { + stream := p_stream + } // End of template m_qos + + template (present) Qos mw_qos( + template (present) StreamList p_stream := ? + ) := { + stream := p_stream + } // End of template mw_qos + + template (value) Stream m_stream( + in template (value) QosKpiList p_qos_kpi + ) := { + qosKpi := p_qos_kpi + } // End of template m_stream + + template (present) Stream mw_stream( + template (present) QosKpiList p_qos_kpi := ? + ) := { + qosKpi := p_qos_kpi + } // End of template mw_stream + + template (omit) QosKpi m_qos_kpi( + in Json.String p_kpi_name, + in Json.String p_kpi_value, + in template (omit) Json.String p_confidence := omit + ) := { + kpiName := p_kpi_name, + kpiValue := p_kpi_value, + confidence := p_confidence + } // End of template m_qos_kpi + + template (present) QosKpi mw_qos_kpi( + template (present) Json.String p_kpi_name := ?, + template (present) Json.String p_kpi_value := ?, + template Json.String p_confidence := * + ) := { + kpiName := p_kpi_name, + kpiValue := p_kpi_value, + confidence := p_confidence + } // End of template mw_qos_kpi template (omit) RouteInfo m_route_info( - in template (value) LocationInfo p_location, - in template (omit) TimeStamp p_time := omit, - in template (omit) UInt8 p_rsrp := omit, - in template (omit) UInt8 p_rsrq := omit + in template (value) LocationInfo p_location, + in template (omit) TimeStamp p_time := omit ) := { location := p_location, - time := p_time, - rsrp := p_rsrp, - rsrq := p_rsrq + time := p_time } // End of template m_route_info template RouteInfo mw_route_info( template (present) LocationInfo p_location := ?, - template TimeStamp p_time := *, - template UInt8 p_rsrp := *, - template UInt8 p_rsrq := * + template TimeStamp p_time := * ) := { location := p_location, - time := p_time, - rsrp := p_rsrp, - rsrq := p_rsrq + time := p_time } // End of template mw_route_info template (omit) LocationInfo m_location_info( @@ -160,20 +287,20 @@ module V2XInformationServiceAPI_Templates { in Json.String p_cellId, in template (value) Plmn p_plmn ) := { + plmn := p_plmn, cellId := { cellId := p_cellId - }, - plmn := p_plmn + } } // End of template m_ecgi template (present) Ecgi mw_ecgi( template (present) Json.String p_cellId := ?, template (present) Plmn p_plmn := ? ) := { + plmn := p_plmn, cellId := { cellId := p_cellId - }, - plmn := p_plmn + } } // End of template mw_ecgi template (value) Plmn m_plmn( @@ -193,66 +320,92 @@ module V2XInformationServiceAPI_Templates { } // End of template mw_plmn template (value) V2xMsgPublication m_v2x_message( - in Json.String p_msgContent := "AgIAEPQ9JwVAWXGJVq3AIK5gAgAgADDUHgAAASAWhAMQpQcz/+H/+gAQAA==", - in Json.String p_msgEncodeFormat := "base64", - in MsgType p_msgType := cam, - in StdOrganization p_stdOrganization := ETSI + in template (value) V2xMsgPropertiesValues p_msgPropertiesValues, + in Json.String p_msgRepresentationFormat := "base64", + in Json.String p_msgContent := "AgIAEPQ9JwVAWXGJVq3AIK5gAgAgADDUHgAAASAWhAMQpQcz/+H/+gAQAA==" ) := { - msgContent := p_msgContent, - msgEncodeFormat := p_msgEncodeFormat, - msgType := p_msgType, - stdOrganization := p_stdOrganization + msgPropertiesValues := p_msgPropertiesValues, + msgRepresentationFormat := p_msgRepresentationFormat, + msgContent := p_msgContent } // End of template m_v2x_message template (present) V2xMsgPublication mw_v2x_message( - template (present) Json.String p_msgContent := ?, - template (present) Json.String p_msgEncodeFormat := "base64", - template (present) MsgType p_msgType := ?, - template (present) StdOrganization p_stdOrganization := ETSI + template (present) V2xMsgPropertiesValues p_msgPropertiesValues := ?, + template (present) Json.String p_msgRepresentationFormat := ?, + template (present) Json.String p_msgContent := ? ) := { - msgContent := p_msgContent, - msgEncodeFormat := p_msgEncodeFormat, - msgType := p_msgType, - stdOrganization := p_stdOrganization + msgPropertiesValues := p_msgPropertiesValues, + msgRepresentationFormat := p_msgRepresentationFormat, + msgContent := p_msgContent } // End of template mw_v2x_message + template (value) V2xMsgPropertiesValues m_v2x_msg_properties_values( + in StdOrganization p_std_organization := ETSI, + in MsgType p_msg_type := cam, + in Json.Integer p_msg_protocol_version := 1, + in template (value) LocationInfo p_location_info + ) := { + stdOrganization := p_std_organization, + msgType := p_msg_type, + msgProtocolVersion := p_msg_protocol_version, + locationInfo := p_location_info + } // End of template m_v2x_msg_properties_values + + template (present) V2xMsgPropertiesValues mw_v2x_msg_properties_values( + template (present) StdOrganization p_std_organization := ?, + template (present) MsgType p_msg_type := ?, + template (present) Json.Integer p_msg_protocol_version := ?, + template (present) LocationInfo p_location_info := ? + ) := { + stdOrganization := p_std_organization, + msgType := p_msg_type, + msgProtocolVersion := p_msg_protocol_version, + locationInfo := p_location_info + } // End of template mw_v2x_msg_properties_values + template (omit) ProvChgUuUniSubscription m_prov_chg_uu_uni_subscription( - in template (value) Json.AnyURI p_callbackReference, in template (value) ProvChgUuUniSubscriptionFilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgUuUniSubscription" + subscriptionType := "ProvChgUuUniSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_prov_chg_uu_uni_subscription template (omit) ProvChgUuUniSubscription m_prov_chg_uu_uni_subscription_invalid( - in template (value) Json.AnyURI p_callbackReference, in template (value) ProvChgUuUniSubscriptionFilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit - ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "InvalidProvChgUuUniSubscription" + ) modifies m_prov_chg_uu_uni_subscription := { + subscriptionType := "InvalidProvChgUuUniSubscription" } // End of template m_prov_chg_uu_uni_subscription template ProvChgUuUniSubscription mw_prov_chg_uu_uni_subscription( - template (present) Json.AnyURI p_callbackReference := ?, template (present) ProvChgUuUniSubscriptionFilterCriteria p_filterCriteria := ?, - template LinkType p_links := *, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgUuUniSubscription" + subscriptionType := "ProvChgUuUniSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template mw_prov_chg_uu_uni_subscription template (omit) ProvChgUuUniSubscriptionFilterCriteria m_prov_chg_uu_uni_filter_criteria( @@ -261,8 +414,8 @@ module V2XInformationServiceAPI_Templates { in template (omit) UuMbmsNeighbourCellInfoList p_neighbourCellInfo := omit ) := { locationInfo := p_location_info, - neighbourCellInfo := p_neighbourCellInfo, - v2xApplicationServer := p_v2xApplicationServer + v2xApplicationServer := p_v2xApplicationServer, + neighbourCellInfo := p_neighbourCellInfo } // End of template m_prov_chg_uu_uni_filter_criteria template ProvChgUuUniSubscriptionFilterCriteria mw_prov_chg_uu_uni_filter_criteria( @@ -271,8 +424,8 @@ module V2XInformationServiceAPI_Templates { template UuMbmsNeighbourCellInfoList p_neighbourCellInfo := * ) := { locationInfo := p_location_info, - neighbourCellInfo := p_neighbourCellInfo, - v2xApplicationServer := p_v2xApplicationServer + v2xApplicationServer := p_v2xApplicationServer, + neighbourCellInfo := p_neighbourCellInfo } // End of template mw_prov_chg_uu_uni_filter_criteria template (value) V2xApplicationServer m_v2x_application_server( @@ -280,7 +433,7 @@ module V2XInformationServiceAPI_Templates { in Json.String p_udp_port ) := { ipAddress := p_ip_address, - udpPort := p_udp_port + udpPort := p_udp_port } // End of template m_v2x_application_server template (present) V2xApplicationServer mw_v2x_application_server( @@ -288,33 +441,41 @@ module V2XInformationServiceAPI_Templates { template (present) Json.String p_udp_port := ? ) := { ipAddress := p_ip_address, - udpPort := p_udp_port + udpPort := p_udp_port } // End of template mw_v2x_application_server template (omit) ProvChgUuMbmsSubscription m_prov_chg_uu_mbms_subscription( - in template (value) Json.AnyURI p_callbackReference, in template (value) ProvChgUuMbmsSubscriptionFilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgUuMbmsSubscription" + subscriptionType := "ProvChgUuMbmsSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_prov_chg_uu_mbms_subscription template ProvChgUuMbmsSubscription mw_prov_chg_uu_mbms_subscription( - template (present) Json.AnyURI p_callbackReference := ?, template (present) ProvChgUuMbmsSubscriptionFilterCriteria p_filterCriteria := ?, - template LinkType p_links := *, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * - ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgUuMbmsSubscription" + ) := { + subscriptionType := "ProvChgUuMbmsSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template mw_prov_chg_uu_mbms_subscription template (omit) ProvChgUuMbmsSubscriptionFilterCriteria m_prov_chg_uu_mbms_filter_criteria( @@ -323,8 +484,8 @@ module V2XInformationServiceAPI_Templates { template (omit) UuMbmsNeighbourCellInfoList p_neighbourCellInfo := omit ) := { locationInfo := p_locationInfo, - neighbourCellInfo := p_neighbourCellInfo, - v2xServerUsd := p_v2xServerUsd + v2xServerUsd := p_v2xServerUsd, + neighbourCellInfo := p_neighbourCellInfo } // End of template m_prov_chg_uu_mbms_filter_criteria template (present) ProvChgUuMbmsSubscriptionFilterCriteria mw_prov_chg_uu_mbms_filter_criteria( @@ -333,8 +494,8 @@ module V2XInformationServiceAPI_Templates { template UuMbmsNeighbourCellInfoList p_neighbourCellInfo := * ) := { locationInfo := p_locationInfo, - neighbourCellInfo := p_neighbourCellInfo, - v2xServerUsd := p_v2xServerUsd + v2xServerUsd := p_v2xServerUsd, + neighbourCellInfo := p_neighbourCellInfo } // End of template mw_prov_chg_uu_mbms_filter_criteria template (value) V2xServerUsd m_v2x_server_usd( @@ -342,9 +503,9 @@ module V2XInformationServiceAPI_Templates { in template (value) SdpInfo p_sdpInfo, in template (value) Tmgi p_tmgi ) := { + tmgi := p_tmgi, serviceAreaIdentifier := p_serviceAreaIdentifier, - sdpInfo := p_sdpInfo, - tmgi := p_tmgi + sdpInfo := p_sdpInfo } // End of template m_v2x_server_usd template (present) V2xServerUsd mw_v2x_server_usd( @@ -352,9 +513,9 @@ module V2XInformationServiceAPI_Templates { template (present) SdpInfo p_sdpInfo := ?, template (present) Tmgi p_tmgi := ? ) := { + tmgi := p_tmgi, serviceAreaIdentifier := p_serviceAreaIdentifier, - sdpInfo := p_sdpInfo, - tmgi := p_tmgi + sdpInfo := p_sdpInfo } // End of template mw_v2x_server_usd template (value) SdpInfo m_sdp_info( @@ -394,29 +555,37 @@ module V2XInformationServiceAPI_Templates { } // End of template mw_tmgi template (omit) ProvChgPc5Subscription m_prov_chg_pc5_subscription( - in template (value) Json.AnyURI p_callbackReference, in template (value) FilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgPc5Subscription" + subscriptionType := "ProvChgPc5Subscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_prov_chg_pc5_subscription template (present) ProvChgPc5Subscription mw_prov_chg_pc5_subscription( - template (present) Json.AnyURI p_callbackReference := ?, template (present) FilterCriteria p_filterCriteria := ?, - template LinkType p_links := *, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "ProvChgPc5Subscription" + subscriptionType := "ProvChgPc5Subscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template mw_prov_chg_pc5_subscription template (omit) FilterCriteria m_filter_criteria( @@ -424,8 +593,8 @@ module V2XInformationServiceAPI_Templates { in template (value) LocationInfo p_locationInfo, in template (omit) Pc5NeighbourCellInfoList p_neighbourCellInfo := omit ) := { - dstLayer2Id := p_dstLayer2Id, locationInfo := p_locationInfo, + dstLayer2Id := p_dstLayer2Id, neighbourCellInfo := p_neighbourCellInfo } // End of template m_filter_criteria @@ -434,51 +603,113 @@ module V2XInformationServiceAPI_Templates { template (present) LocationInfo p_locationInfo := ?, template Pc5NeighbourCellInfoList p_neighbourCellInfo := * ) := { - dstLayer2Id := p_dstLayer2Id, locationInfo := p_locationInfo, + dstLayer2Id := p_dstLayer2Id, neighbourCellInfo := p_neighbourCellInfo } // End of template mw_filter_criteria template (omit) V2xMsgSubscription m_v2x_msg_subscription( - in template (value) Json.AnyURI p_callbackReference, - in template (value) V2xMsgSubscriptionFilterCriteria p_filterCriteria, - in template (omit) LinkType p_links := omit, + in template (value) V2xMsgFilterCriteria p_filterCriteria, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "V2xMsgSubscription" + subscriptionType := "V2xMsgSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template m_v2x_msg_subscription template (present) V2xMsgSubscription mw_v2x_msg_subscription( - template (present) Json.AnyURI p_callbackReference := ?, - template (present) V2xMsgSubscriptionFilterCriteria p_filterCriteria := ?, - template LinkType p_links := *, + template (present) V2xMsgFilterCriteria p_filterCriteria := ?, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, template TimeStamp p_expiryDeadline := * ) := { - links := p_links, - callbackReference := p_callbackReference, - expiryDeadline := p_expiryDeadline, - filterCriteria := p_filterCriteria, - subscriptionType := "V2xMsgSubscription" + subscriptionType := "V2xMsgSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline } // End of template mw_v2x_msg_subscription - template (omit) V2xMsgSubscriptionFilterCriteria m_v2x_msg_subscription_filter_criteria( - in StdOrganization p_stdOrganization := ETSI, - in template (omit) MsgTypeList p_msgType := { cam, denm } - ) := { - msgType := p_msgType, - stdOrganization := p_stdOrganization + template (omit) V2xMsgFilterCriteria m_v2x_msg_subscription_filter_criteria( + in StdOrganization p_stdOrganization := ETSI, + in template (omit) MsgTypeList p_msgType := { cam, denm }, + in template (omit) MsgProtocolVersionList p_msgProtocolVersion := omit, + in template (omit) LocationInfoList p_locationInfo := omit + ) := { + stdOrganization := p_stdOrganization, + msgType := p_msgType, + msgProtocolVersion := p_msgProtocolVersion, + locationInfo := p_locationInfo } // End of template m_v2x_msg_subscription_filter_criteria - template (present) V2xMsgSubscriptionFilterCriteria mw_v2x_msg_subscription_filter_criteria( - template (present) StdOrganization p_stdOrganization := ETSI, - template MsgTypeList p_msgType := * - ) := { - msgType := p_msgType, - stdOrganization := p_stdOrganization + template (present) V2xMsgFilterCriteria mw_v2x_msg_subscription_filter_criteria( + template (present) StdOrganization p_stdOrganization := ETSI, + template MsgTypeList p_msgType := *, + template MsgProtocolVersionList p_msgProtocolVersion := *, + template LocationInfoList p_locationInfo := * + ) := { + stdOrganization := p_stdOrganization, + msgType := p_msgType, + msgProtocolVersion := p_msgProtocolVersion, + locationInfo := p_locationInfo } // End of template mw_v2x_msg_subscription_filter_criteria + template (omit) PredQosSubscription m_pred_qos_subscription( + in template (value) QosPredFilterCriteria p_filterCriteria, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "PredQosSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template m_pred_qos_subscription + + template (present) PredQosSubscription mw_pred_qos_subscription( + template (present) QosPredFilterCriteria p_filterCriteria := ?, + template Json.AnyURI p_callbackReference := *, + template Links p_links := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "PredQosSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filterCriteria, + expiryDeadline := p_expiryDeadline + } // End of template mw_pred_qos_subscription + + template (omit) QosPredFilterCriteria m_qos_pred_filter_criteria( + in template (omit) Json.String p_streamId := omit + ) := { + streamId := p_streamId + } // End of template m_filterCriteria + + template QosPredFilterCriteria mw_qos_pred_filter_criteria( + template Json.String p_streamId := * + ) := { + streamId := p_streamId + } // End of template mw_filterCriteria + } // End of module V2XInformationServiceAPI_Templates diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn index 076dd00b525fa2a759e0f1a59f40626e1a922f0e..c881fa0205aeb144bf5846e557f04ede12493b0d 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn @@ -2,7 +2,7 @@ * @author ETSI / TTF T012 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 030 V2.1.1 (2020-04) + * @desc Types And Values for ETSI GS MEC 030 V3.1.1 (2023-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. @@ -13,492 +13,747 @@ module V2XInformationServiceAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; /** - * @desc E-UTRAN Cell Identity as a bit string (size (28)) - * @see ETSI TS 136 413 + * @desc Provisioning information required for V2X communication over Uu unicast + * @member timeStamp_ Time stamp + * @member proInfoUuUnicast The provisioning information per location + * @see ETSI GS MEC 030 V3.1.1 (2023-03) V3.1.1 (2023-03) Table 6.2.2-1: Attributes of the UuUnicastProvisioningInfo */ - type record CellId { - Json.String cellId + type record UuUnicastProvisioningInfo { + TimeStamp timeStamp optional, + ProInfoUuUnicastList proInfoUuUnicast } - /** - * @desc E-UTRA Absolute Radio Frequency Channel Number, range (0... 65535) - * @see ETSI TS 136 413 - */ - type UInt16 Earfcn; - /** - * @desc Transmission Bandwidth, which is used to indicate the UL or DL transmission bandwidth expressed in units of resource blocks - * @see ETSI TS 136 413 + * @desc The provisioning information per location as defined below + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member neighbourCellInfoThe information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast + * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.2-1: Attributes of the UuUnicastProvisioningInfo */ - type enumerated TransmissionBandwidth { - bw6 (1), - bw15 (2), - bw25 (3), - bw50 (4), - bw75 (6), - bw100 (7) - } with { - variant "JSON: as number" + type record ProInfoUuUnicast { + LocationInfo locationInfo, + V2xApplicationServer v2xApplicationServer, + UuUniNeighbourCellInfoList neighbourCellInfo optional } + type record of ProInfoUuUnicast ProInfoUuUnicastList; /** - * @desc E-UTRAN Cell Global Identifier - * @member cellId The E-UTRAN Cell Identity - * @member plmn Public Land Mobile Network Identity - * @see ETSI TS 136 413 + * @desc Provisioning information required for V2X communication over Uu MBMS + * @member proInfoUuMbms The provisioning information per location as defined below + * @member timeStamp_ TimeStamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.3-1: Attributes of the UuMbmsProvisioningInfo */ - type record Ecgi { - CellId cellId, - Plmn plmn + type record UuMbmsProvisioningInfo { + TimeStamp timeStamp optional, + ProInfoUuMbmsList proInfoUuMbms } /** - * @desc FDD information - * @member dlEarfcn Downlink E-UTRA Absolute Radio Frequency Channel Number - * @member dlTransmissionBandwidth Downlink Transmission Bandwidth - * @member ulEarfcn Uplink E-UTRA Absolute Radio Frequency Channel Number - * @member ulTransmissionBandwidth Uplink Transmission Bandwidth - * @see ETSI TS 136 413 + * @desc The provisioning information per location + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.3-1: Attributes of the UuMbmsProvisioningInfo */ - type record FddInfo { - Earfcn dlEarfcn, - TransmissionBandwidth dlTransmissionBandwidth, - Earfcn ulEarfcn, - TransmissionBandwidth ulTransmissionBandwidth + type record ProInfoUuMbms { + LocationInfo locationInfo, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional, + V2xServerUsd v2xServerUsd } + type record of ProInfoUuMbms ProInfoUuMbmsList; /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc Provisioning information required for V2X communication over PC5 + * @member proInfoPc5 The provisioning information per location + * @member timeStamp Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.4-1: Attributes of the Pc5ProvisioningInfo */ - type UInt32 Seconds; + type record Pc5ProvisioningInfo { + TimeStamp timeStamp optional, + Pc5ProvisioningInfoProInfoPc5List proInfoPc5 + } /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc The provisioning information per location + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.4-1: Attributes of the Pc5ProvisioningInfo */ - type UInt32 NanoSeconds; + type record Pc5ProvisioningInfoProInfoPc5 { + LocationInfo locationInfo, + Json.String dstLayer2Id, + Pc5NeighbourCellInfoList neighbourCellInfo optional + } + type record of Pc5ProvisioningInfoProInfoPc5 Pc5ProvisioningInfoProInfoPc5List; /** - * @desc Time stamp description - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see MEC030 Clause 6.5.2 Type: TimeStamp + * @desc This type represents the information of one or more V2X Message Distribution Servers that is exchanged between the VIS and a service consumer (e.g. a MEC application) to enable a direct interaction among the service consumer and one or multiple V2X Message Distribution Servers + * @member v2xMsgDistributionServer Describes the information of the V2X Message Distribution Servers supported by the service consumer for direct communication + * @member locationInfo Location information to identify a particular geographical area of interest to the service consumer for receiving V2X messages + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.5-1: Attributes of the V2xMsgDistributionServerInfo */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds + type record V2xMsgDistributionServerInfo { + V2xMsgDistributionServers v2xMsgDistributionServer, + LocationInfo locationInfo optional } /** - * @desc Information of a geographical area - * @member latitude Latitude (DATUM = WGS84) -90 to 90 in decimal degree format DDD.ddd - * @member longitude Longitude (DATUM = WGS84)-180 to 180 in decimal degree format DDD.ddd - * @see MEC030 Clause 6.5.3 Type: LocationInfo + * @desc Predicted QoS of a vehicular UE + * @member predictionTarget Indicates target of QoS prediction + * @member timeGranularity Granularity of visited location. Measured in meters + * @member locationGranularity Granularity of visited location. Measured in meters + * @member noticePeriod Information on when the predicted QoS is needed at the service consumer interface + * @member predictionArea Geographical area including the two ends of the user plane link between two V2X application instances + * @member routes Information relating to the potential routes of a vehicular UE + * @member qos Predicted QoS at the related time and vehicular UE location + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record LocationInfoGeoArea { - Json.Number latitude, - Json.Number longitude + type record PredictedQos { + PredictionTarget predictionTarget, + TimeStamp timeGranularity optional, + Json.String locationGranularity, + TimeStamp noticePeriod optional, + PredictionArea predictionArea optional, + Routes routes optional, + Qos qos + } + + type enumerated PredictionTarget { + SINGLE_UE_PREDICTION (1), + E2E_APPLICATION_INSTANCE_PREDICTION (2) + } with { + variant "JSON: as number" } /** - * @desc Location information - * @member ecgi E-UTRAN CelI Global Identifier of the serving cell - * @member geoArea Information of a geographical area - * @see MEC030 Clause 6.5.3 Type: LocationInfo + * @desc Geographical area including the two ends of the user plane link between two V2X application instances + * @member center Center of geographical area including the two ends of the user plane link between two V2X application instances + * @member radius Radius of geographical area including the two ends of the user plane link between two V2X application instances. Measured in meters + * @member + * @member + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record LocationInfo { - Ecgi ecgi, - LocationInfoGeoArea geoArea optional + type record PredictionArea { + LocationInfo center, + Json.String radius } - type record of LocationInfo LocationInfoList; /** - * @desc Location information - * @member ecgi E-UTRAN CelI Global Identifier - * @member plmn Public Land Mobile Network Identity - * @member siV2xConfig V2X sidelink communication configuration, as defined in ETSI TS 136 331 - * @see MEC030 Clause 6.5.12 Type: Pc5NeighbourCellInfo + * @desc Information relating to the potential routes of a vehicular UE + * @member routeinfo Information relating to a specific route + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record Pc5NeighbourCellInfo { - Ecgi ecgi, - Plmn plmn, - Json.String siV2xConfig + type record Route { + RouteInfoList routeinfo } - type record of Pc5NeighbourCellInfo Pc5NeighbourCellInfoList; + type record of Route Routes; /** - * @desc The provisioning information per location - * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 - * @see MEC030 Clause 6.2.4 Type: Pc5ProvisioningInfo + * @desc Information relating to a specific route + * @member location Vehicular UE location + * @member time Estimated time at the location + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record Pc5ProvisioningInfoProInfoPc5 { - Json.String dstLayer2Id, - LocationInfo locationInfo, - Pc5NeighbourCellInfoList neighbourCellInfo optional + type record RouteInfo { + LocationInfo location, + TimeStamp time optional } - type record of Pc5ProvisioningInfoProInfoPc5 Pc5ProvisioningInfoProInfoPc5List; + type record of RouteInfo RouteInfoList; /** - * @desc Provisioning information required for V2X communication over PC5 - * @member proInfoPc5 The provisioning information per location - * @member timeStamp Time stamp - * @see MEC030 Clause 6.5.12 Type: Pc5NeighbourCellInfo + * @desc Predicted QoS at the related time and vehicular UE location + * @member stream Predicted QoS at the related time and vehicular UE location for the specific data stream + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record Pc5ProvisioningInfo { - Pc5ProvisioningInfoProInfoPc5List proInfoPc5, - TimeStamp timeStamp optional + type record Qos { + StreamList stream } /** - * @desc PLMN Identity - * @member mcc The Mobile Country Code part of PLMN Identity - * @member mnc The Mobile Network Code part of PLMN Identity - * @see MEC030 Clause 6.5.4 Type: Plmn + * @desc Predicted QoS at the related time and vehicular UE location + * @member qosKpi This structure contains the prediction for a specific QoS KPI related to a given data stream + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record Plmn { - Json.String mcc, - Json.String mnc + type record Stream { + QosKpiList qosKpi } + type record of Stream StreamList; /** - * @desc Information relating to a specific route - * @member location Vehicular UE location - * @member time Estimated time at the location - * @member rsrp Reference Signal Received Quality as defined in ETSI TS 136 214 - * @member rsrq Reference Signal Received Quality as defined in ETSI TS 136 214 [i.13]. Shall only be included in the response - * @see MEC030 Clause 6.2.5 Type: PredictedQos + * @desc This structure contains the prediction for a specific QoS KPI related to a given data stream + * @member kpiName The name of the KPI (e.g. latency, UL bitrate, etc.) + * @member kpiValue Information on the predicted value for the specific QoS KPI + * @member confidence Confidence of the prediction, as returned by the relevant domain PF + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.6-1: Attributes of the PredictedQos */ - type record RouteInfo { - LocationInfo location, - TimeStamp time optional, - UInt8 rsrp optional, - UInt8 rsrq optional + type record QosKpi { + Json.String kpiName, + Json.String kpiValue, + Json.String confidence optional } - type record of RouteInfo RouteInfoList; + type record of QosKpi QosKpiList; /** - * @desc Information relating to the potential routes of a vehicular UE - * @member routeinfo Information relating to a specific route - * @see MEC030 Clause 6.2.5 Type: PredictedQos + * @desc V2X message that a service consumer publishes to VIS + * @member msgPropertiesValues List of message properties that is associated to the V2X message publication that can be used for filtering messages at the reception of the V2X message + * @member msgRepresentationFormat The representation format of the binary V2X message, for example base64 or hexadecimal representation + * @member msgType Published V2X message content. Its format is defined by the standardization organization indicated by the attribute stdOrganization of the msgPropertiesValues attribute + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.7-1: Attributes of the V2xMsgPublication */ - type record PredictedQosRoutes { - RouteInfoList routeinfo + type record V2xMsgPublication { + V2xMsgPropertiesValues msgPropertiesValues, + Json.String msgRepresentationFormat, + Json.String msgContent } - type record of PredictedQosRoutes PredictedQosRoutesList; /** - * @desc Predicted QoS of a vehicular UE - * @member timeGranularity Granularity of visited location. Measured in meters - * @member locationGranularity Granularity of visited location. Measured in meters - * @member routes Information relating to the potential routes of a vehicular UE - * @see MEC030 Clause 6.2.5 Type: PredictedQos + * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over Uu unicast + * @member subscriptionType Shall be set to "ProvChgUuUniSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription */ - type record PredictedQos { - TimeStamp timeGranularity optional, - Json.String locationGranularity, - PredictedQosRoutesList routes + type record ProvChgUuUniSubscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + ProvChgUuUniSubscriptionFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; } /** - * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over PC5 - * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 - * @member notificationType Shall be set to "ProvChgPc5Notification" - * @see MEC030 Clause 6.4.4 Type: ProvChgPc5Notification + * @desc URI exposed by the client on which to receive notifications via HTTP */ - type record ProvChgPc5Notification { - Json.String dstLayer2Id optional, - LocationInfo locationInfo, - Pc5NeighbourCellInfoList neighbourCellInfo optional, - Json.String notificationType, - TimeStamp timeStamp optional - } + type Json.AnyURI CallbackReference; /** - * @desc Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests - * @member self_ Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription - * @see MEC030 Clause 6.3.4 Type: ProvChgPc5Subscription + * @desc List of hyperlinks related to the resource + * @member self_ URI referring to a resource + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription */ - type record LinkType { - Json.AnyURI self_ + type record Links { + LinkType self_ } with { variant (self_) "name as 'self'"; } /** - * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response - * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID + * @desc List of filtering criteria for the subscription. * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 - * @see MEC030 Clause 6.3.4 Type: ProvChgPc5Subscription + * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription */ - type record FilterCriteria { - Json.String dstLayer2Id, - LocationInfo locationInfo, - Pc5NeighbourCellInfoList neighbourCellInfo optional + type record ProvChgUuUniSubscriptionFilterCriteria { + LocationInfo locationInfo, + V2xApplicationServer v2xApplicationServer, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional } /** - * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over PC5 - * @member links URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member expiryDeadline Time stamp + * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over Uu MBMS + * @member subscriptionType Shall be set to "ProvChgUuMbmsSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource * @member filterCriteria List of filtering criteria for the subscription - * @member subscriptionType Shall be set to "ProvChgPc5Subscription" - * @see MEC030 Clause 6.3.4 Type: ProvChgPc5Subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.3-1: Attributes of the ProvChgUuMbmsSubscription */ - type record ProvChgPc5Subscription { - LinkType links optional, - Json.AnyURI callbackReference, - TimeStamp expiryDeadline optional, - FilterCriteria filterCriteria, - Json.String subscriptionType + type record ProvChgUuMbmsSubscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + ProvChgUuMbmsSubscriptionFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } - /** - * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over Uu MBMS - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS - * @member notificationType Shall be set to "ProvChgUuMbmsNotification" - * @member timeStamp_ Time stamp - * @member v2xServerUsd User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS - * @see MEC030 Clause 6.4.3 Type: ProvChgUuMbmsNotification - */ - type record ProvChgUuMbmsNotification { - LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - Json.String notificationType, - TimeStamp timeStamp optional, - V2xServerUsd v2xServerUsd optional - } - /** * @desc List of filtering criteria for the subscription * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS * @member v2xServerUsd User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS - * @see MEC030 Clause 6.3.3 Type: ProvChgUuMbmsSubscription + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.3-1: Attributes of the ProvChgUuMbmsSubscription */ type record ProvChgUuMbmsSubscriptionFilterCriteria { LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - V2xServerUsd v2xServerUsd + V2xServerUsd v2xServerUsd, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional } /** - * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over Uu MBMS - * @member links URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member callbackReferenceURI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member expiryDeadline Time stamp + * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over PC5 + * @member subscriptionType Shall be set to "ProvChgPc5Subscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource * @member filterCriteria List of filtering criteria for the subscription - * @member subscriptionType Shall be set to "ProvChgUuMbmsSubscription" - * @see MEC030 Clause 6.3.3 Type: ProvChgUuMbmsSubscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.4-1: Attributes of the ProvChgPc5Subscription */ - type record ProvChgUuMbmsSubscription { - LinkType links optional, - Json.AnyURI callbackReference, - TimeStamp expiryDeadline optional, - ProvChgUuMbmsSubscriptionFilterCriteria filterCriteria, - Json.String subscriptionType + type record ProvChgPc5Subscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteria filterCriteria, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } /** - * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over Uu unicast + * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast - * @member notificationType Shall be set to "ProvChgUuUniNotification" - * @member timeStamp_ Time stamp - * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast - * @see MEC030 Clause 6.4.2 Type: ProvChgUuUniNotification + * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 6.3.4 Type: ProvChgPc5Subscription */ - type record ProvChgUuUniNotification { - LocationInfo locationInfo, - UuUniNeighbourCellInfoList neighbourCellInfo optional, - Json.String notificationType, - TimeStamp timeStamp optional, - V2xApplicationServer v2xApplicationServer optional + type record FilterCriteria { + LocationInfo locationInfo, + Json.String dstLayer2Id, + Pc5NeighbourCellInfoList neighbourCellInfo optional } /** - * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS - * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast - * @see MEC030 Clause 6.3.3 Type: ProvChgUuMbmsSubscription + * @desc Subscription to notification of V2X message + * @member subscriptionType Shall be set to "V2xMsgSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource + * @member filterCriteria List of filtering criteria for the subscription + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.5-1: Attributes of the V2xMsgSubscription */ - type record ProvChgUuUniSubscriptionFilterCriteria { - LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - V2xApplicationServer v2xApplicationServer + type record V2xMsgSubscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + V2xMsgFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; } /** - * @desc Subscription to the notifications from VIS about the provisioning information changes for V2X communication over Uu unicast - * @member links URI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member callbackReferenceURI selected by the service consumer to receive notifications on the subscribed VIS information. This shall be included both in the request and in response - * @member expiryDeadline Time stamp + * @desc This type represents a subscription to notification of predicted QoS information + * @member subscriptionType Shall be set to "PredQosSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed RNIS information + * @member requestTestNotification Shall be set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between RNIS and the service consumer for notifications + * @member links Hyperlink related to the resource * @member filterCriteria List of filtering criteria for the subscription - * @member subscriptionType Shall be set to "ProvChgUuUniSubscription" - * @see MEC030 Clause 6.3.2 Type: ProvChgUuUniSubscription - */ - type record ProvChgUuUniSubscription { - LinkType links optional, - Json.AnyURI callbackReference, - TimeStamp expiryDeadline optional, - ProvChgUuUniSubscriptionFilterCriteria filterCriteria, - Json.String subscriptionType + * @member expiryDeadline Time stamp + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.6-1: Attributes of the PredQosSubscription + */ + type record PredQosSubscription { + Json.String subscriptionType, + CallbackReference callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + QosPredFilterCriteria filterCriteria, + TimeStamp expiryDeadline optional } with { variant (links) "name as '_links'"; } /** - * @desc The service consumers subscriptions - * @member href The URI referring to the subscription - * @member subscriptionType Type of the subscription. The values are as defined in the \"subscriptionType\" attribute for each different V2X information event subscription data type - * @see MEC030 Clause 6.3.6 Type: SubscriptionLinkList + * @desc This type represents a list of links related to currently existing subscriptions for the service consumer + * @member links Hyperlink related to the resource + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.7-1: Attributes of the SubscriptionLinkList */ - type record SubscriptionsLink_ { - Json.AnyURI href, - Json.String subscriptionType + type record SubscriptionLinkList { + SubscriptionLinks links + } with { + variant (links) "name as '_links'"; } - type record of SubscriptionsLink_ SubscriptionLinkList_; /** - * @desc List of hyperlinks related to the resource - * @member self_ URI of this resource - * @member subscriptions The service consumer’s subscriptions - * @see MEC030 Clause 6.3.6 Type: SubscriptionLinkList + * @desc Hyperlink related to the resource + * @member self_ URI of this resource. + * @member subscription The service consumer's subscriptions + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.7-1: Attributes of the SubscriptionLinkList */ - type record SubscriptionLinkList { - LinkType self_, - SubscriptionLinkList_ subscriptions + type record SubscriptionLinks { + LinkType self_, + SubscriptionList subscription optional } with { variant (self_) "name as 'self'"; } /** - * @desc TDD information - * @member earfcn E-UTRA Absolute Radio Frequency Channel Number - * @member subframeAssignment Uplink-downlink subframe configuration information - * @member transmissionBandwidth Transmission Bandwidth - * @see MEC030 Clause 6.5.7 Type: TddInfo + * @desc A link to a subscription + * @member href The URI referring to the subscription. + * @member subscriptionType Type of subscription + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.7-1: Attributes of the SubscriptionLinkList */ - type record TddInfo { - Earfcn earfcn, - Json.String subframeAssignment, - TransmissionBandwidth transmissionBandwidth + type record Subscription_ { + Json.AnyURI href, + Json.String subscriptionType } + type record of Subscription_ SubscriptionList; /** - * @desc Neighbour cell information in a visiting PLMN that supports V2X communication over Uu MBMS - * @member ecgi E-UTRAN CelI Global Identifier - * @member fddInfo Information for FDD operation - * @member mbmsServiceAreaIdentity Supported MBMS Service Area Identities in the cell - * @member pci Physical Cell Identifier - * @member plmn Public Land Mobile Network Identity - * @member tddInfo Information for TDD operation - * @see MEC030 Clause 6.5.11 Type: UuMbmsNeighbourCellInfo + * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over Uu unicast + * @member notificationType Shall be set to "ProvChgUuUniNotification" + * @member timeStamp_ Time stamp + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.2-1: Attributes of the ProvChgUuUniNotification */ - type record UuMbmsNeighbourCellInfo { - Ecgi ecgi, - FddInfo fddInfo, - MbmsServiceAreaIdentityList mbmsServiceAreaIdentity, - integer pci, - Plmn plmn, - TddInfo tddInfo + type record ProvChgUuUniNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + LocationInfo locationInfo, + V2xApplicationServer v2xApplicationServer optional, + UuUniNeighbourCellInfoList neighbourCellInfo optional } - type record of Json.String MbmsServiceAreaIdentityList; - type record of UuMbmsNeighbourCellInfo UuMbmsNeighbourCellInfoList; /** - * @desc The provisioning information per location + * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over Uu MBMS + * @member notificationType Shall be set to "ProvChgUuMbmsNotification" + * @member timeStamp_ Time stamp * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member v2xServerUsd User Service Description for V2X Application Server is used to configure the UE for receiving local V2X Application Server information when it is provided over MBMS * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over Uu MBMS + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.3-1: Attributes of the ProvChgUuMbmsNotification */ - type record ProInfoUuMbms { + type record ProvChgUuMbmsNotification { + Json.String notificationType, + TimeStamp timeStamp optional, LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - V2xServerUsd v2xServerUsd + V2xServerUsd v2xServerUsd optional, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional } - type record of ProInfoUuMbms ProInfoUuMbmsList; /** - * @desc Provisioning information required for V2X communication over Uu MBMS - * @member proInfoUuMbms The provisioning information per location as defined below - * @member timeStamp_ TimeStamp - * @see MEC030 Clause 6.2.3 Type: UuMbmsProvisioningInfo + * @desc Notification from VIS with regards to the provisioning information changes for V2X communication over PC5 + * @member notificationType Shall be set to "ProvChgPc5Notification" + * @member timeStamp_ Time stamp + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area + * @member dstLayer2Id For sidelink communication, the Destination Layer-2 ID is set to the ProSe Layer-2 Group ID or Prose UE ID + * @member neighbourCellInfo The information of the neighbour cells in a visiting PLMN that support V2X communication over PC5 + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.4-1: Attributes of the ProvChgPc5Notification */ - type record UuMbmsProvisioningInfo { - ProInfoUuMbmsList proInfoUuMbms, - TimeStamp timeStamp optional + type record ProvChgPc5Notification { + Json.String notificationType, + TimeStamp timeStamp optional, + LocationInfo locationInfo, + Json.String dstLayer2Id optional, + Pc5NeighbourCellInfoList neighbourCellInfo optional } /** - * @desc Neighbour cell information in a visiting PLMN that supports V2X communication over Uu unicast - * @member ecgi E-UTRAN CelI Global Identifier - * @member fddInfo Information for FDD operation - * @member pci Physical Cell Identifier + * @desc Notification for informing the subscribers about the V2X message + * @member notificationType Shall be set to "V2xMsgNotification" + * @member timeStamp Time stamp + * @member msgPropertiesValues List of message properties that is associated to the V2X message + * @member msgRepresentationFormat The representation format of the binary V2X message, for example base64 or hexadecimal representation + * @member msgContent Published V2X message content. The format of the string is defined by the standardization organization + * @member links Link to resources related to this notification + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.5-1: Attributes of the V2xMsgNotification + */ + type record V2xMsgNotification { + Json.String notificationType, + TimeStamp timeStamp, + V2xMsgPropertiesValues msgPropertiesValues, + Json.String msgRepresentationFormat, + Json.String msgContent, + Links_Notification links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Link to resources related to this notification + * @member subscription A link to the related subscription + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.5-1: Attributes of the V2xMsgNotification + */ + type record Links_Notification { + LinkType subscription + } + + /** + * @desc This type represents a notification from RNIS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "TestNotification" + * @member links Hyperlink related to the resource + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.4.6-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links_Notification links optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Location information + * @member ecgi E-UTRAN CelI Global Identifier of the serving cell + * @member geoArea Information of a geographical area + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.3-1: Attributes of the LocationInfo + */ + type record LocationInfo { + Ecgi ecgi, + LocationInfoGeoArea geoArea optional + } + type record of LocationInfo LocationInfoList; + + /** + * @desc Information of a geographical area + * @member latitude Latitude (DATUM = WGS84) -90 to 90 in decimal degree format DDD.ddd + * @member longitude Longitude (DATUM = WGS84)-180 to 180 in decimal degree format DDD.ddd + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.3-1: Attributes of the LocationInfo + */ + type record LocationInfoGeoArea { + Json.Number latitude, + Json.Number longitude + } + + /** + * @desc PLMN Identity + * @member mcc The Mobile Country Code part of PLMN Identity + * @member mnc The Mobile Network Code part of PLMN Identity + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.4-1: Attributes of the Plmn + */ + type record Plmn { + Json.String mcc, + Json.String mnc + } + + /** + * @desc E-UTRAN Cell Global Identifier * @member plmn Public Land Mobile Network Identity - * @member tddInfo Information for TDD operation - * @see MEC030 Clause 6.5.9 Type: UuUniNeighbourCellInfo + * @member cellId The E-UTRAN Cell Identity + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.5-1: Attributes of the Ecgi */ - type record UuUniNeighbourCellInfo { - Ecgi ecgi, - FddInfo fddInfo, - integer pci, - Plmn plmn, - TddInfo tddInfo + type record Ecgi { + Plmn plmn, + CellId cellId } - type record of UuUniNeighbourCellInfo UuUniNeighbourCellInfoList; /** - * @desc The provisioning information per location as defined below - * @member locationInfo Location information to identify a cell of a base station or a particular geographical area - * @member neighbourCellInfoThe information of the neighbour cells in a visiting PLMN that support V2X communication over Uu unicast - * @member v2xApplicationServer V2X Application Server address (consisting of IP address and UDP port) for unicast - * @see MEC030 Clause 6.2.2 Type: UuUnicastProvisioningInfo + * @desc E-UTRAN Cell Identity as a bit string (size (28)) + * @see ETSI TS 136 413 */ - type record ProInfoUuUnicast { - LocationInfo locationInfo, - V2xApplicationServer v2xApplicationServer, - UuUniNeighbourCellInfoList neighbourCellInfo optional + type record CellId { + Json.String cellId } - type record of ProInfoUuUnicast ProInfoUuUnicastList; /** - * @desc Provisioning information required for V2X communication over Uu unicast - * @member proInfoUuUnicast The provisioning information per location - * @member timeStamp_ Time stamp - * @see MEC030 Clause 6.2.2 Type: UuUnicastProvisioningInfo + * @desc FDD information + * @member ulEarfcn Uplink E-UTRA Absolute Radio Frequency Channel Number + * @member dlEarfcn Downlink E-UTRA Absolute Radio Frequency Channel Number + * @member ulTransmissionBandwidth Uplink Transmission Bandwidth + * @member dlTransmissionBandwidth Downlink Transmission Bandwidth + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.6-1: Attributes of the FddInfo */ - type record UuUnicastProvisioningInfo { - ProInfoUuUnicastList proInfoUuUnicast, - TimeStamp timeStamp optional + type record FddInfo { + Earfcn ulEarfcn, + Earfcn dlEarfcn, + TransmissionBandwidth ulTransmissionBandwidth, + TransmissionBandwidth dlTransmissionBandwidth + } + + /** + * @desc E-UTRA Absolute Radio Frequency Channel Number, range (0... 65535) + * @see ETSI TS 136 413 + */ + type Json.UInt16 Earfcn; + + /** + * @desc Transmission Bandwidth, which is used to indicate the UL or DL transmission bandwidth expressed in units of resource blocks + * @see ETSI TS 136 413 + */ + type enumerated TransmissionBandwidth { + bw6 (1), + bw15 (2), + bw25 (3), + bw50 (4), + bw75 (6), + bw100 (7) + } with { + variant "JSON: as number" + } + + /** + * @desc TDD information + * @member earfcn E-UTRA Absolute Radio Frequency Channel Number + * @member transmissionBandwidth Transmission Bandwidth + * @member subframeAssignment Uplink-downlink subframe configuration information + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.7-1: Attributes of the TddInfo + */ + type record TddInfo { + Earfcn earfcn, + TransmissionBandwidth transmissionBandwidth, + Json.String subframeAssignment } /** * @desc V2X Application Server address (consisting of IP address and UDP port) for unicast * @member ipAddress * @member udpPort - * @see MEC030 Clause 6.5.8 Type: V2xApplicationServer + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.8-1: Attributes of the V2xApplicationServer */ type record V2xApplicationServer { Json.String ipAddress, Json.String udpPort } + /** + * @desc Neighbour cell information in a visiting PLMN that supports V2X communication over Uu unicast + * @member plmn Public Land Mobile Network Identity + * @member ecgi E-UTRAN CelI Global Identifier + * @member pci Physical Cell Identifier + * @member fddInfo Information for FDD operation + * @member tddInfo Information for TDD operation + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.9-1: Attributes of the UuUniNeighbourCellInfo + */ + type record UuUniNeighbourCellInfo { + Plmn plmn, + Ecgi ecgi, + Json.Integer pci, + FddInfo fddInfo, + TddInfo tddInfo + } + type record of UuUniNeighbourCellInfo UuUniNeighbourCellInfoList; + + /** + * @desc Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services + * @member tmgi Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services + * @member serviceAreaIdentifier A list of service area identifier for the applicable MBMS broadcast area + * @member sdpInfo SDP with IP multicast address and port number used for V2X communication via MBMS + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.10-1: Attributes of the V2xServerUsd + */ + type record V2xServerUsd { + Tmgi tmgi, + ServiceAreaIdentifier serviceAreaIdentifier, + SdpInfo sdpInfo + } + + /** + * @desc Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services + * @member mbmsServiceId MBMS Service ID consisting of three octets + * @member mcc The Mobile Country Code part of PLMN Identity + * @member mnc The Mobile Network Code part of PLMN Identity + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.10-1: Attributes of the V2xServerUsd + */ + type record Tmgi { + Json.String mbmsServiceId, + Json.String mcc, + Json.String mnc + } + + type record of Json.String ServiceAreaIdentifier; + + /** + * @desc SDP with IP multicast address and port number used for V2X communication via MBMS + * @member ipMulticastAddress + * @member portNumber + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.10-1: Attributes of the V2xServerUsd + */ + type record SdpInfo { + Json.String ipMulticastAddress, + Json.String portNumber + } + type record of SdpInfo SdpInfoList; + + /** + * @desc Neighbour cell information in a visiting PLMN that supports V2X communication over Uu MBMS + * @member plmn Public Land Mobile Network Identity + * @member ecgi E-UTRAN CelI Global Identifier + * @member pci Physical Cell Identifier + * @member fddInfo Information for FDD operation + * @member tddInfo Information for TDD operation + * @member mbmsServiceAreaIdentity Supported MBMS Service Area Identities in the cell + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 6.5.11 Type: UuMbmsNeighbourCellInfo + */ + type record UuMbmsNeighbourCellInfo { + Plmn plmn, + Ecgi ecgi, + Json.Integer pci, + FddInfo fddInfo, + TddInfo tddInfo, + MbmsServiceAreaIdentityList mbmsServiceAreaIdentity + } + type record of Json.String MbmsServiceAreaIdentityList; + type record of UuMbmsNeighbourCellInfo UuMbmsNeighbourCellInfoList; + + /** + * @desc Location information + * @member ecgi E-UTRAN CelI Global Identifier + * @member plmn Public Land Mobile Network Identity + * @member siV2xConfig V2X sidelink communication configuration, as defined in ETSI TS 136 331 + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.12-1: Attributes of the Pc5NeighbourCellInfo + */ + type record Pc5NeighbourCellInfo { + Plmn plmn, + Ecgi ecgi, + SystemInformationBlockType21 siV2xConfig + } + type record of Pc5NeighbourCellInfo Pc5NeighbourCellInfoList; + + type Json.String SystemInformationBlockType21; // FIXME Not defined anywhere in ETSI GS MEC 030 V3.1.1 and previous versions + + /** + * @desc This type represents a type of link + * @member self_ URI referring to a resource + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.13-1: Attributes of the LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc This type represents the properties that can be associated to a V2X message when it is published, or a notification in relation to the V2X message is issued + * @member stdOrganization Standardization organization which defines the published V2X + * @member msgType Published V2X message type. Its value is defined by the standardization organization indicated by the attribute stdOrganization + * @member msgProtocolVersion Protocol version of the V2X message (0..255) + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area to which the V2X message can be associated + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.14-1: Attributes of the V2xMsgPropertiesValues + */ + type record V2xMsgPropertiesValues { + StdOrganization stdOrganization, + MsgType msgType, + Json.Integer msgProtocolVersion, + LocationInfo locationInfo + } + + /** + * @desc Standardization organization which defines the published V2X message type + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.14-1: Attributes of the V2xMsgPropertiesValues + */ + type enumerated StdOrganization { + ETSI + } + /** * @desc Published V2X message type. Its value is defined by the standardization organization + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.14-1: Attributes of the V2xMsgPropertiesValues */ type enumerated MsgType { denm (1), @@ -508,133 +763,95 @@ module V2XInformationServiceAPI_TypesAndValues { map_ (5), ivi (6), ev_rsr(7) - } with { - variant "JSON: as number" + // } with { + // variant "JSON: as number" } type record of MsgType MsgTypeList; /** - * @desc Standardization organization which defines the published V2X message type - */ - type enumerated StdOrganization { - ETSI - } - - /** - * @desc V2X message that a service consumer publishes to VIS - * @member msgContent Published V2X message content. Its format is defined by the standardization organization indicated by the attribute stdOrganization - * @member msgEncodeFormat The encode format of the V2X message, for example base64 + * @desc This type represents the filter criteria that can be used when performing a subscription to notification of V2X messages + * @member stdOrganization Standardization organization which defines the published V2X * @member msgType Published V2X message type. Its value is defined by the standardization organization indicated by the attribute stdOrganization - * @member stdOrganization Standardization organization which defines the published V2X message type - * @see MEC030 Clause 6.2.6 Type: V2xMsgPublication + * @member msgProtocolVersion Protocol version of the V2X message (0..255) + * @member locationInfo Location information to identify a cell of a base station or a particular geographical area to which the V2X message can be associated + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.15-1: Attributes of the V2xMsgFilterCriteria */ - type record V2xMsgPublication { - Json.String msgContent, - Json.String msgEncodeFormat, - MsgType msgType, - StdOrganization stdOrganization + type record V2xMsgFilterCriteria { + StdOrganization stdOrganization, + MsgTypeList msgType optional, + MsgProtocolVersionList msgProtocolVersion optional, + LocationInfoList locationInfo optional } + type record of Json.Integer MsgProtocolVersionList; /** - * @desc List of filtering criteria for the subscription. Any filtering criteria from below, which is included in the request, shall also be included in the response - * @member msgType Subscribed V2X message type. Its value is defined by the standardization organization indicated by the attribute stdOrganization - * @member stdOrganization Standardization organization which defines the published V2X message type - * @see MEC030 Clause 6.3.5 Type: V2xMsgSubscription + * @desc This type represents the information about a V2X Message Distribution Server that can be exchanged between a service consumer (e.g. a MEC application) and the VIS + * @member infoProtocol Specifics of the application layer protocol of V2X Message Distribution Server + * @member infoConnection Connection information of the V2X Message Distribution Server the service consumer can use for direct connection + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ - type record V2xMsgSubscriptionFilterCriteria { - MsgTypeList msgType optional, - StdOrganization stdOrganization - } - -/** - * @desc Subscription to notification of V2X message - * @member links Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed V2X message. This shall be included both in the request and in response - * @member expiryDeadline Time stamp - * @member filterCriteria List of filtering criteria for the subscription - * @member subscriptionType Shall be set to "V2xMsgSubscription" - * @see MEC030 Clause 6.3.5 Type: V2xMsgSubscription - */ - type record V2xMsgSubscription { - LinkType links optional, - Json.AnyURI callbackReference, - TimeStamp expiryDeadline optional, - V2xMsgSubscriptionFilterCriteria filterCriteria, - Json.String subscriptionType - } with { - variant (links) "name as '_links'"; + type record V2xMsgDistributionServer { + InfoProtocol infoProtocol, + InfoConnection infoConnection optional } + type record of V2xMsgDistributionServer V2xMsgDistributionServers; /** - * @desc Link to resources related to this notification - * @member subscription Self-referring URI. The URI shall be unique within the VIS API as it acts as an ID for the subscription - * @see MEC030 Clause 6.4.5 Type: V2xMsgNotification + * @desc Specifics of the application layer protocol of V2X Message Distribution Server + * @member msgProtocol Numerical value corresponding to the application layer protocol supported by the service consumer + * @member protImplementation Implementation specifics of application layer protocol, e.g. programming language + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ - type record V2xMsgNotificationLinks { - LinkType subscription + type record InfoProtocol { + MsgProtocols msgProtocol, + Json.String protImplementation } /** - * @desc Notification for informing the subscribers about the V2X message - * @member notificationType Shall be set to "V2xMsgNotification" - * @member timeStamp_ Time stamp - * @member stdOrganization Standardization organization which defines the published V2X message type ETSI: European Telecommunications Standards Institute - * @member msgType Published V2X message type. Its value is defined by the standardization organization - * @member msgEncodeFormat The encode format of the V2X message, for example base64 - * @member msgContent Published V2X message content. The format of the string is defined by the standardization organization - * @member links Link to resources related to this notification - * @see MEC030 Clause 6.4.5 Type: V2xMsgNotification + * @desc Numerical value corresponding to the application layer protocol supported by the service consumer + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ - type record V2xMsgNotification { - Json.String notificationType, - TimeStamp timeStamp, - StdOrganization stdOrganization, - MsgType msgType, - Json.String msgEncodeFormat, - Json.String msgContent, - V2xMsgNotificationLinks links + type enumerated MsgProtocol { + MQTT_v3_1_0 (0), + MQTT_v3_1_1 (1), + MQTT_v5 (2), + MQTT_SN (3), + AMQP_1_0 (4) } with { - variant (links) "name as '_links'"; + variant "JSON: as number" } + type record of MsgProtocol MsgProtocols /** - * @desc SDP with IP multicast address and port number used for V2X communication via MBMS - * @member ipMulticastAddress - * @member portNumber - * @see MEC030 Clause 6.5.10 Type: V2xServerUsd + * @desc Connection information of the V2X Message Distribution Server the service consumer can use for direct connection + * @member ipAddress IP address of the V2X Message Distribution Server + * @member port_number Port number of the V2X Message Distribution Server + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ - type record SdpInfo { - Json.String ipMulticastAddress, - Json.String portNumber + type record InfoConnection { + Json.String ipAddress, + Json.UInt16 port_number } - type record of SdpInfo SdpInfoList; /** - * @desc Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services - * @member mbmsServiceId MBMS Service ID consisting of three octets - * @member mcc The Mobile Country Code part of PLMN Identity - * @member mnc The Mobile Network Code part of PLMN Identity - * @see MEC030 Clause 6.5.10 Type: V2xServerUsd + * @desc This type represents the filter criteria that can be used when performing a subscription to notification of QoS prediction messages + * @member streamId The predicted QoS at the related time and vehicular UE location is provided for a specific data stream. In case of 3GPP network, this is mapped to a QoS flow + * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.17-1: Attributes of the QosPredFilterCriteria */ - type record Tmgi { - Json.String mbmsServiceId, - Json.String mcc, - Json.String mnc + type record QosPredFilterCriteria { + Json.String streamId optional } /** - * @desc Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services - * @member serviceAreaIdentifier A list of service area identifier for the applicable MBMS broadcast area - * @member sdpInfo SDP with IP multicast address and port number used for V2X communication via MBMS - * @member tmgi Temporary Mobile Group Identity (TMGI), which is used within MBMS to uniquely identify Multicast and Broadcast bearer services - * @see MEC030 Clause 6.5.10 Type: V2xServerUsd + * @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 030 V3.1.1 (2023-03) Table 6.5.18-1: Attributes of the WebsockNotifConfig */ - type record V2xServerUsd { - ServiceAreaIdentifier serviceAreaIdentifier, - SdpInfo sdpInfo, - Tmgi tmgi + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional } - type record of Json.String ServiceAreaIdentifier; } with { encode "JSON" diff --git a/ttcn/LibMec/WlanInformationAPI/json/WlanInformationAPI.json b/ttcn/LibMec/WlanInformationAPI/json/WlanInformationAPI.json deleted file mode 100644 index 73fd3482425eaba9603887e6e282f8ff9b35dc9e..0000000000000000000000000000000000000000 --- a/ttcn/LibMec/WlanInformationAPI/json/WlanInformationAPI.json +++ /dev/null @@ -1,2701 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "contact": { - "url": "https://forge.etsi.org/rep/mec/gs028-wai-api" - }, - "title": "ETSI GS MEC 028 - WLAN Access Information API", - "version": "2.1.1", - "description": "The ETSI MEC ISG MEC028 WLAN Access Information API described using OpenAPI", - "license": { - "name": "BSD-3-Clause", - "url": "https://forge.etsi.org/legal-matters" - } - }, - "externalDocs": { - "description": "ETSI MEC028 V2.1.1 WLAN Information API", - "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/028/02.01.01_60/gs_mec028v020101p.pdf" - }, - "servers": [ - { - "url": "https://localhost/wai/v2" - } - ], - "tags": [ - { - "name": "wai" - } - ], - "paths": { - "/queries/ap/ap_information": { - "get": { - "tags": [ - "wai" - ], - "summary": "Retrieve information on existing Access Points", - "description": "Queries information about existing WLAN Access Points", - "operationId": "apInfoGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.Filter" - }, - { - "$ref": "#/components/parameters/Query.AllFields" - }, - { - "$ref": "#/components/parameters/Query.Fields" - }, - { - "$ref": "#/components/parameters/Query.ExcludeFields" - }, - { - "$ref": "#/components/parameters/Query.ExcludeDefault" - } - ], - "responses": { - "200": { - "description": "Successful response to ap_info request", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApInfo" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - } - }, - "/queries/sta/sta_information": { - "get": { - "tags": [ - "wai" - ], - "summary": "Retrieve information on existing Stations", - "description": "Queries information about existing WLAN stations", - "operationId": "staInfoGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.Filter" - }, - { - "$ref": "#/components/parameters/Query.AllFields" - }, - { - "$ref": "#/components/parameters/Query.Fields" - }, - { - "$ref": "#/components/parameters/Query.ExcludeFields" - }, - { - "$ref": "#/components/parameters/Query.ExcludeDefault" - } - ], - "responses": { - "200": { - "description": "Successful response to sta_info request", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/StaInfo" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - } - }, - "/subscriptions": { - "get": { - "tags": [ - "wai" - ], - "summary": "Retrieve information on subscriptions for notifications", - "description": "Queries information on subscriptions for notifications", - "operationId": "subscriptionLinkList_subscriptionsGET", - "parameters": [ - { - "$ref": "#/components/parameters/Query.SubscriptionType" - } - ], - "responses": { - "200": { - "description": "Response body contains the list of links to requestors subscriptions.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SubscriptionLinkList" - }, - "example": { - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions" - } - }, - "subscription": [ - { - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123" - } - }, - "callbackReference": "http://my.callback.com/wai/assocStaSubscription/some-id", - "subscriptionType": "AssocStaSubscription" - } - ] - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - }, - "post": { - "tags": [ - "wai" - ], - "summary": "Create a new subscription", - "description": "Creates a new subscription to WLAN Access Information notifications", - "operationId": "subscriptionsPOST", - "requestBody": { - "description": "Subscription to be created", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "subscriptionType": "AssocStaSubscription", - "callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1", - "expiryDeadline": { - "seconds": 1977836800, - "nanoSeconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - } - } - } - } - }, - "responses": { - "201": { - "description": "Successful subscription response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "subscriptionType": "AssocStaSubscription", - "callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1", - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123" - } - }, - "expiryDeadline": { - "seconds": 1977836800, - "nanoSeconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "415": { - "$ref": "#/components/responses/415" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - }, - "callbacks": { - "notification": { - "{$request.body#/callbackReference}": { - "post": { - "summary": "Callback POST used to send a notification", - "description": "Notification from WAIS, content based on subscription type", - "operationId": "notificationPOST", - "requestBody": { - "description": "Subscription notification", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineNotification" - }, - "example": { - "notificationType": "AssocStaNotification", - "timeStamp": { - "seconds": 1977836800, - "nanoseconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - }, - "staId": { - "macId": "005C01111111", - "ssid": [ - "myNetworkSsid", - "myOtherNetworkSsid" - ], - "aid": "1122", - "ipAddress": "10.10.1.255" - } - } - } - } - }, - "responses": { - "204": { - "$ref": "#/components/responses/204" - } - } - } - } - } - } - } - }, - "/subscriptions/{subscriptionId}": { - "get": { - "tags": [ - "wai" - ], - "summary": "Retrieve information on current specific subscription", - "description": "Queries information about an existing subscription, identified by its self-referring URI returned on creation (initial POST)", - "operationId": "subscriptionsGET", - "parameters": [ - { - "$ref": "#/components/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Subscription information regarding subscription notifications", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "subscriptionType": "AssocStaSubscription", - "callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1", - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123" - } - }, - "expiryDeadline": { - "seconds": 1977836800, - "nanoSeconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - }, - "put": { - "tags": [ - "wai" - ], - "summary": "Modify an existing subscription", - "description": "Updates an existing subscription, identified by its self-referring URI returned on creation (initial POST)", - "operationId": "subscriptionsPUT", - "requestBody": { - "description": "Subscription to be modified", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "subscriptionType": "AssocStaSubscription", - "callbackReference": "http://meAppClient.example.com/wai/v2/notifications/1", - "_links": { - "self": { - "href": "http://meAppServer.example.com/wai/v2/subscriptions/sub123" - } - }, - "expiryDeadline": { - "seconds": 1977836800, - "nanoSeconds": 0 - }, - "apId": { - "macId": "005C0A0A0A0A", - "ssid": "myNetworkSsid", - "ipAddress": "10.10.100.1" - } - } - } - } - }, - "parameters": [ - { - "$ref": "#/components/parameters/Path.subscrId" - } - ], - "responses": { - "200": { - "description": "Successful subscription modification", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InlineSubscription" - }, - "example": { - "_links": { - "self": { - "href": "http://[hostIP]/sbox-xyz123/wai/v2/subscriptions/sub123" - } - }, - "callbackReference": "http://my.callback.com/wai/some-id", - "apId": { - "macId": "005C0A0A0A0A" - } - } - } - } - }, - "400": { - "$ref": "#/components/responses/400" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "406": { - "$ref": "#/components/responses/406" - }, - "412": { - "$ref": "#/components/responses/412" - }, - "422": { - "$ref": "#/components/responses/422" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - }, - "delete": { - "tags": [ - "wai" - ], - "summary": "Cancel an existing subscription", - "description": "Cancels an existing subscription, identified by its self-referring URI returned on creation (initial POST)", - "operationId": "subscriptionsDELETE", - "parameters": [ - { - "$ref": "#/components/parameters/Path.subscrId" - } - ], - "responses": { - "204": { - "$ref": "#/components/responses/204" - }, - "401": { - "$ref": "#/components/responses/401" - }, - "403": { - "$ref": "#/components/responses/403" - }, - "404": { - "$ref": "#/components/responses/404" - }, - "429": { - "$ref": "#/components/responses/429" - } - } - } - } - }, - "components": { - "responses": { - "200": { - "description": "OK" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request : used to indicate that incorrect parameters were passed to the request.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "401": { - "description": "Unauthorized : used when the client did not submit credentials.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "403": { - "description": "Forbidden : operation is not allowed given the current status of the resource.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found : used when a client provided a URI that cannot be mapped to a valid resource URI.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "406": { - "description": "Not Acceptable : used to indicate that the server cannot provide the any of the content formats supported by the client.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "412": { - "description": "Precondition failed : used when a condition has failed during conditional requests, e.g. when using ETags to avoid write conflicts when using PUT", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "415": { - "description": "Unsupported Media Type : used to indicate that the server or the client does not support the content type of the entity body.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "422": { - "description": "Unprocessable Entity : used to indicate that the server understands the content type of the request entity and that the syntax of the request entity is correct but that the server is unable to process the contained instructions. This error condition can occur if an JSON request body is syntactically correct but semantically incorrect, for example if the target area for the request is considered too large. This error condition can also occur if the capabilities required by the request are not supported.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - }, - "example": { - "application/problem+json": { - "type": "https://meAppServer.example.com/wai/v2/probs/too-many targets", - "title": "Too many targets", - "status": "422", - "detail": "The target area for the request is considered too large", - "instance": "/meAppClient.example.com/77777/msgs/abc" - } - } - } - } - }, - "429": { - "description": "Too Many Requests : used when a rate limiter has triggered.", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - } - }, - "parameters": { - "Path.subscrId": { - "name": "subscriptionId", - "in": "path", - "description": "Subscription Id, specifically the \"self\" returned in the subscription request", - "required": true, - "schema": { - "type": "string", - "format": "uri" - } - }, - "Query.Filter": { - "name": "filter", - "in": "query", - "description": "Attribute-based filtering expression according to clause 6.19 of ETSI GS MEC 009. .", - "required": false, - "schema": { - "type": "string" - } - }, - "Query.AllFields": { - "name": "all_fields", - "in": "query", - "description": "Include all complex attributes in the response. See clause 6.18 of ETSI GS MEC 009 for details.", - "required": false, - "schema": { - "type": "string" - } - }, - "Query.Fields": { - "name": "fields", - "in": "query", - "description": "Complex attributes to be included into the response. See clause 6.18 of ETSI GS MEC 009 for details.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.ExcludeFields": { - "name": "exclude_fields", - "in": "query", - "description": "Complex attributes to be excluded from the response. See clause 6.18 of ETSI GS MEC 009 for details.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.ExcludeDefault": { - "name": "exclude_default", - "in": "query", - "description": "Indicates to exclude the following complex attributes from the response. See clause 6.18 of ETSI GS MEC 009 for details. The following attributes shall be excluded from the structure in the response body if this parameter is provided, or none of the parameters \"all_fields\", \"fields\", \"exclude_fields\", \"exclude_default\" are provided: Not applicable", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Query.SubscriptionType": { - "name": "subscription_type", - "in": "query", - "description": "Filter on a specific subscription type. Permitted values: assoc_sta, sta_data_rate.", - "required": false, - "schema": { - "type": "string" - } - } - }, - "schemas": { - "ApAssociated": { - "properties": { - "assocId": { - "description": "Unique number which identifies a particular association between the station and Access Point.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "ipAddress": { - "description": "IPv4 or IPv6 address allocated for the Access Point.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "string" - }, - "macId": { - "description": "Unique identifier assigned to the Access Point (as network interface controller) for communications at the data link layer of a network segment.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "string" - }, - "ssid": { - "description": "Service Set Identifier to identify logical networks.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "macId" - ], - "type": "object", - "x-etsi-ref": "6.5.12" - }, - "ApIdentity": { - "properties": { - "ipAddress": { - "description": "IPv4 or IPv6 address allocated for the Access Point.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - }, - "macId": { - "description": "Unique Identifier assigned to an Access Point (as network interface controller) for communications at the data link layer of a network segment.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "ssid": { - "description": "Service Set Identifier to identify logical networks including Basic Service Set and Extended Service Set.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "macId" - ], - "type": "object", - "x-etsi-ref": "6.5.3" - }, - "ApInfo": { - "properties": { - "apId": { - "$ref": "#/components/schemas/ApIdentity" - }, - "apLocation": { - "$ref": "#/components/schemas/ApLocation" - }, - "apNeighbor": { - "$ref": "#/components/schemas/NeighborReport" - }, - "bssLoad": { - "$ref": "#/components/schemas/BssLoad" - }, - "channel": { - "description": "Channel configured for the Access Point.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "extBssLoad": { - "$ref": "#/components/schemas/ExtBssLoad" - }, - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" - }, - "wanMetrics": { - "$ref": "#/components/schemas/WanMetrics" - }, - "wlanCap": { - "$ref": "#/components/schemas/WlanCapabilities" - } - }, - "required": [ - "apId" - ], - "type": "object", - "x-etsi-ref": "6.2.2" - }, - "ApLocation": { - "properties": { - "civicLocation": { - "$ref": "#/components/schemas/CivicLocation" - }, - "geolocation": { - "$ref": "#/components/schemas/GeoLocation" - } - }, - "type": "object", - "x-etsi-ref": "6.5.9" - }, - "AssocStaNotification": { - "properties": { - "apId": { - "$ref": "#/components/schemas/ApIdentity" - }, - "notificationType": { - "description": "Shall be set to \"AssocStaNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "staId": { - "description": "Identifier(s) to uniquely specify the client station(s) associated.", - "items": { - "$ref": "#/components/schemas/StaIdentity" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "StaIdentity" - }, - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" - } - }, - "required": [ - "notificationType", - "apId" - ], - "type": "object", - "x-etsi-ref": "6.4.2" - }, - "AssocStaSubscription": { - "properties": { - "_links": { - "description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.", - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "required": [ - "self" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "apId": { - "$ref": "#/components/schemas/ApIdentity" - }, - "callbackReference": { - "description": "URI selected by the service consumer to receive notifications on the subscribed WLAN information. This shall be included both in the request and in response.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "URI" - }, - "expiryDeadline": { - "$ref": "#/components/schemas/TimeStamp" - }, - "subscriptionType": { - "description": "Shall be set to \"AssocStaSubscription\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "subscriptionType", - "callbackReference", - "apId" - ], - "type": "object", - "x-etsi-ref": "6.3.2" - }, - "AssociatedStations": { - "properties": { - "assocId": { - "description": "Unique number which identifies a particular association between an Access Point and a station.", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "string" - }, - "ipAddress": { - "description": "IPv4 or IPv6 address allocated for the station associated with the Access Point.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "string" - }, - "macId": { - "description": "Unique identifier assigned to a station (as network interface controller) for communications at the data link layer of a network segment.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "string" - } - }, - "required": [ - "macId" - ], - "type": "object", - "x-etsi-ref": "6.5.5" - }, - "BeaconReport": { - "properties": { - "bssId": { - "description": "The BSSID field indicates the BSSID of the BSS(s) for which a beacon report has been received.", - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "String" - }, - "channelId": { - "description": "Channel number where the beacon was received.", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "measurementId": { - "description": "Measurement ID of the Measurement configuration applied to this Beacon Report.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "reportingCondition": { - "description": "As in table T9-89 of IEEE 802.11-2012 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "ssId": { - "description": "(Optional) The SSID subelement indicates the ESS(s) or IBSS(s) for which a beacon report is received.", - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "String" - }, - "staId": { - "$ref": "#/components/schemas/StaIdentity" - } - }, - "required": [ - "staId", - "measurementId", - "channelId", - "bssId", - "ssId", - "reportingCondition" - ], - "type": "object", - "x-etsi-ref": "6.5.27" - }, - "BeaconRequestConfig": { - "properties": { - "bssId": { - "description": "The BSSID field indicates the BSSID of the BSS(s) for which a beacon report is requested. When requesting beacon reports for all BSSs on the channel, the BSSID field contains the wildcard BSSID.", - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "String" - }, - "channelId": { - "description": "Channel number to scan. A Channel Number of 0 indicates a request to make iterative measurements for all supported channels in the Operating Class where the measurement is permitted on the channel and the channel is valid for the current regulatory domain. A Channel Number of 255 indicates a request to make iterative measurements for all supported channels in the current Operating Class listed in the latest AP Channel Report received from the serving AP.", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "measurementMode": { - "description": "0 for passive.\n1 for active.\n2 for beacon table.", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "reportingCondition": { - "description": "As in table T9-89 of IEEE 802.11-2012 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "ssId": { - "description": "(Optional) The SSID subelement indicates the ESS(s) or IBSS(s) for which a beacon report is requested.", - "items": { - "type": "string" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "String" - }, - "staId": { - "$ref": "#/components/schemas/StaIdentity" - } - }, - "required": [ - "staId", - "channelId", - "measurementMode", - "bssId", - "ssId", - "reportingCondition" - ], - "type": "object", - "x-etsi-ref": "6.5.25" - }, - "BssLoad": { - "properties": { - "availAdmCap": { - "description": "Available Admission Capacity that specifies the remaining amount of medium time available via explicit admission control, in units of 32 s/s.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - }, - "channelUtilization": { - "description": "The percentage of time, linearly scaled with 255 representing 100 %, that the AP sensed the medium was busy, as indicated by either the physical or virtual Carrier Sense (CS) mechanism.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "staCount": { - "description": "An unsigned integer that indicates the total number of STAs currently associated with this BSS.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - } - }, - "required": [ - "staCount", - "channelUtilization", - "availAdmCap" - ], - "type": "object", - "x-etsi-ref": "6.5.7" - }, - "ChannelLoadConfig": { - "properties": { - "apId": { - "$ref": "#/components/schemas/ApIdentity" - }, - "cChannelId": { - "description": "Channel number which load is reported", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "channelLoad": { - "description": "Channel load as per IEEE 802.11-2012 [8], section 11.11.9.3", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - } - }, - "required": [ - "apId", - "cChannelId", - "channelLoad" - ], - "type": "object", - "x-etsi-ref": "6.5.24" - }, - "CivicLocation": { - "properties": { - "ca0": { - "description": "Language", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca1": { - "description": "National subdivisions (state, canton, region,province, prefecture) ", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca128": { - "description": "Script", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca16": { - "description": "Leading street direction", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca17": { - "description": "Trailing street suffix", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca18": { - "description": "Street suffix or type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca19": { - "description": "House number", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca2": { - "description": "County, parish, gun (JP), district (IN)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca20": { - "description": "House number suffix", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca21": { - "description": "Landmark of vanity address", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca22": { - "description": "Additional location information", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca23": { - "description": "Name (residence and office occupant)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca24": { - "description": "Postal/zip code", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca25": { - "description": "Building (structure)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca26": { - "description": "Unit (apartment/suite)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca27": { - "description": "Floor", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca28": { - "description": "Room", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca29": { - "description": "Type of place", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca3": { - "description": "City, township, shi (JP)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca30": { - "description": "Postal community name", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca31": { - "description": "Post office box", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca32": { - "description": "Additional code", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca33": { - "description": "Seat (desk.cubicle, workstation)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca34": { - "description": "Primary road name", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca35": { - "description": "Road section", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca36": { - "description": "Branch road name", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca37": { - "description": "Sub-branch road name", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca38": { - "description": "Street name pre-modifier", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca39": { - "description": "Street name post-modifier", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca4": { - "description": "City division, borough, city district, ward, chou (JP)", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca5": { - "description": "Neighborhood, block", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ca6": { - "description": "Group of streets below the neighborhood level ", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "country": { - "description": "The two-letter ISO 3166 [i.9] country code in capital ASCII letters, e.g. DE or US, as per ISO 3166 [i.9]", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "country" - ], - "type": "object", - "x-etsi-ref": "6.5.20" - }, - "DmgCapabilities": { - "properties": { - "ExtScMcsCap": { - "description": "Extended SC MCS capabilities as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dmgApOrPcpCapInfo": { - "description": "DMG AP or PCP capabilities information as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - }, - "dmgStaBeamTrackTimeLimit": { - "description": "DMG station beam tracking time limit as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - }, - "dmgStaCapInfo": { - "description": "DMG station capabilities information as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint64" - }, - "maxNrBasicAmsduSubframes": { - "description": "Number of basic A-MSDU subframes in A-MSDU as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "maxNrShortAmsduSubframes": { - "description": "Number of short A-MSDU subframes in A-MSDU as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "sarCap": { - "description": "SAR capabilities as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "tddCap": { - "description": "TDD capabilities as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - } - }, - "required": [ - "dmgStaCapInfo", - "dmgApOrPcpCapInfo", - "dmgStaBeamTrackTimeLimit", - "ExtScMcsCap", - "maxNrBasicAmsduSubframes", - "maxNrShortAmsduSubframes", - "tddCap", - "sarCap" - ], - "type": "object", - "x-etsi-ref": "6.5.17" - }, - "EdmgCapabilities": { - "properties": { - "ampduParameters": { - "description": "A-MPDU parameters as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "reserved": { - "description": "", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "supportedMcs": { - "description": "Supported MCS as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "trnParameters": { - "description": "Training parameters as defined in draft IEEE P802.11/D4.0 [i.11]", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - } - }, - "required": [ - "ampduParameters", - "trnParameters", - "supportedMcs" - ], - "type": "object", - "x-etsi-ref": "6.5.18" - }, - "ExtBssLoad": { - "properties": { - "muMimoStaCount": { - "description": "Indicates the total number of STAs currently associated with this BSS that have a 1 in the MU Beamformee Capable field of their VHT Capabilities element.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - }, - "obsSec20MhzUtil": { - "description": "Observable loading on each of the secondary 20 MHz channel.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "obsSec40MhzUtil": { - "description": "Observable loading on each of the secondary 40 MHz channel.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "obsSec80MhzUtil": { - "description": "Observable loading on each of the secondary 80 MHz channel.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "spatStreamUnderUtil": { - "description": "The percentage of time, linearly scaled with 255 representing 100 %, that the AP has underutilized spatial domain resources for given busy time of the medium.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - } - }, - "required": [ - "muMimoStaCount", - "spatStreamUnderUtil", - "obsSec20MhzUtil", - "obsSec40MhzUtil", - "obsSec80MhzUtil" - ], - "type": "object", - "x-etsi-ref": "6.5.8" - }, - "GeoLocation": { - "properties": { - "altitude": { - "description": "The altitude value of location as defined in IETF RFC 6225 [6]", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "altitudeType": { - "description": "The type description for altitude information e.g. floors or meters as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "altitudeUncertainty": { - "description": "The uncertainty for altitude information as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "datum": { - "description": "The datum value to express how coordinates are organized and related to real world as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "lat": { - "description": "The latitude value of location as defined in IETF RFC 6225 [6]", - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint64" - }, - "latUncertainty": { - "description": "The uncertainty for Latitude information as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "long": { - "description": "The longitude value of location as defined in IETF RFC 6225 [6]", - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint64" - }, - "longUncertainty": { - "description": "The uncertainty for Longitude information as defined in IETF RFC 6225 [6]", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "latUncertainty", - "lat", - "longUncertainty", - "long", - "datum" - ], - "type": "object", - "x-etsi-ref": "6.5.19" - }, - "HeCapabilities": { - "properties": { - "heMacCapInfo": { - "description": "MAC capabilities of an Access Point.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "hePhyCapinfo": { - "description": "PHY capabilities of an Access Point.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "ppeThresholds": { - "description": "PPE Threshold determines the nominal packet padding value for a HE PPDU.", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "not defined" - }, - "supportedHeMcsNssSet": { - "description": "Supported MCS and NSS Set.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "heMacCapInfo", - "hePhyCapinfo", - "supportedHeMcsNssSet" - ], - "type": "object", - "x-etsi-ref": "6.5.16" - }, - "HtCapabilities": { - "properties": { - "ampduParameters": { - "description": "A-MPDU parameters as defined in IEEE 802.11-2016 [8].", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "aselCap": { - "description": "ASEL capabilities as defined in IEEE 802.11-2016 [8].", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "htCapabilityInfo": { - "description": "HT Capability Information as defined in IEEE 802.11-2016 [8].", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - }, - "htExtendedCap": { - "description": "Extended HT Capabilities as defined in IEEE 802.11-2016 [8].", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - }, - "supportedMcsSet": { - "description": "Supported MCS set as defined in IEEE 802.11-2016 [8].", - "format": "uint128", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint128" - }, - "txBeamFormCap": { - "description": "Transmit Beamforming Capabilities as defined in IEEE 802.11-2016 [8].", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt32" - } - }, - "required": [ - "htCapabilityInfo", - "ampduParameters", - "supportedMcsSet", - "htExtendedCap", - "txBeamFormCap", - "aselCap" - ], - "type": "object", - "x-etsi-ref": "6.5.14" - }, - "InlineNotification": { - "oneOf": [ - { - "$ref": "#/components/schemas/AssocStaNotification" - }, - { - "$ref": "#/components/schemas/StaDataRateNotification" - } - ], - "discriminator": { - "propertyName": "notificationType" - } - }, - "InlineSubscription": { - "oneOf": [ - { - "$ref": "#/components/schemas/AssocStaSubscription" - }, - { - "$ref": "#/components/schemas/StaDataRateSubscription" - } - ], - "discriminator": { - "propertyName": "subscriptionType" - } - }, - "LinkType": { - "properties": { - "href": { - "description": "URI referring to a resource", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "href" - ], - "type": "object", - "x-etsi-ref": "6.5.23" - }, - "MeasurementConfig": { - "properties": { - "beaconRequest": { - "$ref": "#/components/schemas/BeaconRequestConfig" - }, - "channelLoad": { - "$ref": "#/components/schemas/ChannelLoadConfig" - }, - "measurementDuration": { - "description": "Duration of the measurement, shall be lower than Maximum Measurement Duration in TU as defined in section 11.11.4 of IEEE 802.11 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "measurementId": { - "description": "Identifier of this measurement configuration.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "randomnInterval": { - "description": "Random interval to be used for starting the measurement. In units of TU as specifed in section 11.11.3 of IEEE 802.11 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "staStatistics": { - "$ref": "#/components/schemas/StaStatisticsConfig" - } - }, - "required": [ - "measurementId", - "measurementDuration", - "randomnInterval" - ], - "type": "object", - "x-etsi-notes": "NOTE:\tThis element enables the configuration of the channelLoad, beaconRequest and staStatistics in a single resource data type, although only one of each measurement. Multiple measurement configurations of each kind are not allowed.", - "x-etsi-ref": "6.2.4" - }, - "NeighborReport": { - "properties": { - "bssid": { - "description": "BSS Id of the Access Point that is being reported.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "bssidInfo": { - "description": "Additional information related to Access Point that is being reported such as AP reachability, security, key scope, Mobility Domain, HT/VHT capability and Fine Time Measurements.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt32" - }, - "channel": { - "description": "The channel currently used by this Access Point.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "operatingClass": { - "description": "The channel set of the AP indicated by this BSSID.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "phyType": { - "description": "PHY type of the AP indicated by this BSSID. It is an integer value coded according to the value of the dot11PHYType.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "bssid", - "bssidInfo", - "operatingClass", - "channel", - "phyType" - ], - "type": "object", - "x-etsi-ref": "6.5.10" - }, - "ProblemDetails": { - "properties": { - "detail": { - "description": "A human-readable explanation specific to this occurrence of the problem", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "instance": { - "description": "A URI reference that identifies the specific occurrence of the problem", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - }, - "status": { - "description": "The HTTP status code for this occurrence of the problem", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "title": { - "description": "A short, human-readable summary of the problem type", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "type": { - "description": "A URI reference according to IETF RFC 3986 that identifies the problem type", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "URI" - } - }, - "type": "object" - }, - "Rssi": { - "properties": { - "rssi": { - "description": "The Received Signal Strength Indicator from a station", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "rssi" - ], - "type": "object", - "x-etsi-ref": "6.5.21" - }, - "StaDataRate": { - "properties": { - "staId": { - "$ref": "#/components/schemas/StaIdentity" - }, - "staLastDataDownlinkRate": { - "description": "The data transmit rate in kbps that was most recently used for transmission of data PPDUs from the access point to the station.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "staLastDataUplinkRate": { - "description": "The data transmit rate in Kbps that was most recently used for transmission of data PPDUs from the associated station to the access point.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "type": "object", - "x-etsi-ref": "6.5.22" - }, - "StaDataRateNotification": { - "properties": { - "notificationType": { - "description": "Shall be set to \"StaDataRateNotification\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "staDataRate": { - "description": "Data rates of a client station.", - "items": { - "$ref": "#/components/schemas/StaDataRate" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "StaDataRate" - }, - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" - } - }, - "required": [ - "notificationType" - ], - "type": "object", - "x-etsi-ref": "6.4.3" - }, - "StaDataRateSubscription": { - "properties": { - "_links": { - "description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.", - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "required": [ - "self" - ], - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "callbackReference": { - "description": "URI selected by the service consumer to receive notifications on the subscribed WLAN Access Information Service. This shall be included both in the request and in response.", - "format": "uri", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "URI" - }, - "expiryDeadline": { - "$ref": "#/components/schemas/TimeStamp" - }, - "staId": { - "description": "Identifier(s) to uniquely specify the target client station(s) for the subscription", - "items": { - "$ref": "#/components/schemas/StaIdentity" - }, - "minItems": 1, - "type": "array", - "x-etsi-mec-cardinality": "1..N", - "x-etsi-mec-origin-type": "StaIdentity" - }, - "subscriptionType": { - "description": "Shall be set to \"StaDataRateSubscription\".", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "subscriptionType", - "callbackReference", - "staId" - ], - "type": "object", - "x-etsi-ref": "6.3.3" - }, - "StaIdentity": { - "properties": { - "aid": { - "description": "Number which identifies a particular association between a station and an Access Point ", - "type": "string", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "String" - }, - "ipAddress": { - "description": "IPv4 or IPv6 address allocated for the station.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - }, - "macId": { - "description": "Unique identifier assigned to station (as network interface controller) for communications at the data link layer of a network segment.", - "type": "string", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "String" - }, - "ssid": { - "description": "Service Set Identifier to identify logical networks.", - "items": { - "type": "string" - }, - "minItems": 0, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "String" - } - }, - "required": [ - "macId" - ], - "type": "object", - "x-etsi-ref": "6.5.11" - }, - "StaInfo": { - "properties": { - "apAssociated": { - "$ref": "#/components/schemas/ApAssociated" - }, - "beaconReport": { - "$ref": "#/components/schemas/BeaconReport" - }, - "channel": { - "description": "Channel currently used by the station.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "rssi": { - "$ref": "#/components/schemas/Rssi" - }, - "staDataRate": { - "$ref": "#/components/schemas/StaDataRate" - }, - "staId": { - "$ref": "#/components/schemas/StaIdentity" - }, - "staStatistics": { - "$ref": "#/components/schemas/StaStatistics" - }, - "timeStamp": { - "$ref": "#/components/schemas/TimeStamp" - } - }, - "required": [ - "staId" - ], - "type": "object", - "x-etsi-ref": "6.2.3" - }, - "StaStatistics": { - "properties": { - "groupIdentity": { - "description": "Indicates the requested statistics group describing the Statistics Group Data according to table 9-114 of IEEE 802.11-2016 [8].", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "md": { - "description": "Measurement Duration.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt16" - }, - "statisticsGroupData": { - "$ref": "#/components/schemas/StatisticsGroupData", - "description": "Statistics Group Data as defined in Annex C of IEEE 802.112016 [8].", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "not specified" - } - }, - "required": [ - "md", - "groupIdentity", - "statisticsGroupData" - ], - "type": "object", - "x-etsi-ref": "6.5.13" - }, - "StaStatisticsConfig": { - "properties": { - "groupIdentity": { - "description": "As per table T 9-114 of IEEE 802.11-2012 [8].", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "staId": { - "$ref": "#/components/schemas/StaIdentity" - }, - "triggerCondition": { - "type": "integer" - }, - "triggerTimeout": { - "description": "The Trigger Timeout field contains a value in units of 100 TUs during which a measuring STA does not generate further triggered STA Statistics Reports after a trigger condition has been met.", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Integer" - }, - "triggeredReport": { - "type": "boolean" - } - }, - "required": [ - "staId", - "groupIdentity", - "triggeredReport", - "triggerTimeout", - "triggerCondition" - ], - "type": "object", - "x-etsi-ref": "6.5.26" - }, - "StatisticsGroupData": { - "properties": { - "dot11AMPDUDelimiterCRCErrorCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11AMPDUReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11AMSDUAckFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11AckFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11BeamformingFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ChannelWidthSwitchCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11DualCTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11DualCTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ExplicitBARFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FCSErrorCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FailedAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FailedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FortyMHzFrameReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FortyMHzFrameTransmittedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11FrameDuplicateCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11GrantedRDGUnusedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11GrantedRDGUsedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11GroupReceivedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11GroupTransmittedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ImplicitBARFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11MPDUInReceivedAMPDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11MultipleRetryAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11MultipleRetryCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11PSMPUTTGrantDuration": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11PSMPUTTUsedDuration": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosAckFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosDiscardedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosFailedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosFrameDuplicateCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosMPDUsReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosMultipleRetryCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosRTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosRTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosReceivedFragmentCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosRetriesReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosRetryCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosTransmittedFragmentCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11QosTransmittedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsBIPMICErrors": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsCCMPDecryptErrors": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsCCMPReplays": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsCMACReplays": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsRobustMgmtCCMPReplays": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsTKIPICVErrors": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RSNAStatsTKIPReplays": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RTSLSIGFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RTSLSIGSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ReceivedAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ReceivedFragmentCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11ReceivedOctetsInAMPDUCount": { - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint64" - }, - "dot11ReceivedOctetsInAMSDUCount": { - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint64" - }, - "dot11RetryAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11RetryCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11STAStatisticsAPAverageAccessDelay": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsAverageAccessDelayBackGround": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsAverageAccessDelayBestEffort": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsAverageAccessDelayVideo": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsAverageAccessDelayVoice": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsChannelUtilization": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STAStatisticsStationCount": { - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint8" - }, - "dot11STBCCTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11STBCCTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedAMPDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedFragmentCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedFrameCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedFramesInGrantedRDGCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedMPDUsInAMPDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedOctetsInAMPDUCount": { - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint64" - }, - "dot11TransmittedOctetsInAMSDUCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TransmittedOctetsInGrantedRDGCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TwentyMHzFrameReceivedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11TwentyMHzFrameTransmittedCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11nonSTBCCTSFailureCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - }, - "dot11nonSTBCCTSSuccessCount": { - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "type": "object" - }, - "SubscriptionLinkList": { - "properties": { - "_links": { - "description": "Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.", - "properties": { - "self": { - "$ref": "#/components/schemas/LinkType" - } - }, - "type": "object", - "x-etsi-mec-cardinality": "0..1", - "x-etsi-mec-origin-type": "Structure (inlined)" - }, - "assocStaSubscription": { - "items": { - "$ref": "#/components/schemas/AssocStaSubscription" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "AssocStaSubscription" - }, - "staDataRateSubscription": { - "items": { - "$ref": "#/components/schemas/StaDataRateSubscription" - }, - "type": "array", - "x-etsi-mec-cardinality": "0..N", - "x-etsi-mec-origin-type": "StaDataRateSubscription" - } - }, - "required": [ - "_links" - ], - "type": "object" - }, - "TimeStamp": { - "properties": { - "nanoSeconds": { - "description": "The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "seconds": { - "description": "The seconds part of the time. Time is defined as Unixtime since January 1, 1970, 00:00:00 UTC.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - } - }, - "required": [ - "seconds", - "nanoSeconds" - ], - "type": "object", - "x-etsi-ref": "6.5.2" - }, - "VhtCapabilities": { - "properties": { - "vhtCapInfo": { - "description": "VHT capabilities Info as defined in IEEE 802.11-2016 [8].", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt32" - }, - "vhtMcsNss": { - "description": "Supported VHT-MCS and NSS Set as defined in IEEE 802.11-2016 [8].", - "format": "int64", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt64" - } - }, - "required": [ - "vhtCapInfo", - "vhtMcsNss" - ], - "type": "object", - "x-etsi-ref": "6.5.15" - }, - "WanMetrics": { - "properties": { - "downlinkLoad": { - "description": "1-octet positive integer representing the current percentage loading of the downlink WAN connection, scaled linearly with 255 representing 100 %, as measured over an interval the duration of which is reported in Load Measurement Duration. In cases where the downlink load is unknown to the AP, the value is set to zero.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt8" - }, - "downlinkSpeed": { - "description": "4-octet positive integer whose value is an estimate of the WAN Backhaul link current downlink speed in kilobits per second.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint32" - }, - "lmd": { - "description": "The LMD (Load Measurement Duration) field is a 2-octet positive integer representing the duration over which the Downlink Load and Uplink Load have been measured, in tenths of a second. When the actual load measurement duration is greater than the maximum value, the maximum value will be reported. The value of the LMD field is set to 0 when neither the uplink nor downlink load can be computed. When the uplink and downlink loads are computed over different intervals, the maximum interval is reported.", - "format": "uint16", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint16" - }, - "uplinkLoad": { - "description": "1-octet positive integer representing the current percentage loading of the uplink WAN connection, scaled linearly with 255 representing 100 %, as measured over an interval, the duration of which is reported in Load Measurement Duration. In cases where the uplink load is unknown to the AP, the value is set to zero.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - }, - "uplinkSpeed": { - "description": "4-octet positive integer whose value is an estimate of the WAN Backhaul link's current uplink speed in kilobits per second.", - "format": "uint32", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "UInt32" - }, - "wanInfo": { - "description": "Info about WAN link status, link symmetricity and capacity currently used.", - "format": "uint8", - "type": "integer", - "x-etsi-mec-cardinality": "1", - "x-etsi-mec-origin-type": "Uint8" - } - }, - "required": [ - "wanInfo", - "downlinkSpeed", - "uplinkSpeed", - "downlinkLoad", - "uplinkLoad", - "lmd" - ], - "type": "object", - "x-etsi-ref": "6.5.6" - }, - "WlanCapabilities": { - "properties": { - "dmg": { - "$ref": "#/components/schemas/DmgCapabilities" - }, - "edmg": { - "$ref": "#/components/schemas/EdmgCapabilities" - }, - "he": { - "$ref": "#/components/schemas/HeCapabilities" - }, - "ht": { - "$ref": "#/components/schemas/HtCapabilities" - }, - "vht": { - "$ref": "#/components/schemas/VhtCapabilities" - } - }, - "type": "object", - "x-etsi-ref": "6.5.4" - } - } - } -} diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn index 0be7d86a7784052defacffcdffdf702eeedf854b..c97ae002dfec0aa9e6719fb383e2cbbd6b5bb5d5 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Functions.ttcn @@ -38,7 +38,8 @@ module WlanInformationAPI_Functions { import from LibMec_Pixits all; function f_create_assoc_sta_subscription( - out AssocStaSubscription p_assoc_sta_subscription + out AssocStaSubscription p_assoc_sta_subscription, + out Json.String p_subscription_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -47,7 +48,7 @@ module WlanInformationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions", + PICS_ROOT_API & PX_ME_WLAN_URI_SUB, v_headers, m_http_message_body_json( m_body_json_assoc_sta_subscription( @@ -61,7 +62,7 @@ module WlanInformationAPI_Functions { -, m_time_stamp( f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds - ))))))); + ))))))); tc_ac.start; alt { @@ -75,11 +76,21 @@ module WlanInformationAPI_Functions { -, -, -, ? - )))))) -> value v_response { + )))))) -> 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_WLAN_URI_SUB & "/(?*)", + 0 + ); p_assoc_sta_subscription := v_response.response.body.json_body.assocStaSubscription; log("f_create_assoc_sta_subscription: INFO: IUT successfully responds to the subscription: ", p_assoc_sta_subscription); + log("f_create_assoc_sta_subscription: INFO: p_subscription_id: ", p_subscription_id); } [] tc_ac.timeout { log("f_create_assoc_sta_subscription: INCONC: Expected message not received"); @@ -89,29 +100,25 @@ module WlanInformationAPI_Functions { } // End of function "f_create_assoc_sta_subscription function f_delete_assoc_sta_subscription( - in AssocStaSubscription p_assoc_sta_subscription + in Json.String p_subscription_id ) runs on HttpComponent { var Headers v_headers; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_assoc_sta_subscription.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); + f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & v_uri, + PICS_ROOT_API & PX_ME_WLAN_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 { @@ -122,7 +129,8 @@ module WlanInformationAPI_Functions { } // End of function f_delete_assoc_sta_subscription function f_create_measurement_config( - out MeasurementConfig p_measurement_config + out MeasurementConfig p_measurement_config, + out Json.String p_measurement_config_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -131,7 +139,7 @@ module WlanInformationAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS, v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -140,14 +148,14 @@ module WlanInformationAPI_Functions { { m_sta_identity( PX_MAC_ID, - PX_SSID, + { PX_SSID }, -, - PX_IP_ADDRESS + { PX_IP_ADDRESS } ) }, PX_MEASUREMENT_ID, m_measurement_info(1000, 10) - )))))); + )))))); tc_ac.start; alt { @@ -158,11 +166,17 @@ module WlanInformationAPI_Functions { mw_body_json_wlan_measurement_config( mw_measurement_config( ? - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; p_measurement_config := v_response.response.body.json_body.measurementConfig; + p_measurement_config_id := regexp( + oct2char(unichar2oct(p_measurement_config.links.self_.href)), + "?+" & PX_ME_WLAN_URI_MEAS & "/" & "(?*)", + 0 + ); log("f_create_measurement_config: INFO: IUT successfully responds to the subscription: ", p_measurement_config); + log("f_create_measurement_config: INFO: p_measurement_config_id = ", p_measurement_config_id); } [] tc_ac.timeout { log("f_create_measurement_config: INCONC: Expected message not received"); @@ -172,30 +186,24 @@ module WlanInformationAPI_Functions { } // End of function "f_create_measurement_config function f_delete_measurement_config( - in MeasurementConfig p_measurement_config + in Json.String p_measurement_config_id ) runs on HttpComponent { var Headers v_headers; - var charstring v_uri := regexp( - oct2char(unichar2oct(p_measurement_config.links.self_.href)), - "?+(" & PX_ME_WLAN_URI & "?*)", - 0 - ); - log("====> v_uri: ", v_uri); f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & v_uri, + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & p_measurement_config_id, v_headers - ))); + ))); tc_ac.start; alt { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; } [] tc_ac.timeout { diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn index 982baed1a902278e4ad54a02563bd99012e934cd..d4c9abc1276da039037db98692961d236eada946 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_Templates.ttcn @@ -6,26 +6,13 @@ module WlanInformationAPI_Templates { // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/WlanInformationAPI import from WlanInformationAPI_TypesAndValues all; import from WlanInformationAPI_Pixits all; - template (value) TimeStamp m_time_stamp( - in Seconds p_seconds, - in NanoSeconds p_nanoSeconds := 0 - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of template m_time_stamp - - template (present) TimeStamp mw_time_stamp( - template (present) Seconds p_seconds := ?, - template (present) NanoSeconds p_nanoSeconds := ? - ) := { - seconds := p_seconds, - nanoSeconds := p_nanoSeconds - } // End of template mw_time_stamp - template (omit) ApInfo m_ap_info( in template (value) ApIdentity p_apId, in template (omit) UInt32 p_channel := omit, @@ -123,8 +110,8 @@ module WlanInformationAPI_Templates { in template (value) ApIdentity p_apId, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) LinkTypes p_links := omit, - in template (omit) UInt8 p_notificationPeriod := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.UInt8 p_notificationPeriod := omit, in template (omit) NotificationEvent p_notificationEvent := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { @@ -144,8 +131,8 @@ module WlanInformationAPI_Templates { in template (value) ApIdentity p_apId, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) LinkTypes p_links := omit, - in template (omit) UInt8 p_notificationPeriod := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.UInt8 p_notificationPeriod := omit, in template (omit) NotificationEvent p_notificationEvent := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { @@ -165,8 +152,8 @@ module WlanInformationAPI_Templates { template (present) ApIdentity p_apId := ?, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, - template LinkTypes p_links := *, - template UInt8 p_notificationPeriod := *, + template Links p_links := *, + template Json.UInt8 p_notificationPeriod := *, template NotificationEvent p_notificationEvent := *, template TimeStamp p_expiryDeadline := * ) := { @@ -183,12 +170,12 @@ module WlanInformationAPI_Templates { template (omit) StaDataRateSubscription m_sta_data_rate_subscription( in template (value) Json.AnyURI p_callbackReference, - in template (value) StaIdentities p_staId, + in template (value) StaIdentityList p_staId, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) LinkTypes p_links := omit, - in template (omit) UInt8 p_notificationPeriod := omit, - in template (omit) NotificationEvent p_notificationEvent := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.UInt8 p_notificationPeriod := omit, + in template (omit) NotificationEvent_StaDataRateSubscription p_notificationEvent := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { subscriptionType := "StaDataRateSubscription", @@ -204,12 +191,12 @@ module WlanInformationAPI_Templates { template (omit) StaDataRateSubscription m_sta_data_rate_subscription_invalid( in template (value) Json.AnyURI p_callbackReference, - in template (value) StaIdentities p_staId, + in template (value) StaIdentityList p_staId, in template (omit) Json.Bool p_requestTestNotification := omit, in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, - in template (omit) LinkTypes p_links := omit, - in template (omit) UInt8 p_notificationPeriod := omit, - in template (omit) NotificationEvent p_notificationEvent := omit, + in template (omit) Links p_links := omit, + in template (omit) Json.UInt8 p_notificationPeriod := omit, + in template (omit) NotificationEvent_StaDataRateSubscription p_notificationEvent := omit, in template (omit) TimeStamp p_expiryDeadline := omit ) := { subscriptionType := "InvalidStaDataRateSubscription", @@ -225,12 +212,12 @@ module WlanInformationAPI_Templates { template (present) StaDataRateSubscription mw_sta_data_rate_subscription( template (present) Json.AnyURI p_callbackReference := ?, - template (present) StaIdentities p_staId := ?, + template (present) StaIdentityList p_staId := ?, template Json.Bool p_requestTestNotification := *, template WebsockNotifConfig p_websockNotifConfig := *, - template LinkTypes p_links := *, - template UInt8 p_notificationPeriod := *, - template NotificationEvent p_notificationEvent := *, + template Links p_links := *, + template Json.UInt8 p_notificationPeriod := *, + template NotificationEvent_StaDataRateSubscription p_notificationEvent := *, template TimeStamp p_expiryDeadline := * ) := { subscriptionType := "StaDataRateSubscription", @@ -246,9 +233,9 @@ module WlanInformationAPI_Templates { template (omit) StaIdentity m_sta_identity( in Json.String p_macId, - in template (omit) Json.String p_ssid := omit, + in template (omit) SsidList p_ssid := omit, in template (omit) Json.String p_aid := omit, - in template (omit) Json.String p_ipAddress := omit + in template (omit) IpAddressList p_ipAddress := omit ) := { macId := p_macId, ssid := p_ssid, @@ -258,9 +245,9 @@ module WlanInformationAPI_Templates { template (present) StaIdentity mw_sta_identity( template (present) Json.String p_macId := ?, - template Json.String p_ssid := *, + template SsidList p_ssid := *, template Json.String p_aid := *, - template Json.String p_ipAddress := * + template IpAddressList p_ipAddress := * ) := { macId := p_macId, ssid := p_ssid, @@ -269,7 +256,7 @@ module WlanInformationAPI_Templates { } // End of template mw_sta_identity template (omit) SubscriptionLinkList m_subscription_link_list( - in template (value) LinkTypes p_links, + in template (value) Links p_links, in template (omit) Subscription p_subscription := omit ) := { links := p_links, @@ -277,13 +264,29 @@ module WlanInformationAPI_Templates { } // End of template m_subscription_link_list template (present) SubscriptionLinkList mw_subscription_link_list( - template (present) LinkTypes p_links := ?, + template (present) Links p_links := ?, template Subscription p_subscription := * ) := { links := p_links, subscription := p_subscription } // End of template mw_subscription_link_list + template (value) Subscription_ m_subscription( + in Json.AnyURI p_href, + in Json.String p_subscriptionType + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template m_subscription + + 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 (omit) ApIdentity m_ap_identity( in Json.String p_bssid, in template (omit) SsidList p_ssid := omit, @@ -305,7 +308,7 @@ module WlanInformationAPI_Templates { } // End of template mw_ap_identity template (omit) MeasurementConfigLinkList m_measurement_config_list( - in template (omit) LinkTypes p_links := omit, + in template (omit) Links p_links := omit, in template (value) MeasurementConfig_MeasurementConfigLinkList p_measurementConfig ) := { links := p_links, @@ -313,7 +316,7 @@ module WlanInformationAPI_Templates { } // End of template m_measurement_config_list template (present) MeasurementConfigLinkList mw_measurement_config_list( - template LinkTypes p_links := *, + template Links p_links := *, template (present) MeasurementConfig_MeasurementConfigLinkList p_measurementConfig := ? ) := { links := p_links, @@ -337,8 +340,8 @@ module WlanInformationAPI_Templates { } // End of template mw_measurement_config_link_list template (omit) MeasurementConfig m_measurement_config( - in template (omit) LinkTypes p_links := omit, - in template (value) StaIdentities p_staId, + in template (omit) Links p_links := omit, + in template (value) StaIdentityList p_staId, in Json.String p_measurementId, in template (value) MeasurementInfo p_measurementInfo ) := { @@ -349,8 +352,8 @@ module WlanInformationAPI_Templates { } // End of template m_measurement_config template (present) MeasurementConfig mw_measurement_config( - template LinkTypes p_links := *, - template (present) StaIdentities p_staId := ?, + template Links p_links := *, + template (present) StaIdentityList p_staId := ?, template (present) Json.String p_measurementId := ?, template (present) MeasurementInfo p_measurementInfo := ? ) := { @@ -361,8 +364,8 @@ module WlanInformationAPI_Templates { } // End of template mw_measurement_config template (omit) MeasurementInfo m_measurement_info( - in template (omit) UInt16 p_measurementDuration := omit, - in template (omit) UInt16 p_randomInterval:= omit, + in template (omit) Json.UInt16 p_measurementDuration := omit, + in template (omit) Json.UInt16 p_randomInterval:= omit, in template (omit) ChannelLoadConfig p_channelLoadConf := omit, in template (omit) BeaconRequestConfig p_beaconRequestConf := omit, in template (omit) StaStatisticsConfig p_staStatisticsConf := omit, @@ -377,8 +380,8 @@ module WlanInformationAPI_Templates { } // End of template m_measurement_info template MeasurementInfo mw_measurement_info( - template UInt16 p_measurementDuration := *, - template UInt16 p_randomInterval:= *, + template Json.UInt16 p_measurementDuration := *, + template Json.UInt16 p_randomInterval:= *, template ChannelLoadConfig p_channelLoadConf := *, template BeaconRequestConfig p_beaconRequestConf := *, template StaStatisticsConfig p_staStatisticsConf := *, diff --git a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn index 35effc67beac021652b7873d0951e7c6660e6b86..e5d677e516d3244ca7155c5b49e76b3c017610a3 100644 --- a/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/WlanInformationAPI/ttcn/WlanInformationAPI_TypesAndValues.ttcn @@ -1,8 +1,8 @@ /** - * @author ETSI / TTF T012 + * @author ETSI / TTF T012 // TTF T027 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 028 V2.1.1 (2020-06) + * @desc Types And Values for ETSI GS MEC 028 V2.3.1 (2022-07) * @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. @@ -13,44 +13,502 @@ module WlanInformationAPI_TypesAndValues { // JSON import from Json all; - // LibCommon - import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; /** - * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc This type represents the information on Access Points available from the WLAN Access Information Service. + * @member timeStamp TimeStamp + * @member apId Identifier(s) to uniquely specify the Access Point whose information is exposed within this data type + * @member channel Channel configured for the Access Point + * @member wlanCap WLAN capabilities of Access Point + * @member wanMetrics WAN Metrics element provides information about the WAN link connecting an IEEE 802.11 Access Node and the Internet + * @member bssLoad BSS Load attribute contains information on the current STA population and traffic levels in the BSS + * @member extBssLoad Extended BSS Load attribute contains more detailed information on the current STA population and traffic levels in the BSS + * @member apLocation The location on the Access Point + * @see ETSI GS MEC 028 V2.3.1 Clause 6.2.2 Type: ApInfo */ - type UInt32 Seconds; + type record ApInfo { + TimeStamp timeStamp optional, + ApIdentity apId, + Json.UInteger channel optional, + WlanCapabilities wlanCap optional, + WanMetrics wanMetrics optional, + BssLoad bssLoad optional, + ExtBssLoad extBssLoad optional, + OBssLoad oBssLoad optional, + ApLocation apLocation optional + } + type record of ApInfo ApInfoList; /** - * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @desc Information on wireless stations available from the WLAN Access Information Service + * @member timeStamp TimeStamp + * @member staId Identifier(s) to uniquely specify station whose information is exposed within this data type + * @member channel Channel configured for the Access Point + * @member apAssociated Information about the Access Point that this Client Station is associated to + * @member rssi Receive Signal Strength Indicator + * @member staDataRate Station Data Rate + * @member staStatistics Statistics as defined in IEEE 802.11-2016 for the client station collected over measurement duration + * @member beaconReport Beacon Report as defined in Wi-Fi Agile Multiband Specification + * @member neighborReport Information about neighbor Access Points seen by the station + * @member channelLoad Channel Load reports as seen by the station + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.3-1: Attributes for StaInfo */ - type UInt32 NanoSeconds; + type record StaInfo { + TimeStamp timeStamp optional, + StaIdentity staId, + Json.UInteger channel optional, + ApAssociated apAssociated optional, + Rssi rssi optional, + StaDataRate staDataRate optional, + StaStatistics staStatistics optional, + BeaconReport beaconReport optional, + NeighborReport neighborReport optional, + ChannelLoad channelLoad optional + + } + type record of StaInfo StaInfoList; /** - * @desc Time stamp description - * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see MEC030 Clause 6.5.2 Type: TimeStamp + * @desc Different measurements configuration available from the WLAN Access Information Service + * @member _links Hyperlink related to the resource + * @member staId Identifier(s) to uniquely specify the target client station(s) for the measurement configuration + * @member measurementId Identifier of this measurement configuration + * @member measurementInfo Information used to configure this measurement + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.4-1: Attributes for MeasurementConfig */ - type record TimeStamp { - Seconds seconds, - NanoSeconds nanoSeconds + type record MeasurementConfig { + Links links optional, + StaIdentityList staId, + Json.String measurementId, + MeasurementInfo measurementInfo + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Hyperlink related to the resource + * @member self_ Self-referring URI + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.4-1: Attributes for MeasurementConfig + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + /** + * @desc The different measurement configurations available from the WLAN Access Information Service + * @member _links Hyperlink related to the resource + * @member measurementConfig + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.5-1: Attributes of the MeasurementConfigLinkList + */ + type record MeasurementConfigLinkList { + Links links optional, + MeasurementConfig_MeasurementConfigLinkList measurementConfig + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc + * @member href The URI referring to a measurement configuration + * @member measurementId Unique identifier allocated by the service consumer to identify measurement reports associated with this measurement configuration + * @see ETSI GS MEC 028 V2.3.1 Table 6.2.5-1: Attributes of the MeasurementConfigLinkList + */ + type record MeasurementConfig_MeasurementConfigLinkList { + Json.AnyURI href, + Json.String measurementId + } + + /** + * @desc Subscription to get updates on client stations that are associated to an Access Point + * @member subscriptionType Shall be set to "AssocStaSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification + * @member _links Hyperlink related to the resource + * @member apId Identifier(s) to uniquely specify the target Access Point for the subscription + * @member notificationPeriod Set for periodic notification reporting + * @member notificationEvent Set for trigger-based event notification reporting + * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.2-1: Attributes of the AssocStaSubscription + */ + type record AssocStaSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + ApIdentity apId, + Json.UInt8 notificationPeriod optional, + NotificationEvent notificationEvent optional, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + type record of AssocStaSubscription AssocStaSubscriptionList; + + /** + * @desc Set for trigger-based event notification reporting + * @member trigger_ Trigger for the notification + * @member threshold Number of connected stations threshold for trigger-based event reporting + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.2-1: Attributes of the AssocStaSubscription + */ + type record NotificationEvent { + Json.UInt8 trigger_, + Json.UInt8 threshold + } with { + variant (trigger_) "name as 'trigger'"; + } + + /** + * @desc Subscription to get updates on the Data Rate of targeted client station(s) + * @member subscriptionType Shall be set to "AssocStaSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification + * @member _links Hyperlink related to the resource + * @member staId Identifier(s) to uniquely specify the target client station(s) for the subscription + * @member notificationPeriod Set for periodic notification reporting + * @member notificationEvent Set for trigger-based event notification reporting + * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.3-1: Attributes of the StaDataRateSubscription + */ + type record StaDataRateSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + StaIdentityList staId, + Json.UInt8 notificationPeriod optional, + NotificationEvent_StaDataRateSubscription notificationEvent optional, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + type record of StaDataRateSubscription StaDataRateSubscriptionList; + + /** + * @desc Set for trigger-based event notification reporting + * @member trigger_ Trigger for the notification + * @member threshold Number of connected stations threshold for trigger-based event reporting + * @member downlinkRateThreshold Downlink data rate threshold for StaDataRate reporting + * @member uplinkRateThreshold Uplink data rate threshold for StaDataRate reporting + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.3-1: Attributes of the StaDataRateSubscription + */ + type record NotificationEvent_StaDataRateSubscription { + Json.UInt8 trigger_, + Json.UInteger downlinkRateThreshold optional, + Json.UInteger uplinkRateThreshold + } with { + variant (trigger_) "name as 'trigger'"; + } + + /** + * @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 ETSI GS MEC 028 V2.3.1 Table 6.3.4-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinkList { + Links links, + Subscription subscription optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.4-1: Attributes of the SubscriptionLinkLis + */ + type record Subscription_ { + Json.AnyURI href, + Json.String subscriptionType + } + type record of Subscription_ Subscription; + + /** + * @desc This type represents a subscription to get measurement reports (Channel Load, Beacon Request, STA Statistics, or Neighbor Report) from targeted client station(s) + * @member subscriptionType Shall be set to "MeasurementReportSubscription" + * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information + * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications + * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification + * @member _links Hyperlink related to the resource + * @member staId Identifier(s) to uniquely specify the target client station(s) for the subscription + * @member measurementId Unique identifier allocated by the service consumer to identify measurement reports associated with this measurement subscription + * @member measurementInfo Information used to configure this measurement + * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service + * @see ETSI GS MEC 028 V2.3.1 Table 6.3.5-1: Attributes of the MeasurementReportSubscription + */ + type record MeasurementReportSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + StaIdentityList staId, + Json.String measurementId, + Json.String measurementInfo, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Notification from WLAN Access Information Service with regards to client stations associated to the targeted Access Point + * @member notificationType Shall be set to "AssocStaNotification" + * @member timeStamp Time stamp + * @member apId Identifier(s) to uniquely specify the Access Point to which the client stations are associated + * @member staId Identifier(s) to uniquely specify the client station(s) associated + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.2-1: Attributes of the AssocStaNotification + */ + type record AssocStaNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + ApIdentity apId, + StaIdentityList staId optional + } + + /** + * @desc Notification from WLAN Information service with regards to Data Rates of the subscribed client stations + * @member notificationType Shall be set to "StaDataRateNotification" + * @member timeStamp Time stamp + * @member staDataRate Data rates of a client station + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.3-1: Attributes of the StaDataRateNotification + */ + type record StaDataRateNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + StaDataRateList staDataRate optional + } + + /** + * @desc Notification from WLAN Access Information service with regards to expiry of an existing subscription + * @member notificationType Shall be set to "ExpiryNotification" + * @member links Hyperlink related to the resource + * @member expiryDeadlineTime stamp + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.4-1: Attributes of the ExpiryNotification + */ + type record ExpiryNotification { + Json.String notificationType, + Links links, + TimeStamp expiryDeadline + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Hyperlink related to the resource + * @member subscription URI identifying the subscription which has expired + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.4-1: Attributes of the ExpiryNotification + */ + type record Links_Notification { + LinkType subscription + } + + /** + * @desc This type represents a notification from WLAN Access Information service with regards to Measurement Reports of the subscribed client stations + * @member notificationType Shall be set to "MeasurementReportNotification" + * @member timeStamp Time stamp + * @member staStatistics STA Statistics Report as defined in IEEE 802.11-2016 [8] + * @member beaconReport Beacon Report as defined in IEEE 802.11-2016 [8] + * @member neighborReport Neighbor Report providing information about neighbor Access Points seen by the station as defined in IEEE 802.11-2016 [8] + * @member channelLoad Channel Load reports as seen by the station as defined in IEEE 802.11-2016 [8] + * @see ETSI GS MEC 028 V2.3.1 Table 6.4.5-1: Attributes of the MeasurementReportNotification + */ + type record MeasurementReportNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + StaStatistics staStatistics optional, + BeaconReport beaconReport optional, + NeighborReport neighborReport optional, + ChannelLoad channelLoad optional + } + + /** + * @desc This data type represents a notification from AMS with regards to expiry of the existing subscription + * @member notificationType Shall be set to "TestNotification" + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 028 V2.3.1 V3.1.1 (2023-10) Table 6.4.6-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links_Notification links + } with { + variant (links) "name as '_links'"; } - type record of Json.String SsidList; - type record of Json.String IpAddressList; /** * @desc Identifiers determining a specific Access Point * @member bssid Basic Service Set Identifier (BSSID) is a unique Identifier assigned to an Access Point (as network interface controller) for communications at the data link layer of a network segment * @member ssid Service Set Identifier to identify logical networks including Basic Service Set and Extended Service Set * @member ipAddress IPv4 or IPv6 address allocated for the Access Point - * @see ETSI GS MEC 028 Clause 6.5.3 Type: ApIdentity + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.3-1: Attributes of the ApIdentity */ type record ApIdentity { - Json.String bssid, - SsidList ssid optional, + Json.String bssid, + SsidList ssid optional, IpAddressList ipAddress optional } + type record of Json.String SsidList; + type record of Json.String IpAddressList; + + /** + * @desc WLAN capabilities of the Access Point + * @member ht Information about Access Point HT capabilities + * @member vht Information about Access Point VHT capabilities + * @member he Information about Access Point HE capabilities + * @member dmg Information about Access Point DMG capabilities + * @member edmg Information about Access Point EDMG capabilities + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.4-1: Attributes of the WlanCapabilities + */ + type record WlanCapabilities { + HtCapabilities ht optional, + VhtCapabilities vht optional, + HeCapabilities he optional, + DmgCapabilities dmg optional, + EdmgCapabilities edmg optional + } + + /** + * @desc Metrics related to the backhaul characteristics of an Access Point as defined for WAN metrics + * @member wanInfo Info about WAN link status, link symmetricity and capacity currently used + * @member downlinkSpeed 4-octet positive integer whose value is an estimate of the WAN Backhaul link current downlink speed in kilobits per second + * @member uplinkSpeed 4-octet positive integer whose value is an estimate of the WAN Backhaul link's current uplink speed in kilobits per second + * @member downlinkLoad 1-octet positive integer representing the current percentage loading of the downlink WAN connection + * @member uplinkLoad 1-octet positive integer representing the current percentage loading of the uplink WAN connection + * @member lmd The LMD (Load Measurement Duration) + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.6-1: Attributes of the WanMetrics + */ + type record WanMetrics { + Json.UInt8 wanInfo, + Json.UInteger downlinkSpeed, + Json.UInteger uplinkSpeed, + Json.UInt8 downlinkLoad, + Json.UInt8 uplinkLoad, + Json.UInt16 lmd + } + + /** + * @desc Load of a BSS + * @member staCount Indicates the total number of STAs currently associated with this BSS + * @member channelUtilization The percentage of time + * @member availAdmCap Available Admission Capacity that specifies the remaining amount of medium time available via explicit admission control, in units of 32 μs/s + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.7-1: Attributes of the BssLoad + */ + type record BssLoad { + Json.UInt16 staCount, + Json.UInt8 channelUtilization, + Json.UInt16 availAdmCap + } + + /** + * @desc Extended BSS Load information + * @member muMimoStaCount Indicates the total number of STAs currently associated with this BSS that have a 1 in the MU Beamformee Capable field of their VHT Capabilities element + * @member spatStreamUnderUtil The percentage of time that the AP has underutilized spatial domain resources for given busy time of the medium + * @member obsSec20MhzUtil Observable loading on each of the secondary 20 MHz channel + * @member obsSec40MhzUtil Observable loading on each of the secondary 40 MHz channel + * @member obsSec80MhzUtil Observable loading on each of the secondary 80 MHz channel + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.8-1: Attributes of the ExtBssLoad + */ + type record ExtBssLoad { + Json.UInt16 muMimoStaCount, + Json.UInt8 spatStreamUnderUtil, + Json.UInt8 obsSec20MhzUtil, + Json.UInt8 obsSec40MhzUtil, + Json.UInt8 obsSec80MhzUtil + } + + /** + * @desc Location information of the Access Point + * @member geolocation Geospatial Location of the AP + * @member civicLocation Civic Location of the AP + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.9-1: Attributes of the ApLocation + */ + type record ApLocation { + GeoLocation geolocation optional, + CivicLocation civicLocation optional + } + + /** + * @desc Information about neighbor Access Points + * @member staId Identifier to uniquely specify the station whose information is exposed within this report + * @member measurementId Measurement ID of the Measurement configuration applied to this Neighbor Report + * @member bssid BSS Id of the Access Point that is being reported + * @member bssidInfo Additional information related to Access Point that is being reported + * @member operatingClass The channel set of the AP indicated by this BSSID + * @member channel The channel currently used by this Access Point + * @member phyType PHY type of the AP indicated by this BSSID. It is an integer value coded according to the value of the dot11PHYType + * @member bssTransitionCandidatePreference Relative value indicating the preferred ordering for this BSS as a transition candidate for roaming + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.10-1: Attributes of the NeighborReport + */ + type record NeighborReportItem { + StaIdentity staId optional, + Json.String measurementId, + Json.String bssid, + Json.UInteger bssidInfo, + Json.UInt8 operatingClass, + Json.UInt8 channel, + Json.UInt8 phyType, + Json.UInt8 bssTransitionCandidatePreference optional + } + type record of NeighborReportItem NeighborReport; + + /** + * @desc Identifiers determining a specific client station + * @member macId Unique identifier assigned to station (as network interface controller) for communications at the data link layer of a network segment + * @member ssid Service Set Identifier to identify logical networks + * @member aid Number which identifies a particular association between a station and an Access Point + * @member ipAddress IPv4 or IPv6 address allocated for the station + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.11-1: Attributes of the StaIdentity + */ + type record StaIdentity { + Json.String macId, + SsidList ssid optional, + Json.String aid optional, + IpAddressList ipAddress optional + } + type record of StaIdentity StaIdentityList; + + /** + * @desc Information for the Access Point that the client station is associated to + * @member bssid Basic Service Set Identifier (BSSID) is a unique identifier assigned to the Access Point (as network interface controller) for communications at the data link layer of a network segment. + * @member ssid Service Set Identifier to identify logical networks + * @member assocId Unique number which identifies a particular association between the station and Access Point + * @member ipAddress IPv4 or IPv6 address allocated for the Access Point + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.12-1: Attributes of the ApAssociated + */ + type record ApAssociated { + Json.String bssid, + SsidList ssid optional, + Json.String assocId optional, + IpAddressList ipAddress optional + } + + /** + * @desc Information statistics of the client station + * @member staId Identifier to uniquely specify the station whose information is exposed within this report + * @member measurementId Measurement ID of the Measurement configuration applied to this STA Statistics Report + * @member measurementDuration Duration over which the Statistics Group Data was measured in time units of 1024 µs + * @member groupIdentity Indicates the requested statistics group describing the Statistics Group Data + * @member groupZeroData STA Statistics Data for Group Identity = 0 + * @member groupOneData STA Statistics Data for Group Identity = 1 + * @member group2to9Data STA Statistics Data for Group Identity = 2 through 9 + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.13-1: Attributes of the StaStatistics + */ + type record StaStatistics { + StaIdentity staId optional, + Json.String measurementId, + Json.String measurementDuration, + Json.UInt8 groupIdentity, + StaStatisticsGroupZeroData groupZeroData optional, + StaStatisticsGroupOneData groupOneData optional, + StaStatisticsGroup2to9Data group2to9Data optional + } /** * @desc information on HT capabilities of an Access Point @@ -60,27 +518,27 @@ module WlanInformationAPI_TypesAndValues { * @member htExtendedCap Extended HT Capabilities * @member txBeamFormCap Transmit Beamforming Capabilities * @member aselCap ASEL capabilities - * @see ETSI GS MEC 028 Clause 6.5.14 Type: HtCapabilities + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.14-1: Attributes of the HtCapabilities */ - type integer UInt128 with {variant "unsigned 128 bit"}; type record HtCapabilities { - UInt16 htCapabilityInfo, - UInt8 ampduParameters, - UInt128 supportedMcsSet, - UInt16 htExtendedCap, - UInt32 txBeamFormCap, - UInt8 aselCap + Json.UInt16 htCapabilityInfo, + Json.UInt8 ampduParameters, + UInt128 supportedMcsSet, + Json.UInt16 htExtendedCap, + Json.UInteger txBeamFormCap, + Json.UInt8 aselCap } + type integer UInt128 with {variant "unsigned 128 bit"}; /** * @desc Information on VHT Capabilities of an Access Point * @member vhtCapInfo VHT capabilities Info * @member vhtMcsNss Supported VHT-MCS and NSS Set - * @see ETSI GS MEC 028 Clause 6.5.15 Type: VhtCapabilities + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.15-1: Attributes of the VhtCapabilities */ type record VhtCapabilities { - UInt32 vhtCapInfo, - UInt64 vhtMcsNss + Json.UInteger vhtCapInfo, + Json.UInteger vhtMcsNss } /** @@ -88,12 +546,12 @@ module WlanInformationAPI_TypesAndValues { * @member heMacCapInfo MAC capabilities of an Access Point * @member hePhyCapinfo PHY capabilities of an Access Point * @member supportedHeMcsNssSet Supported MCS and NSS Set - * @see ETSI GS MEC 028 Clause 6.5.16 Type: HeCapabilities + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.16-1: Attributes of the HeCapabilities */ type record HeCapabilities { - UInt8 heMacCapInfo, - UInt8 hePhyCapinfo, - UInt8 supportedHeMcsNssSet + Json.UInt8 heMacCapInfo, + Json.UInt8 hePhyCapinfo, + Json.UInt8 supportedHeMcsNssSet } /** @@ -104,15 +562,15 @@ module WlanInformationAPI_TypesAndValues { * @member extScMcsCap Extended SC MCS capabilities * @member maxNrBasicAmsduSubframes Number of basic A-MSDU subframes in A-MSDU * @member maxNrShortAmsduSubframes Number of short A-MSDU subframes in A-MSDU - * @see ETSI GS MEC 028 Clause 6.5.17 Type: DmgCapabilities + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.17-1: Attributes of the DmgCapabilities */ type record DmgCapabilities { - UInt64 dmgStaCapInfo, - UInt16 dmgApOrPcpCapInfo, - UInt16 dmgStaBeamTrackTimeLimit, - UInt8 extScMcsCap, - UInt8 maxNrBasicAmsduSubframes, - UInt8 maxNrShortAmsduSubframes + Json.UInteger dmgStaCapInfo, + Json.UInt16 dmgApOrPcpCapInfo, + Json.UInt16 dmgStaBeamTrackTimeLimit, + Json.UInt8 extScMcsCap, + Json.UInt8 maxNrBasicAmsduSubframes, + Json.UInt8 maxNrShortAmsduSubframes } /** @@ -121,78 +579,12 @@ module WlanInformationAPI_TypesAndValues { * @member trnParameters Training parameters * @member supportedMcs Supported MCS * @member reserved - * @see ETSI GS MEC 028 Clause 6.5.18 Type: EdmgCapabilities + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.18-1: Attributes of the EdmgCapabilities */ type record EdmgCapabilities { - UInt8 ampduParameters, - UInt16 trnParameters, - UInt32 supportedMcs - } - - /** - * @desc WLAN capabilities of the Access Point - * @member ht Information about Access Point HT capabilities - * @member vht Information about Access Point VHT capabilities - * @member he Information about Access Point HE capabilities - * @member dmg Information about Access Point DMG capabilities - * @member edmg Information about Access Point EDMG capabilities - * @see ETSI GS MEC 028 Clause 6.5.4 Type: WlanCapabilities - */ - type record WlanCapabilities { - HtCapabilities ht optional, - VhtCapabilities vht optional, - HeCapabilities he optional, - DmgCapabilities dmg optional, - EdmgCapabilities edmg optional - } - - /** - * @desc Metrics related to the backhaul characteristics of an Access Point as defined for WAN metrics - * @member wanInfo Info about WAN link status, link symmetricity and capacity currently used - * @member downlinkSpeed 4-octet positive integer whose value is an estimate of the WAN Backhaul link current downlink speed in kilobits per second - * @member uplinkSpeed 4-octet positive integer whose value is an estimate of the WAN Backhaul link's current uplink speed in kilobits per second - * @member downlinkLoad 1-octet positive integer representing the current percentage loading of the downlink WAN connection - * @member uplinkLoad 1-octet positive integer representing the current percentage loading of the uplink WAN connection - * @member lmd The LMD (Load Measurement Duration) - * @see ETSI GS MEC 028 Clause 6.5.6 Type: WanMetrics - */ - type record WanMetrics { - UInt8 wanInfo, - UInt32 downlinkSpeed, - UInt32 uplinkSpeed, - UInt8 downlinkLoad, - UInt8 uplinkLoad, - UInt16 lmd - } - - /** - * @desc Load of a BSS - * @member staCount Indicates the total number of STAs currently associated with this BSS - * @member channelUtilization The percentage of time - * @member availAdmCap Available Admission Capacity that specifies the remaining amount of medium time available via explicit admission control, in units of 32 μs/s - * @see ETSI GS MEC 028 Clause 6.5.7 Type: BssLoad - */ - type record BssLoad { - UInt16 staCount, - UInt8 channelUtilization, - UInt16 availAdmCap - } - - /** - * @desc Extended BSS Load information - * @member muMimoStaCount Indicates the total number of STAs currently associated with this BSS that have a 1 in the MU Beamformee Capable field of their VHT Capabilities element - * @member spatStreamUnderUtil The percentage of time that the AP has underutilized spatial domain resources for given busy time of the medium - * @member obsSec20MhzUtil Observable loading on each of the secondary 20 MHz channel - * @member obsSec40MhzUtil Observable loading on each of the secondary 40 MHz channel - * @member obsSec80MhzUtil Observable loading on each of the secondary 80 MHz channel - * @see ETSI GS MEC 028 Clause 6.5.8 Type: ExtBssLoad - */ - type record ExtBssLoad { - UInt16 muMimoStaCount, - UInt8 spatStreamUnderUtil, - UInt8 obsSec20MhzUtil, - UInt8 obsSec40MhzUtil, - UInt8 obsSec80MhzUtil + Json.UInt8 ampduParameters, + Json.UInt16 trnParameters, + Json.UInteger supportedMcs } /** @@ -205,21 +597,21 @@ module WlanInformationAPI_TypesAndValues { * @member altitudeUncertainty The uncertainty for altitude information * @member altitude The altitude value of location * @member datum The datum value to express how coordinates are organized and related to real world - * @see ETSI GS MEC 028 Clause 6.5.19 Type: GeoLocation + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.19-1: Attributes of the GeoLocation */ type record GeoLocation { - UInt8 latUncertainty, - UInt64 lat, - UInt8 longUncertainty, - UInt64 long, - UInt8 altitudeType optional, - UInt8 altitudeUncertainty optional, - UInt32 altitude optional, - UInt8 datum + Json.UInt8 latUncertainty, + Json.UInteger lat, + Json.UInt8 longUncertainty, + Json.UInteger long, + Json.UInt8 altitudeType optional, + Json.UInt8 altitudeUncertainty optional, + Json.UInteger altitude optional, + Json.UInt8 datum } /** - * @desc Iinformation on Civic Location of an Access Point + * @desc Information on Civic Location of an Access Point * @member country The two-letter ISO 3166 [i.9] country code in capital ASCII letters, e.g. DE or US, as per ISO 3166 * @member ca0 Language * @member ca0 Language @@ -254,7 +646,7 @@ module WlanInformationAPI_TypesAndValues { * @member ca38 Street name pre-modifier * @member ca39 Street name post-modifier * @member ca128 Script - * @see ETSI GS MEC 028 Clause 6.5.20 Type: CivicLocation + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.20-1: Attributes of the CivicLocation */ type record CivicLocation { Json.String country, @@ -280,302 +672,25 @@ module WlanInformationAPI_TypesAndValues { Json.String ca28 optional, Json.String ca29 optional, Json.String ca30 optional, - Json.String ca31 optional, - Json.String ca32 optional, - Json.String ca33 optional, - Json.String ca34 optional, - Json.String ca35 optional, - Json.String ca36 optional, - Json.String ca37 optional, - Json.String ca38 optional, - Json.String ca39 optional, - Json.String ca128 optional - } - - /** - * @desc Location information of the Access Point - * @member geolocation Geospatial Location of the AP - * @member civicLocation Civic Location of the AP - * @see ETSI GS MEC 028 Clause 6.5.9 Type: ApLocation - */ - type record ApLocation { - GeoLocation geolocation optional, - CivicLocation civicLocation optional - } - - /** - * @desc Identifiers determining a specific client station - * @member macId Unique identifier assigned to station (as network interface controller) for communications at the data link layer of a network segment - * @member ssid Service Set Identifier to identify logical networks - * @member aid Number which identifies a particular association between a station and an Access Point - * @member ipAddress IPv4 or IPv6 address allocated for the station - * @see ETSI GS MEC 028 Clause 6.5.11 Type: StaIdentity - */ - type record StaIdentity { - Json.String macId, - Json.String ssid optional, - Json.String aid optional, - Json.String ipAddress optional - } - type record of StaIdentity StaIdentities; - - /** - * @desc Information about neighbor Access Points - * @member staId Identifier to uniquely specify the station whose information is exposed within this report - * @member measurementId Measurement ID of the Measurement configuration applied to this Neighbor Report - * @member bssid BSS Id of the Access Point that is being reported - * @member bssidInfo Additional information related to Access Point that is being reported - * @member operatingClass The channel set of the AP indicated by this BSSID - * @member channel The channel currently used by this Access Point - * @member phyType PHY type of the AP indicated by this BSSID. It is an integer value coded according to the value of the dot11PHYType - * @member bssTransitionCandidatePreference Relative value indicating the preferred ordering for this BSS as a transition candidate for roaming - * @see ETSI GS MEC 028 Clause 6.5.10 Type: NeighborReport - */ - type record NeighborReportItem { - StaIdentity staId, - Json.String measurementId, - Json.String bssid, - UInt32 bssidInfo, - UInt8 operatingClass, - UInt8 channel, - UInt8 phyType, - UInt8 bssTransitionCandidatePreference optional - } - type record of NeighborReportItem NeighborReport; - - /** - * @desc Information for the Access Point that the client station is associated to - * @member bssid Basic Service Set Identifier (BSSID) is a unique identifier assigned to the Access Point (as network interface controller) for communications at the data link layer of a network segment. - * @member ssid Service Set Identifier to identify logical networks - * @member assocId Unique number which identifies a particular association between the station and Access Point - * @member ipAddress IPv4 or IPv6 address allocated for the Access Point - * @see ETSI GS MEC 028 Clause 6.5.12 Type: ApAssociated - */ - type record ApAssociated { - Json.String bssid, - Json.String ssid optional, - Json.String assocId optional, - Json.String ipAddress optional - } - - /** - * @desc Optionally reported reason for STA Statistics Group Identities 0 or 1 (STA Counters) in the STA Statistics Optional subelements - * @member failed dot11Failed - * @member fcsError dot11FCSError - * @member multipleRetry dot11MultipleRetry - * @member frameDuplicate dot11FrameDuplicate - * @member rtsFailure dot11RTSFailure - * @member ackFailure dot11AckFailure - * @member retry dot11Retry - * @see ETSI GS MEC 028 Clause 6.5.37 Type: ReportingReasonStaCounters - */ - type record ReportingReasonStaCounters { - Json.Bool failed, - Json.Bool fcsError, - Json.Bool multipleRetry, - Json.Bool frameDuplicate, - Json.Bool rtsFailure, - Json.Bool ackFailure, - Json.Bool retry - } - - /** - * @desc Optionally reported reason for STA Statistics Group Identities 2 to 9 (QoS STA Counters) in the STA Statistics - * @member qosFailed dot11QoSFailed - * @member qosRetry dot11QoSRetry - * @member qosMultipleRetry dot11QoSMultipleRetry - * @member qosFrameDuplicate dot11QoSFrameDuplicate - * @member qosRtsFailure dot11QoSRTSFailure - * @member qosAckFailure dot11QoSAckFailure - * @member qosDiscarded dot11QoSDiscarded - * @see ETSI GS MEC 028 Clause 6.5.38 Type: ReportingReasonQoSCounters - */ - type record ReportingReasonQoSCounters { - Json.Bool qosFailed, - Json.Bool qosRetry, - Json.Bool qosMultipleRetry, - Json.Bool qosFrameDuplicate, - Json.Bool qosRtsFailure, - Json.Bool qosAckFailure, - Json.Bool qosDiscarded - } - - /** - * @desc Channel Load report from a station - * @member staId Identifier to uniquely specify the station whose information is exposed within this report - * @member measurementId Measurement ID of the Measurement configuration applied to this Channel Load Report - * @member operatingClass Operating Class field indicates an operating class value - * @member channel Channel number indicates the channel number for which the measurement report applies - * @member measurementDuration Duration over which the Channel Load report was measured, in units of TUs of 1024 µs - * @member channelLoad Proportion of measurement duration for which the measuring STA determined the channel to be busy, as a percentage of time, linearl scaled with 255 representing 100% - * @see ETSI GS MEC 028 Clause 6.5.39 Type: ChannelLoad - */ - type record ChannelLoadItem { - StaIdentity staId optional, - Json.String measurementId, - UInt8 operatingClass, - UInt8 channel, - UInt8 measurementDuration, - UInt8 channelLoad - } - type record of ChannelLoadItem ChannelLoad; - - /** - * @desc The load of a Overlapping BSS - * @member allocatedTrafficSelfMean Mean of allocated traffic from this AP (BSS) in units of 32 µs per second - * @member allocatedTrafficSelfStdDev Standard deviation from the mean of allocation traffic from this BSS in units of 32 µs per second - * @member Mean of the sum of allocated traffic from other APs on the overlapping channel in unit of 32 µs per second - * @member Standard deviation from the mean of the sum of allocated traffic from other APs on the overlapping channel in unit of 32 µs per second - * @member overlap Indicates the number of other APs that are sharing the same channel as the reporting AP - * @see ETSI GS MEC 028 Clause 6.5.40 Type: OBssLoad - */ - type record OBssLoad { - UInt16 allocatedTrafficSelfMean, - UInt16 allocatedTrafficSelfStdDev optional, - UInt16 allocatedTrafficShareMean, - UInt16 allocatedTrafficShareStdDev optional, - UInt8 overlap optional - } - - /** - * @desc - * @member ssid Contains an SSID element - * @member bssid BSSID of the neighbor AP which information is intended to obtain - * @see ETSI GS MEC 028 Clause 6.5.32 Type: NeighborReportConfig - */ - type record NeighborReportConfig { - Json.String ssid optional, - Json.String bssid optional - } - - /** - * @desc The information required to define client station measurements available from the WLAN Access Information Service - * @member measurementDuration Duration of the measurement in time units (TUs) of 1024 µs - * @member randomInterval Random interval to be used for starting the measurement in TUs of 1024 µs - * @member channelLoadConf Configuration related to the Channel Load - * @member beaconRequestConf Configuration related to Beacon Request - * @member staStatisticsConf Configuration related to the statistics provided by STAs - * @member neighborReportConf Configuration related to Neighbor Reports - * @see ETSI GS MEC 028 Clause 6.5.41 Type: MeasurementInfo - */ - type record MeasurementInfo { - UInt16 measurementDuration optional, - UInt16 randomInterval optional, - ChannelLoadConfig channelLoadConf optional, - BeaconRequestConfig beaconRequestConf optional, - StaStatisticsConfig staStatisticsConf optional, - NeighborReportConfig neighborReportConf optional - } - - /** - * @desc STA Statistics Group Data for Group Identity = 0 - * @member transmittedFragmentCount dot11TransmittedFragmentCount counter - * @member groupTransmittedFrameCount dot11GroupTransmittedFrameCount counter - * @member failedCount dot11FailedCount counter - * @member receivedFragmentCountdot11ReceivedFragmentCount counter - * @member groupReceivedFrameCountdot11GroupReceivedFrameCount counter - * @member fcsErrorCount dot11FCSErrorCount counter - * @member transmittedFrameCount dot11TransmittedFrameCount counter - * @member reportingReasonStaCounters Optionally reported reason for STA Statistics Group 0 - * @see ETSI GS MEC 028 Clause 6.5.34 Type: StaStatisticsGroupZeroData - */ - type record StaStatisticsGroupZeroData { - UInt32 transmittedFragmentCount, - UInt32 groupTransmittedFrameCount, - UInt32 failedCount, - UInt32 receivedFragmentCount, - UInt32 groupReceivedFrameCount, - UInt32 fcsErrorCount, - UInt32 transmittedFrameCount, - ReportingReasonStaCounters reportingReasonStaCounters optional - } - - /** - * @desc STA Statistics Group Data for Group Identity = 1 - * @member retryCount dot11RetryCount counter - * @member multipleRetryCount dot11MultipleRetryCount counter - * @member frameDuplicateCount dot11FrameDuplicateCount counter - * @member rtsSuccessCount dot11RTSSuccessCount counter - * @member rtsFailureCount dot11RTSFailureCount counter - * @member ackFailureCount dot11AckFailureCount counter - * @member reportingReasonStaCounters Optionally reported reason for STA Statistics Group 1 - * @see ETSI GS MEC 028 Clause 6.5.35-1: Attributes of the StaStatisticsGroupOneData - */ - type record StaStatisticsGroupOneData { - UInt32 retryCount, - UInt32 multipleRetryCount, - UInt32 frameDuplicateCount, - UInt32 rtsSuccessCount, - UInt32 rtsFailureCount, - UInt32 ackFailureCount, - ReportingReasonStaCounters reportingReasonStaCounters optional - } - - - /** - * @desc STA Statistics Group Data for Group Identity = 2 through 9 - * @member qosTransmittedFragmentCount dot11QosTransmittedFragmentCount counter - * @member qosFailedCount dot11QosFailedCount counter - * @member qosRetryCount dot11QosRetryCount counter - * @member qosMultipleRetryCount dot11QosMultipleRetryCount counter - * @member qosFrameDuplicateCount dot11QosFrameDuplicateCount counter - * @member qosRTSSuccessCount dot11QosRTSSuccessCount counter - * @member qosRTSFailureCount dot11QosRTSFailureCount counter - * @member qosAckFailureCount dot11QosAckFailureCount counter - * @member qosReceivedFragmentCount dot11QosReceivedFragmentCount counter - * @member qosTransmittedFrameCount dot11QosTransmittedFrameCount counter - * @member qosDiscardedFrameCount dot11QosDiscardedFrameCount counter - * @member qosMPDUsReceivedCount dot11QosMPDUsReceivedCount counter - * @member qosRetriesReceivedCount dot11QosRetriesReceivedCount counter - * @member reportingReasonQoSCounters Optionally reported reason for STA Statistics Groups 2 to 9 - * @see ETSI GS MEC 028 Clause 6.5.36-1: Attributes of the StaStatisticsGroup2to9Data - */ - type record StaStatisticsGroup2to9Data { - UInt32 qosTransmittedFragmentCount, - UInt32 qosFailedCount, - UInt32 qosRetryCount, - UInt32 qosMultipleRetryCount, - UInt32 qosFrameDuplicateCount, - UInt32 qosRTSSuccessCount, - UInt32 qosRTSFailureCount, - UInt32 qosAckFailureCount, - UInt32 qosReceivedFragmentCount, - UInt32 qosTransmittedFrameCount, - UInt32 qosDiscardedFrameCount, - UInt32 qosMPDUsReceivedCount, - UInt32 qosRetriesReceivedCount, - ReportingReasonQoSCounters reportingReasonQoSCounters optional - } - - /** - * @desc Information statistics of the client station - * @member staId Identifier to uniquely specify the station whose information is exposed within this report - * @member measurementId Measurement ID of the Measurement configuration applied to this STA Statistics Report - * @member measurementDuration Duration over which the Statistics Group Data was measured in time units of 1024 µs - * @member groupIdentity Indicates the requested statistics group describing the Statistics Group Data - * @member groupZeroData STA Statistics Data for Group Identity = 0 - * @member groupOneData STA Statistics Data for Group Identity = 1 - * @member group2to9Data STA Statistics Data for Group Identity = 2 through 9 - * @see ETSI GS MEC 028 Clause 6.5.13 Type: StaStatistics - */ - type record StaStatistics { - StaIdentity staId optional, - Json.String measurementId, - Json.String measurementDuration, - UInt8 groupIdentity, - StaStatisticsGroupZeroData groupZeroData optional, - StaStatisticsGroupOneData groupOneData optional, - StaStatisticsGroup2to9Data group2to9Data optional + Json.String ca31 optional, + Json.String ca32 optional, + Json.String ca33 optional, + Json.String ca34 optional, + Json.String ca35 optional, + Json.String ca36 optional, + Json.String ca37 optional, + Json.String ca38 optional, + Json.String ca39 optional, + Json.String ca128 optional } - type UInt8 StatisticsGroupData; // Note defined, see ETSI GS MEC 028 Clause 6.5.13 Type: StaStatistics - /** + /** * @desc Information on the Received Signal Strength Indicator (RSSI) of a client station * @member rssi The Received Signal Strength Indicator from a station - * @see ETSI GS MEC 028 Clause 6.5.21 Type: Rssi + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.21-1: Attributes of the Rssi */ type record Rssi { - UInt8 rssi + Json.UInt8 rssi } /** @@ -583,336 +698,386 @@ module WlanInformationAPI_TypesAndValues { * @member staId Identifier(s) to uniquely specify the client station(s) associated * @member staLastDataDownlinkRate The data transmit rate in kbps that was most recently used for transmission of data PPDUs from the access point to the station * @member staLastDataUplinkRate The data transmit rate in Kbps that was most recently used for transmission of data PPDUs from the associated station to the access point - * @see ETSI GS MEC 028 Clause 6.5.22 Type: StaDataRate + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.22-1: Attributes of the StaDataRate */ type record StaDataRate { - StaIdentity staId optional, - UInt32 staLastDataDownlinkRate optional, - UInt32 staLastDataUplinkRate optional + StaIdentity staId optional, + Json.UInteger staLastDataDownlinkRate optional, + Json.UInteger staLastDataUplinkRate optional } - type record of StaDataRate StaDataRates; + type record of StaDataRate StaDataRateList; /** * @desc Type of link * @member href URI referring to a resource - * @see ETSI GS MEC 028 Clause 6.5.23 Type: LinkType + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.23-1: Attributes of the LinkType */ type record LinkType { Json.AnyURI href } - type record LinkTypes { - LinkType self_ - } with { - variant (self_) "name as 'self'"; - } - /** - * @desc This configuration applies to BssLoad measurement - * @member apId Identifier(s) to uniquely specify the target Access Point - * @member cChannelId Channel number which load is reported - * @member channelLoad Channel load as per IEEE 802.11-2012 - * @see ETSI GS MEC 028 Clause 6.5.24 Type: ChannelLoadConfig + * @desc This configuration applies to Channel Load measurement + * @member operatingClass Operating Class field indicates an operating class value + * @member channel Channel for which the channel load report is requested + * @member reportingCondition Reporting condition for the Beacon Report + * @member threshold Channel Load reference value for threshold reporting + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.24-1: Attributes of the ChannelLoadConfig */ type record ChannelLoadConfig { - ApIdentity apId, - UInt32 cChannelId, - UInt32 channelLoad + Json.UInt8 operatingClass, + Json.UInteger channel, + Json.UInt8 reportingCondition optional, + Json.UInt8 threshold optional } /** - * @desc - * @member staId Identifier to uniquely specify the station whose information is exposed within this data type + * @desc This configuration applies to the BeaconReport + * @member operatingClass Operating Class field indicates an operating class value * @member channelId Channel number to scan - * @member measurementMode - * @member bssId The BSSID field indicates the BSSID of the BSS(s) for which a beacon report is requested. When requesting beacon reports for all BSSs on the channel, the BSSID field contains the wildcard BSSID - * @member ssId The SSID subelement indicates the ESS(s) or IBSS(s) for which a beacon report is requested - * @member reportingCondition As in table T9-89 of IEEE 802.11-2012 - * @see ETSI GS MEC 028 Clause 6.5.25 Type: BeaconRequestConfig + * @member measurementMode + * @member bssid The BSSID field indicates the BSS for which a beacon report is requested + * @member ssid The SSID subelement indicates the ESS or IBSS for which a beacon report is requested + * @member beaconReportingConf Beacon reporting configuration data field + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.25-1: Attributes of the BeaconRequestConfig */ type record BeaconRequestConfig { - StaIdentity staId, - UInt32 channelId, - UInt32 measurementMode, - BssIds bssId, - SsIds ssId optional, - UInt32 reportingCondition + Json.UInt8 operatingClass, + Json.UInt8 channelId, + Json.UInt8 measurementMode, + Json.String bssid optional, + Json.String ssid optional, + BeaconReportingConfig beaconReportingConf } - type record of Json.String BssIds; - type record of Json.String SsIds; /** - * @desc - * @member staId Identifier to uniquely specify the station whose information is exposed within this data type + * @desc This configuration applies to the StaStatistics report * @member groupIdentity As per table T 9-114 of IEEE 802.11-2012 * @member triggeredReport Yes, use triggered report + * @member measurementCount Specifies the number of MAC service data units or protocol data units to determine if the trigger conditions are met * @member triggerTimeout The Trigger Timeout field contains a value in units of 100 TUs during which a measuring STA does not generate further triggered STA Statistics Reports after a trigger condition has been met - * @member triggerCondition As per Figure 9-161 of IEEE 802.11. This bitmap defines what are the metrics returned by the STA Statistics Report - * @see ETSI GS MEC 028 Clause 6.5.26 Type: StaStatisticsConfig + * @member triggerCondition Defines what are the metrics returned by the STA Statistics Report + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.26-1: Attributes of the StaStatisticsConfig */ type record StaStatisticsConfig { - StaIdentity staId, - UInt32 groupIdentity, - boolean triggeredReport, - UInt32 triggerTimeout, - UInt16 triggerCondition + Json.UInt8 groupIdentity, + Json.Bool triggeredReport, + Json.UInteger measurementCount optional, + Json.UInt16 triggerTimeout optional, + STACounterTriggerCondition triggerCondition optional } /** - * @desc + * @desc This type represents information in a STA Beacon report * @member staId Identifier to uniquely specify the station whose information is exposed within this data type + * @member operatingClass Operating Class field indicates an operating class value * @member measurementId Measurement ID of the Measurement configuration applied to this Beacon Report - * @member bssId The BSSID field indicates the BSSID of the BSS(s) for which a beacon report has been received - * @member ssId The SSID subelement indicates the ESS(s) or IBSS(s) for which a beacon report is received - * @see ETSI GS MEC 028 Clause 6.5.27 Type: BeaconReport + * @member channel Channel number where the beacon was received + * @member reportedFrameInfo Information about the reported beacon frame + * @member bssid Indicates the BSSID of the BSS(s) for which a beacon report has been received + * @member ssid Indicates the ESS(s) or IBSS(s) for which a beacon report is received + * @member rcpi Indicates the received channel power of the Beacon + * @member rsni Indicates the received signal-to-noise indication for the Beacon + * @member antennaId contains the identifying number for the antenna(s) used for this measurement + * @member parentTsf contains the lower 4 octets of the measuring STA's TSF timer value at the start of reception of the first octet of the timestamp field of the reported Beacon + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.27-1: Attributes of the BeaconReport */ - type record BeaconReportItem { - StaIdentity staId, - Json.String measurementId, - UInt32 channelId, - BssIds bssId, - SsIds ssId optional + type record BeaconReport_ { + StaIdentity staId, + Json.String measurementId, + Json.UInt8 operatingClass, + Json.UInt8 channel, + ReportedBeaconFrameInfo reportedFrameInfo, + Json.String bssid, + Json.String ssid optional, + Json.UInt8 rcpi optional, + Json.UInt8 rsni optional, + Json.UInt8 antennaId optional, + Json.UInteger parentTsf optional } - type record of BeaconReportItem BeaconReport; + type record of BeaconReport_ BeaconReport; /** - * @desc Information on Access Points available from the WLAN Access Information Service - * @member timeStamp TimeStamp - * @member apId Identifier(s) to uniquely specify the Access Point whose information is exposed within this data type - * @member channel Channel configured for the Access Point - * @member wlanCap WLAN capabilities of Access Point - * @member wanMetrics WAN Metrics element provides information about the WAN link connecting an IEEE 802.11 Access Node and the Internet - * @member bssLoad BSS Load attribute contains information on the current STA population and traffic levels in the BSS - * @member extBssLoad Extended BSS Load attribute contains more detailed information on the current STA population and traffic levels in the BSS - * @member apLocation The location on the Access Point - * @see ETSI GS MEC 028 Clause 6.2.2 Type: ApInfo + * @desc This type represents the Beacon Reporting Condition configuration + * @member reportingCondition Reporting condition for the Beacon Report + * @member threshold Contains either the threshold value or the offset value to be used for conditional reporting + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.28-1: Attributes of the BeaconReportingConfig */ - type record ApInfo { - TimeStamp timeStamp optional, - ApIdentity apId, - UInt32 channel optional, - WlanCapabilities wlanCap optional, - WanMetrics wanMetrics optional, - BssLoad bssLoad optional, - ExtBssLoad extBssLoad optional, - OBssLoad oBssLoad optional, - ApLocation apLocation optional + type record BeaconReportingConfig { + Json.UInt8 reportingCondition, + Json.UInt8 threshold } - type record of ApInfo ApInfoList; /** - * @desc Information on wireless stations available from the WLAN Access Information Service - * @member timeStamp TimeStamp - * @member staId Identifier(s) to uniquely specify station whose information is exposed within this data type - * @member channel Channel configured for the Access Point - * @member apAssociated Information about the Access Point that this Client Station is associated to - * @member rssi Receive Signal Strength Indicator - * @member staDataRate Station Data Rate - * @member staStatistics Statistics as defined in IEEE 802.11-2016 for the client station collected over measurement duration - * @member beaconReport Beacon Report as defined in Wi-Fi Agile Multiband Specification - * @member neighborReport Information about neighbor Access Points seen by the station - * @member channelLoad Channel Load reports as seen by the station - * @see ETSI GS MEC 028 Clause 6.2.3 Type: StaInfo + * @desc This type represents the Beacon Reported Frame information + * @member phyType Value between 0 and 127 coded according to dot11PHYType + * @member frameType A value of 0 indicates a Beacon or Probe Response. A value of 1 indicates a Measurement Pilot frame + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.29-1: Attributes of the ReportedBeaconFrameInfo */ - type record StaInfo { - TimeStamp timeStamp optional, - StaIdentity staId, - UInt32 channel optional, - ApAssociated apAssociated optional, - Rssi rssi optional, - StaDataRate staDataRate optional, - StaStatistics staStatistics optional, - BeaconReport beaconReport optional, - NeighborReport neighborReport optional, - ChannelLoad channelLoad optional + type record ReportedBeaconFrameInfo { + Json.UInt8 phyType, + Json.UInt8 frameType + } + /** + * @desc This type represents BSSID Information field within the Neighbor Report + * @member apReachability The apReachability field indicates whether the AP identified by this BSSID is reachable by the STA that requested the neighbor report + * @member security True indicates the AP identified by this BSSID supports the same security provisioning as used by the STA in its current association + * @member capabilities Capability information for the AP indicated by this BSSID + * @member highThroughputTrue indicates that the AP represented by this BSSID is an HT AP including the HT Capabilities element in its Beacons, and that the contents of that HT Capabilities element are identical to the HT Capabilities element advertised by the AP sending the report + * @member veryHighThroughputTrue indicates that the AP represented by this BSSID is a VHT AP and that the VHT Capabilities element + * @member ftm True indicates the AP represented by this BSSID is an AP that has set the Fine Timing Measurement Responder field of the Extended Capabilities element to 1 + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.30-1: Attributes of the BssidInfo + */ + type record BssidInfo { + Json.UInt8 apReachability, + Json.Bool security, + BssCapabilities capabilities, + Json.Bool highThroughput, + Json.Bool veryHighThroughput, + Json.Bool ftm } - type record of StaInfo StaInfoList; + /** - * @desc Different measurements configuration available from the WLAN Access Information Service - * @member _links Hyperlink related to the resource - * @member staId Identifier(s) to uniquely specify the target client station(s) for the measurement configuration - * @member measurementId Identifier of this measurement configuration - * @member measurementInfo Information used to configure this measurement - * @see ETSI GS MEC 028 Clause 6.2.4 Type: MeasurementConfig + * @desc This type represents BSS Capabilities subfield within the Neighbor Report + * @member spectrumManagement Spectrum Management required + * @member qos QoS Option implemented + * @member apsd APSD Option implemented + * @member radioMeasurements Radio Measurement Activated + * @member delayedBACK Delayed Block Ack Option implemented + * @member immediateBACK Immediate Block Ack Option implemented + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.31-1: Attributes of the BssCapabilities */ - type record MeasurementConfig { - LinkTypes links optional, - StaIdentities staId, - Json.String measurementId, - MeasurementInfo measurementInfo - } with { - variant (links) "name as '_links'"; + type record BssCapabilities { + Json.Bool spectrumManagement, + Json.Bool qos, + Json.Bool apsd, + Json.Bool radioMeasurements, + Json.Bool delayedBACK, + Json.Bool immediateBACK } - type record MeasurementConfig_MeasurementConfigLinkList { - Json.AnyURI href, - Json.String measurementId + /** + * @desc This configuration applies to the Neighbor Report + * @member ssid Contains an SSID element + * @member bssid BSSID of the neighbor AP which information is intended to obtain + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.32-1: Attributes of the NeighborReportConfig + */ + type record NeighborReportConfig { + Json.String ssid optional, + Json.String bssid optional } /** - * @desc The different measurement configurations available from the WLAN Access Information Service - * @member _links Hyperlink related to the resource - * @member measurementConfig - * @see ETSI GS MEC 028 Clause 6.2.5 Type: MeasurementConfigLinkList + * @desc This type represents the STA Counter Trigger Condition configuration + * @member failedCountThreshold Configure and set threshold for dot11FailedCount trigger + * @member fcsErrorCountThreshold Configure and set threshold for dot11FCSErrorCount trigger + * @member multipleRetryCountThreshold Configure and set threshold for dot11MultipleRetryCount trigger + * @member frameDuplicateCountThreshold Configure and set threshold for dot11FrameDuplicateCount trigger + * @member rtsFailureCountThreshold Configure and set threshold for dot11RTSFailureCount trigger + * @member ackFailureCountThreshold Configure and set threshold for dot11AckFailureCount trigger + * @member retryCountThreshold Configure and set threshold for dot11RetryCount trigger + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.33-1: Attributes of the STACounterTriggerCondition */ - type record MeasurementConfigLinkList { - LinkTypes links optional, - MeasurementConfig_MeasurementConfigLinkList measurementConfig - } with { - variant (links) "name as '_links'"; + type record STACounterTriggerCondition { + Json.UInteger failedCountThreshold optional, + Json.UInteger fcsErrorCountThreshold optional, + Json.UInteger multipleRetryCountThreshold optional, + Json.UInteger frameDuplicateCountThreshold optional, + Json.UInteger rtsFailureCountThreshold optional, + Json.UInteger ackFailureCountThreshold optional, + Json.UInteger retryCountThreshold optional } /** - * @desc Set for trigger-based event notification reporting - * @member trigger_ Trigger for the notification - * @member threshold Number of connected stations threshold for trigger-based event reporting - * @see ETSI GS MEC 028 Clause 6.3.3 Type: StaDataRateSubscription + * @desc STA Statistics Group Data for Group Identity = 0 + * @member transmittedFragmentCount dot11TransmittedFragmentCount counter + * @member groupTransmittedFrameCount dot11GroupTransmittedFrameCount counter + * @member failedCount dot11FailedCount counter + * @member receivedFragmentCountdot11ReceivedFragmentCount counter + * @member groupReceivedFrameCountdot11GroupReceivedFrameCount counter + * @member fcsErrorCount dot11FCSErrorCount counter + * @member transmittedFrameCount dot11TransmittedFrameCount counter + * @member reportingReasonStaCounters Optionally reported reason for STA Statistics Group 0 + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.34-1: Attributes of the StaStatisticsGroupZeroData */ - type record NotificationEvent { - UInt8 trigger_, - UInt8 threshold - } with { - variant (trigger_) "name as 'trigger'"; + type record StaStatisticsGroupZeroData { + Json.UInteger transmittedFragmentCount, + Json.UInteger groupTransmittedFrameCount, + Json.UInteger failedCount, + Json.UInteger receivedFragmentCount, + Json.UInteger groupReceivedFrameCount, + Json.UInteger fcsErrorCount, + Json.UInteger transmittedFrameCount, + ReportingReasonStaCounters reportingReasonStaCounters optional } /** - * @desc Subscription to get updates on client stations that are associated to an Access Point - * @member subscriptionType Shall be set to "AssocStaSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information - * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications - * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification - * @member _links Hyperlink related to the resource - * @member apId Identifier(s) to uniquely specify the target Access Point for the subscription - * @member notificationPeriod Set for periodic notification reporting - * @member notificationEvent Set for trigger-based event notification reporting - * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service - * @see ETSI GS MEC 028 Clause 6.3.2 Type: AssocStaSubscription + * @desc STA Statistics Group Data for Group Identity = 1 + * @member retryCount dot11RetryCount counter + * @member multipleRetryCount dot11MultipleRetryCount counter + * @member frameDuplicateCount dot11FrameDuplicateCount counter + * @member rtsSuccessCount dot11RTSSuccessCount counter + * @member rtsFailureCount dot11RTSFailureCount counter + * @member ackFailureCount dot11AckFailureCount counter + * @member reportingReasonStaCounters Optionally reported reason for STA Statistics Group 1 + * @see ETSI GS MEC 028 V2.3.1 Clause 6.5.35-1: Attributes of the StaStatisticsGroupOneData */ - type record AssocStaSubscription { - Json.String subscriptionType, - Json.AnyURI callbackReference optional, - Json.Bool requestTestNotification optional, - WebsockNotifConfig websockNotifConfig optional, - LinkTypes links optional, - ApIdentity apId, - UInt8 notificationPeriod optional, - NotificationEvent notificationEvent optional, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; + type record StaStatisticsGroupOneData { + Json.UInteger retryCount, + Json.UInteger multipleRetryCount, + Json.UInteger frameDuplicateCount, + Json.UInteger rtsSuccessCount, + Json.UInteger rtsFailureCount, + Json.UInteger ackFailureCount, + ReportingReasonStaCounters reportingReasonStaCounters optional } - type record of AssocStaSubscription AssocStaSubscriptionList; /** - * @desc Subscription to get updates on the Data Rate of targeted client station(s) - * @member subscriptionType Shall be set to "AssocStaSubscription" - * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed WLAN information - * @member requestTestNotification Set to TRUE by the service consumer to request a test notification on the callbackReference URI to determine if it is reachable by the WAIS for notifications - * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications, either in place of the callbackReference URI or if it is not reachable via the test notification - * @member _links Hyperlink related to the resource - * @member staId Identifier(s) to uniquely specify the target client station(s) for the subscription - * @member notificationPeriod Set for periodic notification reporting - * @member notificationEvent Set for trigger-based event notification reporting - * @member expiryDeadline The expiration time of the subscription determined by the WLAN Access Information Service - * @see ETSI GS MEC 028 Clause 6.3.3 Type: StaDataRateSubscription + * @desc STA Statistics Group Data for Group Identity = 2 through 9 + * @member qosTransmittedFragmentCount dot11QosTransmittedFragmentCount counter + * @member qosFailedCount dot11QosFailedCount counter + * @member qosRetryCount dot11QosRetryCount counter + * @member qosMultipleRetryCount dot11QosMultipleRetryCount counter + * @member qosFrameDuplicateCount dot11QosFrameDuplicateCount counter + * @member qosRTSSuccessCount dot11QosRTSSuccessCount counter + * @member qosRTSFailureCount dot11QosRTSFailureCount counter + * @member qosAckFailureCount dot11QosAckFailureCount counter + * @member qosReceivedFragmentCount dot11QosReceivedFragmentCount counter + * @member qosTransmittedFrameCount dot11QosTransmittedFrameCount counter + * @member qosDiscardedFrameCount dot11QosDiscardedFrameCount counter + * @member qosMPDUsReceivedCount dot11QosMPDUsReceivedCount counter + * @member qosRetriesReceivedCount dot11QosRetriesReceivedCount counter + * @member reportingReasonQoSCounters Optionally reported reason for STA Statistics Groups 2 to 9 + * @see ETSI GS MEC 028 V2.3.1 Clause 6.5.36-1: Attributes of the StaStatisticsGroup2to9Data */ - type record StaDataRateSubscription { - Json.String subscriptionType, - Json.AnyURI callbackReference, - Json.Bool requestTestNotification optional, - WebsockNotifConfig websockNotifConfig optional, - LinkTypes links optional, - StaIdentities staId, - UInt8 notificationPeriod optional, - NotificationEvent notificationEvent optional, - TimeStamp expiryDeadline optional - } with { - variant (links) "name as '_links'"; + type record StaStatisticsGroup2to9Data { + Json.UInteger qosTransmittedFragmentCount, + Json.UInteger qosFailedCount, + Json.UInteger qosRetryCount, + Json.UInteger qosMultipleRetryCount, + Json.UInteger qosFrameDuplicateCount, + Json.UInteger qosRTSSuccessCount, + Json.UInteger qosRTSFailureCount, + Json.UInteger qosAckFailureCount, + Json.UInteger qosReceivedFragmentCount, + Json.UInteger qosTransmittedFrameCount, + Json.UInteger qosDiscardedFrameCount, + Json.UInteger qosMPDUsReceivedCount, + Json.UInteger qosRetriesReceivedCount, + ReportingReasonQoSCounters reportingReasonQoSCounters optional } - type record of StaDataRateSubscription StaDataRateSubscriptionList; /** - * @desc - * @member href The URI referring to the subscription - * @member subscriptionType Type of the subscription - * @see ETSI GS MEC 028 Clause 6.3.4 Type: SubscriptionLinkList + * @desc Optionally reported reason for STA Statistics Group Identities 0 or 1 (STA Counters) in the STA Statistics Optional subelements + * @member failed dot11Failed + * @member fcsError dot11FCSError + * @member multipleRetry dot11MultipleRetry + * @member frameDuplicate dot11FrameDuplicate + * @member rtsFailure dot11RTSFailure + * @member ackFailure dot11AckFailure + * @member retry dot11Retry + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.37-1: Attributes of the ReportingReasonStaCounters */ - type record SubscriptionItem { - Json.AnyURI href, - Json.String subscriptionType + type record ReportingReasonStaCounters { + Json.Bool failed, + Json.Bool fcsError, + Json.Bool multipleRetry, + Json.Bool frameDuplicate, + Json.Bool rtsFailure, + Json.Bool ackFailure, + Json.Bool retry } - type record of SubscriptionItem Subscription; /** - * @desc List of links related to currently existing subscriptions for the service consumer - * @member links List of hyperlinks related to the resource - * @member assocStaSubscription - * @see ETSI GS MEC 028 Clause 6.3.4 Type: SubscriptionLinkList + * @desc Optionally reported reason for STA Statistics Group Identities 2 to 9 (QoS STA Counters) in the STA Statistics + * @member qosFailed dot11QoSFailed + * @member qosRetry dot11QoSRetry + * @member qosMultipleRetry dot11QoSMultipleRetry + * @member qosFrameDuplicate dot11QoSFrameDuplicate + * @member qosRtsFailure dot11QoSRTSFailure + * @member qosAckFailure dot11QoSAckFailure + * @member qosDiscarded dot11QoSDiscarded + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.38-1: Attributes of the ReportingReasonQoSCounters */ - type record SubscriptionLinkList { - LinkTypes links, - Subscription subscription optional - } with { - variant (links) "name as '_links'"; + type record ReportingReasonQoSCounters { + Json.Bool qosFailed, + Json.Bool qosRetry, + Json.Bool qosMultipleRetry, + Json.Bool qosFrameDuplicate, + Json.Bool qosRtsFailure, + Json.Bool qosAckFailure, + Json.Bool qosDiscarded } /** - * @desc Configuration for the delivery of subscription notifications over Websockets - * @member websocketUri Set by WAIS 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 028 Clause 6.3.6 Type: WebsockNotifConfig + * @desc Channel Load report from a station + * @member staId Identifier to uniquely specify the station whose information is exposed within this report + * @member measurementId Measurement ID of the Measurement configuration applied to this Channel Load Report + * @member operatingClass Operating Class field indicates an operating class value + * @member channel Channel number indicates the channel number for which the measurement report applies + * @member measurementDuration Duration over which the Channel Load report was measured, in units of TUs of 1024 µs + * @member channelLoad Proportion of measurement duration for which the measuring STA determined the channel to be busy, as a percentage of time, linearl scaled with 255 representing 100% + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.39-1: Attributes of the ChannelLoad */ - type record WebsockNotifConfig { - Json.AnyURI websocketUri optional, - Json.Bool requestWebsocketUri optional + type record ChannelLoad_ { + StaIdentity staId optional, + Json.String measurementId, + Json.UInt8 operatingClass, + Json.UInt8 channel, + Json.UInt8 measurementDuration, + Json.UInt8 channelLoad } + type record of ChannelLoad_ ChannelLoad; /** - * @desc Notification from WLAN Access Information Service with regards to client stations associated to the targeted Access Point - * @member notificationType Shall be set to "AssocStaNotification" - * @member timeStamp Time stamp - * @member apId Identifier(s) to uniquely specify the Access Point to which the client stations are associated - * @member staId Identifier(s) to uniquely specify the client station(s) associated - * @see ETSI GS MEC 028 Clause 6.4.2 Type: AssocStaNotification + * @desc The load of a Overlapping BSS + * @member allocatedTrafficSelfMean Mean of allocated traffic from this AP (BSS) in units of 32 µs per second + * @member allocatedTrafficSelfStdDev Standard deviation from the mean of allocation traffic from this BSS in units of 32 µs per second + * @member Mean of the sum of allocated traffic from other APs on the overlapping channel in unit of 32 µs per second + * @member Standard deviation from the mean of the sum of allocated traffic from other APs on the overlapping channel in unit of 32 µs per second + * @member overlap Indicates the number of other APs that are sharing the same channel as the reporting AP + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.40-1: Attributes of the OBssLoad */ - type record AssocStaNotification { - Json.String notificationType, - TimeStamp timeStamp optional, - ApIdentity apId, - StaIdentities staId optional + type record OBssLoad { + Json.UInt16 allocatedTrafficSelfMean, + Json.UInt16 allocatedTrafficSelfStdDev optional, + Json.UInt16 allocatedTrafficShareMean, + Json.UInt16 allocatedTrafficShareStdDev optional, + Json.UInt8 overlap optional } /** - * @desc Notification from WLAN Information service with regards to Data Rates of the subscribed client stations - * @member notificationType Shall be set to "StaDataRateNotification" - * @member timeStamp Time stamp - * @member staDataRate Data rates of a client station - * @see ETSI GS MEC 028 Clause 6.4.3 Type: StaDataRateNotification + * @desc The information required to define client station measurements available from the WLAN Access Information Service + * @member measurementDuration Duration of the measurement in time units (TUs) of 1024 µs + * @member randomInterval Random interval to be used for starting the measurement in TUs of 1024 µs + * @member channelLoadConf Configuration related to the Channel Load + * @member beaconRequestConf Configuration related to Beacon Request + * @member staStatisticsConf Configuration related to the statistics provided by STAs + * @member neighborReportConf Configuration related to Neighbor Reports + * @see ETSI GS MEC 028 V2.3.1 Table 6.5.41-1: Attributes for MeasurementInfo */ - type record StaDataRateNotification { - Json.String notificationType, - TimeStamp timeStamp optional, - StaDataRates staDataRate optional + type record MeasurementInfo { + Json.UInt16 measurementDuration optional, + Json.UInt16 randomInterval optional, + ChannelLoadConfig channelLoadConf optional, + BeaconRequestConfig beaconRequestConf optional, + StaStatisticsConfig staStatisticsConf optional, + NeighborReportConfig neighborReportConf optional } /** - * @desc Notification from WLAN Access Information service with regards to expiry of an existing subscription - * @member notificationType Shall be set to "ExpiryNotification" - * @member links Hyperlink related to the resource - * @member expiryDeadlineTime stamp - * @see ETSI GS MEC 028 Clause 6.4.4 Type: ExpiryNotification + * @desc Configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by WAIS 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 028 V2.3.1 Table 6.5.42-1: Attributes of the WebsockNotifConfig */ - type record ExpiryNotification { - Json.String notificationType, - LinkTypes links, - TimeStamp expiryDeadline - } with { - variant (links) "name as '_links'"; + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional } - } - with { +} with { encode "JSON" } // End of module WlanInformationAPI_TypesAndValues diff --git a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn index 18ace6f78d0e651f4e1116ac151db1c905fe735e..f488964887181143388be3de7a7889be88fd2ab9 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn @@ -36,8 +36,10 @@ module LibMec_Pics { modulepar boolean PICS_APP_PACKAGE_NOTIFICATIONS := true; - modulepar charstring PICS_ROOT_API := "exampleAPI"; + modulepar boolean PIC_APP_LCM_MANAGEMENT := true; modulepar boolean PIC_APP_LCM_NOTIFICATIONS := true; + modulepar charstring PICS_ROOT_API := "/"; + } // End of module LibMec_Pics diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index c694216f7c797b13715b4318963f556f8ec8ef72..fee2d654347d9ae207f7681d1c2cdd6f0f0ca542 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -1,91 +1,113 @@ module LibMec_Pixits { - modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "/location/v2/queries/zones"; + modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "location/v3/queries/zones"; - modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "/location/v2/queries/users"; + modulepar charstring PX_ME_APP_Q_USERS_LIST_URI := "location/v3/queries/users"; - modulepar charstring PX_ME_APP_Q_DIST_URI := "/location/v2/subscriptions/distance"; - - modulepar charstring PX_ME_APP_Q_USERS_LOC_SUB_URI := "/location/v2/subscriptions/userTracking"; - - modulepar charstring PX_ME_APP_Q_USERS_TRACK_SUB_URI := "/location/v2/subscriptions/periodic"; + modulepar charstring PX_LOC_API_USERS_SUB_URI := "location/v3/subscriptions/users"; - modulepar charstring PX_ME_APP_Q_USERS_INF_SUB_URI := "/location/v2/subscriptions/zonalTraffic"; + modulepar charstring PX_LOC_API_ZONES_SUB_URI := "location/v3/subscriptions/zones"; - modulepar charstring PX_ME_APP_Q_AREA_SUB_URI := "/location/v2/subscriptions/area/circle"; + modulepar charstring PX_LOC_API_AREA_SUB_URI := "location/v3/subscriptions/area"; - modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "/ui/v1/"; + modulepar charstring PX_LOC_API_DISTANCE_SUB_URI := "location/v3/subscriptions/distance"; - modulepar charstring PX_SVC_MGMT_TRANS_URI := "/mec_service_mgmt/v1/transports"; + modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "ui/v1/"; - modulepar charstring PX_SVC_MGMT_APP_URI := "/mec_service_mgmt/v1/application"; + modulepar charstring PX_SVC_MGMT_TRANS_URI := "mec_service_mgmt/v1/transports"; - modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions"; + modulepar charstring PX_SVC_MGMT_APP_URI := "mec_service_mgmt/v1/application"; - modulepar charstring PX_RNIS_QUERIES_URI := "/rni/v2/queries"; + modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "rni/v2/subscriptions"; - modulepar charstring PX_ME_BWM_URI := "/bwm/v1/bw_allocations"; + modulepar charstring PX_RNIS_QUERIES_URI := "rni/v2/queries"; - modulepar charstring PX_ME_MTS_INFO_URI := "/mts/v1/mts_info"; + modulepar charstring PX_ME_BWM_URI := "bwm/v1/bw_allocations"; - modulepar charstring PX_ME_MTS_SESSIONS_URI := "/mts/v1/mts_sessions"; + modulepar charstring PX_ME_MTS_INFO_URI := "mts/v1/mts_capability_info"; + + modulepar charstring PX_ME_MTS_SESSIONS_URI := "mts/v1/mts_sessions"; - modulepar charstring PX_ME_WLAN_QUERIES_URI := "/wai/v2/queries"; + modulepar charstring PX_ME_WLAN_QUERIES_URI := "wai/v2/queries"; + + modulepar charstring PX_ME_WLAN_URI := "wai/v2"; - modulepar charstring PX_ME_WLAN_URI := "/wai/v2"; + modulepar charstring PX_ME_WLAN_URI_SUB := "wai/v2/subscriptions"; - modulepar charstring PX_ME_V2X_URI := "/vis/v1"; + modulepar charstring PX_ME_WLAN_URI_MEAS := "wai/v2/measurements"; - modulepar charstring PX_ME_V2X_QUERIES_URI := "/vis/v1/queries"; + modulepar charstring PX_ME_V2X_URI := "vis/v2"; - modulepar charstring PX_ME_DEVICE_APP_URI := "/dev_app/v1"; + modulepar charstring PX_ME_V2X_URI_SUB := "vis/v2/subscriptions"; - modulepar charstring PX_ME_APP_AMS_URI := "/amsi/v1/appMobilityServices" + modulepar charstring PX_ME_V2X_QUERIES_URI := "vis/v2/queries"; - modulepar charstring PX_ME_APP_AMS_SUBS := "/amsi/v1/subscriptions"; + modulepar charstring PX_ME_DEVICE_APP_URI := "dev_app/v1"; - modulepar charstring PX_MEO_GRANT_URI := "/granting/v1/grants"; + modulepar charstring PX_ME_APP_AMS_URI := "amsi/v1/app_mobility_services" - modulepar charstring PX_MEO_PKGM_URI := "/app_pkgm/v1/app_packages" + modulepar charstring PX_ME_APP_AMS_QUERIES_URI := "amsi/v1/queries/adjacent_app_instances" - modulepar charstring PX_MEO_PKGM_URI_ONBOARDED := "/app_pkgm/v1/onboarded_app_packages" + modulepar charstring PX_ME_APP_AMS_SUBS := "amsi/v1/subscriptions"; - modulepar charstring PX_MEO_PKGM_SUBS := "/app_pkgm/v1/subscriptions" + modulepar charstring PX_MEO_GRANT_URI := "granting/v1/grants"; + + modulepar charstring PX_MEO_PKGM_URI := "app_pkgm/v1/app_packages" + + modulepar charstring PX_MEO_PKGM_URI_ONBOARDED := "app_pkgm/v1/onboarded_app_packages" + + modulepar charstring PX_MEO_PKGM_SUBS := "app_pkgm/v1/subscriptions" - modulepar charstring PX_MEPM_PKGM_URI := "/app_pkgm/v1/app_packages" + modulepar charstring PX_MEPM_PKGM_URI := "app_pkgm/v1/app_packages" - modulepar charstring PX_MEPM_PKGM_SUBS := "/app_pkgm/v1/subscriptions" + modulepar charstring PX_MEPM_PKGM_SUBS := "app_pkgm/v1/subscriptions" - modulepar charstring PX_APP_LCM_URI := "/app_lcm/v1/app_instances" + modulepar charstring PX_APP_LCM_URI := "app_lcm/v1/app_instances" - modulepar charstring PX_MEX_LCM_SUBS := "/alcmi/v1/subscriptions"; + modulepar charstring PX_MEX_LCM_SUBS := "app_lcm/v1/subscriptions"; - modulepar charstring PX_MEX_LCM_OP_OCC_URI := "/alcmi/v1/app_lcm_op_occs"; + modulepar charstring PX_MEX_LCM_OP_OCC_URI := "app_lcm/v1/app_lcm_op_occs"; - modulepar charstring PX_UE_APP_CTX_URI := "/mx2/v1/app_contexts"; + modulepar charstring PX_UE_APP_CTX_URI := "mx2/v1/app_contexts"; - modulepar charstring PX_UE_APPS_URI := "/mx2/v1/app_list"; + modulepar charstring PX_UE_APPS_URI := "mx2/v1/app_list"; - modulepar charstring PX_MEC_SVC_MGMT_APPS_URI := "/mec_service_mgmt/v1/applications"; + modulepar charstring PX_MEC_SVC_MGMT_APPS_URI := "mec_app_support/v2/registrations"; - modulepar charstring PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "/mec_app_support/v1/timing/current_time"; + modulepar charstring PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "mec_app_support/v2/timing/current_time"; - modulepar charstring PX_ME_APP_SUPPORT_URI := "/mec_app_support/v1/applications"; + modulepar charstring PX_ME_APP_SUPPORT_URI := "mec_app_support/v2/applications"; - modulepar charstring PX_MEC_SVC_MGMT_SVC_URI := "/mec_service_mgmt/v1/services"; + modulepar charstring PX_ME_APP_REG_APPS_URI := "mec_service_mgmt/v1/applications"; - modulepar charstring PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "/mec_app_support/v1/timing/timing_caps"; + modulepar charstring PX_MEC_SVC_MGMT_SVC_URI := "mec_service_mgmt/v1/services"; - modulepar charstring PX_FAI_FA_INFO_URI := "/fai/v1/fa_info"; + modulepar charstring PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "mec_app_support/v2/timing/timing_caps"; - modulepar charstring PX_FAI_DEVICE_INFO_URI:= "/fai/v1/device_info"; + modulepar charstring PX_FAI_FA_INFO_URI := "fai/v1/queries/fa_info"; - modulepar charstring PX_FAI_CABLE_LINE_INFO_URI := "/fai/v1/cable_line_info"; + modulepar charstring PX_FAI_DEVICE_INFO_URI:= "fai/v1/queries/device_info"; - modulepar charstring PX_FAI_OPTICAL_NW_INFO_URI := "/fai/v1/optical_network_info"; + modulepar charstring PX_FAI_CABLE_LINE_INFO_URI := "fai/v1/queries/cable_line_info"; - modulepar charstring PX_FAI_SUB_URI := "/fai/v1/optical_network_info"; + modulepar charstring PX_FAI_OPTICAL_NW_INFO_URI := "fai/v1/queries/optical_network_info"; - modulepar charstring PX_UE_ZONAL_TRAF_SUB_URI := "/fai/v1/optical_network_info"; + modulepar charstring PX_FAI_SUB_URI := "ai/v1/subscriptions"; + modulepar charstring PX_UE_ZONAL_TRAF_SUB_URI := "fai/v1/optical_network_info"; + + modulepar charstring PX_FED_API_LIST_SYSTEM_INFO := "fed_enablement/v1/fed_resources/system_info"; + + modulepar charstring PX_FED_API_SUB := "fed_enablement/v1/fed_resources/system_info"; + + modulepar charstring PX_FED_API_SUB_WRONG := "fed_enablement/v10/fed_resources/system_info"; // v10 instead of v1 + + modulepar charstring PX_IOT_API_LIST_DEVICE_INFO := "iots/v1/registered_devices"; + + modulepar charstring PX_IOT_API_SUB := "iots/v1/registered_devices"; + + modulepar charstring PX_IOT_API_LIST_PLTF_INFO := "iots/v1/registered_iot_platforms"; + + modulepar charstring PX_IOT_API_LIST_PLTF_SUB := "iots/v1/registered_iot_platforms"; + } // End of module LibMec_Pixits diff --git a/ttcn/LibMec/ttcn/LibMec_Templates.ttcn b/ttcn/LibMec/ttcn/LibMec_Templates.ttcn index d5f8e8202667e2f63e5cfb6e6fbe583003415365..fafc89d9a5c12c252f2d3e3c0dce1798ab8b8f6c 100644 --- a/ttcn/LibMec/ttcn/LibMec_Templates.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Templates.ttcn @@ -37,4 +37,20 @@ module LibMec_Templates { instance := p_instance } // End of template mw_problem_details + template (value) TimeStamp m_time_stamp( + in Seconds p_seconds, + in NanoSeconds p_nanoSeconds := 0 + ) := { + seconds := p_seconds, + nanoSeconds := p_nanoSeconds + } // End of template m_time_stamp + + template (present) TimeStamp mw_time_stamp( + template (present) Seconds p_seconds := ?, + template (present) NanoSeconds p_nanoSeconds := ? + ) := { + seconds := p_seconds, + nanoSeconds := p_nanoSeconds + } // End of template mw_time_stamp + } // End of module LibMec_Templates diff --git a/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn b/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn index 829f2eb90d3441ffcc7154486ffe3ef889ff196a..b960094b4d7eb2d0f226d4f63fde6a3bf2fcdd24 100644 --- a/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn @@ -6,6 +6,26 @@ module LibMec_TypesAndValues { // LibCommon import from LibCommon_BasicTypesAndValues all; + /** + * @desc Time stamp description + * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type record TimeStamp { + Seconds seconds, + NanoSeconds nanoSeconds + } + + /** + * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type Json.UInteger Seconds; + + /** + * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC + */ + type Json.UInteger NanoSeconds; + /** * @desc Problem Details for HTTP APIs * @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type diff --git a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.cc b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.cc index fcff30b43db4aa08cefb7d655fcab59d0fc309ec..38bc8f5b6331b12604ea1adb60293cfc670eb3be 100644 --- a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.cc +++ b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.cc @@ -43,7 +43,7 @@ #endif -#define AS_TCP_CHUNCK_SIZE 4096 +#define AS_TCP_CHUNCK_SIZE 4096 + 1024 #define AS_SSL_CHUNCK_SIZE 16384 // Used for the 'address already in use' bug workaround #define AS_DEADLOCK_COUNTER 16 diff --git a/ttcn/modules/titan.TestPorts.HTTPmsg/module/demo/HTTP_Test_no_ASPs.ttcn b/ttcn/modules/titan.TestPorts.HTTPmsg/module/demo/HTTP_Test_no_ASPs.ttcn index 3d69543f9bc991777c5fae144ea98844022e8319..dfe710ba4761488a9c5b05fd8a283dad299b6689 100644 --- a/ttcn/modules/titan.TestPorts.HTTPmsg/module/demo/HTTP_Test_no_ASPs.ttcn +++ b/ttcn/modules/titan.TestPorts.HTTPmsg/module/demo/HTTP_Test_no_ASPs.ttcn @@ -158,7 +158,7 @@ function f_singleEncDecCheck( in HTTPMessage p_msg) if(ischosen( p_msg.request ) ){ tr_expectedMsg.request.client_id := *; } - else if(ischosen( p_msg.response )){ + else if(ischosen( p_msg.response )) { tr_expectedMsg.response.client_id := *; } diff --git a/ttcn/patch_lib_common_titan/module.mk b/ttcn/patch_lib_common_titan/module.mk index 3b3b66029142802a399c0aa3a7b66eb989ddbe3b..905b4887a000439649532bbbb61e8e39df20d6dc 100644 --- a/ttcn/patch_lib_common_titan/module.mk +++ b/ttcn/patch_lib_common_titan/module.mk @@ -1,9 +1,9 @@ sources := \ ttcn/LibCommon_AbstractData.ttcn \ - ttcn/LibCommon_BasicTypesAndValues.ttcn \ - ttcn/LibCommon_DataStrings.ttcn \ - ttcn/LibCommon_Sync.ttcn \ ttcn/LibCommon_TextStrings.ttcn \ ttcn/LibCommon_Time.ttcn \ - ttcn/LibCommon_VerdictControl.ttcn + ttcn/LibCommon_VerdictControl.ttcn \ + ../patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn \ + ../patch_lib_common_titan/ttcn/LibCommon_DataStrings.ttcn \ + ../patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn \ diff --git a/ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn similarity index 92% rename from ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn rename to ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn index 5758c7c1bf17a5520726718f0e66d24cd846af22..9b5477d98b422df6a9051cfd7b589269cf553be3 100644 --- a/ttcn/patch_lib_common_titan/LibCommon_BasicTypesAndValues.ttcn +++ b/ttcn/patch_lib_common_titan/ttcn/LibCommon_BasicTypesAndValues.ttcn @@ -172,38 +172,38 @@ const integer c_int32Max := 2147483647; type integer Int; - type integer Int1 (c_int1Min .. c_int1Max) with { variant "1 bit, COMP(2scompl)" }; - type integer Int2 (c_int2Min .. c_int2Max) with { variant "2 bit, COMP(2scompl)" }; - type integer Int3 (c_int3Min .. c_int3Max) with { variant "3 bit, COMP(2scompl)" }; - type integer Int4 (c_int4Min .. c_int4Max) with { variant "4 bit, COMP(2scompl)" }; - type integer Int5 (c_int5Min .. c_int5Max) with { variant "5 bit, COMP(2scompl)" }; - type integer Int6 (c_int6Min .. c_int6Max) with { variant "6 bit, COMP(2scompl)" }; - type integer Int7 (c_int7Min .. c_int7Max) with { variant "7 bit, COMP(2scompl)" }; - type integer Int8 (c_int8Min .. c_int8Max) with { variant "8 bit, COMP(2scompl)" }; - type integer Int9 (c_int9Min .. c_int9Max) with { variant "9 bit, COMP(2scompl)" }; - type integer Int10 (c_int10Min .. c_int10Max) with { variant "10 bit, COMP(2scompl)" }; - type integer Int11 (c_int11Min .. c_int11Max) with { variant "11 bit, COMP(2scompl)" }; - type integer Int12 (c_int12Min .. c_int12Max) with { variant "12 bit, COMP(2scompl)" }; - type integer Int13 (c_int13Min .. c_int13Max) with { variant "13 bit, COMP(2scompl)" }; - type integer Int14 (c_int14Min .. c_int14Max) with { variant "14 bit, COMP(2scompl)" }; - type integer Int15 (c_int15Min .. c_int15Max) with { variant "15 bit, COMP(2scompl)" }; - type integer Int16 (c_int16Min .. c_int16Max) with { variant "16 bit, COMP(2scompl)" }; - type integer Int17 (c_int17Min .. c_int17Max) with { variant "17 bit, COMP(2scompl)" }; - type integer Int18 (c_int18Min .. c_int18Max) with { variant "18 bit, COMP(2scompl)" }; - type integer Int19 (c_int19Min .. c_int19Max) with { variant "19 bit, COMP(2scompl)" }; - type integer Int20 (c_int20Min .. c_int20Max) with { variant "20 bit, COMP(2scompl)" }; - type integer Int21 (c_int21Min .. c_int21Max) with { variant "21 bit, COMP(2scompl)" }; - type integer Int22 (c_int22Min .. c_int22Max) with { variant "22 bit, COMP(2scompl)" }; - type integer Int23 (c_int23Min .. c_int23Max) with { variant "23 bit, COMP(2scompl)" }; - type integer Int24 (c_int24Min .. c_int24Max) with { variant "24 bit, COMP(2scompl)" }; - type integer Int25 (c_int25Min .. c_int25Max) with { variant "25 bit, COMP(2scompl)" }; - type integer Int26 (c_int26Min .. c_int26Max) with { variant "26 bit, COMP(2scompl)" }; - type integer Int27 (c_int27Min .. c_int27Max) with { variant "27 bit, COMP(2scompl)" }; - type integer Int28 (c_int28Min .. c_int28Max) with { variant "28 bit, COMP(2scompl)" }; - type integer Int29 (c_int29Min .. c_int29Max) with { variant "29 bit, COMP(2scompl)" }; - type integer Int30 (c_int30Min .. c_int30Max) with { variant "30 bit, COMP(2scompl)" }; - type integer Int31 (c_int31Min .. c_int31Max) with { variant "31 bit, COMP(2scompl)" }; - type integer Int32 (c_int32Min .. c_int32Max) with { variant "32 bit, COMP(2scompl)" }; + type integer Int1 (c_int1Min .. c_int1Max) with { variant "1 bit"}; + type integer Int2 (c_int2Min .. c_int2Max) with { variant "2 bit"}; + type integer Int3 (c_int3Min .. c_int3Max) with { variant "3 bit"}; + type integer Int4 (c_int4Min .. c_int4Max) with { variant "4 bit"}; + type integer Int5 (c_int5Min .. c_int5Max) with { variant "5 bit"}; + type integer Int6 (c_int6Min .. c_int6Max) with { variant "6 bit"}; + type integer Int7 (c_int7Min .. c_int7Max) with { variant "7 bit"}; + type integer Int8 (c_int8Min .. c_int8Max) with { variant "8 bit"}; + type integer Int9 (c_int9Min .. c_int9Max) with { variant "9 bit"}; + type integer Int10 (c_int10Min .. c_int10Max) with { variant "10 bit"}; + type integer Int11 (c_int11Min .. c_int11Max) with { variant "11 bit"}; + type integer Int12 (c_int12Min .. c_int12Max) with { variant "12 bit"}; + type integer Int13 (c_int13Min .. c_int13Max) with { variant "13 bit"}; + type integer Int14 (c_int14Min .. c_int14Max) with { variant "14 bit"}; + type integer Int15 (c_int15Min .. c_int15Max) with { variant "15 bit"}; + type integer Int16 (c_int16Min .. c_int16Max) with { variant "16 bit"}; + type integer Int17 (c_int17Min .. c_int17Max) with { variant "17 bit"}; + type integer Int18 (c_int18Min .. c_int18Max) with { variant "18 bit"}; + type integer Int19 (c_int19Min .. c_int19Max) with { variant "19 bit"}; + type integer Int20 (c_int20Min .. c_int20Max) with { variant "20 bit"}; + type integer Int21 (c_int21Min .. c_int21Max) with { variant "21 bit"}; + type integer Int22 (c_int22Min .. c_int22Max) with { variant "22 bit"}; + type integer Int23 (c_int23Min .. c_int23Max) with { variant "23 bit"}; + type integer Int24 (c_int24Min .. c_int24Max) with { variant "24 bit"}; + type integer Int25 (c_int25Min .. c_int25Max) with { variant "25 bit"}; + type integer Int26 (c_int26Min .. c_int26Max) with { variant "26 bit"}; + type integer Int27 (c_int27Min .. c_int27Max) with { variant "27 bit"}; + type integer Int28 (c_int28Min .. c_int28Max) with { variant "28 bit"}; + type integer Int29 (c_int29Min .. c_int29Max) with { variant "29 bit"}; + type integer Int30 (c_int30Min .. c_int30Max) with { variant "30 bit"}; + type integer Int31 (c_int31Min .. c_int31Max) with { variant "31 bit"}; + type integer Int32 (c_int32Min .. c_int32Max) with { variant "32 bit"}; } // end group signedIntegerDefintions diff --git a/ttcn/patch_lib_common_titan/ttcn/LibCommon_DataStrings.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_DataStrings.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9bfbe61a78b4cb161929cae010cf34f510d97e00 --- /dev/null +++ b/ttcn/patch_lib_common_titan/ttcn/LibCommon_DataStrings.ttcn @@ -0,0 +1,168 @@ +/** + * + * @author ETSI + * @version $URL$ + * $Id$ + * @desc A collection of data string type and value definitions which + * may be useful in the implementation of any TTCN-3 test + * suite. "Data string" refers to TTCN-3 hexstring, octetstring + * and bitstring types. + * @remark End users should be aware that any changes made to the in + * definitions this module may be overwritten in future releases. + * End users are encouraged to contact the distributers of this + * module regarding their modifications or additions so that future + * updates will include your changes. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * + */ + module LibCommon_DataStrings { + + /** + * @remark Number in name indicates string length in number of + * _bits_ + */ + group bitStringSubTypes { + + type bitstring Bit1 length(1) with {encode "length(1)"}; + type bitstring Bit2 length(2) with {encode "length(2)"}; + type bitstring Bit3 length(3) with {encode "length(3)"}; + type bitstring Bit4 length(4) with {encode "length(4)"}; + type bitstring Bit5 length(5) with {encode "length(5)"}; + type bitstring Bit6 length(6) with {encode "length(6)"}; + type bitstring Bit7 length(7) with {encode "length(7)"}; + type bitstring Bit8 length(8) with {encode "length(8)"}; + type bitstring Bit9 length(9) with {encode "length(9)"}; + type bitstring Bit10 length(10) with {encode "length(10)"}; + type bitstring Bit11 length(11) with {encode "length(11)"}; + type bitstring Bit12 length(12) with {encode "length(12)"}; + type bitstring Bit13 length(13) with {encode "length(13)"}; + type bitstring Bit14 length(14) with {encode "length(14)"}; + type bitstring Bit15 length(15) with {encode "length(15)"}; + type bitstring Bit16 length(16) with {encode "length(16)"}; + type bitstring Bit17 length(17) with {encode "length(17)"}; + type bitstring Bit18 length(18) with {encode "length(18)"}; + type bitstring Bit19 length(19) with {encode "length(19)"}; + type bitstring Bit20 length(20) with {encode "length(20)"}; + type bitstring Bit21 length(21) with {encode "length(21)"}; + type bitstring Bit22 length(22) with {encode "length(22)"}; + type bitstring Bit23 length(23) with {encode "length(23)"}; + type bitstring Bit24 length(24) with {encode "length(24)"}; + type bitstring Bit25 length(25) with {encode "length(25)"}; + type bitstring Bit26 length(26) with {encode "length(26)"}; + type bitstring Bit27 length(27) with {encode "length(27)"}; + type bitstring Bit28 length(28) with {encode "length(28)"}; + type bitstring Bit29 length(29) with {encode "length(29)"}; + type bitstring Bit30 length(30) with {encode "length(30)"}; + type bitstring Bit31 length(31) with {encode "length(31)"}; + type bitstring Bit32 length(32) with {encode "length(32)"}; + type bitstring Bit40 length(40) with {encode "length(40)"}; + + type bitstring Bit48 length(48) with {encode "length(48)"}; + type bitstring Bit64 length(64) with {encode "length(64)"}; + type bitstring Bit72 length(72) with {encode "length(72)"}; + type bitstring Bit128 length(128) with {encode "length(128)"}; + type bitstring Bit144 length(144) with {encode "length(144)"}; + type bitstring Bit256 length(256) with {encode "length(256)"}; + + } // end group bitStringSubTypes + + group zeroedBits { + + const Bit1 c_1ZeroBit := int2bit(0,1); + const Bit2 c_2ZeroBits := int2bit(0,2); + const Bit4 c_4ZeroBits := int2bit(0,4); + const Bit5 c_5ZeroBits := int2bit(0,5); + const Bit6 c_6ZeroBits := int2bit(0,6); + const Bit8 c_8ZeroBits := int2bit(0,8); + const Bit14 c_14ZeroBits := int2bit(0,14); + const Bit64 c_64ZeroBits := int2bit(0,64); + + }//end group zeroedBits + + /** + * @remark Number in name indicates string length in number of + * _octets_ + */ + group octetStringSubTypes { + + type octetstring Oct1 length(1) with {encode "length(1)"}; + type octetstring Oct2 length(2) with {encode "length(2)"}; + type octetstring Oct3 length(3) with {encode "length(3)"}; + type octetstring Oct4 length(4) with {encode "length(4)"}; + type octetstring Oct5 length(5) with {encode "length(5)"}; + type octetstring Oct6 length(6) with {encode "length(6)"}; + type octetstring Oct7 length(7) with {encode "length(7)"}; + type octetstring Oct8 length(8) with {encode "length(8)"}; + type octetstring Oct9 length(9) with {encode "length(9)"}; + type octetstring Oct10 length(10) with {encode "length(10)"}; + type octetstring Oct11 length(11) with {encode "length(11)"}; + type octetstring Oct12 length(12) with {encode "length(12)"}; + type octetstring Oct13 length(13) with {encode "length(13)"}; + type octetstring Oct14 length(14) with {encode "length(14)"}; + type octetstring Oct15 length(15) with {encode "length(15)"}; + type octetstring Oct16 length(16) with {encode "length(16)"}; + + type octetstring Oct20 length(20) with {encode "length(20)"}; + type octetstring Oct32 length(32) with {encode "length(32)"}; + type octetstring Oct48 length(48) with {encode "length(48)"}; + type octetstring Oct64 length(64) with {encode "length(64)"}; + type octetstring Oct80 length(80) with {encode "length(80)"}; + type octetstring Oct96 length(96) with {encode "length(96)"}; + type octetstring Oct128 length(128) with {encode "length(128)"}; + type octetstring Oct160 length(160) with {encode "length(160)"}; + type octetstring Oct320 length(320) with {encode "length(320)"}; + type octetstring Oct640 length(640) with {encode "length(640)"}; + type octetstring Oct1280 length(1280) with {encode "length(1280)"}; + type octetstring Oct1380 length(1380) with {encode "length(1380)"}; + + type octetstring Oct0to3 length(0..3) with {encode "length(0..3)"}; + type octetstring Oct0to8 length(0..16) with {encode "length(0..8)"}; + type octetstring Oct0to12 length(0..12) with {encode "length(0..12)"}; + type octetstring Oct0to16 length(0..16) with {encode "length(0..16)"}; + type octetstring Oct0to31 length(0..31) with {encode "length(0..31)"}; + type octetstring Oct0to20 length(0..20) with {encode "length(0..20)"}; + type octetstring Oct0to30 length(0..20) with {encode "length(0..30)"}; + type octetstring Oct0to127 length(0..127) with {encode "length(0..127)"}; + type octetstring Oct0to255 length(0..255) with {encode "length(0..255)"}; + + type octetstring Oct1to15 length(1..15) with {encode "length(1..15)"}; + type octetstring Oct1to31 length(1..31) with {encode "length(1..31)"}; + type octetstring Oct1to128 length(1..128) with {encode "length(1..128)"}; + type octetstring Oct1to254 length(1..254) with {encode "length(1..254)"}; + type octetstring Oct1to255 length(1..255) with {encode "length(1..255)"}; + + type octetstring Oct4to16 length(4..16) with {encode "length(4..16)"}; + type octetstring Oct6to15 length(6..15) with {encode "length(6..15)"}; + + } // end group octetStringSubTypes + + group zeroedBytes { + const Oct1 c_1ZeroByte := int2oct(0,1); + const Oct2 c_2ZeroBytes := int2oct(0,2); + const Oct4 c_4ZeroBytes := int2oct(0,4); + const Oct6 c_6ZeroBytes := int2oct(0,6); + const Oct8 c_8ZeroBytes := int2oct(0,8); + const Oct9 c_9ZeroBytes := int2oct(0,9); + const Oct12 c_12ZeroBytes := int2oct(0,12); + const Oct16 c_16ZeroBytes := int2oct(0,16); + const Oct20 c_20ZeroBytes := int2oct(0,20); + + const Oct80 c_80ZeroBytes := int2oct(0,80); + const Oct160 c_160ZeroBytes := int2oct(0,160); + const Oct320 c_320ZeroBytes := int2oct(0,320); + const Oct640 c_640ZeroBytes := int2oct(0,640); + const Oct1280 c_1280ZeroBytes := int2oct(0,1280); + const Oct1380 c_1380ZeroBytes := int2oct(0,1380); + const octetstring c_256ZeroBytes := int2oct(0,256); + const octetstring c_1KZeroBytes := int2oct(0,1024); + const octetstring c_4KZeroBytes := int2oct(0,4096); + const octetstring c_16KZeroBytes := int2oct(0,16384); + const octetstring c_64KZeroBytes := int2oct(0,65536); + const octetstring c_128KZeroBytes := int2oct(0,131072); + + }//end group zeroedBytes + +} // end module LibCommon_DataStrings diff --git a/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn similarity index 97% rename from ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn rename to ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn index 38e29df924fe40e808448a50008ad62ccc765d27..7c54ff1b2cdbe61019667089c462de3c05b26da3 100644 --- a/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn +++ b/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn @@ -1,7 +1,7 @@ /** * @author ETSI - * @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_Sync.ttcn $ - * $Id: LibCommon_Sync.ttcn 66 2017-03-06 09:59:41Z filatov $ + * @version $URL$ + * $Id$ * @desc This module implements _one_ generic synchronization mechanism * for TTCN-3 test cases with one or more test components. * Key concept is here that one test component acts as a @@ -777,6 +777,7 @@ module LibCommon_Sync { // leave it to be ok to receive anything else // in case that the user has added any non-sync ports to // his/her server component type definition! + repeat; } [] tc_sync.timeout{ log("**** f_serverSyncClientsTimed: A client is not responding within specified time limit - sync server is sending stop to all clients! ****"); @@ -990,7 +991,7 @@ module LibCommon_Sync { syncPort.send(m_syncClientReady(p_syncId)); tc_sync.start; alt{ - [] syncPort.receive(m_syncServerReady(p_syncId)){ + [] syncPort.receive(m_syncServerReady(p_syncId)) { tc_sync.stop ; } [] tc_sync.timeout{ log("**** f_clientSync: Sync client did not receive message from sync server within the specified time limit - sync client will ask sync server to stop test case! ****") ; diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 6b9164833a50e14480ad03e19440a8df9de667a1..2dc8d1c254b3b20486eda07169e50fb44fba94c2 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -22,27 +22,42 @@ module LibHttp_JsonMessageBodyTypes { import from WlanInformationAPI_TypesAndValues all; // LibMec/FixedAccessInformationServiceAPI import from FixedAccessInformationServiceAPI_TypesAndValues all; + // LibMec/ApplicationMobilityServiceAPI_TypesAndValues + import from ApplicationMobilityServiceAPI_TypesAndValues all; // LibMec/V2XInformationServiceAPI import from V2XInformationServiceAPI_TypesAndValues all; + // LibMec/IoT + import from IoTAPI_TypesAndValues all; + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; /** * This file volontary contains a trivial declaration of the type JsonBody. * In accordance with your TTCN-3 module LibItsHttp_JSONTypes, you have to change the JsonBody typing. */ // TODO Add here your custom RFCs import - + type union JsonBody { - UserInfo userInfo, - UserList userList, - LocationAPI_TypesAndValues.ZoneInfo zoneInfo, - AccessPointList accessPointList, - UserTrackingSubscription userTrackingSubscription, - PeriodicTrackingSubscription periodicTrackingSubscription, - ZonalTrafficSubscription zonalTrafficSubscription, - CircleNotificationSubscription circleNotificationSubscription, + UserInfo userInfo, // ETSI GS MEC 013 V3.1.1 Clause 6.2.2 Type: UserInfo + UserList userList, // ETSI GS MEC 013 V3.1.1 Clause 6.2.5 Type: UserList + LocationAPI_TypesAndValues.ZoneInfo zoneInfo, // ETSI GS MEC 013 V3.1.1 Clause 6.2.1 Zonal presence data types + AccessPointList accessPointList, // ETSI GS MEC 013 V3.1.1 Clause 6.2.1 Zonal presence data types + AccessPointInfo accessPointInfo, // ETSI GS MEC 013 V3.1.1 Clause 6.2.1 Zonal presence data types + NotificationSubscriptionList notificationSubscriptionList, // ETSI GS MEC 013 V3.1.1 Clause 6.3.3 Type: NotificationSubscriptionList + UserLocationEventSubscription userLocationEventSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.4 Type: UserLocationEventSubscription + UserLocationPeriodicSubscription userLocationPeriodicSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.5 Type: UserLocationPeriodicSubscription + ZoneLocationEventSubscription zoneLocationEventSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.6 Type: ZoneLocationEventSubscription + ZoneStatusSubscription zoneStatusSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.7 Type: ZoneStatusSubscription + UserAreaSubscription userAreaSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.8 Type: UserAreaSubscription + UserDistanceSubscription userDistanceSubscription, // ETSI GS MEC 013 V3.1.1 Clause 6.3.9 Type: UserDistanceSubscription + UserAreaNotification userAreaNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.8 Type: UserAreaNotification + UserDistanceNotification userDistanceNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.9 Type: UserDistanceNotification + UserLocationEventNotification userLocationEventNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.4 Type: UserLocationEventNotification + UserLocationPeriodicNotification userLocationPeriodicNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.5 Type: UserLocationPeriodicNotification + ZoneLocationEventNotification zoneLocationEventNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.6 Type: ZoneLocationEventNotification + ZoneStatusNotification zoneStatusNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.7 Type: ZoneStatusNotification + LocationAPI_TypesAndValues.TestNotification testNotification, // ETSI GS MEC 013 V3.1.1 Clause 6.4.3 Type: TestNotification TerminalDistance terminalDistance, - DistanceNotificationSubscription distanceNotificationSubscription, - PeriodicNotificationSubscription periodicNotificationSubscription, LibMec_TypesAndValues.ProblemDetails problemDetails, UeIdentityTagInfo ueIdentityTagInfo, RnisAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList, @@ -57,6 +72,7 @@ module LibHttp_JsonMessageBodyTypes { MeasTaSubscription measTaSubscription, CaReConfSubscription caReConfSubscription, S1BearerSubscription s1BearerSubscription, + RnisAPI_TypesAndValues.ExpiryNotification expiryNotification_rnis, L2Meas l2Meas, BwInfoList bwInfoList, BwInfo bwInfo, @@ -64,15 +80,22 @@ module LibHttp_JsonMessageBodyTypes { MtsCapabilityInfo mtsCapabilityInfo, MtsSessionInfo mtsSessionInfo, MtsSessionInfos mtsSessionInfos, - TransportInfoList transportInfoList, + EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList transportInfoList, + EdgePlatformApplicationEnablementAPI_TypesAndValues.AppInfo appInfo_regapps, TrafficRuleList trafficRuleList, TrafficRule trafficRule, /*AppMobilityServiceInfo appMobilityServiceInfo,*/ - /* Ams_TypesAndValues.RegistrationRequest registrationRequest_ams, */ - /* Ams_TypesAndValues.MobilityProcedureSubscription subscriptionLinkList_ams, */ - /* Ams_TypesAndValues.AdjacentAppInfoSubscription adjacentAppInfoSubscription_ams, */ - /* Ams_TypesAndValues.ExpiryNotification expireNotification_ams, */ - /* Ams_TypesAndValues.RegistrationRequestWithError registrationRequestWithError_ams, */ + RegistrationInfos registrationInfos, + RegistrationInfo registrationInfo, + AdjacentAppInstanceInfos adjacentAppInstanceInfos, + AdjacentAppInstanceInfo adjacentAppInstanceInfo, + MobilityProcedureSubscription mobilityProcedureSubscription, + AdjacentAppInfoSubscription adjacentAppInfoSubscription, + MobilityProcedureNotification mobilityProcedureNotification, + AdjacentAppInfoNotification adjacentAppInfoNotification, + ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_ams, + ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification expireNotification_ams, + /* ApplicationMobilityServiceAPI_TypesAndValues.RegistrationRequestWithError registrationRequestWithError_ams, */ GrantRequest grantRequest, Grant grantResponse, CreateAppPkg createAppPkg, @@ -84,35 +107,21 @@ module LibHttp_JsonMessageBodyTypes { AppPkgSubscriptionLinkList appPkgSubscriptionLinkList, AppPkgNotification appPkgNotification, ConfigPlatformForAppRequest configPlatformForAppRequest, - /* MepmPkgm_TypesAndValues.AppPkg appMepmPackageManagement, */ - /* MepmPkgm_TypesAndValues.OnboardedAppPkgInfo onboardedMepmAppPkgInfo, */ - /* MepmPkgm_TypesAndValues.OnboardedAppPkgInfoList appOnboardMepmPackageInfoList, */ - /* MepmPkgm_TypesAndValues.AppPkgWithError appMepmPackageManagementWithError, */ - /* MepmPkgm_TypesAndValues.AppPkgSubscription appMepmPkgSubscription, */ - /* MepmPkgm_TypesAndValues.AppPkgSubscriptionInfo appMepmPkgSubscriptionInfo, */ - /* MepmPkgm_TypesAndValues.AppPkgSubscriptionInfoList appMepmPkgSubscriptionInfoList, */ - /* MepmPkgm_TypesAndValues.AppPkgSubscriptionWithError appMepmPkgSubscriptionWithError, */ - /* MepmPkgm_TypesAndValues.AppPkgNotification appMepmPkgNotification, */ - /* MepmPkgm_TypesAndValues.OnboardedAppPkgInfo appOnboardMepmPackageInfo, */ CreateAppInstanceRequest createAppInstanceRequest, AppInstanceInfo appInstanceInfo, AppInstanceInfoList appInstanceInfoList, - /* AppLCM_TypesAndValues.CreateAppInstanceRequestWithError createAppInstanceRequestWithError, */ - /* AppLCM_TypesAndValues.InstantiateAppRequest appInstanceInstantiate, */ - /* AppLCM_TypesAndValues.InstantiateAppRequestWithError appInstanceInstantiateWithError, */ - /* AppLCM_TypesAndValues.TerminateAppRequest terminateType, */ - /* AppLCM_TypesAndValues.TerminateAppRequestWithError terminateTypeWithError, */ - /* AppLCM_TypesAndValues.OperateAppRequest changeStateTo, */ - /* AppLCM_TypesAndValues.OperateAppRequestWithError changeStateToWithError, */ - /* AppLCM_TypesAndValues.AppInstanceLcmOpOcc appInstanceLcmOpOcc, */ - /* AppLCM_TypesAndValues.AppInstanceLcmOpOccList appInstanceLcmOpOccList, */ - /* AppLCM_TypesAndValues.SubscriptionRequest subscriptionRequest, */ - /* AppLCM_TypesAndValues.SubscriptionRequestWithError subscriptionRequestWithError, */ - /* AppLCM_TypesAndValues.SubscriptionInfoList subscriptionInfoList, */ - /* AppLCM_TypesAndValues.SubscriptionInfo subscriptionInfo, */ - /* AppLCM_TypesAndValues.Notification lcmNotification, */ + InstantiateAppRequest appInstanceInstantiate, + TerminateAppRequest terminateAppRequest, + OperateAppRequest changeStateTo, + AppLcmOpOccList appLcmOpOccList, + AppLcmOpOcc appLcmOpOcc, + AppInstSubscriptionRequest appInstSubscriptionRequest, + AppInstSubscriptionInfo appInstSubscriptionInfo, + AppInstanceSubscriptionLinkList appInstSubscriptionLinkList, + CancelMode cancelMode, + AppInstNotification appInstNotification, UEAppInterfaceAPI_TypesAndValues.AppContext appContext, - AppInfo appInfo, + UEAppInterfaceAPI_TypesAndValues.AppInfo appInfo, ServiceInfoList serviceInfoList, ServiceInfo serviceInfo, EdgePlatformApplicationEnablementAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_app_ens, @@ -137,10 +146,13 @@ module LibHttp_JsonMessageBodyTypes { MeasurementConfigLinkList measurementConfigLinkList, MeasurementConfig measurementConfig, FaInfo faInfo, - DeviceInfo deviceInfo, + FixedAccessInformationServiceAPI_TypesAndValues.DeviceInfo deviceInfo, CableLineInfo cableLineInfo, PonInfo ponInfo, OnuAlarmSubscription onuAlarmSubscription, + DevInfoSubscription devInfoSubscription, + CmConnSubscription cmConnSubscription, + AniAlarmSubscription aniAlarmSubscription, FixedAccessInformationServiceAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_fai, UuUnicastProvisioningInfo uuUnicastProvisioningInfo, UuMbmsProvisioningInfo uuMbmsProvisioningInfo, @@ -151,11 +163,20 @@ module LibHttp_JsonMessageBodyTypes { ProvChgUuUniSubscription provChgUuUniSubscription, ProvChgUuMbmsSubscription provChgUuMbmsSubscription, ProvChgPc5Subscription provChgPc5Subscription, + V2xMsgDistributionServerInfo v2xMsgDistributionServerInfo, // ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.2.5-1: Attributes of the V2xMsgDistributionServerInfo V2xMsgSubscription v2xMsgSubscription, + PredQosSubscription predQosSubscription, // ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.6-1: Attributes of the PredQosSubscription ProvChgUuUniNotification provChgUuUniNotification, ProvChgUuMbmsNotification provChgUuMbmsNotification, ProvChgPc5Notification provChgPc5Notification, - // TODO Add here your custom variants + SystemInfo systemInfo, // ETSI GS MEC 040 V3.1.1 Clause 6.2.2 Type: SystemInfo + SystemInfoList systemInfoList, // ETSI GS MEC 040 V3.1.1 Clause 6.2.2 Type: SystemInfo + SystemInfoUpdate systemInfoUpdate, // ETSI GS MEC 040 V3.1.1 Clause 6.2.3 Type: SystemInfoUpdate + IoTAPI_TypesAndValues.DeviceInfo deviceInfo_iot, // ETSI GS MEC 033 V3.1.1 Clause 6.2.2 Type: DeviceInfo + IoTAPI_TypesAndValues.DeviceInfoList deviceInfoList_iot, // ETSI GS MEC 033 V3.1.1 Clause 6.2.2 Type: DeviceInfo + IotPlatformInfoList iotPlatformInfoList, // ETSI GS MEC 033 V3.1.1 Clause 6.2.3 Type: IotPlatformInfo + IotPlatformInfo iotPlatformInfo, // ETSI GS MEC 033 V3.1.1 Clause 6.2.3 Type: IotPlatformInfo + // TODO Add here your custom variants universal charstring raw } with { variant "" diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn index b4e97203bd76939052001efcb6fa8d309ff2f472..553c55caa4ace67bcbc2a2b74c03952b4eaf9408 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -2,7 +2,7 @@ module LibHttp_JsonTemplates { // LibHttp import from LibHttp_JsonMessageBodyTypes all; - + // LibMec import from LibMec_TypesAndValues all; import from LibMec_Templates all; @@ -33,10 +33,13 @@ module LibHttp_JsonTemplates { // LibMec/UEAppInterfaceAPI import from UEAppInterfaceAPI_TypesAndValues all; - + // LibMec/module FixedAccessInformationServiceAPI import from FixedAccessInformationServiceAPI_TypesAndValues all; + // LibMec/module ApplicationMobilityServiceAPI + import from ApplicationMobilityServiceAPI_TypesAndValues all; + // LibMec/DeviceApplicationInterfaceAPI import from DeviceApplicationInterfaceAPI_TypesAndValues all; @@ -45,7 +48,13 @@ module LibHttp_JsonTemplates { // LibMec/V2XInformationServiceAPI import from V2XInformationServiceAPI_TypesAndValues all; - + + // LibMec/IoT + import from IoTAPI_TypesAndValues all; + + // LibMec/FixedAccessInformationServiceAPI + import from FederationEnablementAPI_TypesAndValues all; + template (value) JsonBody m_json_body_raw( in template (value) charstring p_raw ) := { @@ -58,42 +67,48 @@ module LibHttp_JsonTemplates { raw := p_raw } // End of template mw_json_body_raw + template (value) JsonBody m_body_json_problem_details( + in template (value) LibMec_TypesAndValues.ProblemDetails p_problemDetails + ) := { + problemDetails := p_problemDetails + } // End of template m_body_json_problem_details + template (present) JsonBody mw_body_json_problem_details( - template (present) LibMec_TypesAndValues.ProblemDetails p_problemDetails := ? + template (present) LibMec_TypesAndValues.ProblemDetails p_problemDetails := ? ) := { problemDetails := p_problemDetails } // End of template mw_body_json_problem_details group granting_api { - + template (value) JsonBody m_body_json_grant_request( in template (value) GrantRequest p_grant_request ) := { grantRequest := p_grant_request } // End of template m_body_json_grant_request - + template (present) JsonBody mw_body_json_grant_response( template (present) Grant p_grant_response := ? ) := { grantResponse := p_grant_response } // End of template m_wbody_json_grant_request - + } // End of group granting_api group meo_pkg_mgmt_api { - + template (value) JsonBody m_body_json_create_package_management( in template (value) CreateAppPkg p_create_pkg ) := { createAppPkg := p_create_pkg } // End of template m_body_json_create_package_management - + template (present) JsonBody mw_body_json_create_package_management( template (present) CreateAppPkg p_create_pkg := ? ) := { createAppPkg := p_create_pkg } // End of template mw_body_json_create_package_management - + template (present) JsonBody mw_body_json_app_pkg_info( in template (present) AppPkgInfo p_app_pkg_info := ? ) := { @@ -111,13 +126,13 @@ module LibHttp_JsonTemplates { ) := { appPkgInfoModifications := p_app_pkg_info_modification } // End of template m_body_json_app_pkg_info_modification - + template (present) JsonBody mw_body_json_app_pkg_info_modification( template (present) AppPkgInfoModifications p_app_pkg_info_modification := ? ) := { appPkgInfoModifications := p_app_pkg_info_modification } // End of template mw_body_json_app_pkg_info_modification - + template (value) JsonBody m_body_json_pkgm_subscription( in template (value) AppPkgSubscription p_app_pkg_subscription ) := { @@ -135,23 +150,23 @@ module LibHttp_JsonTemplates { ) := { appPkgSubscriptionLinkList := p_app_pkg_subscription_link_list } // End of template mw_body_json_pkgm_subscription_link_list - + template (present) JsonBody mw_body_json_app_package_notification ( template (present) AppPkgNotification p_app_pkg_notification := ? ) := { appPkgNotification := p_app_pkg_notification } // End of template mw_body_json_app_package_notification - + } // End of group meo_pkg_mgmt_api group mepm_lifcyclemgt { - + template (value) JsonBody m_body_json_config_platform_for_app_request( in template (value) ConfigPlatformForAppRequest p_config_platform_for_app_request ) := { configPlatformForAppRequest := p_config_platform_for_app_request } // End of template m_body_json_config_platform_for_app_request - + template (present) JsonBody mw_body_json_config_platform_for_app_request( template (present) ConfigPlatformForAppRequest p_config_platform_for_app_request := ? ) := { @@ -159,336 +174,522 @@ module LibHttp_JsonTemplates { } // End of template mw_body_json_config_platform_for_app_request } // End of mepm_lifcyclemgt - + group mex_lifcyclemgt { - - template (value) JsonBody m_body_json_create_app_instance_request ( - in template (value) CreateAppInstanceRequest p_create_app_instance_request - ) := { + + template (value) JsonBody m_body_json_create_app_instance_request( + in template (value) CreateAppInstanceRequest p_create_app_instance_request + ) := { createAppInstanceRequest := p_create_app_instance_request } // End of template m_body_json_create_app_instance_request - - template (value) JsonBody m_body_json_app_instance_info ( - in template (value) AppInstanceInfo p_app_instance_info - ) := { + + template (value) JsonBody m_body_json_app_instance_info( + in template (value) AppInstanceInfo p_app_instance_info + ) := { appInstanceInfo := p_app_instance_info } // End of template m_body_json_app_instance_info - - template (present) JsonBody mw_body_json_app_instance_info ( - template (present) AppInstanceInfo p_app_instance_info := ? - ) := { + + template (present) JsonBody mw_body_json_app_instance_info( + template (present) AppInstanceInfo p_app_instance_info := ? + ) := { appInstanceInfo := p_app_instance_info } // End of template mw_body_json_app_instance_info - - template (present) JsonBody mw_body_json_app_instance_info_list ( - template (present) AppInstanceInfoList p_app_instance_info_list := ? - ) := { + + template (value) JsonBody m_body_json_app_instance_info_list( + in template (value) AppInstanceInfoList p_app_instance_info_list + ) := { + appInstanceInfoList := p_app_instance_info_list + } // End of template m_body_json_app_instance_info_list + + template (present) JsonBody mw_body_json_app_instance_info_list( + template (present) AppInstanceInfoList p_app_instance_info_list := ? + ) := { appInstanceInfoList := p_app_instance_info_list } // End of template mw_body_json_app_instance_info_list - - /*template (present) JsonBody mw_body_json_mex_lcm_instance_info_list ( - in template (present) AppInstanceInfoList p_app_instance_info_list - ) := { - appInstanceInfoList := p_app_instance_info_list - } - - - template (present) JsonBody m_body_json_lifecycle_management_instantiate ( - in template (present) InstantiateAppRequest p_app_instance_instantiate - ) := { - appInstanceInstantiate := p_app_instance_instantiate - } - - template (present) JsonBody m_body_json_lifecycle_management_instantiate_with_error ( - in template (present) InstantiateAppRequestWithError p_app_instance_instantiate_with_error - ) := { - appInstanceInstantiateWithError := p_app_instance_instantiate_with_error - } - - - - template (present) JsonBody m_body_json_lifecycle_management_terminate ( - in template (present) TerminateAppRequest p_app_instance_terminate - ) := { - terminateType := p_app_instance_terminate - } - - template (present) JsonBody m_body_json_lifecycle_management_terminate_with_error ( - in template (present) TerminateAppRequestWithError p_app_instance_terminate_with_error - ) := { - terminateTypeWithError := p_app_instance_terminate_with_error - } - - - - template (present) JsonBody m_body_json_lifecycle_management_operate ( - in template (present) OperateAppRequest p_app_instance_operate - ) := { - changeStateTo := p_app_instance_operate - } - - template (present) JsonBody m_body_json_lifecycle_management_operate_with_error ( - in template (present) OperateAppRequestWithError p_app_instance_operate_with_error - ) := { - changeStateToWithError := p_app_instance_operate_with_error - } - - - template (present) JsonBody mw_body_json_lifecycle_op_occ_list ( - in template (present) AppInstanceLcmOpOccList p_app_instance_op_occ_list - ) := { - appInstanceLcmOpOccList := p_app_instance_op_occ_list - } - - template (present) JsonBody mw_body_json_lifecycle_op_occ ( - in template (present) AppInstanceLcmOpOcc p_app_instance_op_occ - ) := { - appInstanceLcmOpOcc := p_app_instance_op_occ - } - template (present) JsonBody m_body_json_lcm_subscribe( - in template (present) SubscriptionRequest p_app_lcm_request - ) := { - subscriptionRequest := p_app_lcm_request - } + template (value) JsonBody m_body_json_instantiate_app_request( + in template (value) InstantiateAppRequest p_instantiate_app_request + ) := { + appInstanceInstantiate := p_instantiate_app_request + } // End of template m_body_json_instantiate_app_request - template (present) JsonBody m_body_json_lcm_subscribe_with_error( - in template (present) SubscriptionRequestWithError p_app_lcm_request_with_error - ) := { - subscriptionRequestWithError := p_app_lcm_request_with_error - } - - - template (present) JsonBody mw_body_json_lcm_subscription_list( - in template (present) SubscriptionInfoList p_app_lcm_subscription_list - ) := { - subscriptionInfoList := p_app_lcm_subscription_list - } + template (present) JsonBody mw_body_json_instantiate_app_request( + template (present) InstantiateAppRequest p_instantiate_app_request := ? + ) := { + appInstanceInstantiate := p_instantiate_app_request + } // End of template mw_body_json_instantiate_app_request + + template (value) JsonBody m_body_json_terminate_app_request( + in template (value) TerminateAppRequest p_terminate_app_request + ) := { + terminateAppRequest := p_terminate_app_request + } // End of template m_body_json_terminate_app_request + + template (present) JsonBody mw_body_json_terminate_app_request( + template (present) TerminateAppRequest p_terminate_app_request := ? + ) := { + terminateAppRequest := p_terminate_app_request + } // End of template mw_body_json_terminate_app_request + + template (value) JsonBody m_body_json_operate_app_request( + in template (value) OperateAppRequest p_operate_app_request + ) := { + changeStateTo := p_operate_app_request + } // End of template m_body_json_operate_app_request + + template (present) JsonBody mw_body_json_operate_app_request( + template (present) OperateAppRequest p_operate_app_request := ? + ) := { + changeStateTo := p_operate_app_request + } // End of template mw_body_json_operate_app_request + + template (value) JsonBody m_body_json_app_lcm_op_occ_list( + in template (value) AppLcmOpOccList p_app_op_occ_list + ) := { + appLcmOpOccList := p_app_op_occ_list + } // End of template m_body_json_app_lcm_op_occ_list + + template (present) JsonBody mw_body_json_app_lcm_op_occ_list( + template (present) AppLcmOpOccList p_app_op_occ_list := ? + ) := { + appLcmOpOccList := p_app_op_occ_list + } // End of template mw_body_json_app_lcm_op_occ_list + + template (value) JsonBody m_body_json_app_lcm_op_occ( + in template (value) AppLcmOpOcc p_app_op_occ + ) := { + appLcmOpOcc := p_app_op_occ + } // End of template m_body_json_lifecycle_op_occ + + template (present) JsonBody mw_body_json_app_lcm_op_occ( + template (present) AppLcmOpOcc p_app_op_occ := ? + ) := { + appLcmOpOcc := p_app_op_occ + } // End of template mw_body_json_lifecycle_op_occ + + template (value) JsonBody m_body_json_app_inst_subscription_request( + in template (value) AppInstSubscriptionRequest p_app_inst_subscription_request + ) := { + appInstSubscriptionRequest := p_app_inst_subscription_request + } // End of template m_body_json_app_inst_subscription_request + + template (present) JsonBody mw_body_json_app_inst_subscription_request( + template (present) AppInstSubscriptionRequest p_app_inst_subscription_request := ? + ) := { + appInstSubscriptionRequest := p_app_inst_subscription_request + } // End of template mw_body_json_app_inst_subscription_request + + template (value) JsonBody m_body_json_app_inst_subscription_info( + in template (value) AppInstSubscriptionInfo p_app_inst_subscription_info + ) := { + appInstSubscriptionInfo := p_app_inst_subscription_info + } // End of template m_body_json_app_inst_subscription_info + + template (present) JsonBody mw_body_json_app_inst_subscription_info( + template (present) AppInstSubscriptionInfo p_app_inst_subscription_info := ? + ) := { + appInstSubscriptionInfo := p_app_inst_subscription_info + } // End of template mw_body_json_app_inst_subscription_info + + template (value) JsonBody m_body_json_app_instance_subscription_link_list( + in template (value) AppInstanceSubscriptionLinkList p_app_instance_subscription_link_list + ) := { + appInstSubscriptionLinkList := p_app_instance_subscription_link_list + } // End of template m_body_json_app_instance_subscription_link_list + + template (present) JsonBody mw_body_json_app_instance_subscription_link_list( + template (present) AppInstanceSubscriptionLinkList p_app_instance_subscription_link_list := ? + ) := { + appInstSubscriptionLinkList := p_app_instance_subscription_link_list + } // End of template mw_body_json_app_instance_subscription_link_list + + template (value) JsonBody m_body_json_cancel_mode( + in template (value) CancelMode p_cancel_mode + ) := { + cancelMode := p_cancel_mode + } // End of template m_body_json_cancel_mode + + template (present) JsonBody mw_body_json_cancel_mode( + template (present) CancelMode p_cancel_mode := ? + ) := { + cancelMode := p_cancel_mode + } // End of template mw_body_json_cancel_mode + + template (value) JsonBody m_body_json_app_inst_notification( + in template (value) AppInstNotification p_app_inst_notification + ) := { + appInstNotification := p_app_inst_notification + } // End of template m_body_json_app_inst_notification + + template (present) JsonBody mw_body_json_app_inst_notification( + template (present) AppInstNotification p_app_inst_notification := ? + ) := { + appInstNotification := p_app_inst_notification + } // End of template mw_body_json_app_inst_notification - template (present) JsonBody mw_body_json_lcm_subscription( - in template (present) SubscriptionInfo p_app_lcm_subscription - ) := { - subscriptionInfo := p_app_lcm_subscription - } - - - template (present) JsonBody mw_body_json_lcm_notification ( - in template (present) Notification p_lcm_notification - ) := { - lcmNotification := p_lcm_notification - } - */ } // End of group mex_lifcyclemgt -group ams_api { - /* - template (value) JsonBody m_body_json_app_mobility_service_info( - in template (value) AppMobilityServiceInfo p_app_mobility_service_info - ) := { - appMobilityServiceInfo := p_app_mobility_service_info - } // End of template mw_body_json_app_mobility_service_info + group application_mobilty_service_api { - template (present) JsonBody mw_body_json_app_mobility_service_info( - template (present) AppMobilityServiceInfo p_app_mobility_service_info := ? - ) := { - appMobilityServiceInfo := p_app_mobility_service_info - } // End of template mw_body_json_app_mobility_service_info + template (value) JsonBody m_body_json_ams_registration_info_list( + in template (value) RegistrationInfos p_registrationInfos + ) := { + registrationInfos := p_registrationInfos + } // End of template m_body_json_ams_registration_info_list + template (present) JsonBody mw_body_json_ams_registration_info_list( + template (present) RegistrationInfos p_registrationInfos := ? + ) := { + registrationInfos := p_registrationInfos + } // End of template mw_body_json_ams_registration_info_list - template (value) JsonBody m_body_json_problem_details( - in template (value) LibMec_TypesAndValues.ProblemDetails p_problemDetails - ) := { - problemDetails := p_problemDetails - } // End of template m_body_json_problem_details + template (value) JsonBody m_body_json_ams_registration_info( + in template (value) RegistrationInfo p_registrationInfo + ) := { + registrationInfo := p_registrationInfo + } // End of template m_body_json_ams_registration_info + template (present) JsonBody mw_body_json_ams_registration_info( + template (present) RegistrationInfo p_registrationInfo := ? + ) := { + registrationInfo := p_registrationInfo + } // End of template mw_body_json_ams_registration_info + template (value) JsonBody m_body_json_ams_adjacent_app_instance_info_list( + in template (value) AdjacentAppInstanceInfos p_adjacentAppInstanceInfos + ) := { + adjacentAppInstanceInfos := p_adjacentAppInstanceInfos + } // End of template m_body_json_ams_adjacent_app_instance_info_list - template (present) JsonBody mw_body_json_ams_registration_request( - template (present) Ams_TypesAndValues.RegistrationRequest p_registrationRequest := ? - ) := { - registrationRequest_ams := p_registrationRequest - } // End of template mw_body_json_ue_identity_problem_details + template (present) JsonBody mw_body_json_ams_adjacent_app_instance_info_list( + template (present) AdjacentAppInstanceInfos p_adjacentAppInstanceInfos := ? + ) := { + adjacentAppInstanceInfos := p_adjacentAppInstanceInfos + } // End of template mw_body_json_ams_adjacent_app_instance_info_list - template (value) JsonBody m_body_json_ams_registration_request( - in template (value) Ams_TypesAndValues.RegistrationRequest p_registrationRequest - ) := { - registrationRequest_ams := p_registrationRequest - } // End of template m_body_json_ue_identity_problem_details + template (value) JsonBody m_body_json_ams_adjacent_app_instance_info( + in template (value) AdjacentAppInstanceInfo p_adjacentAppInstanceInfo + ) := { + adjacentAppInstanceInfo := p_adjacentAppInstanceInfo + } // End of template m_body_json_ams_adjacent_app_instance_info - template (value) JsonBody m_body_json_ams_registration_request_with_error( - in template (value) Ams_TypesAndValues.RegistrationRequestWithError p_registrationRequestWithError - ) := { - registrationRequestWithError_ams := p_registrationRequestWithError - } // End of template m_body_json_ue_identity_problem_details + template (present) JsonBody mw_body_json_ams_adjacent_app_instance_info( + template (present) AdjacentAppInstanceInfo p_adjacentAppInstanceInfo := ? + ) := { + adjacentAppInstanceInfo := p_adjacentAppInstanceInfo + } // End of template mw_body_json_ams_adjacent_app_instance_info - template (present) JsonBody mw_body_json_ams_subscriptions( - template (present) Ams_TypesAndValues.MobilityProcedureSubscription_ p_amsSubscriptionLinkList := ? - ) := { - subscriptionLinkList_ams := p_amsSubscriptionLinkList - } // End of template mw_body_json_ue_identity_problem_details + template (value) JsonBody m_body_json_ams_subscriptions( + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList p_amsSubscriptionLinkList + ) := { + subscriptionLinkList_ams := p_amsSubscriptionLinkList + } // End of template m_body_json_ams_subscriptions - template (present) JsonBody m_body_json_ams_subscriptions( - template (present) Ams_TypesAndValues.MobilityProcedureSubscription_ p_amsSubscriptionLinkList := ? - ) := { - subscriptionLinkList_ams := p_amsSubscriptionLinkList - } // End of template mw_body_json_ue_identity_problem_details - - - template (present) JsonBody mw_body_json_mobility_procedure_notification( - template (present) Ams_TypesAndValues.MobilityProcedureSubscription_ p_amsSubscriptionLinkList := ? - ) := { - subscriptionLinkList_ams := p_amsSubscriptionLinkList - } // End of template mw_body_json_mobility_procedure_notification + template (present) JsonBody mw_body_json_ams_subscriptions( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList p_amsSubscriptionLinkList := ? + ) := { + subscriptionLinkList_ams := p_amsSubscriptionLinkList + } // End of template mw_body_json_ams_subscriptions - template (present) JsonBody mw_body_json_adjacent_application_info_notification( - template (present) Ams_TypesAndValues.AdjacentAppInfoSubscription_ p_adjacentAppInfoSubscription := ? - ) := { - adjacentAppInfoSubscription_ams := p_adjacentAppInfoSubscription - } // End of template mw_body_json_mobility_procedure_notification + template (value) JsonBody m_body_json_ams_mobility_procedure_subscription( + in template (value) MobilityProcedureSubscription p_mobilityProcedureSubscription + ) := { + mobilityProcedureSubscription := p_mobilityProcedureSubscription + } // End of template m_body_json_ams_mobility_procedure_subscription + template (present) JsonBody mw_body_json_ams_mobility_procedure_subscription( + template (present) MobilityProcedureSubscription p_mobilityProcedureSubscription + ) := { + mobilityProcedureSubscription := p_mobilityProcedureSubscription + } // End of template mw_body_json_ams_mobility_procedure_subscription - template (present) JsonBody mw_body_json_expire_notification( - template (present) Ams_TypesAndValues.ExpiryNotification p_expire_notification := ? - ) := { - expireNotification_ams := p_expire_notification - } // End of template mw_body_json_mobility_procedure_notification - */ -} // end of group ams api + template (value) JsonBody m_body_json_ams_adjacent_appInfo_subscription( + in template (value) AdjacentAppInfoSubscription p_adjacentAppInfoSubscription + ) := { + adjacentAppInfoSubscription := p_adjacentAppInfoSubscription + } // End of template m_body_json_ams_adjacent_appInfo_subscription + + template (present) JsonBody mw_body_json_ams_adjacent_appInfo_subscription( + template (present) AdjacentAppInfoSubscription p_adjacentAppInfoSubscription + ) := { + adjacentAppInfoSubscription := p_adjacentAppInfoSubscription + } // End of template mw_body_json_ams_adjacent_appInfo_subscription + + template (value) JsonBody m_body_json_mobility_procedure_notification( + in template (value) MobilityProcedureNotification p_mobilityProcedureNotification + ) := { + mobilityProcedureNotification := p_mobilityProcedureNotification + } // End of template m_body_json_mobility_procedure_notification + + template (present) JsonBody mw_body_json_mobility_procedure_notification( + template (present) MobilityProcedureNotification p_mobilityProcedureNotification := ? + ) := { + mobilityProcedureNotification := p_mobilityProcedureNotification + } // End of template mw_body_json_mobility_procedure_notification + + + template (value) JsonBody m_body_json_adjacent_app_info_notification( + in template (value) AdjacentAppInfoNotification p_adjacentAppInfoNotification + ) := { + adjacentAppInfoNotification := p_adjacentAppInfoNotification + } // End of template m_body_json_adjacent_app_info_notification + + template (present) JsonBody mw_body_json_adjacent_app_info_notification( + template (present) AdjacentAppInfoNotification p_adjacentAppInfoNotification := ? + ) := { + adjacentAppInfoNotification := p_adjacentAppInfoNotification + } // End of template mw_body_json_adjacent_app_info_notification + + template (present) JsonBody mw_body_json_expire_notification( + template (present) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification p_expire_notification := ? + ) := { + expireNotification_ams := p_expire_notification + } // End of template mw_body_json_mobility_procedure_notification + + } // end of group application_mobilty_service_api group location_api { - + template (value) JsonBody m_body_json_user_info( in template (value) UserInfo p_user_info ) := { userInfo := p_user_info } // End of template m_body_json_user_info - + template (present) JsonBody mw_body_json_user_info( template (present) UserInfo p_user_info := ? ) := { userInfo := p_user_info } // End of template mw_body_json_user_info - + template (value) JsonBody m_body_json_user_list( in template (value) UserList p_user_list ) := { userList := p_user_list } // End of template m_body_json_user_list - + template (present) JsonBody mw_body_json_user_list( template (present) UserList p_user_list := ? ) := { userList := p_user_list } // End of template mw_body_json_user_list - + template (value) JsonBody m_body_json_zone_info( in template (value) LocationAPI_TypesAndValues.ZoneInfo p_zone_info ) := { zoneInfo := p_zone_info } // End of template m_body_json_zone_info - + template (present) JsonBody mw_body_json_zone_info( template (present) LocationAPI_TypesAndValues.ZoneInfo p_zone_info := ? ) := { zoneInfo := p_zone_info } // End of template mw_body_json_zone_info - + template (value) JsonBody m_body_json_access_point_list( in template (value) AccessPointList p_access_point_list ) := { accessPointList := p_access_point_list } // End of template m_body_json_access_point_list - + template (present) JsonBody mw_body_json_access_point_list( template (present) AccessPointList p_access_point_list := ? ) := { accessPointList := p_access_point_list } // End of template mw_body_json_access_point_list - - template (value) JsonBody m_body_json_user_tracking_subscription( - in template (value) UserTrackingSubscription p_user_tracking_subscription - ) := { - userTrackingSubscription := p_user_tracking_subscription - } // End of template m_body_json_user_tracking_subscription - - template (present) JsonBody mw_body_json_user_tracking_subscription( - template (present) UserTrackingSubscription p_user_tracking_subscription := ? - ) := { - userTrackingSubscription := p_user_tracking_subscription - } // End of template mw_body_json_user_rtracking_subscription - - template (value) JsonBody m_body_json_periodic_tracking_subscription( - in template (value) PeriodicTrackingSubscription p_periodic_tracking_subscription - ) := { - periodicTrackingSubscription := p_periodic_tracking_subscription - } // End of template m_body_json_periodic_tracking_subscription - - template (present) JsonBody mw_body_json_periodic_tracking_subscription( - template (present) PeriodicTrackingSubscription p_periodic_tracking_subscription := ? - ) := { - periodicTrackingSubscription := p_periodic_tracking_subscription - } // End of template mw_body_json_periodic_rtracking_subscription - - template (value) JsonBody m_body_json_zonal_traffic_subscription( - in template (value) ZonalTrafficSubscription p_zonal_traffic_subscription + + template (value) JsonBody m_body_json_access_point_info( + in template (value) AccessPointInfo p_access_point_info + ) := { + accessPointInfo := p_access_point_info + } // End of template m_body_json_access_point_info + + template (present) JsonBody mw_body_json_access_point_info( + template (present) AccessPointInfo p_access_point_info := ? + ) := { + accessPointInfo := p_access_point_info + } // End of template mw_body_json_access_point_info + + template (value) JsonBody m_body_json_notification_subscription_list( + in template (value) NotificationSubscriptionList p_notification_subscription_list + ) := { + notificationSubscriptionList := p_notification_subscription_list + } // End of template m_body_json_notification_subscription_list + + template (present) JsonBody mw_body_json_notification_subscription_list( + template (present) NotificationSubscriptionList p_notification_subscription_list := ? + ) := { + notificationSubscriptionList := p_notification_subscription_list + } // End of template mw_body_json_notification_subscription_list + + template (value) JsonBody m_body_json_user_location_event_subscription( + in template (value) UserLocationEventSubscription p_user_location_event_subscription + ) := { + userLocationEventSubscription := p_user_location_event_subscription + } // End of template m_body_json_user_location_event_subscription + + template (present) JsonBody mw_body_json_user_location_event_subscription( + template (present) UserLocationEventSubscription p_user_location_event_subscription := ? + ) := { + userLocationEventSubscription := p_user_location_event_subscription + } // End of template mw_body_json_user_location_event_subscription + + template (value) JsonBody m_body_json_user_location_periodic_subscription( + in template (value) UserLocationPeriodicSubscription p_user_location_periodic_subscription + ) := { + userLocationPeriodicSubscription := p_user_location_periodic_subscription + } // End of template m_body_json_user_location_periodic_subscription + + template (present) JsonBody mw_body_json_user_location_periodic_subscription( + template (present) UserLocationPeriodicSubscription p_user_location_periodic_subscription := ? + ) := { + userLocationPeriodicSubscription := p_user_location_periodic_subscription + } // End of template mw_body_json_user_location_periodic_subscription + + template (value) JsonBody m_body_json_zone_location_event_subscription( + in template (value) ZoneLocationEventSubscription p_zone_location_event_subscription + ) := { + zoneLocationEventSubscription := p_zone_location_event_subscription + } // End of template m_body_json_zone_location_event_subscription + + template (present) JsonBody mw_body_json_zone_location_event_subscription( + template (present) ZoneLocationEventSubscription p_zone_location_event_subscription := ? + ) := { + zoneLocationEventSubscription := p_zone_location_event_subscription + } // End of template mw_body_json_zone_location_event_subscription + + template (value) JsonBody m_body_json_zone_status_subscription( + in template (value) ZoneStatusSubscription p_zone_status_subscription + ) := { + zoneStatusSubscription := p_zone_status_subscription + } // End of template m_body_json_zone_status_subscription + + template (present) JsonBody mw_body_json_zone_status_subscription( + template (present) ZoneStatusSubscription p_zone_status_subscription := ? + ) := { + zoneStatusSubscription := p_zone_status_subscription + } // End of template mw_body_json_zone_status_subscription + + template (value) JsonBody m_body_json_user_area_subscription( + in template (value) UserAreaSubscription p_user_area_subscription + ) := { + userAreaSubscription := p_user_area_subscription + } // End of template m_body_json_user_area_subscription + + template (present) JsonBody mw_body_json_user_area_subscription( + template (present) UserAreaSubscription p_user_area_subscription := ? + ) := { + userAreaSubscription := p_user_area_subscription + } // End of template mw_body_json_user_area_subscription + + template (value) JsonBody m_body_json_user_distance_subscription( + in template (value) UserDistanceSubscription p_user_distance_subscription ) := { - zonalTrafficSubscription := p_zonal_traffic_subscription - } // End of template m_body_json_zonal_traffic_subscription - - template (present) JsonBody mw_body_json_zonal_traffic_subscription( - template (present) ZonalTrafficSubscription p_zonal_traffic_subscription := ? + userDistanceSubscription := p_user_distance_subscription + } // End of template m_body_json_user_distance_subscription + + template (present) JsonBody mw_body_json_user_distance_subscription( + template (present) UserDistanceSubscription p_user_distance_subscription := ? ) := { - zonalTrafficSubscription := p_zonal_traffic_subscription - } // End of template mw_body_json_zonal_traffic_subscription - - template (value) JsonBody m_body_json_circle_notification_subscription( - in template (value) CircleNotificationSubscription p_circle_notification_subscription - ) := { - circleNotificationSubscription := p_circle_notification_subscription - } // End of template m_body_json_circle_notification_subscription - - template (present) JsonBody mw_body_json_circle_notification_subscription( - template (present) CircleNotificationSubscription p_circle_notification_subscription := ? - ) := { - circleNotificationSubscription := p_circle_notification_subscription - } // End of template mw_body_json_circle_notification_subscription - + userDistanceSubscription := p_user_distance_subscription + } // End of template mw_body_json_user_distance_subscription + template (value) JsonBody m_body_json_terminal_distance( in template (value) TerminalDistance p_terminal_distance ) := { terminalDistance := p_terminal_distance } // End of template m_body_json_terminal_distance - + template (present) JsonBody mw_body_json_terminal_distance( template (present) TerminalDistance p_terminal_distance := ? ) := { terminalDistance := p_terminal_distance } // End of template mw_body_json_terminal_distance - - template (value) JsonBody m_body_json_distance_notification_subscription( - in template (value) DistanceNotificationSubscription p_distance_notification_subscription + + template (value) JsonBody m_body_json_user_area_notification( + in template (value) UserAreaNotification p_userAreaNotification + ) := { + userAreaNotification := p_userAreaNotification + } // End of template m_body_json_user_area_notification + + template (present) JsonBody mw_body_json_user_area_notification( + template (present) UserAreaNotification p_userAreaNotification := ? + ) := { + userAreaNotification := p_userAreaNotification + } // End of template mw_body_json_user_area_notification + + template (value) JsonBody m_body_json_user_distance_notification( + in template (value) UserDistanceNotification p_userDistanceNotification + ) := { + userDistanceNotification := p_userDistanceNotification + } // End of template m_body_json_user_distance_notification + + template (present) JsonBody mw_body_json_user_distance_notification( + template (present) UserDistanceNotification p_userDistanceNotification := ? + ) := { + userDistanceNotification := p_userDistanceNotification + } // End of template mw_body_json_user_distance_notification + + template (value) JsonBody m_body_json_user_location_event_notification( + in template (value) UserLocationEventNotification p_userLocationEventNotification + ) := { + userLocationEventNotification := p_userLocationEventNotification + } // End of template m_body_json_user_location_event_notification + + template (present) JsonBody mw_body_json_user_location_event_notification( + template (present) UserLocationEventNotification p_userLocationEventNotification := ? ) := { - distanceNotificationSubscription := p_distance_notification_subscription - } // End of template m_body_json_distance_notification_subscription - - template (present) JsonBody mw_body_json_distance_notification_subscription( - template (present) DistanceNotificationSubscription p_distance_notification_subscription := ? - ) := { - distanceNotificationSubscription := p_distance_notification_subscription - } // End of template mw_body_json_distance_notification_subscription - - template (value) JsonBody m_body_json_periodic_notification_subscription( - in template (value) PeriodicNotificationSubscription p_periodic_notification_subscription - ) := { - periodicNotificationSubscription := p_periodic_notification_subscription - } // End of template m_body_json_periodic_notification_subscription - - template (present) JsonBody mw_body_json_periodic_notification_subscription( - template (present) PeriodicNotificationSubscription p_periodic_notification_subscription := ? - ) := { - periodicNotificationSubscription := p_periodic_notification_subscription - } // End of template mw_body_json_periodic_notification_subscription - + userLocationEventNotification := p_userLocationEventNotification + } // End of template mw_body_json_user_location_event_notification + + template (value) JsonBody m_body_json_user_location_periodic_notification( + in template (value) UserLocationPeriodicNotification p_userLocationPeriodicNotification + ) := { + userLocationPeriodicNotification := p_userLocationPeriodicNotification + } // End of template m_body_json_user_location_periodic_notification + + template (present) JsonBody mw_body_json_user_location_periodic_notification( + template (present) UserLocationPeriodicNotification p_userLocationPeriodicNotification := ? + ) := { + userLocationPeriodicNotification := p_userLocationPeriodicNotification + } // End of template mw_body_json_user_location_periodic_notification + + template (value) JsonBody m_body_json_zone_location_event_notification( + in template (value) ZoneLocationEventNotification p_zoneLocationEventNotification + ) := { + zoneLocationEventNotification := p_zoneLocationEventNotification + } // End of template m_body_json_zone_location_event_notification + + template (present) JsonBody mw_body_json_zone_location_event_notification( + template (present) ZoneLocationEventNotification p_zoneLocationEventNotification := ? + ) := { + zoneLocationEventNotification := p_zoneLocationEventNotification + } // End of template mw_body_json_zone_location_event_notification + + template (value) JsonBody m_body_json_zone_status_notification( + in template (value) ZoneStatusNotification p_zoneStatusNotification + ) := { + zoneStatusNotification := p_zoneStatusNotification + } // End of template m_body_json_zone_status_notification + + template (present) JsonBody mw_body_json_zone_status_notification( + template (present) ZoneStatusNotification p_zoneStatusNotification := ? + ) := { + zoneStatusNotification := p_zoneStatusNotification + } // End of template mw_body_json_zone_status_notification + + template (value) JsonBody m_body_json_test_notification( + in template (value) LocationAPI_TypesAndValues.TestNotification p_testNotification + ) := { + testNotification := p_testNotification + } // End of template m_body_json_test_notification + + template (present) JsonBody mw_body_json_test_notification( + template (present) LocationAPI_TypesAndValues.TestNotification p_testNotification := ? + ) := { + testNotification := p_testNotification + } // End of template mw_body_json_test_notification + } // End of group location_api group ue_identity_api { @@ -498,13 +699,13 @@ group ams_api { ) := { ueIdentityTagInfo := p_ueIdentityTagInfo } // End of template m_body_json_ue_identity_tag_info - + template (present) JsonBody mw_body_json_ue_identity_tag_info( template (present) UeIdentityTagInfo p_ueIdentityTagInfo := ? ) := { ueIdentityTagInfo := p_ueIdentityTagInfo } // End of template mw_body_json_ue_identity_tag_info - + } // End of group ue_identity_api group rnis_subscriptions { @@ -514,189 +715,201 @@ group ams_api { ) := { subscriptionLinkList := p_subscriptionLinkList } // End of template m_body_json_subscriptions_list - + template (present) JsonBody mw_body_json_subscriptions_list( template (present) RnisAPI_TypesAndValues.SubscriptionLinkList p_subscriptionLinkList := ? ) := { subscriptionLinkList := p_subscriptionLinkList } // End of template mw_body_json_subscriptions_list - + template (value) JsonBody m_body_json_cell_change_subscription( in template (value) CellChangeSubscription p_cellChangeSubscription ) := { cellChangeSubscription := p_cellChangeSubscription } // End of template m_body_json_cell_change_subscription - + template (present) JsonBody mw_body_json_cell_change_subscription( template (present) CellChangeSubscription p_cellChangeSubscription := ? ) := { cellChangeSubscription := p_cellChangeSubscription } // End of template mw_body_json_cell_change_subscription - + template (value) JsonBody m_body_json_rab_info( in template (value) RabInfo p_rabInfo ) := { rabInfo := p_rabInfo } // End of template m_body_json_rab_info - + template (present) JsonBody mw_body_json_rab_info( template (present) RabInfo p_rabInfo := ? ) := { rabInfo := p_rabInfo } // End of template mw_body_json_rab_info - + template (value) JsonBody m_body_json_plmn_infos( in template (value) PlmnInfos p_plmnInfos ) := { plmnInfos := p_plmnInfos } // End of template m_body_json_plmn_infos - + template (present) JsonBody mw_body_json_plmn_infos( template (present) PlmnInfos p_plmnInfos := ? ) := { plmnInfos := p_plmnInfos } // End of template mw_body_json_plmn_infos - + template (value) JsonBody m_body_json_s1_bearer_info( in template (value) S1BearerInfo p_s1BearerInfo ) := { s1BearerInfo := p_s1BearerInfo } // End of template m_body_json_s1_bearer_info - + template (present) JsonBody mw_body_json_s1_bearer_info( template (present) S1BearerInfo p_s1BearerInfo := ? ) := { s1BearerInfo := p_s1BearerInfo } // End of template mw_body_json_s1_bearer_info - + template (value) JsonBody m_body_json_rab_est_subscription( in template (value) RabEstSubscription p_rabEstSubscription ) := { rabEstSubscription := p_rabEstSubscription } // End of template m_body_json_rab_est_subscription - + template (present) JsonBody mw_body_json_rab_est_subscription( template (present) RabEstSubscription p_rabEstSubscription := ? ) := { rabEstSubscription := p_rabEstSubscription } // End of template mw_body_json_rab_est_subscription - + template (value) JsonBody m_body_json_rab_mod_subscription( in template (value) RabModSubscription p_rabModSubscription ) := { rabModSubscription := p_rabModSubscription } // End of template m_body_json_rab_mod_subscription - + template (present) JsonBody mw_body_json_rab_mod_subscription( template (present) RabModSubscription p_rabModSubscription := ? ) := { rabModSubscription := p_rabModSubscription } // End of template mw_body_json_rab_mod_subscription - + template (value) JsonBody m_body_json_rab_rel_subscription( in template (value) RabRelSubscription p_rabRelSubscription ) := { rabRelSubscription := p_rabRelSubscription } // End of template m_body_json_rab_rel_subscription - + template (present) JsonBody mw_body_json_rab_rel_subscription( template (present) RabRelSubscription p_rabRelSubscription := ? ) := { rabRelSubscription := p_rabRelSubscription } // End of template mw_body_json_rab_rel_subscription - + template (value) JsonBody m_body_json_meas_rep_ue_subscription( in template (value) MeasRepUeSubscription p_measRepUeSubscription ) := { measRepUeSubscription := p_measRepUeSubscription } // End of template m_body_json_meas_rep_ue_subscription - + template (present) JsonBody mw_body_json_meas_rep_ue_subscription( template (present) MeasRepUeSubscription p_measRepUeSubscription := ? ) := { measRepUeSubscription := p_measRepUeSubscription } // End of template mw_body_json_meas_rep_ue_subscription - + template (value) JsonBody m_body_json_meas_ta_subscription( in template (value) MeasTaSubscription p_measTaSubscription ) := { measTaSubscription := p_measTaSubscription } // End of template m_body_json_meas_ta_subscription - + template (present) JsonBody mw_body_json_meas_ta_subscription( template (present) MeasTaSubscription p_measTaSubscription := ? ) := { measTaSubscription := p_measTaSubscription } // End of template mw_body_json_meas_ta_subscription - + template (value) JsonBody m_body_json_ca_reconf_subscription( in template (value) CaReConfSubscription p_caReconfSubscription ) := { caReConfSubscription := p_caReconfSubscription } // End of template m_body_json_ca_reconf_subscription - + template (present) JsonBody mw_body_json_ca_reconf_subscription( template (present) CaReConfSubscription p_caReconfSubscription := ? ) := { caReConfSubscription := p_caReconfSubscription } // End of template mw_body_json_ca_reconf_subscription - + template (value) JsonBody m_body_json_s1_bearer_subscription( in template (value) S1BearerSubscription p_s1BearerSubscription ) := { s1BearerSubscription := p_s1BearerSubscription } // End of template m_body_json_s1_bearer_subscription - + template (present) JsonBody mw_body_json_s1_bearer_subscription( template (present) S1BearerSubscription p_s1BearerSubscription := ? ) := { s1BearerSubscription := p_s1BearerSubscription } // End of template mw_body_json_s1_bearer_subscription - + template (value) JsonBody m_body_json_l2_meas_subscription( in template (value) L2Meas p_l2Meas ) := { l2Meas := p_l2Meas } // End of template m_body_json_l2_meas_subscription - + template (present) JsonBody mw_body_json_l2_meas_subscription( template (present) L2Meas p_l2Meas := ? ) := { l2Meas := p_l2Meas } // End of template mw_body_json_l2_meas_subscription - + + template (value) JsonBody m_body_json_expiry_notification_rnis( + in template (value) RnisAPI_TypesAndValues.ExpiryNotification p_expiryNotification + ) := { + expiryNotification_rnis := p_expiryNotification + } // End of template m_body_json_expiry_notification_rnis + + template (present) JsonBody mw_body_json_expiry_notification_rnis( + template (present) RnisAPI_TypesAndValues.ExpiryNotification p_expiryNotification := ? + ) := { + expiryNotification_rnis := p_expiryNotification + } // End of template mw_body_json_expiry_notification_rnis + } // End of group rnis_subscriptions - + group rnis_notifications { - + } // End of group rnis_notifications - + group traffic_management_api { - + template (value) JsonBody m_body_json_bw_info( in template (value) BwInfo p_bwInfo ) := { bwInfo := p_bwInfo } // End of template m_body_json_bw_info - + template (present) JsonBody mw_body_json_bw_info( template (present) BwInfo p_bwInfo := ? ) := { bwInfo := p_bwInfo } // End of template mw_body_json_bw_info - + template (value) JsonBody m_body_json_bw_info_deltas( in template (value) BwInfoDeltas p_bwInfoDeltas ) := { bwInfoDeltas := p_bwInfoDeltas } // End of template m_body_json_bw_info_deltas - + template (present) JsonBody mw_body_json_bw_info_deltas( template (present) BwInfoDeltas p_bwInfoDeltas := ? ) := { bwInfoDeltas := p_bwInfoDeltas } // End of template mw_body_json_bw_info_deltas - + template (present) JsonBody mw_body_json_bw_info_list( template (present) BwInfoList p_bwInfoList := ? ) := { @@ -708,35 +921,35 @@ group ams_api { ) := { mtsCapabilityInfo := p_mtsCapabilityInfo } // End of template m_body_json_mts_capability_info - + template (present) JsonBody mw_body_json_mts_capability_info( template (present) MtsCapabilityInfo p_mtsCapabilityInfo := ? ) := { mtsCapabilityInfo := p_mtsCapabilityInfo } // End of template mw_body_json_mts_capability_info - + template (value) JsonBody m_body_json_mts_session_info( in template (value) MtsSessionInfo p_mtsSessionInfo ) := { mtsSessionInfo := p_mtsSessionInfo } // End of template m_body_json_mts_session_info - + template (present) JsonBody mw_body_json_mts_session_info( template (present) MtsSessionInfo p_mtsSessionInfo := ? ) := { mtsSessionInfo := p_mtsSessionInfo } // End of template mw_body_json_mts_session_info - + template (present) JsonBody mw_body_json_mts_session_info_list( template (present) MtsSessionInfos p_mtsSessionInfos := ? ) := { mtsSessionInfos := p_mtsSessionInfos } // End of template mw_body_json_mts_session_info_list - + } // End of group traffic_management_api group app_enablement_api { - + template (value) JsonBody m_body_json_service_info_list( in template (value) ServiceInfoList p_serviceInfoList ) := { @@ -760,7 +973,7 @@ group ams_api { ) := { serviceInfo := p_serviceInfo } // End of template mw_body_json_service_info - + template (value) JsonBody m_body_json_subscription_link_list( in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SubscriptionLinkList p_subscription_link_list ) := { @@ -822,129 +1035,141 @@ group ams_api { } // End of template mw_body_json_srv_liveness_info template (value) JsonBody m_body_json_transport_info_list( - in template (value) TransportInfoList p_transportInfoList + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_transportInfoList ) := { transportInfoList := p_transportInfoList } // End of template m_body_json_transport_info_list - + template (present) JsonBody mw_body_json_transport_info_list( - template (present) TransportInfoList p_transportInfoList := ? + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_transportInfoList := ? ) := { transportInfoList := p_transportInfoList } // End of template mw_body_json_transport_info_list - + template (value) JsonBody m_body_json_dns_rule( in template (value) DnsRule p_dnsRule ) := { dnsRule := p_dnsRule } // End of template m_body_json_dns_rule - + template (present) JsonBody mw_body_json_dns_rule( template (present) DnsRule p_dnsRule := ? ) := { dnsRule := p_dnsRule } // End of template mw_body_json_dns_rule - + template (value) JsonBody m_body_json_dns_rule_list( in template (value) DnsRuleList p_dnsRuleList ) := { dnsRuleList := p_dnsRuleList } // End of template m_body_json_dns_rule_list - + template (present) JsonBody mw_body_json_dns_rule_list( template (present) DnsRuleList p_dnsRuleList := ? ) := { dnsRuleList := p_dnsRuleList } // End of template mw_body_json_dns_rule_list - + template (value) JsonBody m_body_json_srv_avail_notif_subscription( in template (value) SerAvailabilityNotificationSubscription p_serAvailabilityNotificationSubscription ) := { serAvailabilityNotificationSubscription := p_serAvailabilityNotificationSubscription } // End of template m_body_json_srv_avail_notif_subscription - + template (present) JsonBody mw_body_json_srv_avail_notif_subscription( template (present) SerAvailabilityNotificationSubscription p_serAvailabilityNotificationSubscription := ? ) := { serAvailabilityNotificationSubscription := p_serAvailabilityNotificationSubscription } // End of template mw_body_json_srv_avail_notif_subscription - + template (value) JsonBody m_body_json_timing_caps( in template (value) TimingCaps p_timingCaps ) := { timingCaps := p_timingCaps } // End of template m_body_json_timing_caps - + template (present) JsonBody mw_body_json_timing_caps( template (present) TimingCaps p_timingCaps := ? ) := { timingCaps := p_timingCaps } // End of template mw_body_json_timing_caps - + template (value) JsonBody m_body_json_current_time( in template (value) CurrentTime p_currentTime ) := { currentTime := p_currentTime } // End of template m_body_json_current_time - + template (present) JsonBody mw_body_json_current_time( template (present) CurrentTime p_currentTime := ? ) := { currentTime := p_currentTime } // End of template mw_body_json_current_time - + template (value) JsonBody m_body_json_traffic_rule( in template (value) TrafficRule p_trafficRule ) := { trafficRule := p_trafficRule } // End of template m_body_json_traffic_rule - + template (present) JsonBody mw_body_json_traffic_rule( template (present) TrafficRule p_trafficRule := ? ) := { trafficRule := p_trafficRule } // End of template mw_body_json_traffic_rule - + template (value) JsonBody m_body_json_traffic_rule_list( in template (value) TrafficRuleList p_trafficRuleList ) := { trafficRuleList := p_trafficRuleList } // End of template m_body_json_traffic_rule_list - + template (present) JsonBody mw_body_json_traffic_rule_list( template (present) TrafficRuleList p_trafficRuleList := ? ) := { trafficRuleList := p_trafficRuleList } // End of template mw_body_json_traffic_rule_list - + + template (value) JsonBody m_body_json_app_info_regapps( + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.AppInfo p_appInfo_regapps + ) := { + appInfo_regapps := p_appInfo_regapps + } // End of template m_body_json_app_info_regapps + + template (present) JsonBody mw_body_json_app_info_regapps( + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.AppInfo p_appInfo_regapps := ? + ) := { + appInfo_regapps := p_appInfo_regapps + } // End of template mw_body_json_app_info_regapps + } // End of group app_enablement_api - + group ue_app_ctx { - + template (value) JsonBody m_body_json_app_context( in template (value) UEAppInterfaceAPI_TypesAndValues.AppContext p_appContext ) := { appContext := p_appContext } // End of template m_body_json_app_context - + template (present) JsonBody mw_body_json_app_context( template (present) UEAppInterfaceAPI_TypesAndValues.AppContext p_appContext := ? ) := { appContext := p_appContext } // End of template mw_body_json_app_context - + template (value) JsonBody m_body_json_app_info( - in template (value) AppInfo p_appInfo - ) := { + in template (value) UEAppInterfaceAPI_TypesAndValues.AppInfo p_appInfo + ) := { appInfo := p_appInfo } // End of template m_body_json_app_info - + template (present) JsonBody mw_body_json_app_info( - template (present) AppInfo p_appInfo := ? - ) := { + template (present) UEAppInterfaceAPI_TypesAndValues.AppInfo p_appInfo := ? + ) := { appInfo := p_appInfo } // End of template mw_body_json_app_info - + } // End of group ue_app_ctx group device_information { @@ -1185,6 +1410,18 @@ group ams_api { provChgPc5Subscription := p_provChgPc5Subscription } // End of template mw_body_json_prov_pc5_subscription + template (value) JsonBody m_body_json_v2x_msg_distribution_server_info( + in template (value) V2xMsgDistributionServerInfo p_v2xMsgDistributionServerInfo + ) := { + v2xMsgDistributionServerInfo := p_v2xMsgDistributionServerInfo + } // End of template m_body_json_v2x_msg_distribution_server_info + + template (present) JsonBody mw_body_json_v2x_msg_distribution_server_info( + template (present) V2xMsgDistributionServerInfo p_v2xMsgDistributionServerInfo := ? + ) := { + v2xMsgDistributionServerInfo := p_v2xMsgDistributionServerInfo + } // End of template mw_body_json_v2x_msg_distribution_server_info + template (value) JsonBody m_body_json_v2x_msg_subscription( in template (value) V2xMsgSubscription p_v2xMsgSubscription ) := { @@ -1197,6 +1434,18 @@ group ams_api { v2xMsgSubscription := p_v2xMsgSubscription } // End of template mw_body_json_v2x_msg_subscription + template (value) JsonBody m_body_json_pred_qos_subscription( + in template (value) PredQosSubscription p_predQosSubscription + ) := { + predQosSubscription := p_predQosSubscription + } // End of template m_body_json_pred_qos_subscription + + template (present) JsonBody mw_body_json_pred_qos_subscription( + template (present) PredQosSubscription p_predQosSubscription := ? + ) := { + predQosSubscription := p_predQosSubscription + } // End of template mw_body_json_pred_qos_subscription + template (value) JsonBody m_body_json_prov_chg_uu_uni_notification( in template (value) ProvChgUuUniNotification p_provChgUuUniNotification ) := { @@ -1236,79 +1485,207 @@ group ams_api { } // End of group v2x_information_service group fai { - + template (value) JsonBody m_body_json_fai_fa_info( in template (value) FaInfo p_faInfo ) := { faInfo := p_faInfo } // End of template m_body_json_fai_fa_info - + template (present) JsonBody mw_body_json_fai_fa_info( template (present) FaInfo p_faInfo := ? ) := { faInfo := p_faInfo } // End of template mw_body_json_fai_fa_info - + template (value) JsonBody m_body_json_fai_device_info( - in template (value) DeviceInfo p_deviceInfo + in template (value) FixedAccessInformationServiceAPI_TypesAndValues.DeviceInfo p_deviceInfo ) := { deviceInfo := p_deviceInfo } // End of template m_body_json_fai_device_info - + template (present) JsonBody mw_body_json_fai_device_info( - template (present) DeviceInfo p_deviceInfo := ? + template (present) FixedAccessInformationServiceAPI_TypesAndValues.DeviceInfo p_deviceInfo := ? ) := { deviceInfo := p_deviceInfo } // End of template mw_body_json_fai_device_info - + template (value) JsonBody m_body_json_fai_cable_line_info( in template (value) CableLineInfo p_cableLineInfo ) := { cableLineInfo := p_cableLineInfo } // End of template m_body_json_fai_cable_line_info - + template (present) JsonBody mw_body_json_fai_cable_line_info( template (present) CableLineInfo p_cableLineInfo := ? ) := { cableLineInfo := p_cableLineInfo } // End of template mw_body_json_fai_cable_line_info - + template (value) JsonBody m_body_json_fai_pon_info( in template (value) PonInfo p_ponInfo ) := { ponInfo := p_ponInfo } // End of template m_body_json_fai_pon_info - + template (present) JsonBody mw_body_json_fai_pon_info( template (present) PonInfo p_ponInfo := ? ) := { ponInfo := p_ponInfo } // End of template mw_body_json_fai_pon_info - + template (value) JsonBody m_body_json_fai_subscription_link_list( in template (value) FixedAccessInformationServiceAPI_TypesAndValues.SubscriptionLinkList p_subscriptionLinkList ) := { subscriptionLinkList_fai := p_subscriptionLinkList } // End of template m_body_json_fai_subscription_link_list - + template (present) JsonBody mw_body_json_fai_subscription_link_list( template (present) FixedAccessInformationServiceAPI_TypesAndValues.SubscriptionLinkList p_subscriptionLinkList := ? ) := { subscriptionLinkList_fai := p_subscriptionLinkList } // End of template mw_body_json_fai_subscription_link_list - - template (value) JsonBody m_body_json_fai_onu_alarm_subscription_link_list( - in template (value) OnuAlarmSubscription p_onuAlarmSubscription + + template (value) JsonBody m_body_json_fai_onu_alarm_subscription( + in template (value) OnuAlarmSubscription p_onuAlarmSubscription ) := { onuAlarmSubscription := p_onuAlarmSubscription - } // End of template m_body_json_fai_onu_alarm_subscription_link_list - - template (present) JsonBody mw_body_json_fai_onu_alarm_subscription_link_list( - template (present) OnuAlarmSubscription p_onuAlarmSubscription := ? + } // End of template m_body_json_fai_onu_alarm_subscription + + template (present) JsonBody mw_body_json_fai_onu_alarm_subscription( + template (present) OnuAlarmSubscription p_onuAlarmSubscription := ? ) := { onuAlarmSubscription := p_onuAlarmSubscription - } // End of template mw_body_json_fai_onu_alarm_subscription_link_list - + } // End of template mw_body_json_fai_onu_alarm_subscription + + template (value) JsonBody m_body_json_fai_dev_info_subscription( + in template (value) DevInfoSubscription p_devInfoSubscription + ) := { + devInfoSubscription := p_devInfoSubscription + } // End of template m_body_json_fai_dev_info_subscription + + template (present) JsonBody mw_body_json_fai_dev_info_subscription( + template (present) DevInfoSubscription p_devInfoSubscription := ? + ) := { + devInfoSubscription := p_devInfoSubscription + } // End of template mw_body_json_fai_dev_info_subscription + + template (value) JsonBody m_body_json_fai_cm_conn_subscription( + in template (value) CmConnSubscription p_cmConnSubscription + ) := { + cmConnSubscription := p_cmConnSubscription + } // End of template m_body_json_fai_cm_conn_subscription + + template (present) JsonBody mw_body_json_fai_cm_conn_subscription( + template (present) CmConnSubscription p_cmConnSubscription := ? + ) := { + cmConnSubscription := p_cmConnSubscription + } // End of template mw_body_json_fai_cm_conn_subscription + + template (value) JsonBody m_body_json_fai_ani_alarm_subscription( + in template (value) AniAlarmSubscription p_aniAlarmSubscription + ) := { + aniAlarmSubscription := p_aniAlarmSubscription + } // End of template m_body_json_fai_ani_alarm_subscription + + template (present) JsonBody mw_body_json_fai_ani_alarm_subscription( + template (present) AniAlarmSubscription p_aniAlarmSubscription := ? + ) := { + aniAlarmSubscription := p_aniAlarmSubscription + } // End of template mw_body_json_fai_ani_alarm_subscription + } // End of group fai + group iot { + + template (value) JsonBody m_body_json_iot_device_info( + in template (value) IoTAPI_TypesAndValues.DeviceInfo p_deviceInfo + ) := { + deviceInfo_iot := p_deviceInfo + } // End of template m_body_json_iot_device_info + + template (present) JsonBody mw_body_json_iot_device_info( + template (present) IoTAPI_TypesAndValues.DeviceInfo p_deviceInfo := ? + ) := { + deviceInfo_iot := p_deviceInfo + } // End of template mw_body_json_iot_device_info + + template (value) JsonBody m_body_json_fed_device_info_list( + in template (value) IoTAPI_TypesAndValues.DeviceInfoList p_deviceInfoList + ) := { + deviceInfoList_iot := p_deviceInfoList + } // End of template m_body_json_fed_device_info_list + + template (present) JsonBody mw_body_json_iot_device_info_list( + template (present) IoTAPI_TypesAndValues.DeviceInfoList p_deviceInfoList := ? + ) := { + deviceInfoList_iot := p_deviceInfoList + } // End of template mw_body_json_iot_device_info_list + + template (value) JsonBody m_body_json_iot_iot_platform_info( + in template (value) IotPlatformInfo p_iotPlatformInfo + ) := { + iotPlatformInfo := p_iotPlatformInfo + } // End of template m_body_json_iot_iot_platform_info + + template (present) JsonBody mw_body_json_iot_iot_platform_info( + template (present) IotPlatformInfo p_iotPlatformInfo := ? + ) := { + iotPlatformInfo := p_iotPlatformInfo + } // End of template mw_body_json_iot_iot_platform_info + + template (value) JsonBody m_body_json_iot_iot_platform_info_list( + in template (value) IotPlatformInfoList p_iotPlatformInfoList + ) := { + iotPlatformInfoList := p_iotPlatformInfoList + } // End of template m_body_json_iot_iot_platform_info_list + + template (present) JsonBody mw_body_json_iot_iot_platform_info_list( + template (present) IotPlatformInfoList p_iotPlatformInfoList := ? + ) := { + iotPlatformInfoList := p_iotPlatformInfoList + } // End of template mw_body_json_iot_iot_platform_info_list + + } // End of group iot + + group federation { + + template (value) JsonBody m_body_json_fed_system_info( + in template (value) SystemInfo p_systemInfo + ) := { + systemInfo := p_systemInfo + } // End of template m_body_json_fed_system_info + + template (present) JsonBody mw_body_json_fed_system_info( + template (present) SystemInfo p_systemInfo := ? + ) := { + systemInfo := p_systemInfo + } // End of template mw_body_json_fed_system_info + + template (value) JsonBody m_body_json_fed_system_info_list( + in template (value) SystemInfoList p_systemInfoList + ) := { + systemInfoList := p_systemInfoList + } // End of template m_body_json_fed_system_info_list + + template (present) JsonBody mw_body_json_fed_system_info_list( + template (present) SystemInfoList p_systemInfoList := ? + ) := { + systemInfoList := p_systemInfoList + } // End of template mw_body_json_fed_system_info_list + + template (value) JsonBody m_body_json_fed_system_info_update( + in template (value) SystemInfoUpdate p_systemInfoUpdate + ) := { + systemInfoUpdate := p_systemInfoUpdate + } // End of template m_body_json_fed_system_info_update + + template (present) JsonBody mw_body_json_fed_system_info_update( + template (present) SystemInfoUpdate p_systemInfoUpdate := ? + ) := { + systemInfoUpdate := p_systemInfoUpdate + } // End of template mw_body_json_fed_system_info_update + + } // End of group federation + } // End of module LibHttp_JsonTemplates diff --git a/virtualization/docker-dev/Dockerfile b/virtualization/docker-dev/Dockerfile index cae4b242363b984d46adc2572c6fe633a8b66f9d..37c7b15a0f9598b19463ac901121f90626e2aff8 100644 --- a/virtualization/docker-dev/Dockerfile +++ b/virtualization/docker-dev/Dockerfile @@ -1,49 +1,26 @@ -FROM alpine:latest - -# Install dependencies -RUN apk update && \ - apk add --no-cache sudo make git g++ diffutils expect openssl-dev libxml2-dev libxml2-utils libxslt-dev libtool ncurses-dev jsoncpp-dev readline-dev flex bison perl libexecinfo-dev bash libedit libedit-dev lksctp-tools lksctp-tools-dev libpcap-dev - -# Create user and sudouser -RUN \ - addgroup -g 1000 etsi && \ - adduser -S -D -u 1000 -G etsi -h /home/etsi -s /bin/bash etsi && \ - echo "etsi:etsi" | chpasswd && \ - echo "etsi ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers || exit 1 -USER etsi +FROM stfubuntu:20.04 -# Setup Hosts file at the boot time -RUN \ - echo 'sudo sh -c "cp /etc/hosts /etc/append && (echo \"127.0.1.1 $HOSTNAME\"; cat /etc/append) > /etc/hosts"' >> /home/etsi/.bashrc \ - echo 'sh' >> /home/etsi/.bashrc || exit 1 +MAINTAINER ETSI TTF T027 -# Clone Titan -WORKDIR /home/etsi -RUN mkdir -p frameworks dev tmp && cd frameworks && git clone https://github.com/eclipse/titan.core.git || exit 1 -WORKDIR /home/etsi/frameworks/titan.core/ +LABEL description="TTF_T027_Mec Docker Image" -# Setup ENV variables -ENV TTCN3_DIR=/home/etsi/frameworks/titan.core/Install -ENV PATH=$TTCN3_DIR/bin:$PATH \ - LD_LIBRARY_PATH=$TTCN3_DIR/lib:$LD_LIBRARY_PATH +ENV TERM=linux \ + HOME=/home/etsi \ + HOSTNAME=docker-titan-TTF_T027 -# Set flags -RUN \ - echo "ALPINE_LINUX=yes" > Makefile.personal && \ - echo "TTCN3_DIR=$TTCN3_DIR" >> Makefile.personal && \ - echo "JNI=no" >> Makefile.personal && \ - echo "GUI=no" >> Makefile.personal && \ - echo "DEBUG=no" >> Makefile.personal || exit 1 +COPY home /home/etsi -# Build Titan -RUN \ - sed --in-place 's/LINUX_LIBS := -lxml2/LINUX_LIBS := -lxml2 -lpthread/g' ./core/Makefile && \ - make install && make clean || exit 1 +RUN cd /home/etsi \ + && chown -R etsi:etsi . \ + && ls ./etc/init.d/*.sh | while read S; do chmod 0750 "$S" || exit 1; done -WORKDIR /home/etsi/dev +USER etsi -ENV ATS=AtsCise +RUN cd ${HOME} \ + && export PATH=$HOME/bin:$PATH \ + && ls ${HOME}/etc/init.d/*.sh | while read S; do /bin/bash -c "$S" || exit 1; done \ + && rm -fr ${HOME}/etc -EXPOSE 30181/tcp +CMD ["/bin/bash"] -ENTRYPOINT /home/yann/dev/cise/virtualization/docker/docker-entrypoint.sh +# That's all Floks diff --git a/virtualization/docker-dev/Dockerfile.stfubuntu b/virtualization/docker-dev/Dockerfile.stfubuntu index 337f237f5ff1c3ea514cb93a2e2b01bae3b0a3a6..9fa6645dfc7b2239c01bf04ee2d81fad6416528c 100644 --- a/virtualization/docker-dev/Dockerfile.stfubuntu +++ b/virtualization/docker-dev/Dockerfile.stfubuntu @@ -1,7 +1,6 @@ -FROM ubuntu:18.04 - -MAINTAINER ETSI STF +FROM ubuntu:20.04 +LABEL ETSI CTI LABEL description="STF Docker Ubuntu image" ENV TERM=linux \ @@ -10,11 +9,8 @@ ENV TERM=linux \ RUN echo "docker-STF-dev" > /etc/hostname \ && DEBIAN_FRONTEND=noninteractive apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y \ - && DEBIAN_FRONTEND=noninteractive apt-get install software-properties-common -y \ - && DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:linuxuprising/java -y \ && DEBIAN_FRONTEND=noninteractive apt-get update \ - && ( echo "oracle-java17-installer shared/accepted-oracle-license-v1-3 boolean true" | debconf-set-selections -v ) \ - && DEBIAN_FRONTEND=noninteractive apt-get --allow-unauthenticated install -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y \ autoconf \ bison \ build-essential \ @@ -25,10 +21,9 @@ RUN echo "docker-STF-dev" > /etc/hostname \ emacs \ expect \ flex \ - g++-8 \ - gcc-8 \ - gdb \ - git-core \ + g++-9 \ + gcc-9 \ + git \ gnutls-bin \ graphviz \ iputils-ping \ @@ -40,43 +35,27 @@ RUN echo "docker-STF-dev" > /etc/hostname \ libjsoncpp-dev \ libncurses5-dev \ libpcap-dev \ - libqt5svg5-dev \ - libreadline-dev \ libssl-dev \ libtool-bin \ libtool \ - libwireshark-dev \ libxml2-dev \ libxml2-utils \ libyaml-dev \ lsof \ - net-tools \ ntp \ - oracle-java17-installer \ - oracle-java17-set-default \ openssh-server \ pkg-config \ python3-dev \ python3-pip \ python3-setuptools \ - qt5-default \ - qtmultimedia5-dev \ - subversion \ sudo \ sshpass \ tcpdump \ texlive-font-utils \ - texlive-latex-base \ texlive-latex-extra \ - tshark \ tzdata \ valgrind \ - vim \ - vsftpd \ xutils-dev \ - tree \ - unzip \ - wget \ xsltproc \ && DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y \ && DEBIAN_FRONTEND=noninteractive apt-get autoclean \ diff --git a/virtualization/docker-dev/build.sh b/virtualization/docker-dev/build.sh index a7859fb90253e7a618cd3ac99643660cec615749..2eb0390ee553abd32f6beb84dc17b278f6c66a30 100755 --- a/virtualization/docker-dev/build.sh +++ b/virtualization/docker-dev/build.sh @@ -13,7 +13,7 @@ if [ "$1" == "--force-stfubuntu" ]; then fi # Check and build stfubuntu image if [ -z `docker images -q stfubuntu` ]; then - docker build --no-cache --tag stfubuntu:18.04 -f Dockerfile.stfubuntu --force-rm . || exit 1 + docker build --no-cache --tag stfubuntu:20.04 -f Dockerfile.stfubuntu --force-rm . || exit 1 fi docker build --no-cache --tag mec_devel --force-rm . || ( echo "Docker build failed: $?"; exit 1 ) diff --git a/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh b/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh index e7e65cf4b9abaa121bc4f6fc276e4717b9835dd4..ab90df65f87ae0f911e08ded006c8f6c9dc6bf0d 100755 --- a/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh +++ b/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh @@ -1,6 +1,6 @@ #!/bin/bash -ECLIPSE_URL='https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2020-06/R/eclipse-jee-2020-06-R-linux-gtk-x86_64.tar.gz&r=1' +ECLIPSE_URL='https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2024-03/R/eclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz&r=1' TITAN_URL='https://www.eclipse.org/downloads/download.php?file=/titan/TITAN_Designer_and_Executor_Plugin_7.1.0.zip&r=1' #set -e @@ -10,10 +10,10 @@ echo -e "*****************************\n* Install eclipse\n********************* mkdir -p ${HOME}/frameworks cd ${HOME}/frameworks || exit 1 -wget --progress=dot:mega 'http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/epp/downloads/release/2021-12/R/eclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz || exit 1 -tar -zxvf ./eclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz || exit 1 +wget --progress=dot:mega 'http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/epp/downloads/release/2024-03/R/eclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz || exit 1 +tar -zxvf ./eclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz || exit 1 ln -sf ${HOME}/frameworks/eclipse/eclipse ${HOME}/bin/eclipse -rm -f ./eclipse-cpp-2021-12-R-linux-gtk-x86_64.tar.gz +rm -f ./eclipse-cpp-2024-03-R-linux-gtk-x86_64.tar.gz if wget --progress=dot:mega 'https://www.eclipse.org/downloads/download.php?file=/titan/TITAN_Designer_and_Executor_plugin-8.1.0.zip' -OTITAN_Designer_and_Executor_plugin.zip; then eclipse/eclipse -noSplash -application org.eclipse.equinox.p2.director \ diff --git a/virtualization/docker-dev/home/etc/init.d/40-ttf_t012.sh b/virtualization/docker-dev/home/etc/init.d/40-ttf_t027.sh similarity index 82% rename from virtualization/docker-dev/home/etc/init.d/40-ttf_t012.sh rename to virtualization/docker-dev/home/etc/init.d/40-ttf_t027.sh index 4115e5cd25e735bafdbfde096c554bd9aea16376..7bedfabd205365d1a0806c4d3d8a6584db987adb 100755 --- a/virtualization/docker-dev/home/etc/init.d/40-ttf_t012.sh +++ b/virtualization/docker-dev/home/etc/init.d/40-ttf_t027.sh @@ -6,7 +6,7 @@ set -vx echo -e "*****************************\n* Checkout mec_devel sources\n*****************************\n" mkdir -p ${HOME}/dev && cd ${HOME}/dev || exit 1 -git clone --recurse-submodules --branch devel --single-branch https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel +git clone --recurse-submodules --branch TTF_T027 https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel cd ${HOME}/dev/mec_devel/titan-test-system-framework git checkout devel cd ${HOME}/dev/mec_devel/ttcn @@ -19,8 +19,13 @@ ln -sf ${HOME}/dev/mec_devel/scripts/devenv.bash.ubuntu ${HOME}/devenv.bash echo -e "*****************************\n* Apply patched \n*****************************\n" cd ${HOME}/dev/mec_devel -cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ -cp ./ttcn/patch_lib_common_titan/*.ttcn ./ttcn/LibCommon/ttcn + +cd ./ttcn/LibCommon +ln -sf ${HOME}/dev/mec_devel/ttcn/patch_lib_common_titan/module.mk module.mk +cd - +cd ./titan-test-system-framework/ttcn/LibHttp +ln -sf module_mec.mk module.mk +cd - echo -e "*****************************\n* Build Mec test suite\n*****************************\n" cd ${HOME}/dev/mec_devel diff --git a/virtualization/docker/Dockerfile b/virtualization/docker/Dockerfile index 2fdb13d1a36b44b298031024cb93998a7ec2dd2e..456149a5cec8a1aa5fd8d14a90acebb201f590d3 100644 --- a/virtualization/docker/Dockerfile +++ b/virtualization/docker/Dockerfile @@ -19,7 +19,7 @@ RUN \ # Clone Titan WORKDIR /home/etsi -RUN mkdir -p frameworks dev tmp && cd frameworks && git clone https://github.com/eclipse/titan.core.git || exit 1 +RUN mkdir -p frameworks dev tmp && cd frameworks && git clone https://gitlab.eclipse.org/eclipse/titan/titan.core.git || exit 1 WORKDIR /home/etsi/frameworks/titan.core/ # Setup ENV variables @@ -42,8 +42,8 @@ RUN \ WORKDIR /home/etsi/dev -ENV ATS=AtsCise +ENV ATS=AtsMec_V2XInformationService -EXPOSE 443/tcp +EXPOSE 80/tcp 443/tcp ENTRYPOINT /home/yann/dev/cise/virtualization/docker/docker-entrypoint.sh diff --git a/virtualization/vagrant/provisioner.bash b/virtualization/vagrant/provisioner.bash index 420a2252a015614a1efda3340ca7a8a3239ad5ed..82a7d07005dc1d256fe9816bd4847c7960ba5112 100755 --- a/virtualization/vagrant/provisioner.bash +++ b/virtualization/vagrant/provisioner.bash @@ -82,7 +82,7 @@ echo ". ~/devenv.bash" >> /home/vagrant/.bashrc # Clone project cd /home/vagrant/dev -git clone --recurse-submodules --branch devel --single-branch https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel +git clone --recurse-submodules --branch devel https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel cd /home/vagrant/dev/mec_devel/titan-test-system-framework git checkout devel cd /home/vagrant/dev/mec_devel/ttcn @@ -102,7 +102,7 @@ ln -sf /home/vagrant/dev/mec_devel/scripts/devenv.bash.ubuntu /home/vagrant/deve # Apply patch cd /home/vagrant/dev/mec_devel cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/ -cp ./ttcn/patch_lib_common_titan/*.ttcn ./ttcn/LibCommon/ttcn +cp ./ttcn/patch_lib_common_titan/ttcn/*.ttcn ./ttcn/LibCommon/ttcn # Change user in cfg files cd ${HOME}/dev/mec_devel/scripts || exit 1