diff --git a/README.md b/README.md index 10188b71ccd2afe32a947447fb60528a1229fa72..91bc27bb45a7bf0a10e0a48a67f1267d1fd5619e 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,9 @@ The ETSI MEC protocols project builds and tests regularly on the following platf - Linux (Ubuntu) - Windows ([Cygwin x64](https://cygwin.com/install.html), [Npcap SDK x64](https://nmap.org/npcap/#download) and [OpenSSL-Windows x64](https://www.openssl.org) are required) -Note: The [OpenSSL](https://www.openssl.org) version >= 1.1.1 is also required. - +Note: +- The [OpenSSL](https://www.openssl.org) version >= 1.1.1 is also required. +- The version 11.x.y and more of Ericsson TITAN is required. ## Installation diff --git a/STF569_Mec.tpd b/STF569_Mec.tpd deleted file mode 100644 index 5da647fa7c293a85b4923e043a0f5e8f7e43ee0e..0000000000000000000000000000000000000000 --- a/STF569_Mec.tpd +++ /dev/null @@ -1,245 +0,0 @@ - - - STF569_Mec - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Default - - - - - true - bin/STF569_Mec - true - true - true - true - true - true - true - true - true - true - - pcap - - - - bin - - - - - src/ccsrc/EncDec/LibMec/LocationAPI/LibMec_EncDec.cc - - true - - - - src/ttcn/LibCommon/ttcn/LibCommon_Sync.ttcn - - true - - - - src/ttcn/LibIts/ttcn/Http/LibItsHttp_BinaryMessageBodyTypes.ttcn - - true - - - - src/ttcn/LibIts/ttcn/Http/LibItsHttp_BinaryTemplates.ttcn - - true - - - - src/ttcn/LibIts/ttcn/Http/LibItsHttp_BinaryTypes.ttcn - - true - - - - src/ttcn/LibIts/ttcn/Http/LibItsHttp_JsonMessageBodyTypes.ttcn - - true - - - - src/ttcn/LibIts/ttcn/Http/LibItsHttp_JsonTemplates.ttcn - - true - - - - src/ttcn/LibIts/ttcn/Http/LibItsHttp_TestSystem.ttcn - - true - - - - - - \ No newline at end of file diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 012788d12b36f00c2c14b832d00433a925eb027b..cb6d90c92b5f6500d9e05b0cfbc44102201a3302 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -8,35 +8,34 @@ #include "LibHttp_JsonMessageBodyTypes.hh" -int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +int json_codec::encode(const LibHttp__JsonMessageBodyTypes::JsonBody &msg, OCTETSTRING &data) { - loggers::get_instance().log_msg(">>> json_codec::encode: ", (const Base_Type&)msg); + loggers::get_instance().log_msg(">>> json_codec::encode: ", (const Base_Type &)msg); TTCN_EncDec::clear_error(); TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); TTCN_Buffer encoding_buffer; - if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_ueIdentityTagInfo)) { - const UEidentityAPI__TypesAndValues::UeIdentityTagInfo& ue_identity_tag_info = msg.ueIdentityTagInfo(); + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_ueIdentityTagInfo)) + { + 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_cellChangeSubscription)) { - const RnisAPI__TypesAndValues::CellChangeSubscription& cell_change_subscription = msg.cellChangeSubscription(); + } + 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); - data = /*char2oct(CHARSTRING("{\"CellChangeSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appContext)) { - const UEAppInterfaceAPI__TypesAndValues::AppContext& app_context = msg.appContext(); + data = /*char2oct(CHARSTRING("{\"CellChangeSubscription\": ")) + */ OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) /* + char2oct(CHARSTRING("}"))*/; + } + else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appContext)) + { + const UEAppInterfaceAPI__TypesAndValues::AppContext &app_context = msg.appContext(); app_context.encode(UEAppInterfaceAPI__TypesAndValues::AppContext_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = char2oct(CHARSTRING("{\"AppContext\": ")) + 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 = 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 = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; - } else { + } + else + { loggers::get_instance().error("json_codec::encode: Not supported"); } @@ -44,18 +43,22 @@ int json_codec::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTE return 0; } -int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +int json_codec::decode(const OCTETSTRING &p_data, LibHttp__JsonMessageBodyTypes::JsonBody &msg, params *p_params) { loggers::get_instance().log_msg(">>> json_codec::decode: p_data=", p_data); // Sanity checks params::const_iterator it; - if (p_params == nullptr) { + if (p_params == nullptr) + { loggers::get_instance().warning("json_codec::decode: Failed to access p_params (null pointer)"); return -1; // TODO Use p_data instead of return -1 - } else { + } + else + { it = p_params->find("decode_str"); - if (it == p_params->cend()) { + if (it == p_params->cend()) + { loggers::get_instance().warning("json_codec::decode: Failed to access p_params item (decode_str)"); return -1; // TODO Use p_data instead of return -1 } @@ -64,115 +67,109 @@ int json_codec::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes // Remove data structure name (if present) ... std::string str; - if ((it->second[0] != '[') && (it->second[0] != '{')) { + if ((it->second[0] != '[') && (it->second[0] != '{')) + { 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); - } else { + } + else + { str = it->second; } // ..and create the decoding buffer TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); TTCN_EncDec::clear_error(); loggers::get_instance().log("json_codec::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); - TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char *)str.c_str())); - if (it->second.find("\"ueIdentityTagInfo\"") != std::string::npos) { + 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); msg.ueIdentityTagInfo() = ue_identity_tag_info; - } else if (it->second.find("\"CellChangeSubscription\"") != std::string::npos) { + } + else if (it->second.find("\"CellChangeSubscription\"") != std::string::npos) + { RnisAPI__TypesAndValues::CellChangeSubscription cell_change_subscription; cell_change_subscription.decode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.cellChangeSubscription() = cell_change_subscription; - //TODO Continue with other ChangeSubscription - } else if (it->second.find("\"cellInfo\"") != std::string::npos) { + // TODO Continue with other ChangeSubscription + } + else if (it->second.find("\"cellInfo\"") != std::string::npos) + { RnisAPI__TypesAndValues::L2Meas l2_meas; l2_meas.decode(RnisAPI__TypesAndValues::L2Meas_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.l2Meas() = l2_meas; - } else if ((it->second.find("\"appInstanceId\"") != std::string::npos) && (it->second.find("\"requestId\"") != std::string::npos)) { + } + else if ((it->second.find("\"appInstanceId\"") != std::string::npos) && (it->second.find("\"requestId\"") != std::string::npos)) + { RnisAPI__TypesAndValues::RabInfo rab_info; rab_info.decode(RnisAPI__TypesAndValues::RabInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.rabInfo() = rab_info; - } else if (it->second.find("\"S1BearerInfo\"") != std::string::npos) { + } + else if (it->second.find("\"S1BearerInfo\"") != std::string::npos) + { RnisAPI__TypesAndValues::S1BearerInfo s1_nearer_info; s1_nearer_info.decode(RnisAPI__TypesAndValues::S1BearerInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.s1BearerInfo() = s1_nearer_info; - } else if ((it->second.find("\"appInstanceId\"") != std::string::npos) && (it->second.find("\"plmn\"") != std::string::npos)) { + } + else if ((it->second.find("\"appInstanceId\"") != std::string::npos) && (it->second.find("\"plmn\"") != std::string::npos)) + { RnisAPI__TypesAndValues::PlmnInfos plmn_infos; plmn_infos.decode(RnisAPI__TypesAndValues::PlmnInfos_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.plmnInfos() = plmn_infos; - } else if (it->second.find("\"RabEstSubscription\"") != std::string::npos) { + } + else if (it->second.find("\"RabEstSubscription\"") != std::string::npos) + { RnisAPI__TypesAndValues::RabEstSubscription rab_est_subscription; rab_est_subscription.decode(RnisAPI__TypesAndValues::RabEstSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.rabEstSubscription() = rab_est_subscription; - } else if (it->second.find("\"RabModSubscription\"") != std::string::npos) { + } + else if (it->second.find("\"RabModSubscription\"") != std::string::npos) + { RnisAPI__TypesAndValues::RabModSubscription rab_mod_subscription; rab_mod_subscription.decode(RnisAPI__TypesAndValues::RabModSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.rabModSubscription() = rab_mod_subscription; - } else if (it->second.find("\"RabRelSubscription\"") != std::string::npos) { + } + else if (it->second.find("\"RabRelSubscription\"") != std::string::npos) + { 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("\"associateDevAppId\"") != 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("\"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) { - if (str.find("\"00\"") != std::string::npos) { - str = regex_replace(str, regex("\"00\""), "\"Downlink\""); - } else if (str.find("\"01\"") != std::string::npos) { - str = regex_replace(str, regex("\"01\""), "\"Uplink\""); - } else if (str.find("\"10\"") != std::string::npos) { - str = regex_replace(str, regex("\"10\""), "\"Symmetrical\""); - } else { - loggers::get_instance().log("json_codec::decode: BwInfo in break"); - break; - } - } // End of 'while' loop - loggers::get_instance().log("json_codec::decode: BwInfo after converting enum: %s", str.c_str()); - if (it->second[0] == '[') { // BwInfoList - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - TrafficManagementAPI__TypesAndValues::BwInfoList bw_info_list; - bw_info_list.decode(TrafficManagementAPI__TypesAndValues::BwInfoList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.bwInfoList() = bw_info_list; - } else { // BwInfo - TrafficManagementAPI__TypesAndValues::BwInfo bw_info; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - bw_info.decode(TrafficManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.bwInfo() = bw_info; - } - } else if ((it->second.find("\"mtsCapabilityInfo\"") != std::string::npos) || (it->second.find("\"mtsAccessInfo\"") != std::string::npos)) { - TrafficManagementAPI__TypesAndValues::MtsCapabilityInfo mts_cap_info; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - mts_cap_info.decode(TrafficManagementAPI__TypesAndValues::MtsCapabilityInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.mtsCapabilityInfo() = mts_cap_info; - } else if ((it->second.find("\"mtsSessionInfo\"") != std::string::npos) || (it->second.find("\"mtsMode\"") != std::string::npos)) { - TrafficManagementAPI__TypesAndValues::MtsSessionInfo mts_session_info; - TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - mts_session_info.decode(TrafficManagementAPI__TypesAndValues::MtsSessionInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); - msg.mtsSessionInfo() = mts_session_info; - } else if (it->second.find("\"detail\"") != std::string::npos) { + } + else if (it->second.find("\"detail\"") != std::string::npos) + { LibMec__TypesAndValues::ProblemDetails problem_details; problem_details.decode(LibMec__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.problemDetails() = problem_details; - } else { + } + else + { loggers::get_instance().warning("json_codec::decode: Unsupported variant"); return -1; } - loggers::get_instance().log_msg("<<< json_codec::decode: ", (const Base_Type&)msg); + loggers::get_instance().log_msg("<<< json_codec::decode: ", (const Base_Type &)msg); return 0; } diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec012.hh b/ccsrc/Protocols/Json/json_codec_factory_mec012.hh new file mode 100644 index 0000000000000000000000000000000000000000..91547504728f6beb0bf4b4ed6ed1061be52abd64 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec012.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec012.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 + * \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. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec012.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec012 + * \brief This class provides a factory class to create an json_codec class instance + */ +class json_codec_factory_mec012: public codec_factory { + static json_codec_factory_mec012 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec012 class + * \remark The HELD/IP codec identifier is HELD + */ + json_codec_factory_mec012() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec012", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec012(); + }; +}; // End of class json_codec_factory_mec012 diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec015.hh b/ccsrc/Protocols/Json/json_codec_factory_mec015.hh new file mode 100644 index 0000000000000000000000000000000000000000..d02ab430fb1e276d55409bd6f3d17121b491d681 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec015.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec015.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 + * \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. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec015.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec015 + * \brief This class provides a factory class to create a json_codec class instance + */ +class json_codec_factory_mec015: public codec_factory { + static json_codec_factory_mec015 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec015 class + * \remark The MEC015 codec identifier is json_codec_mec015 + */ + json_codec_factory_mec015() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec015", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec015(); + }; +}; // End of class json_codec_factory_mec015 diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec016.hh b/ccsrc/Protocols/Json/json_codec_factory_mec016.hh new file mode 100644 index 0000000000000000000000000000000000000000..a6dd5b98cad567694fe6ecc5b9ca44e2117029b8 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec016.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec013.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 + * \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. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec016.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec013 + * \brief This class provides a factory class to create an json_codec class instance + */ +class json_codec_factory_mec016: public codec_factory { + static json_codec_factory_mec016 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec013 class + * \remark The HELD/IP codec identifier is HELD + */ + json_codec_factory_mec016() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec016", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec016(); + }; +}; // End of class json_codec_factory_mec013 diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec021.hh b/ccsrc/Protocols/Json/json_codec_factory_mec021.hh new file mode 100644 index 0000000000000000000000000000000000000000..bfa4f9cc1f87b9eebb63e1ecf624faf99803cf28 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec021.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec021.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 + * \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. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec021.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec021 + * \brief This class provides a factory class to create an json_codec class instance + */ +class json_codec_factory_mec021: public codec_factory { + static json_codec_factory_mec021 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec021 class + * \remark The HELD/IP codec identifier is HELD + */ + json_codec_factory_mec021() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec021", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec021(); + }; +}; // End of class json_codec_factory_mec021 diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec029.hh b/ccsrc/Protocols/Json/json_codec_factory_mec029.hh new file mode 100644 index 0000000000000000000000000000000000000000..e810f9355b32e182fc6943b5c5d62da10f31c49c --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec029.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec029.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 + * \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. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec029.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec029 + * \brief This class provides a factory class to create an json_codec class instance + */ +class json_codec_factory_mec029: public codec_factory { + static json_codec_factory_mec029 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec029 class + * \remark The HELD/IP codec identifier is HELD + */ + json_codec_factory_mec029() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec029", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec029(); + }; +}; // End of class json_codec_factory_mec029 diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec033.hh b/ccsrc/Protocols/Json/json_codec_factory_mec033.hh new file mode 100644 index 0000000000000000000000000000000000000000..06789037fc24e3a13f7656c8d865c88b7a47a7a3 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec033.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec033.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 / TTF T043 + * \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. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec033.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec033 + * \brief This class provides a factory class to create an json_codec class instance + */ +class json_codec_factory_mec033: public codec_factory { + static json_codec_factory_mec033 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec033 class + * \remark The HELD/IP codec identifier is HELD + */ + json_codec_factory_mec033() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec033", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec033(); + }; +}; // End of class json_codec_factory_mec033 diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec046.hh b/ccsrc/Protocols/Json/json_codec_factory_mec046.hh new file mode 100644 index 0000000000000000000000000000000000000000..f18bd53778aa217d5ce7a858d5ae2d173257780d --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec046.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec046.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 // TTF T043 + * \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. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec046.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec046 + * \brief This class provides a factory class to create an json_codec class instance + */ +class json_codec_factory_mec046: public codec_factory { + static json_codec_factory_mec046 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec046 class + * \remark The HELD/IP codec identifier is HELD + */ + json_codec_factory_mec046() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec046", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec046(); + }; +}; // End of class json_codec_factory_mec046 diff --git a/ccsrc/Protocols/Json/json_codec_factory_mec048.hh b/ccsrc/Protocols/Json/json_codec_factory_mec048.hh new file mode 100644 index 0000000000000000000000000000000000000000..3049de15d864fc89ac6bd055043a3da7f5c4387d --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_factory_mec048.hh @@ -0,0 +1,46 @@ +/*! + * \file json_codec_factory_mec048.hh + * \brief Header file for ITS JSON/IP protocol codec factory. + * \author ETSI STF569 / TTF T027 // TTF T043 + * \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. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "json_codec_mec048.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class json_codec_factory_mec048 + * \brief This class provides a factory class to create an json_codec class instance + */ +class json_codec_factory_mec048: public codec_factory { + static json_codec_factory_mec048 _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the json_codec_factory_mec048 class + * \remark The HELD/IP codec identifier is HELD + */ + json_codec_factory_mec048() { + // register factory + codec_stack_builder::register_codec_factory("json_codec_mec048", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec_gen* create_codec() { + return (codec_gen*)new json_codec_mec048(); + }; +}; // End of class json_codec_factory_mec048 diff --git a/ccsrc/Protocols/Json/json_codec_mec011.cc b/ccsrc/Protocols/Json/json_codec_mec011.cc index a885b51974036e289fdb6accd26b3f9947181dea..4ad08f78c9d6576020da41fedfdb19b45095a1f1 100644 --- a/ccsrc/Protocols/Json/json_codec_mec011.cc +++ b/ccsrc/Protocols/Json/json_codec_mec011.cc @@ -52,6 +52,26 @@ int json_codec_mec011::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& ms const EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule& traffic_rule = msg.trafficRule(); traffic_rule.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::TrafficRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_service__api__description)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription& service_api_description = msg.service__api__description(); + service_api_description.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_service__api__description)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescriptionPatch& service_api_description_patch = msg.service__api__description__patch(); + service_api_description_patch.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescriptionPatch_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_capif__event__subscription)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::EventSubscription& capif_event_subscription = msg.capif__event__subscription(); + capif_event_subscription.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::EventSubscription_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_capif__event__subscription__patch)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::EventSubscriptionPatch& capif_event_subscription_patch = msg.capif__event__subscription__patch(); + capif_event_subscription_patch.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::EventSubscriptionPatch_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_capif__event__notification)) { + const EdgePlatformApplicationEnablementAPI__TypesAndValues::EventNotification& capif_event_notification = msg.capif__event__notification(); + capif_event_notification.encode(EdgePlatformApplicationEnablementAPI__TypesAndValues::EventNotification_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else { return json_codec::encode(msg, data); } @@ -120,8 +140,11 @@ int json_codec_mec011::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo service_info.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.serviceInfo() = service_info; } - } else if (it->second.find("\"security\"") != std::string::npos) { // Be careful to the order - // TODO To be refined, find("\"accessPointList\"") is not optimal + } else if (it->second.find("\"serviceAPIDescriptions\"") != std::string::npos) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::DiscoveredAPIs discovered_apis; + discovered_apis.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::DiscoveredAPIs_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.discovered__apis() = discovered_apis; + } else if ((it->second.find("\"id\"") != std::string::npos) && (it->second.find("\"security\"") != std::string::npos)) { std::size_t it_start; while ((it_start = str.find("null")) != std::string::npos) { loggers::get_instance().log("json_codec_mec011::decode: id_start=%d", it_start); @@ -185,6 +208,27 @@ int json_codec_mec011::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo appInfo; appInfo.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::AppInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.appInfo__regapps() = appInfo; + } else if (it->second.find("\"apiName\"") != std::string::npos) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription service_api_description; + service_api_description.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.service__api__description() = service_api_description; + } else if (it->second.find("\"serviceAPICategory\"") != std::string::npos) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescriptionPatch service_api_description_patch; + service_api_description_patch.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::ServiceAPIDescriptionPatch_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.service__api__description__patch() = service_api_description_patch; + } else if (it->second.find("\"notificationDestination\"") != std::string::npos) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::EventSubscription capif_event_subscription; + capif_event_subscription.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::EventSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.capif__event__subscription() = capif_event_subscription; + } else if (it->second.find("\"events\"") != std::string::npos) { // FIXME FSCOM The data structures EventSubscription & EventSubscriptionPatch are simular + // There is a high potentail bug here + EdgePlatformApplicationEnablementAPI__TypesAndValues::EventSubscriptionPatch capif_event_subscription_patch; + capif_event_subscription_patch.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::EventSubscriptionPatch_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.capif__event__subscription__patch() = capif_event_subscription_patch; + } else if (it->second.find("\"subscriptionId\"") != std::string::npos) { + EdgePlatformApplicationEnablementAPI__TypesAndValues::EventNotification capif_event_notification; + capif_event_notification.decode(EdgePlatformApplicationEnablementAPI__TypesAndValues::EventNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.capif__event__notification() = capif_event_notification; } else { return json_codec::decode(p_data, msg, p_params); } diff --git a/ccsrc/Protocols/Json/json_codec_mec012.cc b/ccsrc/Protocols/Json/json_codec_mec012.cc new file mode 100644 index 0000000000000000000000000000000000000000..7ab051b063b5ccce53b6f1b5837ae3cee93952ed --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec012.cc @@ -0,0 +1,109 @@ +#include +#include +#include + +#include "json_codec_factory_mec012.hh" + +#include "loggers.hh" + +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec012::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> json_codec_mec012::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + 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); + data = /*char2oct(CHARSTRING("{\"CellChangeSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec012::encode"); + return 0; +} + +int json_codec_mec012::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> json_codec_mec012::decode: p_data=", p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("json_codec_mec012::decode: Failed to access p_params (null pointer)"); + return -1; // TODO Use p_data instead of return -1 + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("json_codec_mec012::decode: Failed to access p_params item (decode_str)"); + return -1; // TODO Use p_data instead of return -1 + } + loggers::get_instance().log("json_codec_mec012::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); + } + + // Remove data structure name (if present) ... + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) { + 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); + } else { + str = it->second; + } + // ..and create the decoding buffer + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + loggers::get_instance().log("json_codec_mec012::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + + if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions\"") != std::string::npos)) { // SubscriptionLinkList + 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("\"RabEstSubscription\"") != std::string::npos) { + RnisAPI__TypesAndValues::RabEstSubscription rab_est_subscription; + rab_est_subscription.decode(RnisAPI__TypesAndValues::RabEstSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.rabEstSubscription() = rab_est_subscription; + } else if (it->second.find("\"RabModSubscription\"") != std::string::npos) { + RnisAPI__TypesAndValues::RabModSubscription rab_mod_subscription; + rab_mod_subscription.decode(RnisAPI__TypesAndValues::RabModSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.rabModSubscription() = rab_mod_subscription; + } else if (it->second.find("\"RabRelSubscription\"") != std::string::npos) { + 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("\"CellChangeSubscription\"") != std::string::npos) { + RnisAPI__TypesAndValues::CellChangeSubscription cell_change_subscription; + cell_change_subscription.decode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.cellChangeSubscription() = cell_change_subscription; + //TODO Continue with other ChangeSubscription + } else if (it->second.find("\"cellInfo\"") != std::string::npos) { + RnisAPI__TypesAndValues::L2Meas l2_meas; + l2_meas.decode(RnisAPI__TypesAndValues::L2Meas_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.l2Meas() = l2_meas; + } else if ((it->second.find("\"appInstanceId\"") != std::string::npos) && (it->second.find("\"requestId\"") != std::string::npos)) { + RnisAPI__TypesAndValues::RabInfo rab_info; + rab_info.decode(RnisAPI__TypesAndValues::RabInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.rabInfo() = rab_info; + } else if (it->second.find("\"S1BearerInfo\"") != std::string::npos) { + RnisAPI__TypesAndValues::S1BearerInfo s1_nearer_info; + s1_nearer_info.decode(RnisAPI__TypesAndValues::S1BearerInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.s1BearerInfo() = s1_nearer_info; + } else if ((it->second.find("\"appInstanceId\"") != std::string::npos) && (it->second.find("\"plmn\"") != std::string::npos)) { + RnisAPI__TypesAndValues::PlmnInfos plmn_infos; + plmn_infos.decode(RnisAPI__TypesAndValues::PlmnInfos_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.plmnInfos() = plmn_infos; + } else { + return json_codec::decode(p_data, msg, p_params); + } + + loggers::get_instance().log_msg("<<< json_codec_mec012::decode: ", (const Base_Type&)msg); + return 0; +} + +json_codec_factory_mec012 json_codec_factory_mec012::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec012.hh b/ccsrc/Protocols/Json/json_codec_mec012.hh new file mode 100644 index 0000000000000000000000000000000000000000..f6c1ede589a8de0ce370b42da59c3884f9af3c09 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec012.hh @@ -0,0 +1,25 @@ +#pragma once + +#include "codec_gen.hh" +#include "params.hh" + +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec012: public json_codec +{ +public: + explicit json_codec_mec012() : json_codec() { }; + virtual ~json_codec_mec012() { }; + + int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec012 diff --git a/ccsrc/Protocols/Json/json_codec_mec013.cc b/ccsrc/Protocols/Json/json_codec_mec013.cc index edcf6a6b942c9399204772fb199f11d1c2374359..e4156644cbc420071a125c14c38a4976a3d060a5 100644 --- a/ccsrc/Protocols/Json/json_codec_mec013.cc +++ b/ccsrc/Protocols/Json/json_codec_mec013.cc @@ -113,7 +113,7 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo LocationAPI__TypesAndValues::NotificationSubscriptionList notification_subscription_list; notification_subscription_list.decode(LocationAPI__TypesAndValues::NotificationSubscriptionList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.notificationSubscriptionList() = notification_subscription_list; - } else if (it->second.find("\"userLocationEventSubscription\"") != 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); @@ -121,7 +121,7 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo 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("\"userLocationEventNotification\"") != std::string::npos) { + } else if (it->second.find("\"UserLocationEventNotification\"") != 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); @@ -129,7 +129,7 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo LocationAPI__TypesAndValues::UserLocationEventNotification user_location_event_notification; user_location_event_notification.decode(LocationAPI__TypesAndValues::UserLocationEventNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.userLocationEventNotification() = user_location_event_notification; - } else if (it->second.find("\"userLocationPeriodicSubscription\"") != 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); @@ -137,7 +137,7 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo 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("\"userLocationPeriodicNotification\"") != std::string::npos) { + } else if (it->second.find("\"UserLocationPeriodicNotification\"") != 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); @@ -145,7 +145,7 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo LocationAPI__TypesAndValues::UserLocationPeriodicNotification user_location_periodic_notification; user_location_periodic_notification.decode(LocationAPI__TypesAndValues::UserLocationPeriodicNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.userLocationPeriodicNotification() = user_location_periodic_notification; - } else if (it->second.find("\"zoneStatusSubscription\"") != std::string::npos) { + } else if (it->second.find("\"ZoneStatusSubscription\"") != 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); @@ -153,7 +153,7 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo LocationAPI__TypesAndValues::ZoneStatusSubscription zone_status_subscription; zone_status_subscription.decode(LocationAPI__TypesAndValues::ZoneStatusSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.zoneStatusSubscription() = zone_status_subscription; - } else if (it->second.find("\"zoneStatusNotification\"") != std::string::npos) { + } else if (it->second.find("\"ZoneStatusNotification\"") != 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); @@ -161,7 +161,7 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo LocationAPI__TypesAndValues::ZoneStatusNotification zone_status_notification; zone_status_notification.decode(LocationAPI__TypesAndValues::ZoneStatusNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.zoneStatusNotification() = zone_status_notification; - } else if (it->second.find("\"zoneLocationEventSubscription\"") != std::string::npos) { + } 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); @@ -169,7 +169,7 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo 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("\"zoneLocationEventNotification\"") != std::string::npos) { + } else if (it->second.find("\"ZoneLocationEventNotification\"") != 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); @@ -177,7 +177,7 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo LocationAPI__TypesAndValues::ZoneLocationEventNotification zone_location_event_notification; zone_location_event_notification.decode(LocationAPI__TypesAndValues::ZoneLocationEventNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.zoneLocationEventNotification() = zone_location_event_notification; - } else if (it->second.find("\"userAreaSubscription\"") != std::string::npos) { + } else if (it->second.find("\"UserAreaSubscription\"") != 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); @@ -185,7 +185,7 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo LocationAPI__TypesAndValues::UserAreaSubscription user_area_subscription; user_area_subscription.decode(LocationAPI__TypesAndValues::UserAreaSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.userAreaSubscription() = user_area_subscription; - } else if (it->second.find("\"userAreaNotification\"") != std::string::npos) { + } else if (it->second.find("\"UserAreaNotification\"") != 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); @@ -193,7 +193,7 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo LocationAPI__TypesAndValues::UserAreaNotification user_area_notification; user_area_notification.decode(LocationAPI__TypesAndValues::UserAreaNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.userAreaNotification() = user_area_notification; - } else if (it->second.find("\"userDistanceSubscription\"") != std::string::npos) { + } 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); @@ -201,7 +201,7 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo LocationAPI__TypesAndValues::UserDistanceSubscription user_distance_subscription; user_distance_subscription.decode(LocationAPI__TypesAndValues::UserDistanceSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.userDistanceSubscription() = user_distance_subscription; - } else if (it->second.find("\"userDistanceNotification\"") != std::string::npos) { + } else if (it->second.find("\"UserDistanceNotification\"") != 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); @@ -209,6 +209,14 @@ int json_codec_mec013::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo LocationAPI__TypesAndValues::UserDistanceNotification user_distance_notification; user_distance_notification.decode(LocationAPI__TypesAndValues::UserDistanceNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.userDistanceNotification() = user_distance_notification; + } else if (it->second.find("\"TestNotification\"") != 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::TestNotification test_notification; + test_notification.decode(LocationAPI__TypesAndValues::TestNotification_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.testNotification() = test_notification; } else if (it->second.find("\"accessPointId\"") != std::string::npos) { if (it->second.find("\"address\"") != std::string::npos) { LocationAPI__TypesAndValues::UserInfo user_info; diff --git a/ccsrc/Protocols/Json/json_codec_mec015.cc b/ccsrc/Protocols/Json/json_codec_mec015.cc new file mode 100644 index 0000000000000000000000000000000000000000..cd3c997df5048f98c3df79d475a43335a939b553 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec015.cc @@ -0,0 +1,223 @@ +#include +#include +#include + +#include "json_codec_factory_mec015.hh" +#include "loggers.hh" +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec015::encode(const LibHttp__JsonMessageBodyTypes::JsonBody &msg, OCTETSTRING &data) +{ + loggers::get_instance().log_msg(">>> json_codec::encode: ", (const Base_Type &)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + 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); + // Convert raw buffer to string + std::string json_str((const char *)encoding_buffer.get_data(), encoding_buffer.get_len()); + + // Apply single substitution + if (json_str.find("\"Downlink\"") != std::string::npos) + json_str = std::regex_replace(json_str, std::regex("\"Downlink\""), "\"00\""); + else if (json_str.find("\"Uplink\"") != std::string::npos) + json_str = std::regex_replace(json_str, std::regex("\"Uplink\""), "\"01\""); + else if (json_str.find("\"Symmetrical\"") != std::string::npos) + json_str = std::regex_replace(json_str, std::regex("\"Symmetrical\""), "\"10\""); + + // Set output + data = OCTETSTRING(json_str.length(), (const unsigned char *)json_str.c_str()); + } + else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_bwInfoDeltas)) + { + const TrafficManagementAPI__TypesAndValues::BwInfoDeltas &bw_info_deltas = msg.bwInfoDeltas(); + bw_info_deltas.encode(TrafficManagementAPI__TypesAndValues::BwInfoDeltas_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_bwchgeventsubscription)) + { + const TrafficManagementAPI__TypesAndValues::BwChgEventSubscription &bw_chg_event_subscription = msg.bwchgeventsubscription(); + bw_chg_event_subscription.encode(TrafficManagementAPI__TypesAndValues::BwChgEventSubscription_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_mtsSessionInfo)) + { + const TrafficManagementAPI__TypesAndValues::MtsSessionInfo &mts_session_info = msg.mtsSessionInfo(); + mts_session_info.encode(TrafficManagementAPI__TypesAndValues::MtsSessionInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + // Convert raw buffer to string + std::string json_str((const char *)encoding_buffer.get_data(), encoding_buffer.get_len()); + + // Apply single substitution + if (json_str.find("\"Downlink\"") != std::string::npos) + json_str = std::regex_replace(json_str, std::regex("\"Downlink\""), "\"00\""); + else if (json_str.find("\"Uplink\"") != std::string::npos) + json_str = std::regex_replace(json_str, std::regex("\"Uplink\""), "\"01\""); + else if (json_str.find("\"Symmetrical\"") != std::string::npos) + json_str = std::regex_replace(json_str, std::regex("\"Symmetrical\""), "\"10\""); + + // Set output + data = OCTETSTRING(json_str.length(), (const unsigned char *)json_str.c_str()); + } + else + { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec015::encode"); + return 0; +} + +int json_codec_mec015::decode(const OCTETSTRING &p_data, LibHttp__JsonMessageBodyTypes::JsonBody &msg, params *p_params) +{ + loggers::get_instance().log_msg(">>> json_codec::decode: p_data=", p_data); + + params::const_iterator it; + if (p_params == nullptr) + { + loggers::get_instance().warning("json_codec::decode: Failed to access p_params (null pointer)"); + return -1; + } + else + { + it = p_params->find("decode_str"); + if (it == p_params->cend()) + { + loggers::get_instance().warning("json_codec::decode: Failed to access p_params item (decode_str)"); + return -1; + } + } + + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) + { + int idx_begin = it->second.find(":"); + int idx_end = it->second.rfind("}") - 1; + str = it->second.substr(idx_begin + 1, idx_end - idx_begin); + } + else + { + str = it->second; + } + + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char *)str.c_str())); + + if (it->second == "[]") + { + msg.bwInfoList().set_size(0); // Assign bound empty list + return 0; + } + + if ((it->second.find("\"bwInfo\"") != std::string::npos) || (it->second.find("\"fixedBWPriority\"") != std::string::npos) || (it->second.find("\"allocationId\"") != std::string::npos)) + { + while (true) + { + if (str.find("\"00\"") != std::string::npos) + str = regex_replace(str, regex("\"00\""), "\"Downlink\""); + else if (str.find("\"01\"") != std::string::npos) + str = regex_replace(str, regex("\"01\""), "\"Uplink\""); + else if (str.find("\"10\"") != std::string::npos) + str = regex_replace(str, regex("\"10\""), "\"Symmetrical\""); + else + break; + } + + if (it->second[0] == '[') + { + OCTETSTRING json_str_oct((int)str.length(), (const unsigned char *)str.c_str()); + loggers::get_instance().log_msg("Attempting to decode BwInfoList JSON string:", json_str_oct); + + TTCN_Buffer decoding_buffer_(json_str_oct); + TrafficManagementAPI__TypesAndValues::BwInfoList bw_info_list; + bw_info_list.decode(TrafficManagementAPI__TypesAndValues::BwInfoList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + loggers::get_instance().warning("Decoded BwInfoList successfully."); + msg.bwInfoList() = bw_info_list; + } + else + { + TrafficManagementAPI__TypesAndValues::BwInfo bw_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char *)str.c_str())); + bw_info.decode(TrafficManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.bwInfo() = bw_info; + } + } + else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions\"") != std::string::npos)) + { + TrafficManagementAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; + subscription_link_list.decode(TrafficManagementAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.subscriptionLinkList__bw() = subscription_link_list; + } + else if ((it->second.find("\"BwChgEventSubscription\"") != std::string::npos)) + { + TrafficManagementAPI__TypesAndValues::BwChgEventSubscription bw_chg_event_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char *)str.c_str())); + bw_chg_event_subscription.decode(TrafficManagementAPI__TypesAndValues::BwChgEventSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.bwchgeventsubscription() = bw_chg_event_subscription; + } + else if ((it->second.find("\"notificationType\"") != std::string::npos)) + { + TrafficManagementAPI__TypesAndValues::BwChgEventNotification bw_chg_event_notification; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char *)str.c_str())); + bw_chg_event_notification.decode(TrafficManagementAPI__TypesAndValues::BwChgEventNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.bwChgEventNotification() = bw_chg_event_notification; + } + else if ((it->second.find("\"mtsCapabilityInfo\"") != std::string::npos) || (it->second.find("\"mtsAccessInfo\"") != std::string::npos) || (it->second.find("\"allocationId\"") != std::string::npos)) + { + TrafficManagementAPI__TypesAndValues::MtsCapabilityInfo mts_cap_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char *)str.c_str())); + mts_cap_info.decode(TrafficManagementAPI__TypesAndValues::MtsCapabilityInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.mtsCapabilityInfo() = mts_cap_info; + } + else if ((it->second.find("\"mtsSessionInfo\"") != std::string::npos) || (it->second.find("\"sessionId\"") != std::string::npos)) + { + while (true) + { + if (str.find("\"00\"") != std::string::npos) + str = regex_replace(str, regex("\"00\""), "\"Downlink\""); + else if (str.find("\"01\"") != std::string::npos) + str = regex_replace(str, regex("\"01\""), "\"Uplink\""); + else if (str.find("\"10\"") != std::string::npos) + str = regex_replace(str, regex("\"10\""), "\"Symmetrical\""); + else + break; + } + if (it->second[0] == '[') + { + OCTETSTRING json_str_oct((int)str.length(), (const unsigned char *)str.c_str()); + loggers::get_instance().log_msg("Attempting to decode mtsSessionInfoList JSON string:", json_str_oct); + + TTCN_Buffer decoding_buffer_(json_str_oct); + TrafficManagementAPI__TypesAndValues::MtsSessionInfos mts_session_infos; + mts_session_infos.decode(TrafficManagementAPI__TypesAndValues::MtsSessionInfos_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + loggers::get_instance().warning("Decoded mtsSessionInfoList successfully"); + msg.mtsSessionInfos() = mts_session_infos; + } + else + { + TrafficManagementAPI__TypesAndValues::MtsSessionInfo mts_session_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char *)str.c_str())); + mts_session_info.decode(TrafficManagementAPI__TypesAndValues::MtsSessionInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.mtsSessionInfo() = mts_session_info; + } + } + else if (it->second.find("\"detail\"") != std::string::npos) + { + LibMec__TypesAndValues::ProblemDetails problem_details; + problem_details.decode(LibMec__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.problemDetails() = problem_details; + } + else + { + return json_codec::decode(p_data, msg, p_params); + } + + loggers::get_instance().log_msg("<<< json_codec::decode: ", (const Base_Type &)msg); + return 0; +} + +json_codec_factory_mec015 json_codec_factory_mec015::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec015.hh b/ccsrc/Protocols/Json/json_codec_mec015.hh new file mode 100644 index 0000000000000000000000000000000000000000..a235de49dd1ffc9aaddf0a2bf916587f52c78ff5 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec015.hh @@ -0,0 +1,24 @@ +#pragma once + +#include "codec_gen.hh" +#include "params.hh" +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec015: public json_codec +{ +public: + explicit json_codec_mec015() : json_codec() { }; + virtual ~json_codec_mec015() { }; + + int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec015 diff --git a/ccsrc/Protocols/Json/json_codec_mec016.cc b/ccsrc/Protocols/Json/json_codec_mec016.cc new file mode 100644 index 0000000000000000000000000000000000000000..eccd133d2ecbf103d29ba0607e7708d8816830dc --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec016.cc @@ -0,0 +1,93 @@ +#include +#include +#include + +#include "json_codec_factory_mec016.hh" + +#include "loggers.hh" +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec016::encode(const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) { + loggers::get_instance().log_msg(">>> json_codec_mec016::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + // Application Context + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_appContext__device__info)) { + const DeviceApplicationInterfaceAPI__TypesAndValues::AppContext& ctx = msg.appContext__device__info(); + ctx.encode(DeviceApplicationInterfaceAPI__TypesAndValues::AppContext_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + //data = char2oct(CHARSTRING("{\"appContext\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_applicationLocationAvailability)) { + const DeviceApplicationInterfaceAPI__TypesAndValues::ApplicationLocationAvailability& ctx = msg.applicationLocationAvailability(); + ctx.encode(DeviceApplicationInterfaceAPI__TypesAndValues::ApplicationLocationAvailability_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()); + } + // // Fallback to generic codec + else { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec016::encode"); + return 0; +} + +int json_codec_mec016::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) { + + loggers::get_instance().log_msg(">>> json_codec_mec016::decode: p_data=", p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("json_codec_mec016::decode: Failed to access p_params (null pointer)"); + return -1; // TODO Use p_data instead of return -1 + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("json_codec_mec016::decode: Failed to access p_params item (decode_str)"); + return -1; // TODO Use p_data instead of return -1 + } + loggers::get_instance().log("json_codec_mec016::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); + } + + // Remove data structure name (if present) ... + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) { + 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); + } else { + str = it->second; + } + + + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + loggers::get_instance().log("json_codec_mec016::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.size(), (const unsigned char*)str.c_str())); + + // Determine body type by finding JSON field name + if ((str.find("\"userAppInstanceInfo\"") != std::string::npos) && (str.find("\"appInfo\"") != std::string::npos)) { + DeviceApplicationInterfaceAPI__TypesAndValues::AppContext ctx; + ctx.decode(DeviceApplicationInterfaceAPI__TypesAndValues::AppContext_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.appContext__device__info() = ctx; + } else if ((str.find("\"appList\"") != std::string::npos) && (str.find("\"appInfo\"") != std::string::npos)) { + DeviceApplicationInterfaceAPI__TypesAndValues::ApplicationList ctx; + ctx.decode(DeviceApplicationInterfaceAPI__TypesAndValues::ApplicationList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.applicationList() = ctx; + } else if ((it->second.find("\"appInfo\"") != std::string::npos) && (str.find("\"availableLocations\"") != std::string::npos)) { + DeviceApplicationInterfaceAPI__TypesAndValues::ApplicationLocationAvailability application_location_availability; + application_location_availability.decode(DeviceApplicationInterfaceAPI__TypesAndValues::ApplicationLocationAvailability_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.applicationLocationAvailability() = application_location_availability; + } else { + return json_codec::decode(p_data, msg, p_params); + } + + loggers::get_instance().log_msg("<<< json_codec_mec016::decode: ", (const Base_Type&)msg); + return 0; +} + +// Register codec factory +json_codec_factory_mec016 json_codec_factory_mec016::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec016.hh b/ccsrc/Protocols/Json/json_codec_mec016.hh new file mode 100644 index 0000000000000000000000000000000000000000..f8e194da2783431d7f33ed5300ca595434db3deb --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec016.hh @@ -0,0 +1,24 @@ +#pragma once + +#include "codec_gen.hh" +#include "params.hh" +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec016: public json_codec +{ +public: + explicit json_codec_mec016() : json_codec() { }; + virtual ~json_codec_mec016() { }; + + int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec013 diff --git a/ccsrc/Protocols/Json/json_codec_mec021.cc b/ccsrc/Protocols/Json/json_codec_mec021.cc new file mode 100644 index 0000000000000000000000000000000000000000..c143714bb3d46f52a2b80a51c6b9202a63faac40 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec021.cc @@ -0,0 +1,103 @@ +#include +#include +#include + +#include "json_codec_factory_mec021.hh" + +#include "loggers.hh" + +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec021::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> json_codec_mec021::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_registrationInfo)) { + const ApplicationMobilityServiceAPI__TypesAndValues::RegistrationInfo& registration_info = msg.registrationInfo(); + registration_info.encode(ApplicationMobilityServiceAPI__TypesAndValues::RegistrationInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_mobilityProcedureSubscription)) { + const ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureSubscription& mobility_procedure_subscription = msg.mobilityProcedureSubscription(); + mobility_procedure_subscription.encode(ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec021::encode"); + return 0; +} + +int json_codec_mec021::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> json_codec_mec021::decode: p_data=", p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("json_codec_mec021::decode: Failed to access p_params (null pointer)"); + return -1; // TODO Use p_data instead of return -1 + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("json_codec_mec021::decode: Failed to access p_params item (decode_str)"); + return -1; // TODO Use p_data instead of return -1 + } + loggers::get_instance().log("json_codec_mec021::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); + } + + // Remove data structure name (if present) ... + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) { + 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); + } else { + str = it->second; + } + // ..and create the decoding buffer + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + loggers::get_instance().log("json_codec_mec021::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + + if (it->second.find("\"appMobilityServiceId\"") != std::string::npos) { + if (it->second[0] == '[') { + ApplicationMobilityServiceAPI__TypesAndValues::RegistrationInfos registration_infos; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + registration_infos.decode(ApplicationMobilityServiceAPI__TypesAndValues::RegistrationInfos_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.registrationInfos() = registration_infos; + } else { + ApplicationMobilityServiceAPI__TypesAndValues::RegistrationInfo registration_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + registration_info.decode(ApplicationMobilityServiceAPI__TypesAndValues::RegistrationInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.registrationInfo() = registration_info; + } + } else if ((it->second.find("\"subscription\"") != std::string::npos) && (it->second.find("\"_links\"") != std::string::npos)) { // SubscriptionLinkList + ApplicationMobilityServiceAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + subscription_link_list.decode(ApplicationMobilityServiceAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.subscriptionLinkList__ams() = subscription_link_list; + } else if (it->second.find("\"MobilityProcedureSubscription\"") != std::string::npos) { + ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureSubscription mobility_procedure_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + mobility_procedure_subscription.decode(ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.mobilityProcedureSubscription() = mobility_procedure_subscription; + } else if (it->second.find("\"MobilityProcedureNotification\"") != std::string::npos) { + ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureNotification mobility_procedure_notification; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + mobility_procedure_notification.decode(ApplicationMobilityServiceAPI__TypesAndValues::MobilityProcedureNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.mobilityProcedureNotification() = mobility_procedure_notification; + } else { + return json_codec::decode(p_data, msg, p_params); + } + + loggers::get_instance().log_msg("<<< json_codec_mec021::decode: ", (const Base_Type&)msg); + return 0; +} + +json_codec_factory_mec021 json_codec_factory_mec021::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec021.hh b/ccsrc/Protocols/Json/json_codec_mec021.hh new file mode 100644 index 0000000000000000000000000000000000000000..033a59b9adf14e80746ace38f0550d14a90137fa --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec021.hh @@ -0,0 +1,25 @@ +#pragma once + +#include "codec_gen.hh" +#include "params.hh" + +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec021: public json_codec +{ +public: + explicit json_codec_mec021() : json_codec() { }; + virtual ~json_codec_mec021() { }; + + int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec021 diff --git a/ccsrc/Protocols/Json/json_codec_mec029.cc b/ccsrc/Protocols/Json/json_codec_mec029.cc new file mode 100644 index 0000000000000000000000000000000000000000..2e8596eae1e3e21812b07227fce85757b69eb99a --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec029.cc @@ -0,0 +1,82 @@ +#include +#include +#include + +#include "json_codec_factory_mec029.hh" + +#include "loggers.hh" + +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec029::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> json_codec_mec029::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_registrationInfo)) { + const FixedAccessInformationServiceAPI__TypesAndValues::OnuAlarmSubscription& onu_alarm_subscription = msg.onuAlarmSubscription(); + onu_alarm_subscription.encode(FixedAccessInformationServiceAPI__TypesAndValues::OnuAlarmSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec029::encode"); + return 0; +} + +int json_codec_mec029::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> json_codec_mec029::decode: p_data=", p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("json_codec_mec029::decode: Failed to access p_params (null pointer)"); + return -1; // TODO Use p_data instead of return -1 + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("json_codec_mec029::decode: Failed to access p_params item (decode_str)"); + return -1; // TODO Use p_data instead of return -1 + } + loggers::get_instance().log("json_codec_mec029::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); + } + + // Remove data structure name (if present) ... + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) { + 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); + } else { + str = it->second; + } + // ..and create the decoding buffer + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + loggers::get_instance().log("json_codec_mec029::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + + if (it->second.find("\"lastMileTech\"") != std::string::npos) { + FixedAccessInformationServiceAPI__TypesAndValues::FaInfo fa_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + fa_info.decode(FixedAccessInformationServiceAPI__TypesAndValues::FaInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.faInfo() = fa_info; + } else if (it->second.find("\"OnuAlarmSubscription\"") != std::string::npos) { + FixedAccessInformationServiceAPI__TypesAndValues::OnuAlarmSubscription onu_alarm_subscription; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + onu_alarm_subscription.decode(FixedAccessInformationServiceAPI__TypesAndValues::OnuAlarmSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.onuAlarmSubscription() = onu_alarm_subscription; + } else { + return json_codec::decode(p_data, msg, p_params); + } + + loggers::get_instance().log_msg("<<< json_codec_mec029::decode: ", (const Base_Type&)msg); + return 0; +} + +json_codec_factory_mec029 json_codec_factory_mec029::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec029.hh b/ccsrc/Protocols/Json/json_codec_mec029.hh new file mode 100644 index 0000000000000000000000000000000000000000..534542e70c85c96cd0b8d80a66a19bfad0ba5b2f --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec029.hh @@ -0,0 +1,25 @@ +#pragma once + +#include "codec_gen.hh" +#include "params.hh" + +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec029: public json_codec +{ +public: + explicit json_codec_mec029() : json_codec() { }; + virtual ~json_codec_mec029() { }; + + int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec029 diff --git a/ccsrc/Protocols/Json/json_codec_mec030.cc b/ccsrc/Protocols/Json/json_codec_mec030.cc index 49e7cbbce889f3df18767ed3eeb72daf55d74f32..f84d794c5a9e326df89dd275536baec55b9196e5 100644 --- a/ccsrc/Protocols/Json/json_codec_mec030.cc +++ b/ccsrc/Protocols/Json/json_codec_mec030.cc @@ -24,6 +24,10 @@ int json_codec_mec030::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& ms 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_v2xMsgPublication)) { + const V2XInformationServiceAPI__TypesAndValues::V2xMsgPublication& v2x_msg_publication = msg.v2xMsgPublication(); + v2x_msg_publication.encode(V2XInformationServiceAPI__TypesAndValues::V2xMsgPublication_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); @@ -101,6 +105,11 @@ int json_codec_mec030::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); predicted_qos.decode(V2XInformationServiceAPI__TypesAndValues::PredictedQos_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.predictedQos() = predicted_qos; + } else if ((it->second.find("\"subscriptions\"") != std::string::npos) && (it->second.find("\"_links\"") != std::string::npos)) { + V2XInformationServiceAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + subscription_link_list.decode(V2XInformationServiceAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.subscriptionLinkList__v2x() = subscription_link_list; } else if (it->second.find("\"ProvChgUuUniSubscription\"") != std::string::npos) { V2XInformationServiceAPI__TypesAndValues::ProvChgUuUniSubscription prov_chg_uu_uni_subscription; TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); diff --git a/ccsrc/Protocols/Json/json_codec_mec033.cc b/ccsrc/Protocols/Json/json_codec_mec033.cc new file mode 100644 index 0000000000000000000000000000000000000000..740d3bf9b4ad9622bdd4e0d6ebd23597f4320e23 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec033.cc @@ -0,0 +1,91 @@ +#include +#include +#include + +#include "json_codec_factory_mec033.hh" + +#include "loggers.hh" + +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec033::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> json_codec_mec033::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_iotPlatformInfo)) { + const IoTAPI__TypesAndValues::IotPlatformInfo& iot_platform_info = msg.iotPlatformInfo(); + iot_platform_info.encode(IoTAPI__TypesAndValues::IotPlatformInfo_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_deviceInfo__iot)) { + const IoTAPI__TypesAndValues::DeviceInfo& device_info = msg.deviceInfo__iot(); + device_info.encode(IoTAPI__TypesAndValues::DeviceInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec033::encode"); + return 0; +} + +int json_codec_mec033::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> json_codec_mec033::decode: p_data=", p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("json_codec_mec033::decode: Failed to access p_params (null pointer)"); + return -1; // TODO Use p_data instead of return -1 + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("json_codec_mec033::decode: Failed to access p_params item (decode_str)"); + return -1; // TODO Use p_data instead of return -1 + } + loggers::get_instance().log("json_codec_mec033::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); + } + + // Remove data structure name (if present) ... + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) { + 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); + } else { + str = it->second; + } + // ..and create the decoding buffer + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + loggers::get_instance().log("json_codec_mec033::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + + if (it->second.find("\"iotPlatformId\"") != std::string::npos) { + IoTAPI__TypesAndValues::IotPlatformInfo iot_platform_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + iot_platform_info.decode(IoTAPI__TypesAndValues::IotPlatformInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.iotPlatformInfo() = iot_platform_info; + } else if ((it->second[0] == '[') && (it->second.find("\"deviceId\"") != std::string::npos)) { + IoTAPI__TypesAndValues::DeviceInfoList device_info_list; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + device_info_list.decode(IoTAPI__TypesAndValues::DeviceInfoList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.deviceInfoList__iot() = device_info_list; + } else if (it->second.find("\"deviceId\"") != std::string::npos) { + IoTAPI__TypesAndValues::DeviceInfo device_info; + TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + device_info.decode(IoTAPI__TypesAndValues::DeviceInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); + msg.deviceInfo__iot() = device_info; + } else { + return json_codec::decode(p_data, msg, p_params); + } + + loggers::get_instance().log_msg("<<< json_codec_mec033::decode: ", (const Base_Type&)msg); + return 0; +} + +json_codec_factory_mec033 json_codec_factory_mec033::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec033.hh b/ccsrc/Protocols/Json/json_codec_mec033.hh new file mode 100644 index 0000000000000000000000000000000000000000..f7ee71d1a4ee307994e5a696e61d4edee230f4a9 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec033.hh @@ -0,0 +1,25 @@ +#pragma once + +#include "codec_gen.hh" +#include "params.hh" + +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec033: public json_codec +{ +public: + explicit json_codec_mec033() : json_codec() { }; + virtual ~json_codec_mec033() { }; + + int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec033 diff --git a/ccsrc/Protocols/Json/json_codec_mec040.cc b/ccsrc/Protocols/Json/json_codec_mec040.cc index 78ec67e15498b806bb786e2be712576dfc7e4451..a55813f0b685bc022fa2e9e4b90d8227809ab7ad 100644 --- a/ccsrc/Protocols/Json/json_codec_mec040.cc +++ b/ccsrc/Protocols/Json/json_codec_mec040.cc @@ -20,6 +20,10 @@ int json_codec_mec040::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& ms const FederationEnablementAPI__TypesAndValues::SystemInfo& system_info = msg.systemInfo(); system_info.encode(FederationEnablementAPI__TypesAndValues::SystemInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = /*char2oct(CHARSTRING("{\"SystemInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_systemInfoUpdate)) { + const FederationEnablementAPI__TypesAndValues::SystemInfoUpdate& system_info_update = msg.systemInfoUpdate(); + system_info_update.encode(FederationEnablementAPI__TypesAndValues::SystemInfoUpdate_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"SystemInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else { return json_codec::encode(msg, data); } @@ -61,7 +65,7 @@ int json_codec_mec040::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo loggers::get_instance().log("json_codec_mec040::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); - if (it->second.find("\"systemId\"") != std::string::npos) { // Be careful to the order + if ((it->second.find("\"systemId\"") != std::string::npos) && (it->second.find("\"endPoint\"") == std::string::npos)) { // Be careful to the order if (it->second[0] == '[') { FederationEnablementAPI__TypesAndValues::SystemInfoList system_info_list; system_info_list.decode(FederationEnablementAPI__TypesAndValues::SystemInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); @@ -71,6 +75,10 @@ int json_codec_mec040::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo system_info.decode(FederationEnablementAPI__TypesAndValues::SystemInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.systemInfo() = system_info; } + } else if (it->second.find("\"endPoint\"") != std::string::npos) { + FederationEnablementAPI__TypesAndValues::SystemInfoUpdate system_info_update; + system_info_update.decode(FederationEnablementAPI__TypesAndValues::SystemInfoUpdate_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.systemInfoUpdate() = system_info_update; } else { return json_codec::decode(p_data, msg, p_params); } diff --git a/ccsrc/Protocols/Json/json_codec_mec046.cc b/ccsrc/Protocols/Json/json_codec_mec046.cc new file mode 100644 index 0000000000000000000000000000000000000000..d397cedc8f7209dcffceda22a763bd50ef7e4430 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec046.cc @@ -0,0 +1,113 @@ +#include +#include +#include + +#include "json_codec_factory_mec046.hh" + +#include "loggers.hh" + +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec046::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> json_codec_mec046::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_sensor__discovery__info)) { + const SensorsSharingService__TypesAndValues::SensorDiscoveryInfo& sensor_discovery_info = msg.sensor__discovery__info(); + sensor_discovery_info.encode(SensorsSharingService__TypesAndValues::SensorDiscoveryInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"sensorIdentifier\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_sensor__discovery__event__subscription)) { + const SensorsSharingService__TypesAndValues::SensorDiscoveryEventSubscription& sensor_discovery_event_subscription = msg.sensor__discovery__event__subscription(); + sensor_discovery_event_subscription.encode(SensorsSharingService__TypesAndValues::SensorDiscoveryEventSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"sensorIdentifier\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_sensor__status__subscription)) { + const SensorsSharingService__TypesAndValues::SensorStatusSubscription& sensor_status_subscription = msg.sensor__status__subscription(); + sensor_status_subscription.encode(SensorsSharingService__TypesAndValues::SensorStatusSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"sensorIdentifier\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_sensor__data__subscription)) { + const SensorsSharingService__TypesAndValues::SensorDataSubscription& sensor_data_subscription = msg.sensor__data__subscription(); + sensor_data_subscription.encode(SensorsSharingService__TypesAndValues::SensorDataSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = /*char2oct(CHARSTRING("{\"sensorIdentifier\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; + } else { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec046::encode"); + return 0; +} + +int json_codec_mec046::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> json_codec_mec046::decode: p_data=", p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("json_codec_mec046::decode: Failed to access p_params (null pointer)"); + return -1; // TODO Use p_data instead of return -1 + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("json_codec_mec046::decode: Failed to access p_params item (decode_str)"); + return -1; // TODO Use p_data instead of return -1 + } + loggers::get_instance().log("json_codec_mec046::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); + } + + // Remove data structure name (if present) ... + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) { + 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); + } else { + str = it->second; + } + // ..and create the decoding buffer + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + loggers::get_instance().log("json_codec_mec046::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); + TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); + + if (it->second.find("\"sensorIdentifier\"") != std::string::npos) { // Be careful to the order + if (it->second[0] == '[') { + SensorsSharingService__TypesAndValues::SensorDiscoveryInfos sensor_discovery_infos; + sensor_discovery_infos.decode(SensorsSharingService__TypesAndValues::SensorDiscoveryInfos_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.sensor__discovery__infos() = sensor_discovery_infos; + } else { + SensorsSharingService__TypesAndValues::SensorDiscoveryInfo sensor_discovery_info; + sensor_discovery_info.decode(SensorsSharingService__TypesAndValues::SensorDiscoveryInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.sensor__discovery__info() = sensor_discovery_info; + } + } else if ( + (it->second.find("\"_links\"") != std::string::npos) && + ((it->second.find("\"subscriptions\"") != std::string::npos) || (it->second.find("\"subscriptionType\"") == std::string::npos)) + ) { + SensorsSharingService__TypesAndValues::SubscriptionLinkList subscription_link_list; + subscription_link_list.decode(SensorsSharingService__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.subscription__link__list__sss() = subscription_link_list; + } else if ((it->second.find("\"subscriptionType\"") != std::string::npos) && (it->second.find("\"SensorDiscoveryEventSubscription\"") != std::string::npos)) { + SensorsSharingService__TypesAndValues::SensorDiscoveryEventSubscription sensor_discovery_event_subscription; + sensor_discovery_event_subscription.decode(SensorsSharingService__TypesAndValues::SensorDiscoveryEventSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.sensor__discovery__event__subscription() = sensor_discovery_event_subscription; + } else if ((it->second.find("\"subscriptionType\"") != std::string::npos) && (it->second.find("\"SensorStatusSubscription\"") != std::string::npos)) { + SensorsSharingService__TypesAndValues::SensorStatusSubscription sensor_status_subscription; + sensor_status_subscription.decode(SensorsSharingService__TypesAndValues::SensorStatusSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.sensor__status__subscription() = sensor_status_subscription; + } else if ((it->second.find("\"subscriptionType\"") != std::string::npos) && (it->second.find("\"SensorDataSubscription\"") != std::string::npos)) { + SensorsSharingService__TypesAndValues::SensorDataSubscription sensor_data_subscription; + sensor_data_subscription.decode(SensorsSharingService__TypesAndValues::SensorDataSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.sensor__data__subscription() = sensor_data_subscription; + } else { + return json_codec::decode(p_data, msg, p_params); + } + + loggers::get_instance().log_msg("<<< json_codec_mec046::decode: ", (const Base_Type&)msg); + return 0; +} + +json_codec_factory_mec046 json_codec_factory_mec046::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec046.hh b/ccsrc/Protocols/Json/json_codec_mec046.hh new file mode 100644 index 0000000000000000000000000000000000000000..4b9854c158c7ab5bb1ac79ff682c4e701aada80d --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec046.hh @@ -0,0 +1,25 @@ +#pragma once + +#include "codec_gen.hh" +#include "params.hh" + +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec046: public json_codec +{ +public: + explicit json_codec_mec046() : json_codec() { }; + virtual ~json_codec_mec046() { }; + + int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec046 diff --git a/ccsrc/Protocols/Json/json_codec_mec048.cc b/ccsrc/Protocols/Json/json_codec_mec048.cc new file mode 100644 index 0000000000000000000000000000000000000000..7afba5df40b7de7001f0e956a88c08f579f5ed54 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec048.cc @@ -0,0 +1,135 @@ +#include +#include +#include + +#include "json_codec_factory_mec048.hh" + +#include "loggers.hh" + +#include "LibHttp_JsonMessageBodyTypes.hh" + +int json_codec_mec048::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> json_codec_mec048::encode: ", (const Base_Type&)msg); + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_tenantInfo)) { + const SelfServiceEnablementAPI__TypesAndValues::TenantInfo& tenant_info = msg.tenantInfo(); + tenant_info.encode(SelfServiceEnablementAPI__TypesAndValues::TenantInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"tenantInfo\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_resourceUsageSubscription)) { + const SelfServiceEnablementAPI__TypesAndValues::ResourceUsageSubscription& resource_usage_subscription = msg.resourceUsageSubscription(); + resource_usage_subscription.encode(SelfServiceEnablementAPI__TypesAndValues::ResourceUsageSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"resourceUsageSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_siteResourceUsageSubscription)) { + const SelfServiceEnablementAPI__TypesAndValues::SiteResourceUsageSubscription& site_resource_usage_subscription = msg.siteResourceUsageSubscription(); + site_resource_usage_subscription.encode(SelfServiceEnablementAPI__TypesAndValues::SiteResourceUsageSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"siteResourceUsageSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_resourceQuotaInfo)) { + const SelfServiceEnablementAPI__TypesAndValues::ResourceQuotaInfo& resource_quota_info = msg.resourceQuotaInfo(); + resource_quota_info.encode(SelfServiceEnablementAPI__TypesAndValues::ResourceQuotaInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"resourceQuotaInfo\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else { + return json_codec::encode(msg, data); + } + + loggers::get_instance().log("<<< json_codec_mec048::encode"); + return 0; +} + +int json_codec_mec048::decode(const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> json_codec_mec048::decode: p_data=", p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("json_codec_mec048::decode: Failed to access p_params (null pointer)"); + return -1; // TODO Use p_data instead of return -1 + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("json_codec_mec048::decode: Failed to access p_params item (decode_str)"); + return -1; // TODO Use p_data instead of return -1 + } + loggers::get_instance().log("json_codec_mec048::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); + } + + // Remove data structure name (if present) ... + std::string str; + if ((it->second[0] != '[') && (it->second[0] != '{')) { + 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); + } else { + str = it->second; + } + + // Handle tenantInfo wrapper + std::string decoded_str; + if (str.find("\"tenantInfo\"") != std::string::npos) { + // Extract the inner JSON object + size_t start = str.find_first_of('{', str.find("\"tenantInfo\"") + 11); // Skip past "tenantInfo": + size_t end = str.rfind('}'); // Find the last closing brace + if (start != std::string::npos && end != std::string::npos && end > start) { + decoded_str = str.substr(start, end - start + 1); + } else { + loggers::get_instance().warning("json_codec_mec048::decode: Invalid tenantInfo JSON structure: %s", str.c_str()); + return -1; + } + } else if (str.find("\"resourceUsageSubscription\"") != std::string::npos) { + // Extract the inner JSON object for resourceUsageSubscription + size_t start = str.find_first_of('{', str.find("\"resourceUsageSubscription\"") + 25); // Skip past "resourceUsageSubscription": + size_t end = str.rfind('}'); // Find the last closing brace + if (start != std::string::npos && end != std::string::npos && end > start) { + decoded_str = str.substr(start, end - start + 1); + } else { + loggers::get_instance().warning("json_codec_mec048::decode: Invalid resourceUsageSubscription JSON structure: %s", str.c_str()); + return -1; + } + } else { + decoded_str = str; // Use original string if no tenantInfo wrapper + } + + // Create decoding buffer with the adjusted JSON + TTCN_Buffer decoding_buffer(OCTETSTRING(decoded_str.length(), (const unsigned char*)decoded_str.c_str())); + + if ((it->second.find("\"subscriptionType\"") != std::string::npos) && (it->second.find("\"ResourceUsageSubscription\"") != std::string::npos)) { + SelfServiceEnablementAPI__TypesAndValues::ResourceUsageSubscription resource_usage_subscription; + resource_usage_subscription.decode(SelfServiceEnablementAPI__TypesAndValues::ResourceUsageSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.resourceUsageSubscription() = resource_usage_subscription; + } else if ((it->second.find("\"subscriptionType\"") != std::string::npos) && (it->second.find("\"SiteResourceUsageSubscription\"") != std::string::npos)) { + SelfServiceEnablementAPI__TypesAndValues::SiteResourceUsageSubscription site_resource_usage_subscription; + site_resource_usage_subscription.decode(SelfServiceEnablementAPI__TypesAndValues::SiteResourceUsageSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.siteResourceUsageSubscription() = site_resource_usage_subscription; + } else if ( + (it->second.find("\"_links\"") != std::string::npos) && + ((it->second.find("\"subscriptions\"") != std::string::npos) || (it->second.find("\"subscriptionType\"") == std::string::npos)) + ) { + SelfServiceEnablementAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; + subscription_link_list.decode(SelfServiceEnablementAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.subscriptionLinkList__cse() = subscription_link_list; + } else if (it->second.find("\"tenantId\"") != std::string::npos) { // Be careful to the order + if (it->second[0] == '[') { + SelfServiceEnablementAPI__TypesAndValues::TenantInfoList tenant_info_list; + tenant_info_list.decode(SelfServiceEnablementAPI__TypesAndValues::TenantInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.tenantInfoList() = tenant_info_list; + } else{ + SelfServiceEnablementAPI__TypesAndValues::TenantInfo tenant_info; + tenant_info.decode(SelfServiceEnablementAPI__TypesAndValues::TenantInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.tenantInfo() = tenant_info; + } + } else { + loggers::get_instance().warning("json_codec_mec048::decode: No matching structure found, assigning raw"); + // Assign raw alternative of union with full original string + msg.raw() = CHARSTRING(str.c_str()); + loggers::get_instance().log("json_codec_mec048::decode: Assigned raw='%s'", str.c_str()); + } + + loggers::get_instance().log_msg("<<< json_codec_mec048::decode: ", (const Base_Type&)msg); + return 0; +} + +json_codec_factory_mec048 json_codec_factory_mec048::_f; diff --git a/ccsrc/Protocols/Json/json_codec_mec048.hh b/ccsrc/Protocols/Json/json_codec_mec048.hh new file mode 100644 index 0000000000000000000000000000000000000000..b15860ec89c6eb3504c156491f3d6f3e7c5d9b84 --- /dev/null +++ b/ccsrc/Protocols/Json/json_codec_mec048.hh @@ -0,0 +1,25 @@ +#pragma once + +#include "codec_gen.hh" +#include "params.hh" + +#include "json_codec.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibHttp__JsonMessageBodyTypes { + class JsonBody; +} + +class json_codec_mec048: public json_codec +{ +public: + explicit json_codec_mec048() : json_codec() { }; + virtual ~json_codec_mec048() { }; + + int encode (const LibHttp__JsonMessageBodyTypes::JsonBody&, OCTETSTRING& data); + int decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBodyTypes::JsonBody&, params* p_params = NULL); + +}; // End of class json_codec_mec048 diff --git a/ccsrc/Protocols/Json/module.mk b/ccsrc/Protocols/Json/module.mk index 593ce97104801b3075622e463b180815dbfe1c11..9f3c3ae895d1984caa6a312a738d4c7e135be4cf 100644 --- a/ccsrc/Protocols/Json/module.mk +++ b/ccsrc/Protocols/Json/module.mk @@ -1,8 +1,12 @@ sources := \ json_codec.cc \ json_codec_mec011.cc \ + json_codec_mec012.cc \ json_codec_mec013.cc \ + json_codec_mec015.cc \ + json_codec_mec016.cc \ json_codec_mec030.cc \ + json_codec_mec021.cc \ json_codec_mec028.cc \ json_codec_mec040.cc \ diff --git a/etc/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyService_Sandbox.cfg_ b/etc/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyService_Sandbox.cfg_ new file mode 100644 index 0000000000000000000000000000000000000000..6a37330f6e53bd76eff773635fb71fa0553465fe --- /dev/null +++ b/etc/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyService_Sandbox.cfg_ @@ -0,0 +1,151 @@ +[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 := "yanngarcia.ddns.net" + +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 + +# LibMec/ApplicationMobilityServiceAPI +# Application Instance ID. Get them from the MEC Sandbox GUI. +ApplicationMobilityServiceAPI_Pixits.PX_APP_INS_ID := "6534adc3-9732-4c4a-8d6f-18b105a3890c" +ApplicationMobilityServiceAPI_Pixits.PX_APP_INS_ID_2 := "d3ba5131-deb9-43e1-99ab-02c16d7e8c0b" +ApplicationMobilityServiceAPI_Pixits.PX_MEP_ID := "MEP1" +# Callbacks +ApplicationMobilityServiceAPI_Pixits.PX_CALLBACK_REFERENCE := "https://yanngarcia.ddns.net:36001/ams/v1" +ApplicationMobilityServiceAPI_Pixits.PX_CALLBACK_URI := "http://yanngarcia.ddns.net:36001/ams/v1" + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec_ApplicationMobiltyService/%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_mec021)/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_mec021)/TCP(debug=1,server_mode=1,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_ApplicationMobiltyServiceAPI_TestControl.control + +# Check that the AMS service returns information about the registered application mobility services when requested +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_01 +# Check that the AMS service returns information about the a specific registered application mobility service when requested - filter +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_02 +# Check that the AMS service returns information about the a specific registered application mobility service when requested - filter +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_03 +# Check that the AMS service returns information about the a specific registered application mobility service when requested - exclude_fields +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_04 +# Check that the AMS service returns information about the registered application mobility services when requested - No registered application mobility service +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_OK_05 +# Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_001_BR +# Check that the AMS service creates a new application mobility services when requested +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_002_OK +# Check that the AMS service sends an error when it receives a malformed request to create a new application mobility service +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_002_BR +# Check that the AMS service returns information about the available subscriptions when requested +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_003_OK +# Check that the AMS service sends an error when it receives a malformed query about the available subscriptions +AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_003_BR +# Check that the AMS service creates a notification subscriptions when requested +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_004_OK +# Check that the AMS service sends an error when it receives a malformed request to create a notification subscription +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_004_BR +# Check that the AMS service returns information about a given subscription when requested +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_005_OK +# Check that the AMS service returns an error when receives a query about a not existing subscription +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_005_NF +# Check that the AMS service deletes a given subscription when requested +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_006_OK +# Check that the AMS service sends an error when it receives a delete request for a not existing subscription +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_006_NF +# Check that the AMS service modifies a given subscription when requested +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_007_OK +# Check that the AMS service sends an error when it receives a malformed modify request for a given subscription +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_007_BR +# Check that the AMS service sends an error when it receives a modify request for a not existing subscription +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_007_NF +# 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 +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_008_OK +# 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 +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_009_OK +# 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 +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_010_OK +# Check that the AMS service returns information about this individual application mobility service +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_011_OK +# Check that the AMS service sends an error when receives a query about a not existing individual application mobility service +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_011_NF +# Check that the AMS service modifies the individual application mobility service when requested +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_012_OK +# Check that the AMS service sends an error when receives a request to modify a individual application mobility service using bad parameters +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_012_BR +# Check that the AMS service sends an error when receives a request to modify a not existing individual application mobility service +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_012_NF +# Check that the AMS service de-register the individual application mobility service and delete the resource that represents the individual application mobility service +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_013_OK +# Check that the AMS service sends an error when is requested to delete the resource that represents the individual application mobility service +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_013_NF +# Check that the AMS service deregister an individual application mobility service on expiry of the timer associated with the service +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_014_OK +# Check that the AMS service send an error when is requested to deregister a not existent individual application mobility service +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_014_NF +# Check that the AMS service returns information about the registered application mobility services when requested +#AtsMec_ApplicationMobiltyServiceAPI_TestCases.TC_MEC_MEC021_SRV_AMS_015_OK_01 + +[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_DeviceApplicationInterface/AtsMec_DeviceApplicationInterface_Sandbox.cfg_ b/etc/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterface_Sandbox.cfg_ new file mode 100644 index 0000000000000000000000000000000000000000..337c5691533de5c5bcdf68a8b55a0bcd5ef631cb --- /dev/null +++ b/etc/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterface_Sandbox.cfg_ @@ -0,0 +1,112 @@ +[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 := "yanngarcia.ddns.net" + +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 + +# LibMec/AtsMec_DeviceApplicationInterfaceAPI +DeviceApplicationInterfaceAPI_Pixits.PX_CALLBACK_REFERENCE := "https://yanngarcia.ddns.net:36001/ams/v1" +DeviceApplicationInterfaceAPI_Pixits.PX_CALLBACK_URI := "http://yanngarcia.ddns.net:36001/ams/v1" + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec_DeviceApplicationInterface/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT +#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_mec016)/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_mec016)/TCP(debug=1,server_mode=1,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_DeviceApplicationInterfaceAPI_TestControl.control + +# Check that the IUT responds with the list of user applications when requested by an UE Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPS_001_OK +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPS_001_NF +# Check that the IUT responds with the list of user applications when requested by an UE Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPS_002_OK +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPS_002_BR +#Check that the IUT acknowledges the creation of the application context when requested by an UE Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_001_OK +# Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_001_BR +# Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_001_NF +# Check that the IUT acknowledges the creation of the application context when requested by an UE Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_002_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_002_BR +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_002_NF +# Check that the IUT deletes the application context when commanded by an UE Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_003_OK +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPCTX_003_NF +# Check that the IUT sends the locations available for instantiation of a specific user application when requested by an UE Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPLOC_001_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPLOC_001_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_DeviceApplicationInterfaceAPI_TestCases.TC_MEC_MEC016_MEO_UEAPPLOC_001_NF + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablement_Sandbox.cfg_ b/etc/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablement_Sandbox.cfg_ index 0164f79e9b42a62ed13455110b955ff7e539eb74..3dc67edd5f45ebe0c51db826687a61bc8233f2d3 100644 --- a/etc/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablement_Sandbox.cfg_ +++ b/etc/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablement_Sandbox.cfg_ @@ -19,9 +19,13 @@ LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign i LibMec_Pics.PICS_MEC_PLAT := true # Application Instance ID -EdgePlatformApplicationEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "a503822f-a3ff-4ac3-913b-c35acf610498" # Copied from ETSI MEC Sandbox GUI +EdgePlatformApplicationEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "81c51643-8c6f-4781-ad45-f8a457ca549b" # Copied from ETSI MEC Sandbox GUI +# MEC APIs +EdgePlatformApplicationEnablementAPI_Pixits.PX_API_NAME := "mec015-1" # Pickup from MEC Sandbox logs console +EdgePlatformApplicationEnablementAPI_Pixits.PX_API_ID := "f671a33e-9bc6-42a7-8afb-6f7edec7c357" # Callbacks +EdgePlatformApplicationEnablementAPI_Pixits.PX_CAPIF_NOTIF_CALLBACK_URI := "https://yanngarcia.ddns.net:36001/capif-events/v1" [LOGGING] # In this section you can specify the name of the log file and the classes of events @@ -116,7 +120,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec011)/TCP(debug=1 # Check that the IUT responds that the MEC application is up and running #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_002_OK # Check that the IUT responds that it has completed the application level termination -AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_001_OK +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_001_OK # Check that the IUT responds with an error when a request for an operationAction is sent to an unknown application #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_001_NF # Check that the IUT responds with an error when a request for an indication is sent to an unknown application @@ -193,6 +197,61 @@ AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK # Check that the IUT responds with current time when queried by a MEC Application #AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TIME_002_OK +# Check that the IUT responds with all service APIs when queried by a MEC Application - No filter +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_01 +# Check that the IUT responds with all service APIs when queried by a MEC Application - Filter on apiName +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_02 +# Check that the IUT responds with all service APIs when queried by a MEC Application - Filter on apiId +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_03 +# Check that the IUT responds with all service APIs when queried by a MEC Application - Filter on apiId and apiName +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_05 +# Check that the IUT responds with an error when applying a malformed filter +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_BR +# Check that the IUT responds with an error when applying a filter on an unknown apiName +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_NF +# Check that the IUT responds with all service APIs for a specific apfId when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_002_OK +# Check that the IUT responds with an error when applying a filter on an unknown apfId +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_002_NF +# Check that the IUT responds with all service APIs for a specific apfId when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_003_OK +# Check that the IUT responds with an error when incorrect parameters were sent by a MEC Application - supportedFeatures shall be present +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_003_BR +# Check that the IUT responds with a serviceAPIDescription when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_OK +# Check that the IUT responds with an error when applying a filter on an unknown apfId +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_NF_01 +# Check that the IUT responds with an error when applying a filter on an unknown serviceApiId +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_NF_02 +# Check that the IUT updates the publishing of a new API when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_005_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_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_005_NF +# Check that the IUT changes the publishing of a new API when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_006_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_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_006_NF +# Check that the IUT acknowledges the removing of a published API when queried by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_007_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_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_007_NF +# Check that the IUT acknowledges the creation of a CAPIF subscription request when requested by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_008_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_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_008_NF +# Check that the IUT acknowledges the update of a CAPIF subscription request when requested by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_009_OK +# Check that the IUT acknowledges the update of a CAPIF subscription request when requested by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_009_NF +# Check that the IUT acknowledges the changes of a CAPIF subscription request when requested by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_010_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_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_010_NF +# Check that the IUT acknowledges the cancellation of a CAPIF subscription when requested by a MEC Application +#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_011_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_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_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. diff --git a/etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ b/etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement.cf_ similarity index 68% rename from etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ rename to etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement.cf_ index 5c8c0703f1822e22f4fbb4a4f8bab49db308ec9f..0dca63395c96e3ec4fb5adb38e39eb294b23c4c8 100644 --- a/etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement_Mockoon.cf_ +++ b/etc/AtsMec_FederationEnablement/AtsMec_FederationEnablement.cf_ @@ -8,14 +8,17 @@ LibCommon_Time.PX_TAC := 30.0 LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; -LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.39" +LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" #"192.168.1.39" LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibHttp_Pics.PICS_USE_TOKEN_HEADER := true #LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" # LibMec_Pixits +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/FederationEnablementAPI +FederationEnablementAPI_Pixits.PX_FED_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; [LOGGING] # In this section you can specify the name of the log file and the classes of events @@ -33,8 +36,7 @@ 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_mec040)/TCP(debug=1,server=192.168.1.12,port=30030,use_ssl=0)" -#system.httpPort.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)" +system.httpPort.params := "HTTP(codecs=json:json_codec_mec040)/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_mec040)/TCP(debug=1,server_mode=1,local_port=80,use_ssl=0)" [DEFINE] @@ -63,7 +65,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1 #AtsMec_TestControl.control # Check that the IUT responds with a list of all available systemInfo when requested by a MEC Orchestrator - No query parameters -#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_01 +AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_01 # Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemId query parameters #AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_02 # Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemId query parameters @@ -72,20 +74,14 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1 #AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_04 # Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemName query parameters #AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_05 -# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemName query parameters -#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_05 # Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemName query parameters #AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_06 -# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemName query parameters -#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_07 # Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - systemProvider query parameters -#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_08 +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_07 # Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple systemProvider query parameters -#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_09 -# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty systemProvider query parameters -#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_10 +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_08 # Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple query parameters -#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_11 +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_09 # Check that the IUT responds with an error when selection is not applicable - SystemId #AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_NF_01 # Check that the IUT responds with an error when selection is not applicable - SystemName @@ -93,7 +89,38 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1 # Check that the IUT responds with an error when selection is not applicable - SystemProvider #AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_NF_03 # Check that the IUT responds with an error when request is malformed -AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_BR +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_BR + +# Check that the IUT creates a new systemInfo when requested by a MEC Orchestrator +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_002_OK +# Check that the IUT responds with an error on creating an existing systemInfo +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_002_BR +# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_003_OK +# Check that the IUT responds with an error when it receives a request for returning a systemInfo referred with a wrong systemId +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_003_NF +# Check that the IUT responds with an error when it receives a request with an inconsistant URI +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_003_BR +# Check that the IUT updates the systemInfo when requested by a MEC Orchestrator +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_004_OK_01 +# Check that the IUT updates the systemInfo when requested by a MEC Orchestrator +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_004_OK_02 +# Check that the IUT updates the systemInfo when requested by a MEC Orchestrator +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_004_OK_03 +# Check that the IUT responds with an error when requested to update an unknown systemInfo +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_004_NF +# Check that the IUT responds with an error when requested to update with no data provided +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_004_BR +# Check that the IUT deletes the systemInfo when requested by a MEC Orchestrator +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_005_OK +# Check that the IUT responds with an error when requested to delete an unknown systemInfo +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_005_NF +# Check that the IUT responds with the list of subscriptions when queried by a MEC Application - No query parameters +#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_006_OK_01 + + + + diff --git a/etc/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationService_Sandbox.cf_ b/etc/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationService_Sandbox.cf_ new file mode 100644 index 0000000000000000000000000000000000000000..409d05a43229ff4d6190f3ea7cfc4aeb7376a4fa --- /dev/null +++ b/etc/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationService_Sandbox.cf_ @@ -0,0 +1,133 @@ +[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 := "yanngarcia.ddns.net" + +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 + +[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_FixedAccessInformationService/%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_mec029)/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_mec029)/TCP(debug=1,server_mode=1,use_ssl=0)" +#system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec029)/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_FixedAccessInformationServiceAPI_TestControl.control + +# Check that the IUT responds with the current status of the fixed access information when queried by a MEC Application +AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_001_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_001_BR +# 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_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_001_NF +# Check that the IUT responds with the current status of the device information when queried by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_002_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + #AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_002_BR + # 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_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_002_NF +# Check that the IUT responds with the current status of the cable line information when queried by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_003_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_003_BR +# 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_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_003_NF +# Check that the IUT responds with the current status of the optical network information when queried by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_004_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_004_BR +# 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_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_004_NF +# Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_005_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_005_BR +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_005_NF +# Check that the IUT acknowledges the subscription by a MEC Application to notifications on Optical Network Unit alarm events +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_006_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_006_BR +# Check that the IUT responds with the information on a given subscription when queried by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_007_OK +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_007_NF +# Check that the IUT updates an existing subscription when commanded by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_008_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_008_BR +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_008_NF +# Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_008_PF +# Check that the IUT acknowledges the cancellation of UE location change notifications when commanded by a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_009_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_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_009_NF +# Check that the IUT sends notification on expiry of Fixed Access Information event subscription to a MEC Application +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_010_OK +# Check that the IUT acknowledges the subscription by a MEC Application to notifications on Optical Network Unit alarm events +#AtsMec_FixedAccessInformationServiceAPI_TestCases.TC_MEC_MEC029_SRV_FAIS_011_OK + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ b/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ index a53911e2829335a8808c346e2a852d5035c41214..994c9a13fec1959a2f58d0eb742acd63e59e6c0e 100644 --- a/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ +++ b/etc/AtsMec_IoT/AtsMec_IoT_Mockoon.cf_ @@ -35,10 +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=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)" +#system.httpPort.params := "HTTP(codecs=json:json_codec_mec033)/TCP(debug=1,server=192.168.1.39,port=30030,use_ssl=0)" +system.httpPort.params := "HTTP(codecs=json:json_codec_mec033)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)" +#system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec033)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1)" +system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec033)/TCP(debug=1,server_mode=1,local_port=80,use_ssl=0)" [DEFINE] # In this section you can create macro definitions, diff --git a/etc/AtsMec_IoT/AtsMec_IoT_Sandbox.cf_ b/etc/AtsMec_IoT/AtsMec_IoT_Sandbox.cf_ new file mode 100644 index 0000000000000000000000000000000000000000..8ed8b1cb8f7be38feed59a938600974a2bb5c35f --- /dev/null +++ b/etc/AtsMec_IoT/AtsMec_IoT_Sandbox.cf_ @@ -0,0 +1,134 @@ +[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://try-mec.etsi.org/, section 'Try-it from your MEC application' + +# LibMec_Pixits + +# LibMec/IoTAPI +IoTAPI_Pixits.PX_REQUESTED_PLTF_ID := "d0997381-7536-4ded-849e-e2f4eee20e90" # Used to register devices, this is a real IoT platform +IoTAPI_Pixits.PX_MB_TRANSPORTINFO_ID_1 := "9f2bd66e-0dff-11f0-ae86-8b5374b85d18" +IoTAPI_Pixits.PX_MB_TRANSPORTINFO_NAME_1 := "laboai-acme-ic-cse" +IoTAPI_Pixits.PX_MB_TRANSPORTINFO_TYPE_1 := MB_TOPIC_BASED +IoTAPI_Pixits.PX_MB_TRANSPORTINFO_PROTOCOL_1 := "MQTT" +IoTAPI_Pixits.PX_MB_TRANSPORTINFO_VERSION_1 := "3.1" +IoTAPI_Pixits.PX_IOT_ENDPOINT_URI_1 := "mqtt://laboai-acme-ic-cse:1883" + +[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_IoT/%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_mec033)/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_mec033)/TCP(debug=1,server_mode=1,use_ssl=0)" +#system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec033)/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_TestControl.control + +# Check that the IUT responds with the list of registered IoT devices when queried by a Service Consumer +AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_001_OK_01 +# +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_001_OK_02 +# +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_001_OK_03 +# +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_001_OK_04 +# Check that the IUT registers the information of an IoT device when requested by a Service Consumer - Using IoT platform identifier +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_002_OK_01 +# Check that the IUT registers the information of an IoT device when requested by a Service Consumer - Using IoT MEC traffic rules +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_002_OK_02 +# Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_002_BR +# +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_003_OK +# +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_003_NF +# +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_004_OK +# +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_004_NF +# +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_004_BR +# +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_005_OK +# +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_IOTS_IOTDEV_005_NF +# Check that the IUT responds with the list of registered IoT platforms when queried by a Service Consumer +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_MEX_IOTS_IOTPLAT_001_OK +# Check that the IUT registers the information of a new IoT platform when requested by a Service Consumer +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK +# Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_BR +# Check that the IUT returns the IoT platform information when requested by Service Consumer specifying the IoT platform identifier +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_OK +# Check that the IUT returns error when Service Consumer request to retrieve a not registered IoT platform +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_MEX_IOTS_IOTPLAT_003_NF +# Check that the IUT updates the information about a registered IoT platform when requested by a Service Consumer +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_OK +# Check that the IUT returns an error when a Service Consumer requests to update a not registered IoT platform +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_MEX_IOTS_IOTPLAT_004_NF +# Check that the IUT deregisters an IoT platform information when requested by a Service Consumer specifying the registered IoT platform identifier +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_OK +# Check that the IUT returns an error when a Service Consumer request to deregister an IoT platform using incorrect parameters +#AtsMec_IoTAPI_TestCases.TC_MEC_MEC033_MEX_IOTS_IOTPLAT_005_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/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ b/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ deleted file mode 100644 index 384e475d44bbab49006718e8a2e3371d9164b9b0..0000000000000000000000000000000000000000 --- a/etc/AtsMec_Location/AtsMec_Location_Lewis.cf_ +++ /dev/null @@ -1,238 +0,0 @@ -[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 := "172.22.1.6" - -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 := "etsi-013" - -# LibMex_Pixits -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" -LibMec_Pixits.PX_ME_APP_SUPPORT_URI := "/mec_app_support/v1/applications" -LibMec_Pixits.PX_SVC_MGMT_TRANS_URI := "/mec_service_mgmt/v1/transports" -LibMec_Pixits.PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "/mec_app_support/v1/timing/timing_caps" -LibMec_Pixits.PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "/mec_app_support/v1/timing/current_time" - -# Mec-011 AppEnblementAPI -AppEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "appInst01" -AppEnablementAPI_Pixits.PX_SERVICE_NAME := "serName" -AppEnablementAPI_Pixits.PX_SERVICE_ID := "serInst01" -AppEnablementAPI_Pixits.PX_SERVICE_INFO_VERSION := "1.0.0" -AppEnablementAPI_Pixits.PX_NEW_SERVICE_INFO_VERSION := "1.0.0" -AppEnablementAPI_Pixits.PX_SERVICE_INFO_STATE := ACTIVE -AppEnablementAPI_Pixits.PX_SUBSCRIPTION_ID := "7777" -AppEnablementAPI_Pixits.PX_DNS_RULE_ID := "route2home" -AppEnablementAPI_Pixits.PX_DOMAIN_NAME := "etsi.org" -AppEnablementAPI_Pixits.PX_IP_ADDRESS := "10.10.0.2" -AppEnablementAPI_Pixits.PX_TTL := 8 -AppEnablementAPI_Pixits.PX_TRAFFIC_RULE_ID := "trafficRuleId01" - -# Mec-012 RnisAPI -RnisAPI_Pixits.PX_SUBSCRIPTION_HREF_VALUE := "cell_change" -RnisAPI_Pixits.PX_SUBSCRIPTION_TYPE := CELL_CHANGE -RnisAPI_Pixits.PX_SUBSCRIPTION_ID := "7777" -RnisAPI_Pixits.PX_ASSOCIATE_ID_VALUE := "192.0.0.2" -RnisAPI_Pixits.PX_CELL_ID := "0x0800000A" -RnisAPI_Pixits.PX_C_ID := "0xFFFFFFFF" -RnisAPI_Pixits.PX_APP_INS_ID := "01" -RnisAPI_Pixits.PX_APP_ID := "19" -RnisAPI_Pixits.PX_E_RAB_ID := 0 -RnisAPI_Pixits.PX_QCI := 0 - -# Mec-013 LocationAPI -LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true -LocationAPI_Pixits.PX_ZONE_ID := "zone1" -LocationAPI_Pixits.PX_USER := "ue1" -LocationAPI_Pixits.PX_CLIENT_ID := "0123" -LocationAPI_Pixits.PX_SUBSCRIPTION_ID := "subscription0123" - -UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED := false - -BwManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := false - -[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/%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=172.22.1.6,port=31007,use_ssl=0)" -#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=172.28.4.253,port=30007,use_ssl=0)" -system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=8081,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 -#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_OK -#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_BR -#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_NF -#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_OK -#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_BR -#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_PF - -# ETSI GS MEC 013 -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_OK -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_BR -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_NF -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_001_OK -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_001_BR -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_002_OK -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_002_NF -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_001_OK -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_001_BR -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_002_OK -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_002_NF -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFLOOK_001_OK -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFLOOK_001_BR -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFLOOK_001_NF -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_001_OK -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_001_BR -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_OK -#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_NF -#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_RLOCLOOK_001_OK -#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_RLOCLOOK_001_NF -#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_UEAREASUB_001_OK -#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_UEAREASUB_001_BR -#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_UEAREASUB_002_OK -#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_UEAREASUB_002_NF -#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_UEDISTLOOK_001_OK -#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_UEDISTLOOK_001_BR -#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_UEDISTSUB_001_OK -#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_UEDISTSUB_001_BR -#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_UEDISTSUB_002_OK -#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_UEDISTSUB_002_NF - -# ETSI GS MEC 012 -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_011_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_012_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_011_BR -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_012_BR -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_016_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_017_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_018_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_019_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_016_BR -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_016_NF -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_017_BR -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_017_NF -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_018_BR -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_018_NF -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_019_BR -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_019_NF -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_001_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_002_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_003_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_004_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_005_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_006_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_007_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_008_OK - -# ETSI GS MEC 011 -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_001_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_001_BR -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_002_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_002_BR -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_002_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_003_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_003_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_004_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_004_BR -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_004_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_004_PF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSUB_001_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSUB_001_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSUB_002_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSUB_002_BR -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSUB_003_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSUB_003_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSUB_004_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSUB_004_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_DNS_001_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_DNS_002_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_DNS_002_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_DNS_003_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_DNS_003_BR -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_DNS_003_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_DNS_003_PF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_SAQ_001_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_SAQ_001_BR -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_SAQ_002_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_SAQ_002_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_SRVSUB_001_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_SRVSUB_001_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_SRVSUB_002_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_SRVSUB_002_BR -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_SRVSUB_003_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_SRVSUB_003_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_SRVSUB_004_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_SRVSUB_004_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TIME_001_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TIME_002_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_002_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_003_OK -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_003_BR -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_003_NF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_003_PF -#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRANS_001_OK - -[GROUPS] -# In this section you can specify groups of hosts. These groups can be used inside the -# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. - -[COMPONENTS] -# This section consists of rules restricting the location of created PTCs. - -[MAIN_CONTROLLER] -# The options herein control the behavior of MC. -KillTimer := 10.0 -LocalAddress := 127.0.0.1 -TCPPort := 12000 -NumHCs := 1 diff --git a/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ b/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ deleted file mode 100644 index 292a40d6850fd22323c979dbff2467a686e691b5..0000000000000000000000000000000000000000 --- a/etc/AtsMec_Location/AtsMec_Location_Mockoon.cf_ +++ /dev/null @@ -1,575 +0,0 @@ -[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 -LibMec_Pixits.PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions" -LibMec_Pixits.PX_RNIS_QUERIES_URI := "/rni/v2/queries" -LibMec_Pixits.PX_MEC_SVC_MGMT_APPS_URI := "/mec_service_mgmt/v2/applications" -LibMec_Pixits.PX_ME_APP_SUPPORT_URI := "/mec_app_support/v2/applications" -LibMec_Pixits.PX_SVC_MGMT_TRANS_URI := "/mec_service_mgmt/v2/transports" -LibMec_Pixits.PX_ME_APP_SUPPORT_TIMING_CAPS_URI := "/mec_app_support/v2/timing/timing_caps" -LibMec_Pixits.PX_ME_APP_SUPPORT_TIMING_CURRENT_URI := "/mec_app_support/v2/timing/current_time" - -LibMec_Pics.PICS_MEC_PLAT := true - -# Mec-011 AppEnblementAPI -EdgePlatformApplicationEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "b8ae165a-a1e3-4d6c-86d9-52c59ad314b6" -EdgePlatformApplicationEnablementAPI_Pixits.PX_NON_EXISTENT_APP_INSTANCE_ID := "1b5d27e6-5cc4-47d4-812b-a943233dbe08" -EdgePlatformApplicationEnablementAPI_Pixits.PX_SERVICE_NAME := "mec028-1" -EdgePlatformApplicationEnablementAPI_Pixits.PX_SERVICE_ID := "1b5d27e6-5cc4-47d4-812b-a943233dbe08" -EdgePlatformApplicationEnablementAPI_Pixits.PX_HREF := "http://yanngarcia.ddns.net/mec_service_mgmt/v2/notif/1" -EdgePlatformApplicationEnablementAPI_Pixits.PX_SRV_AVAIL_NOTIF_CALLBACK_URI := "http://yanngarcia.ddns.net/mec_service_mgmt/v2/srv_notif/1" -EdgePlatformApplicationEnablementAPI_Pixits.PX_SERVICE_INFO_VERSION := "v2" -EdgePlatformApplicationEnablementAPI_Pixits.PX_NEW_SERVICE_INFO_VERSION := "v2.1" -EdgePlatformApplicationEnablementAPI_Pixits.PX_SERVICE_INFO_STATE := ACTIVE -EdgePlatformApplicationEnablementAPI_Pixits.PX_SUBSCRIPTION_ID := "3" -EdgePlatformApplicationEnablementAPI_Pixits.PX_DNS_RULE_ID := "route2home" -EdgePlatformApplicationEnablementAPI_Pixits.PX_DOMAIN_NAME := "try-mec.etsi.org" -EdgePlatformApplicationEnablementAPI_Pixits.PX_IP_ADDRESS := "10.10.0.2" -EdgePlatformApplicationEnablementAPI_Pixits.PX_TTL := 8 -EdgePlatformApplicationEnablementAPI_Pixits.PX_TRAFFIC_RULE_ID := "trafficRuleId01" - -# Mec-012 RnisAPI -RnisAPI_Pixits.PX_SUBSCRIPTION_HREF_VALUE := "cell_change" -RnisAPI_Pixits.PX_CALLBACK_REFERENCE := "http://yanngarcia.ddns.net/rni/v2/notif/1" -RnisAPI_Pixits.PX_ASSOCIATE_ID_VALUE := "10.100.0.1" -RnisAPI_Pixits.PX_CELL_ID := "1010101" -RnisAPI_Pixits.PX_C_ID := "0xFFFFFFFF" -RnisAPI_Pixits.PX_APP_INS_ID := "01" -RnisAPI_Pixits.PX_APP_ID := "19" -RnisAPI_Pixits.PX_E_RAB_ID := 0 -RnisAPI_Pixits.PX_QCI := 0 - -# Mec-013 LocationAPI -LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true -LocationAPI_Pixits.PX_ZONE_ID := "zone01" -LocationAPI_Pixits.PX_ACCESS_POINT_ID := "4g-macro-cell-2" -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/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 - - -UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED := false - -# Mec-015 TrafficManagementAPI -TrafficManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := true - -# Mec-028 WLAN Information API -LibMec_Pixits.PX_ME_WLAN_QUERIES_URI := "/wai/v2/queries" -LibMec_Pixits.PX_ME_WLAN_URI := "/wai/v2" - -#WlanInformationAPI_Pixits.PX_WLAN_FILTER_FIELD := "ap/macId" # ApInfo filter -WlanInformationAPI_Pixits.PX_WLAN_FILTER_FIELD := "staId/macId" # StatInfo filter -WlanInformationAPI_Pixits.PX_WLAN_FILTER_VALUE := "\"005C06060606\"" -WlanInformationAPI_Pixits.PX_ASSOC_STA_SUBSCRIPTION_CALLBACK := "http://yanngarcia.ddns.net/wai/v2/notif" - -# Mec-030 V2X Information Service API - -[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 - -# ETSI GS MEC 011 -# Check that the IUT responds with a list of available MEC services for a given application instance when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_001_BR -# Check that the IUT notifies the authorised relevant (subscribed) application instances when a new service for a given application instance is registered -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_002_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_002_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_002_NF -# Check that the IUT responds with the information on a specific service for a given application instance when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_003_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_003_NF -# Check that the IUT updates a service information for a given application instance when commanded by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_004_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_004_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_004_NF -# Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSAQ_004_PF -# Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_001_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_001_NF -# Check that the IUT acknowledges the subscription by a MEC Application to notifications on service availability events -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_002_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_002_BR -# Check that the IUT responds with the information on a specific subscription when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_003_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_003_NF -# Check that the IUT acknowledges the unsubscribe from service availability event notifications when commanded by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_004_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_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_APPSUB_004_NF -# Check that the IUT responds that it has completed the application level termination -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_001_OK -# Check that the IUT responds with an error when a request for an operationAction is sent to an unknown application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_001_NF -# Check that the IUT responds that the MEC application is up and running -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_002_OK -# Check that the IUT responds with an error when a request for an indication is sent to an unknown application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_CONFTASK_002_NF -# Check that the IUT responds with a list of active DNS rules when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_001_OK -# Check that the IUT responds with the information on a specific DNS rule when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_002_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_002_NF -# Check that the IUT updates a specific DNS rule when commanded by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_003_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_003_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_003_NF -# Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_DNS_003_PF -# Check that the IUT responds with the liveness of a MEC service instance when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MSL_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_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MSL_001_NF -# Check that the IUT updates the liveness of a MEC service instance when requested by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MSL_002_OK -# Check that the IUT responds with an error when incorrect parameters were sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_MSL_002_BR -# Check that the IUT responds with a list of available MEC services when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SAQ_001_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SAQ_001_BR -# Check that the IUT responds with the information on a specific service when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SAQ_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_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SAQ_002_NF -# Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_001_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_001_NF -# Check that the IUT acknowledges the subscription by a MEC Application to notifications on service availability events -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_002_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_002_BR -# Check that the IUT responds with the information on a specific subscription when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_003_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_003_NF -# Check that the IUT acknowledges the unsubscribe from service availability event notifications when commanded by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_004_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_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_SRVSUB_004_NF -# Check that the IUT responds with timing capabilities when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TIME_001_OK -# Check that the IUT responds with current time when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TIME_002_OK -# Check that the IUT responds with a list of available traffic rules when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_001_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_001_NF -# Check that the IUT responds with the information on a specific traffic rule when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_002_OK -# Check that the IUT updates a specific traffic rule when commanded by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_003_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_003_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_003_NF -# Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRAF_003_PF -# Check that the IUT responds with a list of available transports when queried by a MEC Application -#AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.TC_MEC_MEC011_SRV_TRANS_001_OK - -# ETSI GS MEC 012 -# 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 -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_001_OK -# 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 -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_002_OK -# 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 -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_003_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_004_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_005_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_006_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_007_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_008_OK -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_009_OK -# Check that the RNIS service sends the list of links to the relevant RNIS subscriptions when requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_011_OK -# Check that the RNIS service creates a new RNIS subscription -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_012_OK -# Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions with a wrong subscription type -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_011_BR -# Check that the RNIS service responds with an error when it receives a request to create a new RNIS subscription with a wrong format -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_012_BR -# Check that the RNIS service sends a RNIS subscription when requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_013_OK -# Check that the RNIS service responds with error when a not existing RNIS subscription is requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_013_NF -# Check that the RNIS service modifies a RNIS subscription when requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_014_OK -# Check that the RNIS service sends an error when it receives a malformed modify request for a RNIS subscription -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_014_BR -# Check that the RNIS service responds with error when a modification for a not existing RNIS subscription is requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_014_NF -# Check that the RNIS service deletes a RNIS subscription when requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_015_OK -# Check that the RNIS service responds with error when the deletion of a not existing RNIS subscription is requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_015_NF -# Check that the RNIS service returns the RAB information when requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_016_OK -# Check that the RNIS service returns the PLMN information when requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_017_OK -# Check that the RNIS service returns the S1 bearer information -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_018_OK -# Check that the RNIS service returns the L2 measurements information -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_019_OK -# Check that the RNIS service returns an error when the RAB information is requested with a malformatted message -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_016_BR -# Check that the RNIS service returns an error when the RAB information is requested with a malformatted message -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_016_NF -# Check that the RNIS service returns an error when the PLMN information is requested with a malformatted message -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_017_BR -# Check that the RNIS service returns an error when the PLMN information for a not existing element is requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_017_NF -# Check that the RNIS service returns an error when the S1 bearer information is requested with a malformatted message -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_018_BR -# Check that the RNIS service returns an error when the S1 bearer information for a not existing element is requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_018_NF -# Check that the RNIS service returns an error when the L2 measurements information is requested with a malformatted message -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_019_BR -# Check that the RNIS service returns an error when the L2 measurements information for a not existing element is requested -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_019_NF - -# ETSI GS MEC 013 -# Check that the IUT responds with a list for the location of User Equipments when queried by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UELOCLOOK_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_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 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 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 -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETRACKSUB_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_UETRACKSUB_002_NF -# Check that the IUT responds with the information pertaining to one or more UEs in a particular location when queried by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFLOOK_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_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 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 -# Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_002_OK -# Check that the IUT acknowledges the cancellation of UE information change notifications when commanded by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEINFSUB_002_NF -# heck 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 -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_RLOCLOOK_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.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 -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEAREASUB_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_UEAREASUB_002_NF -# Check that the IUT responds with the distance to a UE when queried by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTLOOK_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_UEDISTLOOK_001_BR -# 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 -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTSUB_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_UEDISTSUB_001_BR -# Check that the IUT acknowledges the cancellation of UE distance notifications when commanded by a MEC Application -#AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEDISTSUB_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_UEDISTSUB_002_NF - -# ETSI GS MEC 014 -#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_001_OK -#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_001_BR -#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_001_NF -#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_002_OK -#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_002_BR -#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_002_PF - -# ETSI GS MEC 015 -# Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK -# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_BR -# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_NF -# Check that the IUT responds with a registration and initialisation approval for the requested bandwidth requirements sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_OK_01 -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_OK_02 -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_BR_01 -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_BR_02 -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_BR_03 -# Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_NF -# Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_NF -# Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_OK -#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_NF -# Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_007_OK -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_007_NF -# Check that the IUT responds with the Multi-access Traffic Steering information when queried by a MEC Application -#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_001_OK -# Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application -#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK -#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_NF -# Check that the IUT responds with a configured Multi-access Traffic Steering when queried by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_BR -# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application -#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_NF - -# ETSI GS MEC 016 - -# ETSI GS MEC 028 -# Check that the IUT responds with the list of WLAN Access Point -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_001_OK -# Check that the IUT responds with the list of WLAN Access Point filtered by the macId provided as query parameter -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_002_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_002_BR -# Check that the IUT responds with the list of Station Point -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_003_OK -# Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_004_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_004_BR -# Check that the IUT responds with the requested list of subscription -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_005_OK -# Check that the IUT responds with the requested list of subscription -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_OK -# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_BR -# Check that the IUT responds with an error when a request with not existing parameters is sent -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_NF -# Check that the IUT responds with a Notification Subscription -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_007_OK -# Check that the IUT responds with an error when an invalid Subscription request is sent -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_007_BR -# Check that the IUT responds with an error when a request with not existing parameters is sent -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_007_NF -# Check that the IUT responds with the list of Subscription -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_008_OK -# Check that the IUT responds with an error when a request for existing subscription with incorrect parameters is sent -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_008_NF -# Check that the IUT responds with a Notification Subscription when it is modified -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_009_OK -# Check that the IUT responds with an error when an invalid field is set in the subscription modification reques -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_009_BR -# Check that the IUT responds with 204 when an existing subscription is correctly deleted -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_010_OK -# Check that the IUT responds with an error when an not existing subscription cannot be deleted -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_010_NF -# Check that the IUT sends a notification about WLAN event notification if the MEC service has an associated subscription and the event is generated -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_011_OK - -# ETSI GS MEC 030 -# 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 -# 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_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_002_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_002_NF -# Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_OK_01 -# Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_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_003_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_003_NF -# Check that the IUT sends a request about QoS information for a vehicular UE when queried by a MEC Application -#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 -# Check that the IUT processes properly a request to publish a V2X message -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_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_005_BR -# Check that the IUT responds with the requested list of subscription when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_OK_01 -# Check that the IUT responds with the requested list of subscription when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_OK_02 -# Check that the IUT responds with the requested list of subscription when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_OK_03 -# Check that the IUT responds with the requested list of subscription when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_OK_04 -# 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_006_BR -# Check that the IUT responds with the requested to create a subscription -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_01 -# Check that the IUT responds with the requested to create a subscription -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_02 -# Check that the IUT responds with the requested to create a subscription -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_03 -# Check that the IUT responds with the requested to create a subscription -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_04 -# 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_007_BR -# Check that the IUT responds with the requested of subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_01 -# Check that the IUT responds with the requested of subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_02 -# Check that the IUT responds with the requested of subscription information when queried by a MEC Application#AtsMec_V2XInformationServiceAPI_TestCases.TC_#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_03 -# Check that the IUT responds with the requested of subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_008_OK_04 -# 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_008_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_008_NF -# Check that the IUT responds with the request of updating subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_01 -# Check that the IUT responds with the request of updating subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_02 -# Check that the IUT responds with the request of updating subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_03 -# Check that the IUT responds with the request of updating subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_009_OK_04 -# 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 -# Check that the IUT responds with the request of removing subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_01 -# Check that the IUT responds with the request of removing subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_02 -# Check that the IUT responds with the request of removing subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_03 -# Check that the IUT responds with the request of removing subscription information when queried by a MEC Application -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_04 -# 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_010_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/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ b/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ index 91327401cd08c563e6b2fc683cd1d128e1dd4a7f..7725345e62cc42485a444419c1607999d32d7277 100644 --- a/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ +++ b/etc/AtsMec_Location/AtsMec_Location_Sandbox.cf_ @@ -8,15 +8,15 @@ LibCommon_Time.PX_TAC := 30.0 LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; -LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" #"192.168.1.39" +LibHttp_Pics.PICS_HEADER_HOST := "mec-platform.etsi.org" LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibHttp_Pics.PICS_USE_TOKEN_HEADER := true -#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" -LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in on https://sandbox-mec.etsi.org/, section 'Try-it from your MEC application' +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 +LibMec_Pics.PICS_MEC_PLAT := true # Mec-013 LocationAPI LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true @@ -25,7 +25,8 @@ LocationAPI_Pixits.PX_ACCESS_POINT_ID := "4g-macro-cell-6" LocationAPI_Pixits.PX_AP_COORD_LAT := 43.737087 LocationAPI_Pixits.PX_AP_COORD_LONG := 7.421007 LocationAPI_Pixits.PX_CONNECTION_TYPE := LTE -LocationAPI_Pixits.PX_USER := "4005C0A640001" +LocationAPI_Pixits.PX_USER := "10.10.0.1" +LocationAPI_Pixits.PX_USER_2 := "10.100.0.1" LocationAPI_Pixits.PX_IP_ADDRESS := "10.1.0.1" LocationAPI_Pixits.PX_IP_ADDRESS_1 := "10.100.0.1" LocationAPI_Pixits.PX_ZONE_ID_1 := "zone01" @@ -205,10 +206,6 @@ AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UETESTNOT_001_OK # Check that the IUT responds with the subscription when queried by a MEC Application - Zone Status #AtsMec_LocationAPI_TestCases.TC_MEC_MEC013_SRV_UEZONELOOK_002_OK_02 - - - - [GROUPS] # In this section you can specify groups of hosts. These groups can be used inside the # [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. diff --git a/etc/AtsMec_QoSMeasurement/AtsMec_QoSMeasurementAPI.cf_ b/etc/AtsMec_QoSMeasurement/AtsMec_QoSMeasurementAPI.cf_ new file mode 100644 index 0000000000000000000000000000000000000000..0f9e3097d653dd42ee6e3a9bfbcc888beccfb93b --- /dev/null +++ b/etc/AtsMec_QoSMeasurement/AtsMec_QoSMeasurementAPI.cf_ @@ -0,0 +1,162 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" #"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' + +[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_QoSMeasurement/%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_mec030)/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_mec030)/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_QoSMeasurementAPI_TestControl.control + +# Check that the IUT responds with the list of QoS measurement subscriptions when queried by a MEC Application +AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOSLOOKUP_001_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOSLOOKUP_001_BR +# Check that the IUT responds with an error when no subscription are created +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOSLOOKUP_001_NF +# Check that the IUT responds with the list of QoS measurement subscriptions when queried by a MEC Application - Filter on subscriptionId +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_01 +# Check that the IUT responds with the list of QoS measurement subscriptions when queried by a MEC Application - Filter on subscriptionType +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_02 +# Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscriptionType +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_01 +# Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscriptionId +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_02 +# Check that the IUT responds with a QoS measurement subscription when queried by a MEC Application +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOSLOOKUP_003_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOSLOOKUP_003_NF +# Check that the IUT responds with a QoS measurement subscription when queried by a MEC Application +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_01 +# Check that the IUT acknowledges the creation of QoS measurement subscription request when commanded by a MEC Application - with reportingInterval +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_02 +# Check that the IUT acknowledges the creation of QoS measurement subscription request when commanded by a MEC Application - with numberOfReports +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_03 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_03 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - users not present (Note 2) +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_04 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - flowInfo not present (Note 2) +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_05 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid flowFilter +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_06 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid condition on reportingInterval/measuringPeriod +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_07 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid condition on measuringArea +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_08 +# Check that the IUT acknowledges the changes of an existing QoS measurement subscription request when commanded by a MEC Application +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_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_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_002_NF +# Check that the IUT acknowledges the cancellation of QoS measurement subscription when commanded by a MEC Application +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_003_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_003_NF +# Check that the IUT provides a test notification when requested by a MEC Application +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_01 +# Check that the IUT provides a test notification when requested by a MEC Application +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_02 +# Check that the IUT terminates notifications when the expiry timer expires +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_005_OK +# Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_01 +# Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application - With thresholds +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid SubscritionType +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_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_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided +#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_03 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - users not present (Note 2) +#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_04 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - flowFilter not present (Note 2) +#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_05 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid flowFilter +#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_06 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid condition on monitoringArea +#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_07 +# Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application +#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_OK +# Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application +#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_NF +# Check that the IUT acknowledges the cancellation of QoS event subscription when commanded by a MEC Application +#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_OK +# Check that the IUT acknowledges the cancellation of QoS event subscription when commanded by a MEC Application +#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_NF +# Check that the IUT provides a test notification when requested by a MEC Application +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_004_OK_01 +# Check that the IUT provides a test notification when requested by a MEC Application +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_004_OK_02 +# Check that the IUT terminates notifications when the expiry timer expires +#AtsMec_QoSMeasurementAPI_TestCases.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_005_OK + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec_Rnis/AtsMec_Sandbox.cf_ b/etc/AtsMec_Rnis/AtsMec_Sandbox.cf_ index 7daad533fe144868db31877c945925f21c034a7b..0cb48e1154f4262823252e4e240613dffe2d4138 100644 --- a/etc/AtsMec_Rnis/AtsMec_Sandbox.cf_ +++ b/etc/AtsMec_Rnis/AtsMec_Sandbox.cf_ @@ -8,33 +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 := "mec-platform.etsi.org" 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 := "/sbxykqjr17/mep1/" # Need to sign in on https://mec-platform.etsi.org/, section 'Try-it from your MEC application' # LibMec_Pixits -LibMec_Pixits.PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions" -LibMec_Pixits.PX_RNIS_QUERIES_URI := "/rni/v2/queries" - LibMec_Pics.PICS_MEC_PLAT := true -LibMec_Pixits.PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions" -LibMec_Pixits.PX_RNIS_QUERIES_URI := "/rni/v2/queries" - +RnisAPI_Pixits.PX_V2X_CELL_ID := "606060606" RnisAPI_Pixits.PX_SUBSCRIPTION_HREF_VALUE := "cell_change" RnisAPI_Pixits.PX_ASSOCIATE_ID_VALUE := "192.0.0.2" -RnisAPI_Pixits.PX_CELL_ID := "0x0800000A" RnisAPI_Pixits.PX_C_ID := "0xFFFFFFFF" RnisAPI_Pixits.PX_APP_INS_ID := "01" RnisAPI_Pixits.PX_APP_ID := "19" RnisAPI_Pixits.PX_E_RAB_ID := 0 RnisAPI_Pixits.PX_QCI := 0 - [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). @@ -51,8 +44,8 @@ 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_mec012)/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_mec012)/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, @@ -79,19 +72,26 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server # In this section you can specify what parts of your test suite you want to execute. #AtsMec_TestControl.control -#AtsMec_RnisAPI_TestCases.tc_HelloW # 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 -AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_001_OK +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_001_OK # 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 #AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_002_OK # 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 #AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_003_OK +# 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 #AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_004_OK +# 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 #AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_005_OK +# 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 #AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_006_OK +# 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 #AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_007_OK +# 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 #AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_008_OK +# 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 #AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_009_OK +# 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 +#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_010_OK # Check that the RNIS service sends the list of links to the relevant RNIS subscriptions when requested #AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_011_OK # Check that the RNIS service creates a new RNIS subscription @@ -119,7 +119,7 @@ AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_001_OK # Check that the RNIS service returns the PLMN information when requested #AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_017_OK # Check that the RNIS service returns the S1 bearer information -#AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_018_OK +AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_018_OK # Check that the RNIS service returns the L2 measurements information #AtsMec_RnisAPI_TestCases.TC_MEC_MEC012_SRV_RNIS_019_OK # Check that the RNIS service returns an error when the RAB information is requested with a malformatted message diff --git a/etc/AtsMec_SelfServiceEnablement/AtsMec_SelfServiceEnablementAPI.cf_ b/etc/AtsMec_SelfServiceEnablement/AtsMec_SelfServiceEnablementAPI.cf_ new file mode 100644 index 0000000000000000000000000000000000000000..5a8b1e6fbbd91a9be267113b682d760caa0ef6de --- /dev/null +++ b/etc/AtsMec_SelfServiceEnablement/AtsMec_SelfServiceEnablementAPI.cf_ @@ -0,0 +1,165 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" #"192.168.1.39" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +# LibMec_Pixits +LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in on https://mec-platform.etsi.org/, section 'Try-it from your MEC application' + +[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_FederationEnablement/%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_mec015)/TCP(debug=1,server=172.26.214.231,port=3001,use_ssl=0)" +#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)" +#system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec015)/TCP(debug=1,server_mode=1,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_TestControl.control + +# Check that the IUT responds with a list of all available tenantInfo when requested to a CSE - No query parameters +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_001_OK +# Check that the IUT responds with a list of all available tenantInfo when requested to a CSE - customerId attribute as query parameter +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_001_OK_02 +# Check that the IUT responds with a list of all available tenantInfo when requested to a CSE - customerName as query parameter +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_001_OK_03 +# Check that the IUT creates a new tenantInfo when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_002_OK +# Check that the IUT responds with an error on creating a tenantInfo with resourceUseInfo and siteList +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_002_BR +# Check that the IUT responds with a specific tenantInfo when requested to a MEC Consumer +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_003_OK +# Check that the IUT returns an error when requesting a not existing tenantInfo to a MEC Consumer +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_003_NF +# Check that the IUT updates an existing tenantInfo when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_004_OK +# Check that the IUT returns an error on updating a not existing tenantInfo requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_004_NF +# Check that the IUT returns an error on updating with invalid values tenantInfo requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_004_BR +# Check that the IUT removes a tenantInfo when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_005_OK +# Check that the IUT returns an error on deleting a not existing tenantInfo when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_005_NF +# Check that the IUT returns a resourceQuotaInfo for a specific tenant when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_006_OK +# Check that the IUT returns an error on retrieving resourceQuotaInfo for a not existing tenant when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_006_NF +# Check that the IUT updates the resourceQuotaInfo for an existing tenant when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_007_OK +# Check that the IUT returns an error on updating the resourceQuotaInfo for a not existing tenant when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_007_NF +# Check that the IUT creates the resourceQuotaInfo for an existing tenant when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_008_OK +# Check that the IUT returns an error on creating the resourceQuotaInfo for a not existing tenant when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_008_NF +# Check that the IUT returns the list of per site resource quota for a specific tenant when requested to a CSE - No filter +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_009_OK +# Check that the IUT returns the list of per site resource quota for a specific tenant when requested to a CSE - siteId filter" +AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_009_OK_01 +# Check that the IUT returns an error on requesting site resource quota info on a not existing tenant when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_009_NF +# Check that the IUT creates a site resource quota info for a existing tenant when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_010_OK +# Check that the IUT returns an error on creating a site resource quota with wrong parameters +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_010_BR +# Check that the IUT returns the site resource quota for a specific tenant and site identifier when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_011_OK +# Check that the IUT returns an error on requesting site resource quota info on a not existing tenant when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_011_NF +# Check that the IUT updates a site resource quota info for a existing tenant when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_012_OK +# Check that the IUT returns an error updating a site resource quota info for a existing tenant when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_012_BR +# Check that the IUT returns an error updating a site resource quota info for a not existing tenant when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_012_NF +# Check that the IUT returns the list of subscriptions when requested to a CSE - no filter +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_013_OK +# Check that the IUT returns the list of subscriptions when requested to a CSE - subscription_type filter +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_013_OK_02 +# Check that the IUT creates a new subscription when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_014_OK +# Check that the IUT creates a new subscription when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_014_OK_02 +# Check that the IUT returns an error on creating a new subscription when requested to a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_014_BR +# Check that the IUT returns a subscription when requested by a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_015_OK +# Check that the IUT returns an error on requesting a not existing subscription when requested by a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_015_NF +# Check that the IUT updates an existing subscription when requested by a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_016_OK +# Check that the IUT returns an error updating an not existing subscription when requested by a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_016_NF +# Check that the IUT returns an error updating an existing subscription with wrong parameters when requested by a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_016_BR +# Check that the IUT deletes an existing subscription when requested by a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_017_OK +# Check that the IUT returns an error on a deletion of a not existing subscription when requested by a CSE +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_017_NF +# Check that the CSE sends a site resource usage notification if the CSE has an associated subscription and the event is generated +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_018_OK +# Check that the CSE sends a resource usage notification if the CSE has an associated subscription and the event is generated +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_019_OK +# Check that the CSE sends a notification on subscription expiration if the CSE has an associated subscription and the event is generated +#AtsMec_SelfServiceEnablementAPI_TestCases.TC_MEC_MEC048_MEO_CSE_020_OK + + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec_SensorsSharingService/AtsMec_SensorsSharingService.cf_ b/etc/AtsMec_SensorsSharingService/AtsMec_SensorsSharingService.cf_ new file mode 100644 index 0000000000000000000000000000000000000000..0d555c48245e3db4828a78ea4bcd9d90adeab769 --- /dev/null +++ b/etc/AtsMec_SensorsSharingService/AtsMec_SensorsSharingService.cf_ @@ -0,0 +1,197 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" #"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' + +SensorsSharingService_Pixits.PX_SENS_SUB_CALLBACK_URI := "http://yanngarcia.ddns.net:8547/sens/v1/notif" +SensorsSharingService_Pixits.PX_SENS_DISCOVERY_TYPE := "CNT" +SensorsSharingService_Pixits.PX_SENS_DISCOVERY_PROPERTY_LIST := "saref:any" # Could be [], string or [string1 string2] +SensorsSharingService_Pixits.PX_SENSOR_IDENTIFIER := "cnt8WkyGNcEDV" + +[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_SensorsSharingService/%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_mec046)/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_mec046)/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_SensorsSharingService_TestControl.control + +# Check that the IUT responds with the list of SensorDiscoveryInfo when queried by a MEC Application +AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSDISCOVERY_001_OK_01 +# Check that the IUT responds with the list of SensorDiscoveryInfo when queried by a MEC Application - Using type filter +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSDISCOVERY_001_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid filter +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSDISCOVERY_001_BR +# Check that the IUT responds with an error when the IUT does not have sensor(s) +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSDISCOVERY_001_NF +# Check that the IUT responds with the list of subscriptions when queried by a MEC Application - No query parameters +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSDISCOVERY_002_OK_01 +# Check that the IUT responds with the list of subscriptions when queried by a MEC Application - With query parameters +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSDISCOVERY_002_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSDISCOVERY_002_BR +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSDISCOVERY_002_NF +# Check that the IUT responds with a SensorDiscoveryEventSubscription when queried by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSDISCOVERY_003_OK +# Check that the IUT responds with a SensorDiscoveryEventSubscription when queried by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSDISCOVERY_003_NF +# Check that the IUT responds with the list of subscriptions when queried by a MEC Application - No query parameters +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_001_OK_01 +# Check that the IUT responds with the list of subscriptions when queried by a MEC Application - With query parameters +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_001_OK_02 +# Check that the IUT responds with an error when the IUT does not have SensorStatus subscriptions registered +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_001_NF +# Check that the IUT responds with the list of SensorStatusSubscription when queried by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_002_OK +# Check that the IUT responds with an error when the IUT does not have sensor(s) +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_002_NF +# Check that the IUT responds with the list of SensorData when queried by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_003_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_003_BR +# Check that the IUT responds with an error when the IUT does not have sensor(s) +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_003_NF +# Check that the IUT responds with the list of subscriptions when queried by a MEC Application - No query parameters +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_004_OK_01 +# Check that the IUT responds with the list of subscriptions when queried by a MEC Application - With query parameters +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_004_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_004_BR +# Check that the IUT responds with an error when the IUT does not have SensorData subscriptions registered +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_004_NF +# Check that the IUT responds with the a SensorDataSubscriptions when queried by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_005_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_005_NF +# Check that the IUT responds with the list of SensorCharacteristic when queried by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_006_OK +# Check that the IUT acknowledges the change of the characteristics of one or more sensors when queried by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_007_OK +# Check that the IUT responds with an error when the a sensor does not have a characteristic +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_007_NF +# Check that the IUT acknowledges the creation of SensorDiscoveryEventSubscription request when commanded by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_OK +# Check that the IUT provides a test notification when requested by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_OK_01 +# Check that the IUT provides a notification when requested by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_BR_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_BR_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_BR_03 +# Check that the IUT acknowledges the change of SensorDiscoveryEventSubscription request when commanded by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_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_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_002_NF +# Check that the IUT acknowledges the cancellation of a SensorDiscoveryEventSubscription when commanded by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_003_OK +# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_003_NF +# Check that the IUT acknowledges the creation of SensorStatusSubscription request when commanded by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_OK +# Check that the IUT provides a test notification when requested by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_OK_01 + + +# Check that the IUT provides a notification when requested by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_BR_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_BR_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference nor websockNotifConfig provided +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_BR_03 +# Check that the IUT acknowledges the changes of an existing SensorStatusSubscription when commanded by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_005_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_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_005_NF +# Check that the IUT acknowledges the cancellation of an existing SensorStatusSubscription when commanded by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_006_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_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_006_NF +# Check that the IUT acknowledges the creation of SensorDataSubscription request when commanded by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_OK +# Check that the IUT provides a test notification when requested by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_OK_01 +# Check that the IUT provides a notification when requested by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_OK_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_BR_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_BR_02 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference nor websockNotifConfig provided +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_BR_03 +# Check that the IUT acknowledges the changes of an existing SensorDataSubscription when commanded by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_008_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_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_008_NF +# Check that the IUT acknowledges the cancellation of an existing SensorDataSubscription when commanded by a MEC Application +#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_009_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_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_009_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/etc/AtsMec_SensorsSharingService/AtsMec_SensorsSharingService.cfg b/etc/AtsMec_SensorsSharingService/AtsMec_SensorsSharingService.cfg new file mode 120000 index 0000000000000000000000000000000000000000..15550824ee38c367d57178aa01a7c78226288379 --- /dev/null +++ b/etc/AtsMec_SensorsSharingService/AtsMec_SensorsSharingService.cfg @@ -0,0 +1 @@ +AtsMec_SensorsSharingService.cf_ \ No newline at end of file diff --git a/etc/AtsMec_TrafficManagement/AtsMec_TrafficManagement.cfg_ b/etc/AtsMec_TrafficManagement/AtsMec_TrafficManagement.cfg_ new file mode 100644 index 0000000000000000000000000000000000000000..0f34812ab30d22c7360d5b6f512357139e600862 --- /dev/null +++ b/etc/AtsMec_TrafficManagement/AtsMec_TrafficManagement.cfg_ @@ -0,0 +1,200 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "192.168.40.50" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +LibMec_Pics.PICS_ROOT_API := "/sbxnfzm34p/mep1/" + +# LibMec_Pixits +TrafficManagementAPI_Pixits.PX_APP_INSTANCE_ID := "81c51643-8c6f-4781-ad45-f8a457ca549b" +TrafficManagementAPI_Pixits.PX_APP_INSTANCE_ID_2 := "81c51643-8c6f-4781-ad45-f8a457ca549b" + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/AtsMec_TrafficManagement/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +system.httpPort.params := "HTTP(codecs=json:json_codec_mec015)/TCP(debug=1,server=192.168.40.50,port=80,use_ssl=0)" +#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)" +#system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec015)/TCP(debug=1,server_mode=1,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_TestControl.control + +# Check that the IUT responds with the list of configured bandwidth allocations when queried by a MEC Application - none +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_01 +# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_instance_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_02 +# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - app_name +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_03 +# Check that the IUT responds with a configured bandwidth allocation when queried by a MEC Application - session_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_OK_04 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - app_instance_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_BR +# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_instance_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_NF_01 +# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - app_name +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_NF_02 +# Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application - session_id +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_001_NF_03 +# Check that the IUT acknowledges a creation of a bandwidthAllocation resource +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_BR_01 +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_002_BR_02 +# Check that the IUT responds with the configured bandwidth allocation when queried by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_OK +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_003_NF +# Check that the IUT updates the requested bandwidth requirements when commanded by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_BR_01 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_BR_02 +# Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_004_NF +#Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be omitted +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_BR_01 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - sessionFilter shall be present +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_BR_02 +#Check that the IUT when provided with just the changes (deltas) updates the requested bandwidth requirements when commanded by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_005_NF +#Check that the IUT unregisters from the Bandwidth Management Service when commanded by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_OK +#Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application +#AtsMec_TrafficManagementAPI_TestCases.TC_MEC_MEC015_SRV_TM_006_NF + +# Multi-access Traffic Steering information Test Cases +#Check that the IUT responds with the Multi-access Traffic Steering information when queried by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_001_OK +#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - none +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_01 +#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_instance_id +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_02 +#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - app_name +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_03 +#Check that the IUT responds with the list of configured Multi-access Traffic Steering when queried by a MEC Application - sessionId +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_OK_04 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_BR +#Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_002_NF +#Check that the IUT creates a MTS session when queried by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_OK_01 +#Check that the IUT creates a MTS session when queried by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_OK_02 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_003_BR +#Check that the IUT responds with a configured Multi-access Traffic Steering session when queried by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_004_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_004_BR +#Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_004_NF +#Check that the IUT updates the information about an individual MTS session when commanded by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_005_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_005_BR +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_005_NF +#Check that the IUT deregisters a MTS session when commanded by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_006_OK +#Check that the IUT responds with an error when a request with an unknown resource URI is sent by a MEC Application +#AtsMec_MultiAccessSteeringInfoAPI_TestCases.TC_MEC_MEC015_SRV_MTS_006_NF + +# BWM change event susbsciption Testcases +#Check that the IUT responds with a list of BWM change event susbsciption when queried by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_BR +#Check that the IUT responds with an error when no subscription are created +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_NF +#Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - Filter on subscription_type +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK +#Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscription_type +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF +#Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK +#Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF +#Check that the IUT acknowledges the creation of BWM change event subscription request when commanded by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_01 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_02 +#Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_03 +#Check that the IUT acknowledges the update of BWM change event subscription request when commanded by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK +#Check that the IUT acknowledges an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_002_NF +#Check that the IUT acknowledges the cancellation of BWM change event subscription request when commanded by a MEC Applications +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK +#Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_003_NF +#Check that the BWM service sends a notification about a bandwidth utility or the data volume if the BWM service has an associated subscription and the event is generated +#AtsMec_BandwidthChangeEventSubAPI_TestCases.TC_MEC_MEC015_SRV_BW_SUB_NOT_004_OK + + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec_UEidentity/AtsMec_UEidentity.cfg_ b/etc/AtsMec_UEidentity/AtsMec_UEidentity.cfg_ new file mode 100644 index 0000000000000000000000000000000000000000..7d8a960908457a6d9acb1e214adbbaab2df0951f --- /dev/null +++ b/etc/AtsMec_UEidentity/AtsMec_UEidentity.cfg_ @@ -0,0 +1,90 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +# IUT roles + +LibCommon_Time.PX_TAC := 30.0 +#LibCommon_Time.PX_TWAIT := 30.0 +LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0; +LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0; + +LibHttp_Pics.PICS_HEADER_HOST := "192.168.40.7" + +LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" +LibHttp_Pics.PICS_USE_TOKEN_HEADER := true +#LibHttp_Pics.PICS_TOKEN_HEADER := "Basic WrongToken" + +#LibMec_Pics.PICS_ROOT_API := "/sbxnfzm34p/mep1/" + +# LibMec_Pixits +UEidentityAPI_Pixits.PX_APP_INSTANCE_ID := "APP_INSTANCE_ID" +UEidentityAPI_Pixits.PX_UE_IDENTITY_TAG := "UE_IDENTITY_TAG" + +[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_UEidentity/%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.40.7,port=5000,use_ssl=0)" +#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)" +#system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec015)/TCP(debug=1,server_mode=1,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#AtsMec_TestControl.control + +# Check that the IUT responds with the information on a UE Identity tag when queried by a MEC Application +#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_001_OK +# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Applicati +#AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_001_BR +# 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_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_001_NF +# Check that the IUT registers a tag (representing a UE) or a list of tags when commanded by a MEC Application +AtsMec_UEidentityAPI_TestCases.TC_MEC_MEC014_SRV_UETAG_002_OK + + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ index a2043ca473d55f71c9da8ce717c5f4678fbdf424..b378196036d3973d43a0e6c5f83b185040847db4 100644 --- a/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ +++ b/etc/AtsMec_V2XInformationService/AtsMec_V2XInformationService.cfg_ @@ -25,8 +25,28 @@ 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/" +V2XInformationServiceAPI_Pixits.PX_PROV_UU_UNI_SUB_CALLBACK := "https://yanngarcia.ddns.net:36001/vis/v2/uu_uni" +V2XInformationServiceAPI_Pixits.PX_PROV_UU_MBMS_SUB_CALLBACK := "https://yanngarcia.ddns.net:36001/vis/v2/uu_mbs" +V2XInformationServiceAPI_Pixits.PX_PROV_PC5_SUB_CALLBACK := "https://yanngarcia.ddns.net:36001/vis/v2/pc5" +V2XInformationServiceAPI_Pixits.PX_PROV_V2X_SUB_CALLBACK := "https://yanngarcia.ddns.net:36001/vis/v2/v2x" + +# MQTT server +V2XInformationServiceAPI_Pixits.PX_V2X_MC_SERVER := "172.29.10.56"; +V2XInformationServiceAPI_Pixits.PX_V2X_MC_PORT := "1883"; + +# PredictedQos +V2XInformationServiceAPI_Pixits.PX_LOC_GRANULARITY := "30" +V2XInformationServiceAPI_Pixits.PX_QoS_LAT_1 := 43.729416 +V2XInformationServiceAPI_Pixits.PX_QoS_LON_1 := 7.414853 +V2XInformationServiceAPI_Pixits.PX_QoS_TS_1 := 1653295620 +V2XInformationServiceAPI_Pixits.PX_QoS_LAT_2 := 43.732456 +V2XInformationServiceAPI_Pixits.PX_QoS_LON_2 := 7.418417 +V2XInformationServiceAPI_Pixits.PX_QoS_TS_2 := 1653299220 +V2XInformationServiceAPI_Pixits.PX_STREAM_ID_1 := "0" +V2XInformationServiceAPI_Pixits.PX_STREAM_ID_2 := "1" +V2XInformationServiceAPI_Pixits.PX_STREAM_ID_3 := "2" +V2XInformationServiceAPI_Pixits.PX_QoS_LAT_1_OUT_OF_COVERAGE := 45.729416 +V2XInformationServiceAPI_Pixits.PX_QoS_LON_1_OUT_OF_COVERAGE := 10.414853 [LOGGING] # In this section you can specify the name of the log file and the classes of events @@ -73,7 +93,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec030)/TCP(debug=1 #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 +#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 @@ -83,13 +103,21 @@ AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_01 # 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 +# 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_02 -#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_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_002_BR_01 +#AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_002_BR_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_002_NF +# Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_OK_01 +# Check that the IUT responds with a configured provisioning information over PC5 when queried by a MEC Application #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_003_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_003_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_003_NF # Check that the IUT processes properly a request to information of V2X Message Distribution servers @@ -99,18 +127,29 @@ AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_01 # 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 +# Check that the IUT sends a request about QoS information for a vehicular UE when queried by a MEC Application #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_005_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_005_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_005_NF +# Check that the IUT processes properly a request to publish a V2X message #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_006_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_006_BR +# Check that the IUT responds with the requested list of subscription when queried by a MEC Application - prov_chg_uu_uni #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_01 +# Check that the IUT responds with the requested list of subscription when queried by a MEC Application - prov_chg_uu_mbms #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_02 +# Check that the IUT responds with the requested list of subscription when queried by a MEC Application - prov_chg_pc5 #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_03 +# Check that the IUT responds with the requested list of subscription when queried by a MEC Application - v2x_msg #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_04 +# #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_OK_05 +# Check that the IUT responds with the requested list of subscription when queried by a MEC Application #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_007_BR # Check that the IUT responds with the requested to create a subscription - ProvChgUuUniSubscription @@ -143,13 +182,20 @@ AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_01 # 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 +# Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - ProvChgUuUniSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_01 +# Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - ProvChgUuMbmsSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_02 +# Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - ProvChgPc5Subscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_03 +# Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - V2xMsgSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_04 +# Check that the IUT responds with the requested of updating subscription when queried by a MEC Application - PredQosSubscription #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_010_OK_05 +# Check that the IUT responds with the correct error code when a request with incorrect parameters is sent by a MEC Application #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 correct error code when a request with incorrect parameters is sent by a MEC Application +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 @@ -161,6 +207,7 @@ AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_001_OK_01 #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 +# Check that the IUT responds with the correct error code when a request with incorrect parameters is sent by a MEC Application #AtsMec_V2XInformationServiceAPI_TestCases.TC_MEC_MEC030_SRV_V2X_011_NF [GROUPS] diff --git a/etc/AtsMec_WlanInformation/AtsMec_WlanInformation_Sandbox.cfg_ b/etc/AtsMec_WlanInformation/AtsMec_WlanInformation_Sandbox.cfg_ index 50d1b79d6ed8fbf7a5c88aeb9f5c053e8a12fc05..482bf67f9d2678f9adea128edd36e62c64c21ab6 100644 --- a/etc/AtsMec_WlanInformation/AtsMec_WlanInformation_Sandbox.cfg_ +++ b/etc/AtsMec_WlanInformation/AtsMec_WlanInformation_Sandbox.cfg_ @@ -18,9 +18,10 @@ LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign i LibMec_Pics.PICS_MEC_PLAT := true -WlanInformationAPI_Pixits.PX_WLAN_FILTER_VALUE := "005C0A0A0002" -WlanInformationAPI_Pixits.PX_MAC_ID := "005C07070707" -WlanInformationAPI_Pixits.PX_ASSOC_STA_SUBSCRIPTION_CALLBACK := "http://yanngarcia.ddns.net/wais/v2/assoc_sta" +# LibMec/WlanInformationAPI +WlanInformationAPI_Pixits.PX_WLAN_FILTER_VALUE := "005C0A0A0002" +WlanInformationAPI_Pixits.PX_MAC_ID := "005C07070707" +WlanInformationAPI_Pixits.PX_ASSOC_STA_SUBSCRIPTION_CALLBACK := "http://yanngarcia.ddns.net:8547/wais/v2/assoc_sta" [LOGGING] # In this section you can specify the name of the log file and the classes of events @@ -87,7 +88,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec028)/TCP(debug=1 # Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application #AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_BR # Check that the IUT responds with an error when a request with not existing parameters is sent -#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_NF +AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_NF # Check that the IUT responds with a Notification Subscription #AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_007_OK # Check that the IUT responds with an error when an invalid Subscription request is sent @@ -111,7 +112,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec028)/TCP(debug=1 # Check that the IUT sends a notification about WLAN event notification if the MEC service has an associated subscription and the event is generated #AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_011_OK # Check that the IUT responds with the list of WLAN Access Point -AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_012_OK +#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_012_OK # Check that the IUT responds with a new measurement configuration #AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_013_OK # Check that the IUT responds with an error when an invalid request is sent diff --git a/gs032p3-ttcn-test-suite.code-workspace b/gs032p3-ttcn-test-suite.code-workspace index 5d037498b5f2d53a4124c3341698423887f3fd8b..48713ec3dfccc074b2d46408f02b7bd3bb6528f4 100644 --- a/gs032p3-ttcn-test-suite.code-workspace +++ b/gs032p3-ttcn-test-suite.code-workspace @@ -10,7 +10,13 @@ "path": "../eurecom" }, { - "path": "../gs032p3-robot-test-suite" + "path": "../mec.pipeline-scripts" + }, + { + "path": "../../frameworks/titan/titan.core" + }, + { + "path": "../doc2oas" } ], "settings": { diff --git a/install.sh b/install.sh index c8048c944363e79c8c8f17320cfb98d3d726fdf2..c777e49baa809268b37274d7aa387a26f806ce6f 100755 --- a/install.sh +++ b/install.sh @@ -5,7 +5,7 @@ set -vx BASE_PATH=`pwd` -git submodule update --init --recursive --remote +#git submodule update --init --recursive --remote if [ ! -d ./titan-test-system-framework ] then diff --git a/titan-test-system-framework b/titan-test-system-framework index a8db2aefc860cdfec0b76ae767f5c91fe7ec042f..c0d15f46ba5406cf788059a86743ed9b87f1044e 160000 --- a/titan-test-system-framework +++ b/titan-test-system-framework @@ -1 +1 @@ -Subproject commit a8db2aefc860cdfec0b76ae767f5c91fe7ec042f +Subproject commit c0d15f46ba5406cf788059a86743ed9b87f1044e diff --git a/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn index 931930f2bbd9ac84c9bba12cd32988dcd4c8e5b0..a6ee0fae0ff0bf721fe485343f3af5ab48c9cb6e 100644 --- a/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationMobiltyService/AtsMec_ApplicationMobiltyServiceAPI_TestCases.ttcn @@ -130,7 +130,7 @@ 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 & ")", + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,appMobilityServiceId," & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")) & ")", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -192,7 +192,7 @@ 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 & ")", + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,serviceConsumerId/appInstanceId," & oct2char(unichar2oct(PX_APP_INS_ID_2, "UTF-8")) & ")", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -254,7 +254,7 @@ 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])", + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?filter=(eq,appMobilityServiceId," & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")) & "&Exclude_fields=deviceInformation)", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -269,12 +269,7 @@ 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 - )), + v_registration_info_1, * } ))))) { @@ -327,7 +322,7 @@ alt { [] httpPort.receive( mw_http_response( - mw_http_response_ok_no_body + mw_http_response_404_not_found )) { tc_ac.stop; @@ -370,7 +365,7 @@ 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 + PICS_ROOT_API & PX_ME_APP_AMS_URI & "?appMobilityService=" & "?filter=(appMobilityServiceId,eq," & oct2char(unichar2oct(v_registration_info_1.appMobilityServiceId, "UTF-8")) & ")", // Wrong syntax v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -560,7 +555,7 @@ httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=" & v_mobility_procedure_subscription.subscriptionType, + PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=mobility_proc", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -575,10 +570,15 @@ mw_body_json_ams_subscriptions( mw_subscription_link_list( v_mobility_procedure_subscription.links, - mw_subscription( + { + *, + mw_subscription( -, v_mobility_procedure_subscription.subscriptionType - ))))))) { + ), + * + } + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); @@ -860,7 +860,7 @@ httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + 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); @@ -965,7 +965,7 @@ httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + 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); @@ -1142,7 +1142,7 @@ httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & PX_NON_EXISTENT_SUBSCRIPTION_ID, + 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_mobility_procedure_subscription( @@ -1205,7 +1205,7 @@ f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -1217,7 +1217,7 @@ mw_mobility_procedure_notification( v_mobility_procedure_subscription.links )))))) { - tc_wait.stop; + tc_ac.stop; // Send 204 No Content f_init_default_headers_list(-, -, v_headers); @@ -1226,7 +1226,7 @@ log("*** " & testcasename() & ": PASS: IUT successfully sends mobility procedure notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -1262,7 +1262,7 @@ f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -1274,7 +1274,7 @@ mw_adjacent_app_info_notification( v_adjacent_appInfo_subscription.links )))))) { - tc_wait.stop; + tc_ac.stop; // Send 204 No Content f_init_default_headers_list(-, -, v_headers); @@ -1283,7 +1283,7 @@ log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent appInfo notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -1319,7 +1319,7 @@ f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -1331,7 +1331,7 @@ mw_mobility_procedure_notification( v_mobility_procedure_subscription.links )))))) { - tc_wait.stop; + tc_ac.stop; // Send 204 No Content f_init_default_headers_list(-, -, v_headers); @@ -1349,12 +1349,12 @@ mw_body_json_expire_notification( mw_expire_notification ))))) { - tc_wait.stop; + tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully sends expiry notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } diff --git a/ttcn/AtsMec_ApplicationMobiltyService/module.mk b/ttcn/AtsMec_ApplicationMobiltyService/module.mk index 3f0d27376530381cd2deea94ebb6556b6c267e2f..9dbea5d32b86c260176c42fbc8cdbf986b0e2f95 100644 --- a/ttcn/AtsMec_ApplicationMobiltyService/module.mk +++ b/ttcn/AtsMec_ApplicationMobiltyService/module.mk @@ -22,8 +22,11 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ - ../LibMec/IoTAPI \ ../LibMec/FederationEnablementAPI \ + ../LibMec/IoTAPI \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn index 12ea8f68a797a8a32ef1bc79816a68298d1d73dc..2a336f49d4380e3803c828ded5024d9443f5215e 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn @@ -1,5 +1,5 @@ /** -* @Author ETSI / STF569 / TTF012 +* @Author ETSI / STF569 / TTF012 / TTF T043 * @version $URL:$ * $ID:$ * @desc This module provides the MEC test cases. @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. -* @see ETSI GS MEC 003, Draft ETSI GS MEC 010-2 V2.2.1 +* @see ETSI GS MEC 003, Draft ETSI GS MEC 010-2 V3.2.1 */ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { @@ -623,8 +623,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_create_package_management( PX_APP_PKG_NAME, PX_APP_PKG_VERSION, - m_checksum(-, PX_CHECKSUM), - PX_APP_PKG_PATH + m_checksum(-,PX_CHECKSUM) )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -637,11 +636,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - -, -, - PX_APP_PKG_NAME, - PX_APP_PKG_VERSION, - -, - mw_checksum + -, + mw_checksum, + CREATED, + -, + PX_USAGE_STATE, + - )))))) -> value v_response { tc_ac.stop; @@ -687,8 +687,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { m_create_package_management( "", PX_APP_PKG_VERSION, - m_checksum(-, PX_CHECKSUM), - PX_APP_PKG_PATH + m_checksum(-, PX_CHECKSUM) )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -755,12 +754,13 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { { *, mw_app_pkg_info( - -, -, - PX_APP_PKG_NAME, - PX_APP_PKG_VERSION, - -, - mw_checksum - ), + v_app_pkg_info.id, + mw_checksum, + CREATED, + -, + -, + - + ), * } ))))) -> value v_response { @@ -821,12 +821,15 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_body_json_app_pkg_info_list( { *, - mw_app_pkg_info( - -, -, - PX_APP_PKG_NAME, - PX_APP_PKG_VERSION, - -, - mw_checksum + mw_app_pkg_info_onboarded( + v_app_pkg_info.id, + -, + PX_APP_PKG_NAME, + PX_APP_PKG_VERSION, + -, + mw_checksum, + -, + PX_ONBOARDED_STATE_ONBOARDED ), * } @@ -937,7 +940,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - v_app_pkg_info.id + v_app_pkg_info.id, + -, + PX_ONBOARDED_STATE, + -, + PX_USAGE_STATE, + v_app_pkg_info.links )))))) -> value v_response { tc_ac.stop; @@ -994,12 +1002,23 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_app_pkg_info( - mw_app_pkg_info( - PX_APP_PKG_ID + mw_app_pkg_info_onboarded( + v_app_pkg_info.id, + v_app_pkg_info.appDId, + v_app_pkg_info.appName, + v_app_pkg_info.appSoftwareVersion, + v_app_pkg_info.appDVersion, + v_app_pkg_info.checksum, + -, + PX_ONBOARDED_STATE_ONBOARDED, + -, + -, + v_app_pkg_info.mecInfo, + v_app_pkg_info.links )))))) -> value v_response { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with an Onboarded App Package ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1836,7 +1855,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort_notif.receive { tc_ac.stop; - httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers))); + // Send 500 + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers, -, testcasename() & ": Receive unsollicited message"))); log("*** " & testcasename() & ": FAIL: Expected message received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); @@ -2209,10 +2230,12 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { { *, mw_app_pkg_info( - v_app_pkg_info.id, - v_app_pkg_info.appDId - ) - , + -, + mw_checksum, + PX_ONBOARDED_STATE, + PX_APPPKGINFO_OPERATIONAL_STATE, + PX_USAGE_STATE + ), * } ))))) { @@ -2233,7 +2256,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK /** - * @desc Check that MEPM returns the list of App Packages when requested - Note 3 + * @desc Check that MEPM returns the list of on-boarded App Packages when requested - Note 3 */ testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2271,11 +2294,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_body_json_app_pkg_info_list( { *, - mw_app_pkg_info( + mw_app_pkg_info_onboarded( v_app_pkg_info.id, v_app_pkg_info.appDId, -, -, -, -, -, - ONBOARDED + PX_ONBOARDED_STATE_ONBOARDED ) , * @@ -2283,7 +2306,7 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with an Onboarded App Package list ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -2385,7 +2408,8 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_body_json_app_pkg_info( mw_app_pkg_info( v_app_pkg_info.id, - v_app_pkg_info.appDId + -, + PX_ONBOARDED_STATE_ONBOARDED )))))) { tc_ac.stop; @@ -2440,11 +2464,11 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_app_pkg_info( - mw_app_pkg_info( + mw_app_pkg_info_onboarded( v_app_pkg_info.id, v_app_pkg_info.appDId, -, -, -, -, -, - ONBOARDED + PX_ONBOARDED_STATE_ONBOARDED )))))) { tc_ac.stop; @@ -5350,7 +5374,9 @@ module AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases { [] httpPort_notif.receive { tc_ac.stop; - httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers))); + // Send 500 + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers, -, testcasename() & ": Receive unsollicited message"))); log("*** " & testcasename() & ": FAIL: Expected message received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); diff --git a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk index 9b2aa7c42141e6b3cece25b5ad4d464448546b41..13df0a94afcf091732203ce7c88a913b589844b5 100644 --- a/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk +++ b/ttcn/AtsMec_ApplicationPackageLifecycleAndOperationGranting/module.mk @@ -22,7 +22,6 @@ modules := ../LibCommon \ ../LibMec/WlanInformationAPI \ ../LibMec/FixedAccessInformationServiceAPI \ ../LibMec/ApplicationMobilityServiceAPI \ - ../LibMec/FederationEnablementAPI \ ../LibMec/IoTAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ diff --git a/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn index 904a4d0c1ce16efe2f47058c39d34713cc21b43b..5e49a9f70e0a7abed1f1ea7ec085d4ee3563995d 100644 --- a/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_DeviceApplicationInterface/AtsMec_DeviceApplicationInterfaceAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 002, Draft ETSI GS MEC 016 V2.2.1 (2020-04) + * @see ETSI GS MEC 002, Draft ETSI GS MEC 016 V3.1.1 (2024-03) */ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { @@ -43,8 +43,6 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with the list of user applications when requested by an UE Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -70,9 +68,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_DEVICE_APP_LIST_URI, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -83,7 +79,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_device_info_app_list - )))) -> value v_response { + )))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of Application ***"); @@ -101,8 +97,6 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -125,11 +119,9 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_DEVICE_APP_LIST_URI & "appName", + PICS_ROOT_API & "dev_app/v1/app_list_error", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -138,7 +130,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_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 ***"); @@ -156,8 +148,6 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with the list of user applications when requested by an UE Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -181,11 +171,9 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_DEVICE_APP_LIST_URI & "?appName=" & PX_DEVICE_APP_NAME, + PICS_ROOT_API & PX_DEVICE_APP_LIST_URI & "?appName=" & oct2char(unichar2oct(PX_DEVICE_APP_NAME, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -196,7 +184,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { mw_http_response_ok( mw_http_message_body_json( mw_body_json_device_info_app_list - )))) -> value v_response { + )))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of Application ***"); @@ -214,8 +202,6 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -238,7 +224,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_DEVICE_APP_LIST_URI & "appName", + PICS_ROOT_API & PX_DEVICE_APP_LIST_URI & "?APP_NAME", v_headers ) ) @@ -269,8 +255,6 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplications.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPS_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -295,9 +279,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_DEVICE_APP_LIST_URI & "appName", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -306,7 +288,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_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 ***"); @@ -324,14 +306,14 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT acknowledges the creation of the application context when requested by an UE Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; - + + var UserAppInstanceInfoList v_userAppInstanceInfo := {{appInstanceId := omit, referenceURI := omit, appLocation := {countryCode := "countryCode", civicAddressElement := {{caType := 7, caValue := "caValue"}, {caType := 7, caValue := "caValue"}}, area := {coordinates := {{{2.302136, 2.302136}, {2.302136, 2.302136}}, {{2.302136, 2.302136}, {2.302136, 2.302136}}}}}}}; + // Test control if (not(PICS_MEC_PLAT) or not(PICS_DEVICE_APPLICATION_INTERFACE_API_SUPPORTED)) { log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_DEVICE_APPLICATION_INTERFACE_API_SUPPORTED required for executing the TC ***"); @@ -354,20 +336,19 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { m_http_message_body_json( m_body_json_device_info_app_context( m_device_app_context( + -, PX_ASSOCIATE_DEV_APPID, m_app_context_info( PX_APPD_ID, PX_APP_NAME, PX_APP_PROVIDER, - PX_APPD_VERSION + PX_APPD_VERSION, + PX_APP_DESCRIPTION, + PX_APP_SOFT_VERSION, + v_userAppInstanceInfo ), PX_DEVICE_APP_CALLBACK - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -383,7 +364,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { PX_ASSOCIATE_DEV_APPID, mw_app_context_info, PX_DEVICE_APP_CALLBACK - )))))) -> value v_response { + )))))) -> value v_response { tc_ac.stop; // TODO Check presence of Location HTTP header @@ -403,8 +384,6 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -427,25 +406,24 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "Invalid", + PICS_ROOT_API & PX_DEVICE_APP_CTX_URI, v_headers, m_http_message_body_json( m_body_json_device_info_app_context( m_device_app_context( + -, PX_ASSOCIATE_DEV_APPID, m_app_context_info( PX_APPD_ID, PX_APP_NAME, PX_APP_PROVIDER, - PX_APPD_VERSION + PX_APPD_VERSION, + PX_APP_DESCRIPTION, + PX_APP_SOFT_VERSION, + omit ), PX_DEVICE_APP_CALLBACK - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -454,7 +432,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an Application Contexta correct error code ***"); @@ -472,8 +450,6 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -496,11 +472,12 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_DEVICE_APP_CTX_URI, + PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "WRONGURL", v_headers, m_http_message_body_json( m_body_json_device_info_app_context( m_device_app_context( + -, PX_ASSOCIATE_DEV_APPID, m_app_context_info( PX_APPD_ID, @@ -509,12 +486,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { PX_APPD_VERSION ), PX_DEVICE_APP_CALLBACK - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -523,7 +495,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with an Application Contexta correct error code ***"); @@ -541,14 +513,11 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT acknowledges the creation of the application context when requested by an UE Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var AppContext v_device_info_app_context; - var HttpMessage v_response; // Test control if (not(PICS_MEC_PLAT) or not(PICS_DEVICE_APPLICATION_INTERFACE_API_SUPPORTED)) { @@ -568,25 +537,21 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "/" & v_device_info_app_context.contextId, + PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "/" & oct2char(unichar2oct(v_device_info_app_context.contextId, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_device_info_app_context( m_device_app_context( + v_device_info_app_context.contextId, PX_ASSOCIATE_DEV_APPID, m_app_context_info( - PX_APPD_ID, - PX_APP_NAME, - PX_APP_PROVIDER, - PX_APPD_VERSION + PX_APPD_ID_2, + PX_APP_NAME_2, + PX_APP_PROVIDER_2, + PX_APPD_VERSION_2 ), PX_DEVICE_NEW_APP_CALLBACK - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -595,7 +560,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) -> value v_response { + )) { tc_ac.stop; // TODO Check presence of Location HTTP header @@ -615,8 +580,6 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -642,11 +605,12 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "/" & v_device_info_app_context.contextId, + PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "/" & oct2char(unichar2oct(v_device_info_app_context.contextId, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_device_info_app_context( m_device_app_context( + -, PX_INVALID_ASSOCIATE_DEV_APPID, m_app_context_info( PX_APPD_ID, @@ -655,12 +619,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { PX_APPD_VERSION ), PX_DEVICE_NEW_APP_CALLBACK - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -669,7 +628,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { [] 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 ***"); @@ -687,8 +646,6 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_002_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -711,11 +668,12 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "/" & PX_UNKNOWN_APP_CONTEXT_ID, + PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_CONTEXT_ID, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_device_info_app_context( m_device_app_context( + PX_UNKNOWN_APP_CONTEXT_ID, PX_ASSOCIATE_DEV_APPID, m_app_context_info( PX_APPD_ID, @@ -724,12 +682,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { PX_APPD_VERSION ), PX_DEVICE_NEW_APP_CALLBACK - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -738,7 +691,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { [] 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 ***"); @@ -756,8 +709,6 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT deletes the application context when commanded by an UE Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -782,7 +733,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "/" & PX_UNKNOWN_APP_CONTEXT_ID, + PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "/" & oct2char(unichar2oct(v_device_info_app_context.contextId, "UTF-8")), v_headers ) ) @@ -813,8 +764,6 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request for an unknown URI is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeAppsContext.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPCTX_003_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -837,7 +786,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "/" & PX_UNKNOWN_APP_CONTEXT_ID, + PICS_ROOT_API & PX_DEVICE_APP_CTX_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_CONTEXT_ID, "UTF-8")), v_headers ) ) @@ -868,81 +817,88 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT sends the locations available for instantiation of a specific user application when requested by an UE Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPLOC_001_OK() runs on HttpComponent system HttpTestAdapter { - // Local variables - var Headers v_headers; - - // Test control - if (not(PICS_MEC_PLAT) or not(PICS_DEVICE_APPLICATION_INTERFACE_API_SUPPORTED)) { - log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_DEVICE_APPLICATION_INTERFACE_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_DEVICE_APP_LIST_URI, - v_headers, - m_http_message_body_json( - m_body_json_device_info_app_location_availability( - m_application_location_availability( - PX_ASSOCIATE_DEV_APPID, - m_application_location_availability_info( - PX_APPD_ID, - PX_APP_NAME, - PX_APP_PROVIDER, - PX_APPD_VERSION - ) - ) - ) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Local variables + var Headers v_headers; + template (value) ApplicationLocationAvailability_AppInfo t_appLocAvail := + { + appName := "onboarded-demo4", + appProvider := "ETSI", + appSoftVersion := "v0.1.0", + appDVersion := "v0.1.0", + appDescription := "Basic HTTP Ping Pong", + availableLocations := { + { + appLocation := { + countryCode := "492", + civicAddressElement := { + { caType := 1, caValue := "A1" }, + { caType := 2, caValue := "A2" } + }, + area := {coordinates := {{{2.302136, 2.302136}, {2.302136, 2.302136}}, {{2.302136, 2.302136}, {2.302136, 2.302136}}}} + } + } + }, + appPackageSource := "http://example.com/aeiou" + }; - // Test Body - tc_ac.start; - alt { - [] httpPort.receive( - mw_http_response( - mw_http_response_ok( - mw_http_message_body_json( - m_body_json_device_info_app_location_availability( - mw_application_location_availability( - PX_ASSOCIATE_DEV_APPID, - mw_application_location_availability_info - )))))) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of Application ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, 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 control + if (not(PICS_MEC_PLAT) or not(PICS_DEVICE_APPLICATION_INTERFACE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_DEVICE_APPLICATION_INTERFACE_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_DEVICE_APP_LOC_URI, + v_headers, + m_http_message_body_json( + m_body_json_device_info_app_location_availability( + m_application_location_availability( + PX_ASSOCIATE_DEV_APPID, + t_appLocAvail + )))))); + 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( + m_body_json_device_info_app_location_availability( + mw_application_location_availability( + PX_ASSOCIATE_DEV_APPID, + t_appLocAvail + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of Application ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_UEAPPLOC_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/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPLOC_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -965,7 +921,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_DEVICE_APP_LIST_URI & "_invalid", + PICS_ROOT_API & PX_DEVICE_APP_LOC_URI, v_headers, m_http_message_body_json( m_body_json_device_info_app_location_availability( @@ -973,16 +929,10 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { PX_ASSOCIATE_DEV_APPID, m_application_location_availability_info( PX_APPD_ID, - PX_APP_NAME, + PX_UNKNOWN_APP_NAME, PX_APP_PROVIDER, PX_APPD_VERSION - ) - ) - ) - ) - ) - ) - ); + ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -991,7 +941,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_400_bad_request - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of Application ***"); @@ -1009,8 +959,6 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { /** * @desc Check that the IUT responds with an error when a request with incorrect URL is sent by a MEC Application - * @see https://forge.etsi.org/rep/mec/gs016-dev-app-api/blob/master/UEAppInterfaceApi.json - * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC016/MEO/UEAPPS/SysUeApplicationsLocation.tplan2 */ testcase TC_MEC_MEC016_MEO_UEAPPLOC_001_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1033,7 +981,7 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_DEVICE_APP_LIST_URI, + PICS_ROOT_API & PX_DEVICE_APP_LOC_URI, v_headers, m_http_message_body_json( m_body_json_device_info_app_location_availability( @@ -1043,14 +991,11 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { PX_APPD_ID, PX_APP_NAME, PX_APP_PROVIDER, - PX_APPD_VERSION - ) - ) - ) - ) - ) - ) - ); + PX_APPD_VERSION, + -, -, + "http://example.com/aeiou" + + ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1059,10 +1004,10 @@ module AtsMec_DeviceApplicationInterfaceAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_404_not_found - )) { + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of Application ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { diff --git a/ttcn/AtsMec_DeviceApplicationInterface/module.mk b/ttcn/AtsMec_DeviceApplicationInterface/module.mk index a3bfbe021d0c3e235c69cc240c76e62ff60dd35a..20b4ef730eb0564a66797490b42062b628e24620 100644 --- a/ttcn/AtsMec_DeviceApplicationInterface/module.mk +++ b/ttcn/AtsMec_DeviceApplicationInterface/module.mk @@ -24,6 +24,9 @@ modules := ../LibCommon \ ../LibMec/ApplicationMobilityServiceAPI \ ../LibMec/FederationEnablementAPI \ ../LibMec/IoTAPI \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestCases.ttcn index 29b7d54e32431b911079c6ded14e522a912f75d1..fc96039304256398a9e0ab9ec830d079ffb894e2 100644 --- a/ttcn/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 V3.2.1 + * @see ETSI GS MEC 003, Draft ETSI GS MEC 011 V3.3.1 */ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { @@ -881,7 +881,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { 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, + PICS_ROOT_API & PX_ME_APP_REG_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_NON_EXISTENT_SERVICE_NAME)), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2596,7 +2596,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { PX_APP_NAME, -, -, -, -, // appInstanceId shall be provided as isInsByMec is set to true - -, -, -, -, -, + -, -, -, -, -, -, -, -, -, true )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2656,7 +2656,7 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { -, -, PX_APP_D_ID, PX_APP_INSTANCE_ID, - -, -, -, -, -, + -, -, -, -, -,-, -, -, -, false )))))); @@ -4613,4 +4613,1712 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases { } // End of group transport_rules + group capif { + + /** + * @desc Check that the IUT responds with all service APIs when queried by a MEC Application - No filter + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_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_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_CAPIF_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_discovered_apis + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with to the service APIs ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC_PROFILE_FOR_CAPIF_001_OK_01 + + /** + * @desc Check that the IUT responds with all service APIs when queried by a MEC Application - Filter on apiName + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_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_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_CAPIF_URI & "?api-name=" & oct2char(unichar2oct(PX_API_NAME, "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_discovered_apis( + mw_discovered_apis( + { + *, + mw_service_api_description( + oct2char(unichar2oct(PX_API_NAME, "UTF-8")) + ), + * + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with to the service APIs ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC_PROFILE_FOR_CAPIF_001_OK_02 + + /** + * @desc Check that the IUT responds with all service APIs when queried by a MEC Application - Filter on apiId + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_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_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_CAPIF_URI & "?api-invoker-id=" & oct2char(unichar2oct(PX_API_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_discovered_apis( + mw_discovered_apis( + { + mw_service_api_description( + -, + oct2char(unichar2oct(PX_API_ID, "UTF-8")) + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with to the service APIs ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC_PROFILE_FOR_CAPIF_001_OK_03 + + /** + * @desc Check that the IUT responds with all service APIs when queried by a MEC Application - Filter on apiId and apiName + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_05() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_service_info_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_service_info_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_CAPIF_URI & "?api-name=" & oct2char(unichar2oct(PX_API_NAME, "UTF-8")) & "&api-invoker-id=" & oct2char(unichar2oct(PX_API_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_discovered_apis( + mw_discovered_apis( + { + mw_service_api_description( + oct2char(unichar2oct(PX_API_NAME, "UTF-8")), + oct2char(unichar2oct(PX_API_ID, "UTF-8")) + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with to the service APIs ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_service_info_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_05 + + /** + * @desc Check that the IUT responds with an error when applying a malformed filter + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_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_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_CAPIF_URI & "?apiName=" & oct2char(unichar2oct(PX_API_NAME, "UTF-8")), // Wrong query parameters + 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 HTTP error 400 ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC_PROFILE_FOR_CAPIF_001_BR + + /** + * @desc Check that the IUT responds with an error when applying a filter on an unknown apiName + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_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_CAPIF_URI & "?apiName=MEC-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 + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 404 ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC_PROFILE_FOR_CAPIF_001_NF + + /** + * @desc Check that the IUT responds with all service APIs for a specific apfId when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_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_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_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/service-apis", + 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_discovered_apis + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with to the service APIs ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC_PROFILE_FOR_CAPIF_002_OK + + /** + * @desc Check that the IUT responds with all service APIs for a specific apfId when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_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)) { + 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_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/service-apis", + 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 to the HTTP error 404 ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC_PROFILE_FOR_CAPIF_002_NF + + /** + * @desc Check that the IUT responds with all service APIs for a specific apfId when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_service_info_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_service_info_id); + f_start_service_info(v_service_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(v_service_info.serInstanceId, "UTF-8")) & "/service-apis", + v_headers, + m_http_message_body_json( + m_body_json_service_api_description( + m_service_api_description( + v_service_info.serName, + v_service_info.serInstanceId, + { + m_aef_profile( + "12345", + { m_version }, + m_mec_transport_info_capif_ext, + HTTP_2 + ) + }, + m_mec_service_info_capif_ext( + -, -, + m_category_ref( + "catalogueHref", + v_service_info.serName, + v_service_info.serName, + v_service_info.version + )), + -, + v_service_info.serName, + { "WeatherInfo" } + )))))); + 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_service_api_description( + mw_service_api_description( + v_service_info.serName, + v_service_info.serInstanceId + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with to the service APIs ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_published_api(v_service_info.serInstanceId, v_service_info.serInstanceId); + f_stop_service_info(v_service_info); + f_delete_service_info(v_service_info_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_003_OK + + /** + * @desc Check that the IUT responds with an error when incorrect parameters were sent by a MEC Application - supportedFeatures shall be present + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_003_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_service_info_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_service_info_id); + f_start_service_info(v_service_info); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(v_service_info.serInstanceId, "UTF-8")) & "/service-apis", + v_headers, + m_http_message_body_json( + m_body_json_service_api_description( + m_service_api_description( + v_service_info.serInstanceId, + v_service_info.serName, + { + m_aef_profile( + "12345", + { m_version }, + m_mec_transport_info_capif_ext, + HTTP_2 + ) + }, + m_mec_service_info_capif_ext( + -, -, + m_category_ref( + "catalogueHref", + v_service_info.serName, + v_service_info.serName, + v_service_info.version + )), + -, + v_service_info.serName + // No supportedFeatures + )))))); + 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 to the service APIs ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_stop_service_info(v_service_info); + f_delete_service_info(v_service_info_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_003_BR + + /** + * @desc Check that the IUT responds with a serviceAPIDescription when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_service_info_id; + var ServiceAPIDescription v_service_api_description; + + // 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_service_info_id); + f_start_service_info(v_service_info); + f_publish_api(v_service_info, v_service_api_description); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(v_service_info.serInstanceId, "UTF-8")) & "/service-apis/" & oct2char(unichar2oct(v_service_api_description.apiId, "UTF-8")), + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_service_api_description( + mw_service_api_description( + v_service_info.serInstanceId, + v_service_info.serName + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with to the service APIs ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_published_api(v_service_info.serInstanceId, v_service_api_description.apiId); + f_stop_service_info(v_service_info); + f_delete_service_info(v_service_info_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_OK + + /** + * @desc Check that the IUT responds with an error when applying a filter on an unknown apfId + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_NF_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_service_info_id; + var ServiceAPIDescription v_service_api_description; + + // 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_service_info_id); + f_start_service_info(v_service_info); + f_publish_api(v_service_info, v_service_api_description); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(v_service_info.serInstanceId & "_unknown", "UTF-8")) & "/service-apis/" & oct2char(unichar2oct(v_service_api_description.apiId, "UTF-8")), // Unknown apiId + v_headers + ))); + 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 to the service APIs ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_stop_service_info(v_service_info); + f_delete_service_info(v_service_info_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_NF_01 + + /** + * @desc Check that the IUT responds with an error when applying a filter on an unknown serviceApiId + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_NF_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_service_info_id; + var ServiceAPIDescription v_service_api_description; + + // 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_service_info_id); + f_start_service_info(v_service_info); + f_publish_api(v_service_info, v_service_api_description); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(v_service_info.serInstanceId, "UTF-8")) & "/service-apis/666", // Unknown serviceApiId + v_headers + ))); + 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 to the HTTP error message 404 ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_stop_service_info(v_service_info); + f_delete_service_info(v_service_info_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_NF_02 + + /** + * @desc Check that the IUT updates the publishing of a new API when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_service_info_id; + var ServiceAPIDescription v_service_api_description; + + // 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_service_info_id); + f_start_service_info(v_service_info); + f_publish_api(v_service_info, v_service_api_description); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_service_api_description.supportedFeatures := { "WeatherInfo", "MoonPhasesInfo" } + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(v_service_info.serInstanceId, "UTF-8")) & "/service-apis/" & oct2char(unichar2oct(v_service_api_description.apiId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_service_api_description( + v_service_api_description + ))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_service_api_description( + v_service_api_description + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with to the service APIs ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_published_api(v_service_info.serInstanceId, v_service_api_description.apiId); + f_stop_service_info(v_service_info); + f_delete_service_info(v_service_info_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_005_OK + + /** + * @desc Check that the IUT updates the publishing of a new API when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_service_info_id; + var ServiceAPIDescription v_service_api_description; + + // 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_service_info_id); + f_start_service_info(v_service_info); + f_publish_api(v_service_info, v_service_api_description); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_service_api_description.supportedFeatures := { "WeatherInfo", "MoonPhasesInfo" } + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(v_service_info.serInstanceId, "UTF-8")) & "/service-apis/" & oct2char(unichar2oct(v_service_api_description.apiId & "_unknown", "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_service_api_description( + v_service_api_description + ))))); + 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 HTTP error 404 ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_stop_service_info(v_service_info); + f_delete_service_info(v_service_info_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_005_NF + + /** + * @desc Check that the IUT changes the publishing of a new API when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_service_info_id; + var ServiceAPIDescription v_service_api_description; + + // 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_service_info_id); + f_start_service_info(v_service_info); + f_publish_api(v_service_info, v_service_api_description); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_service_api_description.supportedFeatures := { "WeatherInfo", "MoonPhasesInfo" } + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_ME_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(v_service_info.serInstanceId, "UTF-8")) & "/service-apis/" & oct2char(unichar2oct(v_service_api_description.apiId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_service_api_description_patch( + m_service_api_description_patch( + m_mec_service_info_capif_ext( + -, -, + m_category_ref( + "catalogueHref", + v_service_api_description.mecServiceInfoCapifExt.category.href, + v_service_api_description.mecServiceInfoCapifExt.category.id, + v_service_api_description.mecServiceInfoCapifExt.category.version & ".1" + )))))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_service_api_description_patch( + mw_service_api_description_patch( + mw_mec_service_info_capif_ext( + -, -, + mw_category_ref( + -, -, -, + v_service_api_description.mecServiceInfoCapifExt.category.version & ".1" + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with to the service APIs ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_published_api(v_service_info.serInstanceId, v_service_api_description.apiId); + f_stop_service_info(v_service_info); + f_delete_service_info(v_service_info_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_006_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_MEC_PROFILE_FOR_CAPIF_006_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_service_info_id; + var ServiceAPIDescription v_service_api_description; + + // 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_service_info_id); + f_start_service_info(v_service_info); + f_publish_api(v_service_info, v_service_api_description); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_service_api_description.supportedFeatures := { "WeatherInfo", "MoonPhasesInfo" } + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_ME_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(v_service_info.serInstanceId & "_unknown", "UTF-8")) & "/service-apis/" & oct2char(unichar2oct(v_service_api_description.apiId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_service_api_description_patch( + m_service_api_description_patch( + m_mec_service_info_capif_ext( + -, -, + m_category_ref( + "catalogueHref", + v_service_api_description.mecServiceInfoCapifExt.category.href, + v_service_api_description.mecServiceInfoCapifExt.category.id, + v_service_api_description.mecServiceInfoCapifExt.category.version & ".1" + )))))))); + 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 HTTP error 404 ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_stop_service_info(v_service_info); + f_delete_service_info(v_service_info_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_006_NF + + /** + * @desc Check that the IUT acknowledges the removing of a published API when queried by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_service_info_id; + var ServiceAPIDescription v_service_api_description; + + // 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_service_info_id); + f_start_service_info(v_service_info); + f_publish_api(v_service_info, v_service_api_description); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_service_api_description.supportedFeatures := { "WeatherInfo", "MoonPhasesInfo" } + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(v_service_info.serInstanceId, "UTF-8")) & "/service-apis/" & oct2char(unichar2oct(v_service_api_description.apiId, "UTF-8")), + 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 HTTP code 204 ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_stop_service_info(v_service_info); + f_delete_service_info(v_service_info_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_007_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_MEC_PROFILE_FOR_CAPIF_007_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceInfo v_service_info; + var charstring v_service_info_id; + var ServiceAPIDescription v_service_api_description; + + // 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_service_info_id); + f_start_service_info(v_service_info); + f_publish_api(v_service_info, v_service_api_description); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_service_api_description.supportedFeatures := { "WeatherInfo", "MoonPhasesInfo" } + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_ME_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(v_service_info.serInstanceId & "_unknown", "UTF-8")) & "/service-apis/" & oct2char(unichar2oct(v_service_api_description.apiId, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_service_api_description_patch( + m_service_api_description_patch( + m_mec_service_info_capif_ext( + -, -, + m_category_ref( + "catalogueHref", + v_service_api_description.mecServiceInfoCapifExt.category.href, + v_service_api_description.mecServiceInfoCapifExt.category.id, + v_service_api_description.mecServiceInfoCapifExt.category.version & ".1" + )))))))); + 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 HTTP error 404 ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_published_api(v_service_info.serInstanceId, v_service_api_description.apiId); + f_stop_service_info(v_service_info); + f_delete_service_info(v_service_info_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_007_NF + + /** + * @desc Check that the IUT acknowledges the creation of a CAPIF subscription request when requested by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var EventSubscription v_event_subscription; + 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_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_CAPIF_SUBSCRIBE_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + v_headers, + m_http_message_body_json( + m_body_json_capif_event_subscription( + m_event_subscription( + { + SERVICE_API_AVAILABLE, + SERVICE_API_UPDATE + }, + PX_CAPIF_NOTIF_CALLBACK_URI + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_capif_event_subscription( + mw_event_subscription( + { + SERVICE_API_AVAILABLE, + SERVICE_API_UPDATE + }, + PX_CAPIF_NOTIF_CALLBACK_URI + )))))) -> 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 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_CAPIF_SUBSCRIBE_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 EventSubscritpion and set notification, v_subscription_id=", 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_subscription(-, v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_008_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_MEC_PROFILE_FOR_CAPIF_008_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_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_CAPIF_SUBSCRIBE_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions", + v_headers, + m_http_message_body_json( + m_body_json_capif_event_subscription( + m_event_subscription( + { + SERVICE_API_AVAILABLE, + SERVICE_API_UPDATE + }, + PX_CAPIF_NOTIF_CALLBACK_URI + )))))); + 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_MEC_PROFILE_FOR_CAPIF_008_NF + + /** + * @desc Check that the IUT acknowledges the update of a CAPIF subscription request when requested by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var EventSubscription v_event_subscription; + 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_subscription(-, v_event_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_event_subscription.events := { SERVICE_API_AVAILABLE, SERVICE_API_UPDATE, API_INVOKER_UPDATED }; + v_event_subscription.eventFilters := valueof( + { + m_capif_event_filter(-, -, { PX_APP_INSTANCE_ID }) + }); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_CAPIF_SUBSCRIBE_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_capif_event_subscription( + v_event_subscription + ))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_capif_event_subscription( + v_event_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated EventSubscritpion ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_subscription(-, v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_009_OK + + /** + * @desc Check that the IUT acknowledges the update of a CAPIF subscription request when requested by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var EventSubscription v_event_subscription; + 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_subscription(-, v_event_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_event_subscription.events := { SERVICE_API_AVAILABLE, SERVICE_API_UPDATE, API_INVOKER_UPDATED }; + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_CAPIF_SUBSCRIBE_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id & "_unknown", + v_headers, + m_http_message_body_json( + m_body_json_capif_event_subscription( + v_event_subscription + ))))); + 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 updated EventSubscritpion ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_subscription(-, v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_009_NF + + /** + * @desc Check that the IUT acknowledges the changes of a CAPIF subscription request when requested by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ServiceAPIDescription v_service_api_description; + var EventSubscription v_event_subscription; + 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_subscription(-, v_event_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_event_subscription.events := { SERVICE_API_AVAILABLE, SERVICE_API_UPDATE, API_INVOKER_UPDATED }; + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_ME_CAPIF_SUBSCRIBE_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_capif_event_subscription_patch( + m_event_subscription_patch( + v_event_subscription.events, + -, -, + v_event_subscription.notificationDestination + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_capif_event_subscription( + v_event_subscription + + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a patched EventSubscritpion ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_subscription(-, v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_010_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_MEC_PROFILE_FOR_CAPIF_010_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var EventSubscription v_event_subscription; + 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_subscription(-, v_event_subscription, v_subscription_id); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_event_subscription.events := { SERVICE_API_AVAILABLE, SERVICE_API_UPDATE, API_INVOKER_UPDATED }; + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_patch( + PICS_ROOT_API & PX_ME_CAPIF_SUBSCRIBE_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id & "_unknown", + v_headers, + m_http_message_body_json( + m_body_json_capif_event_subscription_patch( + m_event_subscription_patch( + v_event_subscription.events, + -, -, + v_event_subscription.notificationDestination + )))))); + 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 patched EventSubscritpion ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_subscription(-, v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_010_NF + + /** + * @desc Check that the IUT acknowledges the cancellation of a CAPIF subscription when requested by a MEC Application + */ + testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_011_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var EventSubscription v_event_subscription; + 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_subscription(-, v_event_subscription, 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_ME_CAPIF_SUBSCRIBE_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & 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 the 204 HTTP 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_MEC_PROFILE_FOR_CAPIF_011_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_MEC_PROFILE_FOR_CAPIF_011_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var EventSubscription v_event_subscription; + 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_subscription(-, v_event_subscription, 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_ME_CAPIF_SUBSCRIBE_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/subscriptions/" & v_subscription_id & "_unknown", + v_headers + ))); + 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_subscription(-, v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_011_NF + + } // End of group capif + } // End of module AtsMec_EdgePlatformApplicationEnablementAPI_TestCases diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn index 56fdf43e234effd09aa21f07cc3546cf3490def9..5777ec8ab5918b78627d42ed2d972bdfffcbb44e 100644 --- a/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/AtsMec_EdgePlatformApplicationEnablementAPI_TestControl.ttcn @@ -98,6 +98,44 @@ module AtsMec_EdgePlatformApplicationEnablementAPI_TestControl { execute(TC_MEC_MEC011_SRV_TRAF_003_PF()); execute(TC_MEC_MEC011_SRV_TRANS_001_OK()); + + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_01()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_02()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_03()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_OK_05()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_BR()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_001_NF()); + + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_002_OK()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_002_NF()); + + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_003_OK()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_003_BR()); + + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_OK()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_NF_01()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_004_NF_02()); + + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_005_OK()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_005_NF()); + + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_006_OK()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_006_NF()); + + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_007_OK()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_007_NF()); + + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_008_OK()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_008_NF()); + + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_009_OK()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_009_NF()); + + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_010_OK()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_010_NF()); + + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_011_OK()); + execute(TC_MEC_MEC011_SRV_MEC_PROFILE_FOR_CAPIF_011_NF()); } } diff --git a/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk index 25ab67bd3a7ece1378b4497d7575085a840112ef..251be1046caef6465594468f65c99dfa91a55bcf 100644 --- a/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk +++ b/ttcn/AtsMec_EdgePlatformApplicationEnablement/module.mk @@ -24,6 +24,9 @@ modules := ../LibCommon \ ../LibMec/ApplicationMobilityServiceAPI \ ../LibMec/FederationEnablementAPI \ ../LibMec/IoTAPI \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn index 05b2c294694b580397190317f3d77c6917e25a2a..067695aff2b42f02b6eb29dd0f3f1cc982325d87 100644 --- a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestCases.ttcn @@ -1,8 +1,8 @@ module AtsMec_FederationEnablementAPI_TestCases { - + // Libcommon import from LibCommon_Sync all; - + // LibHttp import from LibHttp_TypesAndValues all; import from LibHttp_Functions all; @@ -12,7 +12,7 @@ module AtsMec_FederationEnablementAPI_TestCases { // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_Templates all; - + // LibMec/FederationEnablementAPI import from FederationEnablementAPI_TypesAndValues all; import from FederationEnablementAPI_Templates all; @@ -33,24 +33,25 @@ module AtsMec_FederationEnablementAPI_TestCases { 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)), - valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2)), - valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_3, PX_FED_SYSTEM_NAME_3)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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); @@ -61,7 +62,7 @@ module AtsMec_FederationEnablementAPI_TestCases { v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -71,13 +72,10 @@ module AtsMec_FederationEnablementAPI_TestCases { mw_http_message_body_json( mw_body_json_fed_system_info_list( superset( - mw_system_info( - PX_FED_SYSTEM_PROVIDER_1, - PX_FED_SYSTEM_NAME_1, - PX_FED_SYSTEM_ID_1 - ))))))) { + v_system_info_list[1] + )))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -86,7 +84,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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(); @@ -98,35 +96,36 @@ module AtsMec_FederationEnablementAPI_TestCases { 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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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")), + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(v_system_info_list[1].systemId, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -136,15 +135,11 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 - ) + v_system_info_list[1] } ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -153,7 +148,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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(); @@ -165,37 +160,38 @@ module AtsMec_FederationEnablementAPI_TestCases { 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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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")), + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(v_system_info_list[1].systemId, "UTF-8")) & "&systemName=" & oct2char(unichar2oct(v_system_info_list[2].systemName, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -205,20 +201,12 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 - ) + v_system_info_list[1], + v_system_info_list[2] } ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -227,7 +215,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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(); @@ -239,37 +227,38 @@ module AtsMec_FederationEnablementAPI_TestCases { 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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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=", + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO, v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -278,21 +267,10 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 - ) - } + v_system_info_list ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -301,7 +279,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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(); @@ -313,37 +291,38 @@ module AtsMec_FederationEnablementAPI_TestCases { 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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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")), + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemName=" & oct2char(unichar2oct(v_system_info_list[1].systemName, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -353,15 +332,11 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 - ) + v_system_info_list[1] } ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -370,7 +345,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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(); @@ -382,24 +357,25 @@ module AtsMec_FederationEnablementAPI_TestCases { 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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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); @@ -412,7 +388,7 @@ module AtsMec_FederationEnablementAPI_TestCases { ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -422,20 +398,12 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 - ) + v_system_info_list[0], + v_system_info_list[1] } ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -444,49 +412,50 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 + * @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_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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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=", + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemProvider=" & oct2char(unichar2oct(PX_FED_SYSTEM_PROVIDER_2, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -496,20 +465,11 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 - ) + v_system_info_list[1] } ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -518,49 +478,50 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 + * @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_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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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")), + 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 { @@ -570,15 +531,12 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 - ) + v_system_info_list[0], + v_system_info_list[1] } ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -587,197 +545,50 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 + * @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_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 + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); - /** - * @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")), + PICS_ROOT_API & PX_FED_API_LIST_SYSTEM_INFO & "?systemId=" & oct2char(unichar2oct(v_system_info_list[0].systemId, "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 { @@ -787,20 +598,12 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 - ) + v_system_info_list[0], + v_system_info_list[2] } ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemInfoList ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -809,11 +612,11 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 + } // End of testcase TC_MEC_MEC040_SRV_MEF_001_OK_09 /** * @desc Check that the IUT responds with an error when selection is not applicable - SystemId @@ -821,19 +624,19 @@ module AtsMec_FederationEnablementAPI_TestCases { 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( @@ -845,7 +648,7 @@ module AtsMec_FederationEnablementAPI_TestCases { ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -854,7 +657,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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); } @@ -863,7 +666,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 @@ -874,19 +677,19 @@ module AtsMec_FederationEnablementAPI_TestCases { 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( @@ -898,7 +701,7 @@ module AtsMec_FederationEnablementAPI_TestCases { ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -907,7 +710,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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); } @@ -916,7 +719,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 @@ -927,19 +730,19 @@ module AtsMec_FederationEnablementAPI_TestCases { 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( @@ -951,7 +754,7 @@ module AtsMec_FederationEnablementAPI_TestCases { ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -960,7 +763,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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); } @@ -969,7 +772,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 @@ -980,19 +783,19 @@ module AtsMec_FederationEnablementAPI_TestCases { 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( @@ -1004,7 +807,7 @@ module AtsMec_FederationEnablementAPI_TestCases { ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1013,7 +816,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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); } @@ -1022,15 +825,11 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 */ @@ -1038,25 +837,25 @@ module AtsMec_FederationEnablementAPI_TestCases { // 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, + PICS_ROOT_API & PX_FED_API_SYS_INFO, v_headers, m_http_message_body_json( m_body_json_fed_system_info( @@ -1065,7 +864,7 @@ module AtsMec_FederationEnablementAPI_TestCases { PX_FED_SYSTEM_PROVIDER_1 )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1075,12 +874,12 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 + PX_FED_SYSTEM_PROVIDER_1, + ? )))))) -> value v_response { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds the success code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1089,58 +888,58 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 { + testcase TC_MEC_MEC040_SRV_MEF_002_BR() 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)); - + var SystemInfo v_system_info := valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, omit)); + // 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, + PICS_ROOT_API & PX_FED_API_SYS_INFO, v_headers, m_http_message_body_json( m_body_json_fed_system_info( - m_system_info( // Already created + m_system_info( PX_FED_SYSTEM_NAME_1, - PX_FED_SYSTEM_PROVIDER_1 + PX_FED_SYSTEM_PROVIDER_1, + v_system_info.systemId // Shall be omited )))))); 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); } @@ -1149,110 +948,50 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 - + } // End of testcase TC_MEC_MEC040_SRV_MEF_002_BR + /** - * @desc Check that the IUT responds with an error on creating an existing systemInfo + * @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_002_BR_02() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC040_SRV_MEF_003_OK() 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)); - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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_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")), + PICS_ROOT_API & PX_FED_API_SYS_INFO & "/" & oct2char(unichar2oct(v_system_info_list[1].systemId, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1261,13 +1000,10 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 - )))))) { + v_system_info_list[1] + ))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct SystemInfo entry ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1276,48 +1012,49 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 + * @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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit) + }); + // 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")), + PICS_ROOT_API & PX_FED_API_SYS_INFO & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_3, "UTF-8")), v_headers ) ) ); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1326,7 +1063,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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); } @@ -1335,7 +1072,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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(); @@ -1347,45 +1084,46 @@ module AtsMec_FederationEnablementAPI_TestCases { 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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit) + }); + // 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 + PICS_ROOT_API & PX_FED_API_SYS_INFO & "&" & oct2char(unichar2oct(v_system_info_list[0].systemId, "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 + 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); } @@ -1394,57 +1132,54 @@ module AtsMec_FederationEnablementAPI_TestCases { 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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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")), + PICS_ROOT_API & PX_FED_API_SYS_INFO & "/" & oct2char(unichar2oct(v_system_info_list[1].systemId, "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, // Change name 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 { @@ -1454,12 +1189,12 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 + v_system_info_list[1].systemProvider, + v_system_info_list[1].systemId )))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1468,7 +1203,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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(); @@ -1480,31 +1215,32 @@ module AtsMec_FederationEnablementAPI_TestCases { 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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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")), + PICS_ROOT_API & PX_FED_API_SYS_INFO & "/" & oct2char(unichar2oct(v_system_info_list[1].systemId, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_fed_system_info_update( @@ -1512,7 +1248,7 @@ module AtsMec_FederationEnablementAPI_TestCases { PX_FED_SYSTEM_NAME_1 & "_patched" )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1522,12 +1258,12 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 + v_system_info_list[1].systemProvider, + v_system_info_list[1].systemId )))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1536,7 +1272,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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(); @@ -1548,31 +1284,32 @@ module AtsMec_FederationEnablementAPI_TestCases { 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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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")), + PICS_ROOT_API & PX_FED_API_SYS_INFO & "/" & oct2char(unichar2oct(v_system_info_list[1].systemId, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_fed_system_info_update( @@ -1582,7 +1319,7 @@ module AtsMec_FederationEnablementAPI_TestCases { { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1592,12 +1329,12 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 + v_system_info_list[1].systemProvider, + v_system_info_list[1].systemId )))))) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with the patched SystemInfo entry ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1606,7 +1343,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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(); @@ -1618,29 +1355,29 @@ module AtsMec_FederationEnablementAPI_TestCases { 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)) + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit)) }; - + // 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")), + PICS_ROOT_API & PX_FED_API_SYS_INFO & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_fed_system_info_update( @@ -1650,7 +1387,7 @@ module AtsMec_FederationEnablementAPI_TestCases { { PX_FED_ENDPOINT_URI_1, PX_FED_ENDPOINT_URI_2 } ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1659,69 +1396,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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); } @@ -1730,48 +1405,48 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 + } // End of testcase TC_MEC_MEC040_SRV_MEF_004_NF /** * @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 { + testcase TC_MEC_MEC040_SRV_MEF_004_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)) + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit)) }; - + // 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")), + PICS_ROOT_API & PX_FED_API_SYS_INFO & "/" & oct2char(unichar2oct(v_system_info_list[0].systemId, "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 { @@ -1780,7 +1455,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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); } @@ -1789,51 +1464,48 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 testcase TC_MEC_MEC040_SRV_MEF_004_BR - } // 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)) - }; - + var SystemInfoList v_system_info_list := valueof( + { + m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit), + m_system_info(PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_PROVIDER_2, omit), + m_system_info(PX_FED_SYSTEM_NAME_3, PX_FED_SYSTEM_PROVIDER_3, omit) + }); + // 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")), + PICS_ROOT_API & PX_FED_API_SYS_INFO & "/" & oct2char(unichar2oct(v_system_info_list[1].systemId, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1842,7 +1514,7 @@ module AtsMec_FederationEnablementAPI_TestCases { mw_http_response_204_no_content )) { tc_ac.stop; - + log("*** " & testcasename() & ": PASS: IUT successfully responds with 204 code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } @@ -1851,9 +1523,10 @@ module AtsMec_FederationEnablementAPI_TestCases { f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // End of 'alt' statement - + // Postamble - f_delete_system_info_list(v_system_info_list); + f_delete_system_info(v_system_info_list[0]); + f_delete_system_info(v_system_info_list[2]); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC040_SRV_MEF_005_OK @@ -1863,33 +1536,33 @@ module AtsMec_FederationEnablementAPI_TestCases { 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)) + var SystemInfoList v_system_info_list := { + valueof(m_system_info(PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_PROVIDER_1, omit)) }; - + // 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")), + PICS_ROOT_API & PX_FED_API_SYS_INFO & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_2, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); - + // Test Body tc_ac.start; alt { @@ -1898,7 +1571,7 @@ module AtsMec_FederationEnablementAPI_TestCases { 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); @@ -1908,12 +1581,1088 @@ module AtsMec_FederationEnablementAPI_TestCases { 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 + /** + * @desc Check that the IUT responds with the list of subscriptions when queried by a MEC Application - No query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_006_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription; + var charstring v_subscription_id; + + // 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_update_notification_subscription(v_system_update_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_FED_API_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_subscription_link_list_fed( + mw_subscription_link_list_fed( + mw_links_list + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a subscription link 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_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_006_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_006_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription_1, v_system_update_notification_subscription_2; + var charstring v_subscription_id_1, v_subscription_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_update_notification_subscription(v_system_update_notification_subscription_1, v_subscription_id_1); + f_create_system_update_notification_subscription(v_system_update_notification_subscription_2, v_subscription_id_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "?subscriptionType=system_update_notification_subscription", + 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_subscription_link_list_fed( + mw_subscription_link_list_fed( + mw_links_list( + -, + { + mw_subscription_fed( + v_system_update_notification_subscription_1.links.self_.href + ), + mw_subscription_fed( + v_system_update_notification_subscription_2.links.self_.href + ) + } + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a subscription link 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_subscription(v_subscription_id_1); + f_delete_subscription(v_subscription_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_006_OK_02 + + /** + * @desc Check that the IUT responds with the list of subscriptions when queried by a MEC Application - With query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_006_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription_1, v_system_update_notification_subscription_2; + var charstring v_subscription_id_1, v_subscription_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_update_notification_subscription(v_system_update_notification_subscription_1, v_subscription_id_1, {PX_SYSTEM_ID_1, PX_SYSTEM_ID_2}); + f_create_system_update_notification_subscription(v_system_update_notification_subscription_2, v_subscription_id_2, {PX_SYSTEM_ID_1, PX_SYSTEM_ID_2}); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "?systemId=" & oct2char(unichar2oct(v_system_update_notification_subscription_1.systemId[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_subscription_link_list_fed( + mw_subscription_link_list_fed( + mw_links_list( + -, + { + mw_subscription_fed( + v_system_update_notification_subscription_1.links.self_.href + ) + } + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a subscription link 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_subscription(v_subscription_id_1); + f_delete_subscription(v_subscription_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_006_OK_03 + + /** + * @desc Check that the IUT responds with the correct error code when the request is malformed - Wrong query parameters name + */ + testcase TC_MEC_MEC040_SRV_MEF_006_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription_1, v_system_update_notification_subscription_2; + var charstring v_subscription_id_1, v_subscription_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_update_notification_subscription(v_system_update_notification_subscription_1, v_subscription_id_1); + f_create_system_update_notification_subscription(v_system_update_notification_subscription_2, v_subscription_id_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "?subscription=system_update_notification_subscription", // Wrong query parameters name + 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_subscription(v_subscription_id_1); + f_delete_subscription(v_subscription_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_006_BR_01 + + /** + * @desc Check that the IUT responds with the correct error code when the request is malformed - Wrong query parameters value + */ + testcase TC_MEC_MEC040_SRV_MEF_006_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription_1, v_system_update_notification_subscription_2; + var charstring v_subscription_id_1, v_subscription_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_update_notification_subscription(v_system_update_notification_subscription_1, v_subscription_id_1); + f_create_system_update_notification_subscription(v_system_update_notification_subscription_2, v_subscription_id_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "?subscriptionType=system_update", // Wrong query parameters + 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_subscription(v_subscription_id_1); + f_delete_subscription(v_subscription_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_006_BR_02 + + /** + * @desc Check that the IUT responds with the list of subscriptions when queried by a MEC Application - With query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_006_BR_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription_1, v_system_update_notification_subscription_2; + var charstring v_subscription_id_1, v_subscription_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_update_notification_subscription(v_system_update_notification_subscription_1, v_subscription_id_1); + f_create_system_update_notification_subscription(v_system_update_notification_subscription_2, v_subscription_id_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "?system=" & oct2char(unichar2oct(v_system_update_notification_subscription_1.systemId[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_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_subscription(v_subscription_id_1); + f_delete_subscription(v_subscription_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_006_BR_03 + + /** + * @desc Check that the IUT responds with the correct error code when no subscription found - No query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_006_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_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_MEC040_SRV_MEF_006_NF_01 + + /** + * @desc Check that the IUT responds with the correct error code when no subscription found - With query parameters + */ + testcase TC_MEC_MEC040_SRV_MEF_006_NF_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription_1, v_system_update_notification_subscription_2; + var charstring v_subscription_id_1, v_subscription_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_update_notification_subscription(v_system_update_notification_subscription_1, v_subscription_id_1); + f_create_system_update_notification_subscription(v_system_update_notification_subscription_2, v_subscription_id_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "?systemId=unknown" & oct2char(unichar2oct(v_system_update_notification_subscription_1.systemId[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_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_subscription(v_subscription_id_1); + f_delete_subscription(v_subscription_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_006_NF_02 + + } // End of group lookup + + group subscription { + + /** + * @desc Check that the IUT acknowledges the creation of SystemUpdateNotificationSubscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_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_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_system_update_notification_subscription( + m_system_update_notification_subscription( + PX_FED_SUB_CALLBACK_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_system_update_notification_subscription( + mw_system_update_notification_subscription( + PX_FED_SUB_CALLBACK_URI, + mw_links_fed + )))))) -> 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 SystemUpdateNotificationSubscription ***"); + 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_FED_API_SUB & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SystemUpdateNotificationSubscription, 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_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_001_OK_01 + + /** + * @desc Check that the IUT provides a notification when requested by a MEC Application + */ + testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription; + var charstring v_subscription_id; + + // 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_notif_up(); + + // Test adapter configuration + + // Preamble + f_create_system_update_notification_subscription(v_system_update_notification_subscription, 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_system_update_notification( + mw_system_update_notification( + -, + mw_links_sub( + { href := pattern "http?+" & PICS_ROOT_API & PX_FED_API_SUB & "/" & v_subscription_id} + ))))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_001_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType + */ + testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_001_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_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_system_update_notification_subscription( + m_system_update_notification_subscription_wrong( + PX_FED_SUB_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 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_SUB_NOT_001_BR_01 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - No callback + */ + testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_001_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_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_system_update_notification_subscription( + m_system_update_notification_subscription_wrong + ))))); + 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_SUB_NOT_001_BR_02 + + /** + * @desc Check that the IUT responds with the required SystemUpdateNotificationSubscription when queried by a MEC Application + */ + testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription_1, v_system_update_notification_subscription_2; + var charstring v_subscription_id_1, v_subscription_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_update_notification_subscription(v_system_update_notification_subscription_1, v_subscription_id_1); + f_create_system_update_notification_subscription(v_system_update_notification_subscription_2, v_subscription_id_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & v_subscription_id_1, + 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 SystemUpdateNotificationSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_subscription(v_subscription_id_1); + f_delete_subscription(v_subscription_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_002_OK + + /** + * @desc Check that the IUT responds with the correct error code when no subscription found + */ + testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription_1, v_system_update_notification_subscription_2; + var charstring v_subscription_id_1, v_subscription_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_update_notification_subscription(v_system_update_notification_subscription_1, v_subscription_id_1); + f_create_system_update_notification_subscription(v_system_update_notification_subscription_2, v_subscription_id_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_FED_API_SUB & "/" & PX_FED_UNKNOWN_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_system_update_notification_subscription( + v_system_update_notification_subscription_1 + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct SystemUpdateNotificationSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_subscription(v_subscription_id_1); + f_delete_subscription(v_subscription_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_002_NF + + /** + * @desc Check that the IUT acknowledges the changes of an existing SystemUpdateNotificationSubscription when commanded by a MEC Application + */ + testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription_1, v_system_update_notification_subscription_2; + var charstring v_subscription_id_1, v_subscription_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_update_notification_subscription(v_system_update_notification_subscription_1, v_subscription_id_1); + f_create_system_update_notification_subscription(v_system_update_notification_subscription_2, v_subscription_id_2); + v_system_update_notification_subscription_1.systemId := { PX_SYSTEM_ID_1, PX_SYSTEM_ID_2 }; + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_FED_API_SUB & "/" & v_subscription_id_1, + v_headers, + m_http_message_body_json( + m_body_json_system_update_notification_subscription( + v_system_update_notification_subscription_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_system_update_notification_subscription( + v_system_update_notification_subscription_1 + + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully acknowledges the changes of an existing SystemUpdateNotificationSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_subscription(v_subscription_id_1); + f_delete_subscription(v_subscription_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_003_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription_1, v_system_update_notification_subscription_2; + var charstring v_subscription_id_1, v_subscription_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_update_notification_subscription(v_system_update_notification_subscription_1, v_subscription_id_1); + f_create_system_update_notification_subscription(v_system_update_notification_subscription_2, v_subscription_id_2); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_FED_API_SUB & "/" & PX_FED_UNKNOWN_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_system_update_notification_subscription( + v_system_update_notification_subscription_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 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_subscription(v_subscription_id_1); + f_delete_subscription(v_subscription_id_2); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_003_NF + + /** + * @desc Check that the IUT acknowledges the changes of an existing SystemUpdateNotificationSubscription when commanded by a MEC Application + */ + testcase TC_MEC_MEC040_SRV_MEF_SUB_NOT_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription; + var charstring v_subscription_id; + + // 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_update_notification_subscription(v_system_update_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_FED_API_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 acknowledges the cancellation of an existing SystemUpdateNotificationSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_SUB_NOT_004_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_MEC040_SRV_MEF_SUB_NOT_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SystemUpdateNotificationSubscription v_system_update_notification_subscription; + var charstring v_subscription_id; + + // 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_update_notification_subscription(v_system_update_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_FED_API_SUB & "/" & PX_FED_UNKNOWN_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 acknowledges the cancellation of an existing SystemUpdateNotificationSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_SUB_NOT_004_NF + + } // End of group subscription } // End of module AtsMec_FederationEnablementAPI_TestCases diff --git a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn index f5634c795278c1732c8ee773905bbda0d62a6861..f1175e29cecff4f00aff0dcdb42f727c93fa1815 100644 --- a/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_FederationEnablement/AtsMec_FederationEnablementAPI_TestControl.ttcn @@ -23,8 +23,6 @@ module AtsMec_FederationEnablementAPI_TestControl { 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()); @@ -33,8 +31,7 @@ module AtsMec_FederationEnablementAPI_TestControl { 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_002_BR()); execute(TC_MEC_MEC040_SRV_MEF_003_OK()); execute(TC_MEC_MEC040_SRV_MEF_003_NF()); @@ -45,11 +42,34 @@ module AtsMec_FederationEnablementAPI_TestControl { 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_004_BR()); execute(TC_MEC_MEC040_SRV_MEF_005_OK()); execute(TC_MEC_MEC040_SRV_MEF_005_NF()); + + execute(TC_MEC_MEC040_SRV_MEF_006_OK_01()); + execute(TC_MEC_MEC040_SRV_MEF_006_OK_02()); + execute(TC_MEC_MEC040_SRV_MEF_006_OK_03()); + execute(TC_MEC_MEC040_SRV_MEF_006_BR_01()); + execute(TC_MEC_MEC040_SRV_MEF_006_BR_02()); + execute(TC_MEC_MEC040_SRV_MEF_006_BR_03()); + execute(TC_MEC_MEC040_SRV_MEF_006_NF_01()); + execute(TC_MEC_MEC040_SRV_MEF_006_NF_02()); + + execute(TC_MEC_MEC040_SRV_MEF_SUB_NOT_001_OK_01()); + execute(TC_MEC_MEC040_SRV_MEF_SUB_NOT_001_OK_02()); + execute(TC_MEC_MEC040_SRV_MEF_SUB_NOT_001_BR_01()); + execute(TC_MEC_MEC040_SRV_MEF_SUB_NOT_001_BR_02()); + + execute(TC_MEC_MEC040_SRV_MEF_SUB_NOT_002_OK()); + execute(TC_MEC_MEC040_SRV_MEF_SUB_NOT_002_NF()); + + execute(TC_MEC_MEC040_SRV_MEF_SUB_NOT_003_OK()); + execute(TC_MEC_MEC040_SRV_MEF_SUB_NOT_003_NF()); + + execute(TC_MEC_MEC040_SRV_MEF_SUB_NOT_004_OK()); + execute(TC_MEC_MEC040_SRV_MEF_SUB_NOT_004_NF()); + } } diff --git a/ttcn/AtsMec_FederationEnablement/module.mk b/ttcn/AtsMec_FederationEnablement/module.mk index 2310374076a61668e17a2595a3bddfb382e5cbb4..f78a2aff69db241674c80e2ccb66eae13c4f6b2f 100644 --- a/ttcn/AtsMec_FederationEnablement/module.mk +++ b/ttcn/AtsMec_FederationEnablement/module.mk @@ -24,6 +24,9 @@ modules := ../LibCommon \ ../LibMec/ApplicationMobilityServiceAPI \ ../LibMec/IoTAPI \ ../LibMec/FederationEnablementAPI \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn index 9a328e877c935df4781261ed3a03e7914cc2cdbd..c2d6ef141cca702c5ef270d8b27431b4e3289016 100644 --- a/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_FixedAccessInformationService/AtsMec_FixedAccessInformationServiceAPI_TestCases.ttcn @@ -55,12 +55,15 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { 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( - PX_FAI_FA_INFO_URI, + PICS_ROOT_API & PX_FAI_FA_INFO_URI, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -114,7 +117,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PX_FAI_FA_INFO_URI & "?if=1", + PICS_ROOT_API & PX_FAI_FA_INFO_URI & "?if=1", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1448,7 +1451,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -1460,7 +1463,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_dev_info_subscription( PX_DEV_ALARM_SUB_CALLBACK_URI )))))) { - tc_wait.stop; + tc_ac.stop; f_init_default_headers_list(-, -, v_headers); httpPort_notif.send( @@ -1471,7 +1474,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully responds with a DevInfoSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -1508,7 +1511,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -1520,7 +1523,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { mw_onu_alarm_subscription( PX_DEV_ALARM_SUB_CALLBACK_URI )))))) { - tc_wait.stop; + tc_ac.stop; f_init_default_headers_list(-, -, v_headers); httpPort_notif.send( @@ -1531,7 +1534,7 @@ module AtsMec_FixedAccessInformationServiceAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully responds with a DevInfoSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } diff --git a/ttcn/AtsMec_FixedAccessInformationService/module.mk b/ttcn/AtsMec_FixedAccessInformationService/module.mk index 5b3e010564ae3ccf6e5b8dd75b34bdd9e6a5918c..902ab11aa102436b3d0302dbbbc06b03c58d0c5c 100644 --- a/ttcn/AtsMec_FixedAccessInformationService/module.mk +++ b/ttcn/AtsMec_FixedAccessInformationService/module.mk @@ -24,6 +24,9 @@ modules := ../LibCommon \ ../LibMec/ApplicationMobilityServiceAPI \ ../LibMec/FederationEnablementAPI \ ../LibMec/IoTAPI \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn index 60301b6674ddef518e5996ac079cc122b3e0a9b0..77185b07e8273be4533efb5da80aa07bb93121a7 100644 --- a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn +++ b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestCases.ttcn @@ -40,11 +40,11 @@ module AtsMec_IoTAPI_TestCases { 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)) - }; + 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_REQUESTED_PLTF_ID, { 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 )}), + m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2, PX_REQUESTED_PLTF_ID, { 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 )}), + m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3, PX_REQUESTED_PLTF_ID, { 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)) { @@ -82,8 +82,7 @@ module AtsMec_IoTAPI_TestCases { PX_IOT_DEVICE_ID_1, PX_IOT_DEVICE_AUTH_1, -, - PX_IOT_DEVICE_SUPI_1, - PX_IOT_DEVICE_IMSI_1 + PX_IOT_DEVICE_SUPI_1 ), mw_device_info( PX_IOT_DEVICE_ID_2, @@ -123,11 +122,11 @@ module AtsMec_IoTAPI_TestCases { 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)) - }; + 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_REQUESTED_PLTF_ID, { 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 )}), + m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2, PX_REQUESTED_PLTF_ID, { 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 )}), + m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3, PX_REQUESTED_PLTF_ID, { 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)) { @@ -192,11 +191,11 @@ module AtsMec_IoTAPI_TestCases { 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)) - }; + 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_REQUESTED_PLTF_ID, { 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 )}), + m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2, PX_REQUESTED_PLTF_ID, { 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 )}), + m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3, PX_REQUESTED_PLTF_ID, { 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)) { @@ -261,11 +260,11 @@ module AtsMec_IoTAPI_TestCases { 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)) - }; + 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_REQUESTED_PLTF_ID, { 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 )}), + m_device_info(PX_IOT_DEVICE_ID_2, PX_IOT_DEVICE_AUTH_2, -, PX_IOT_DEVICE_SUPI_2, PX_IOT_DEVICE_IMSI_2, PX_REQUESTED_PLTF_ID, { 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 )}), + m_device_info(PX_IOT_DEVICE_ID_3, PX_IOT_DEVICE_AUTH_3, -, PX_IOT_DEVICE_SUPI_3, PX_IOT_DEVICE_IMSI_3, PX_REQUESTED_PLTF_ID, { 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)) { @@ -329,12 +328,13 @@ module AtsMec_IoTAPI_TestCases { group subscription { /** - * @desc Check that the IUT registers the information of an IoT device when requested by a Service Consumer + * @desc Check that the IUT registers the information of an IoT device when requested by a Service Consumer - Using IoT platform identifier */ - testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK() runs on HttpComponent system HttpTestAdapter { + testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; var HttpMessage v_response; + var charstring v_resource_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { @@ -349,6 +349,7 @@ module AtsMec_IoTAPI_TestCases { // Test adapter configuration // Preamble + action("Check that PX_REQUESTED_PLTF_ID is set with the identifier of a registed IoT platform") f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -362,7 +363,127 @@ module AtsMec_IoTAPI_TestCases { PX_IOT_DEVICE_AUTH_1, -, PX_IOT_DEVICE_SUPI_1, - PX_IOT_DEVICE_IMSI_1 + -, + PX_REQUESTED_PLTF_ID, + { + 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 + ) + } + )))))); + 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, + true, + PX_IOT_DEVICE_SUPI_1 + )))))) -> value v_response { + tc_ac.stop; + + + // Check HTTP Location header + 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_resource_id := regexp( + v_header_location[0], + "?+" & PX_IOT_API_LIST_PLTF_SUB & "/(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfo: ", v_resource_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_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_01 + + /** + * @desc Check that the IUT registers the information of an IoT device when requested by a Service Consumer - Using IoT MEC traffic rules + */ + testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_resource_id; + + // 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 + action("Check that PX_REQUESTED_PLTF_ID is set with the identifier of a registed IoT platform") + 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, + -, + { + 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 + ) + } )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -383,11 +504,20 @@ module AtsMec_IoTAPI_TestCases { )))))) -> value v_response { tc_ac.stop; - if (f_check_headers(valueof(v_response.response.header)) == false) { + + // Check HTTP Location header + 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 { - log("*** " & testcasename() & ": PASS: IUT successfully create DeviceInfo entry ***"); + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_resource_id := regexp( + v_header_location[0], + "?+" & PX_IOT_API_LIST_PLTF_SUB & "/(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a DeviceInfo: ", v_resource_id, " ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } } @@ -400,7 +530,7 @@ module AtsMec_IoTAPI_TestCases { // 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 + } // End of testcase TC_MEC_MEC033_IOTS_IOTDEV_002_OK_02 /** * @desc Check that the IUT returns an error when Service Consumer request to register an IoT device with incorrect parameters @@ -491,7 +621,7 @@ module AtsMec_IoTAPI_TestCases { 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")), + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_2, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -557,7 +687,7 @@ module AtsMec_IoTAPI_TestCases { 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")), + PICS_ROOT_API & PX_IOT_API_SUB & "/" & oct2char(unichar2oct(PX_IOT_DEVICE_ID_UNKNOWN, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -606,13 +736,15 @@ module AtsMec_IoTAPI_TestCases { 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 - ), + { + 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 )); @@ -698,13 +830,15 @@ module AtsMec_IoTAPI_TestCases { 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 - ), + { + 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 )); @@ -780,13 +914,15 @@ module AtsMec_IoTAPI_TestCases { 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 - ), + { + 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 )); @@ -981,50 +1117,49 @@ module AtsMec_IoTAPI_TestCases { 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 - ) - } - )) - }; + 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 + ) + }), + 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 + ) + }), + 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)) { @@ -1085,7 +1220,8 @@ module AtsMec_IoTAPI_TestCases { testcase TC_MEC_MEC033_MEX_IOTS_IOTPLAT_002_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; - var HttpMessage v_response + var HttpMessage v_response; + var charstring v_resource_id; // Test control if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_IOT_API_SUPPORTED)) { @@ -1150,8 +1286,21 @@ module AtsMec_IoTAPI_TestCases { )))))) -> value v_response { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a IotPlatformInfoList ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + // Check HTTP Location header + 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_resource_id := regexp( + v_header_location[0], + "?+" & PX_IOT_API_LIST_PLTF_SUB & "/(?*)", + 0 + ); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a IotPlatformInfoList: ", v_resource_id, " ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); @@ -1225,36 +1374,38 @@ module AtsMec_IoTAPI_TestCases { 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, + 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 + ) + }), + 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 + ) + }), + m_iot_platform_info( + PX_IOT_PLTF_ID_3, { m_mb_transport_info( PX_MB_TRANSPORTINFO_ID_3, @@ -1265,10 +1416,7 @@ module AtsMec_IoTAPI_TestCases { 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)) { @@ -1439,50 +1587,49 @@ module AtsMec_IoTAPI_TestCases { 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 - ) - } - )) - }; + 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 + ) + }), + 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 + ) + }), + 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)) { @@ -1507,7 +1654,7 @@ module AtsMec_IoTAPI_TestCases { m_http_message_body_json( m_body_json_iot_iot_platform_info( m_iot_platform_info( - PX_IOT_PLTF_ID_1, + PX_IOT_PLTF_ID_2, { m_mb_transport_info( PX_MB_TRANSPORTINFO_ID_1, diff --git a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn index 70941a0c912b294507c98a31114d540c13b7b3ea..659f1a5d759dba0eee14f3e8f5a240312953b2f7 100644 --- a/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn +++ b/ttcn/AtsMec_IoT/AtsMec_IoTAPI_TestControl.ttcn @@ -19,8 +19,9 @@ module AtsMec_IoTAPI_TestControl { 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_002_OK_01()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_002_OK_02()); + execute(TC_MEC_MEC033_IOTS_IOTDEV_002_BR()); execute(TC_MEC_MEC033_IOTS_IOTDEV_003_OK()); execute(TC_MEC_MEC033_IOTS_IOTDEV_003_NF()); diff --git a/ttcn/AtsMec_IoT/module.mk b/ttcn/AtsMec_IoT/module.mk index 36152a9c0d348614edd3513af12eb479fbf1ac10..08dc86d3eb59e4ea1c257b29dbc9ae5acc7f16e4 100644 --- a/ttcn/AtsMec_IoT/module.mk +++ b/ttcn/AtsMec_IoT/module.mk @@ -24,6 +24,9 @@ modules := ../LibCommon \ ../LibMec/ApplicationMobilityServiceAPI \ ../LibMec/IoTAPI \ ../LibMec/FederationEnablementAPI \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn index 23c045234dbac6e3387b2d1c6a81b1f9daea6580..3dced3e54cb34e542219f0ec2e2d68708a5a81d1 100644 --- a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn +++ b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestCases.ttcn @@ -1380,9 +1380,11 @@ module AtsMec_LocationAPI_TestCases { -, -, mw_http_message_body_json( - mw_body_json_user_distance_subscription( - v_user_distance_subscription - ))))) { + mw_body_json_user_distance_notification( + mw_user_distance_notification( + -, -, + v_user_distance_subscription.links_ + )))))) { tc_ac.stop; // Send response @@ -1393,6 +1395,14 @@ module AtsMec_LocationAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully responds with a userDistanceNotification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } + [] httpPort_notif.receive { + log("*** " & testcasename() & ": INFO: Unsollicited message received ***"); + // Send 500 + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers, -, testcasename() & ": Receive unsollicited message"))); + repeat; + } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); @@ -2346,7 +2356,7 @@ module AtsMec_LocationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event&address=" & oct2char(unichar2oct(PX_USER_2, "UTF-8")), + PICS_ROOT_API & PX_LOC_API_USERS_SUB_URI & "?event&address=" & oct2char(unichar2oct(PX_USER_UNKNOWN, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -2681,9 +2691,17 @@ module AtsMec_LocationAPI_TestCases { 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 ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a userLocationEventNotification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } + [] httpPort_notif.receive { + log("*** " & testcasename() & ": INFO: Receive unsollicited message ***"); + // Send 500 + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers, -, testcasename() & ": Receive unsollicited message"))); + repeat + } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); @@ -2824,6 +2842,14 @@ module AtsMec_LocationAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully responds with a userLocationPeriodicNotification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } + [] httpPort_notif.receive { + log("*** " & testcasename() & ": INFO: Receive unsollicited message ***"); + // Send 500 + var Headers v_headers; + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send(m_http_response(m_http_response_500_internal_error(v_headers, -, testcasename() & ": Receive unsollicited message"))); + repeat + } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); @@ -3449,12 +3475,12 @@ module AtsMec_LocationAPI_TestCases { 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_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( + m_user_location_event_subscription( PX_CALLBACK_REF_URL, PX_USER, PX_CLIENT_ID, @@ -3467,7 +3493,7 @@ module AtsMec_LocationAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_201_created( + mw_http_response_201_created( mw_http_message_body_json( mw_body_json_user_location_event_subscription( mw_user_location_event_subscription( @@ -3491,8 +3517,9 @@ module AtsMec_LocationAPI_TestCases { "?+" & 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 } } @@ -3504,7 +3531,7 @@ module AtsMec_LocationAPI_TestCases { mw_http_message_body_json( mw_body_json_test_notification( mw_test_notification( - v_response.response.body.json_body.userLocationEventNotification.links_ + { subscription := v_response.response.body.json_body.userLocationEventSubscription.links_.self_ } )))))) { tc_ac.stop; @@ -3610,9 +3637,10 @@ module AtsMec_LocationAPI_TestCases { -, -, mw_http_message_body_json( - mw_body_json_test_notification( - mw_test_notification( - v_response.response.body.json_body.userLocationEventNotification.links_ + mw_body_json_user_location_event_notification( + mw_user_location_event_notification( + -, -, + v_response.response.body.json_body.userLocationEventSubscription.links_ )))))) { tc_ac.stop; diff --git a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn index 4b8c31f0d1c6468add07bb2581c50d800eb9e887..93a70098b9512b99310d61b8021b0b0ba45710d7 100644 --- a/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn +++ b/ttcn/AtsMec_Location/AtsMec_LocationAPI_TestControl.ttcn @@ -50,7 +50,8 @@ module AtsMec_LocationAPI_TestControl { execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_BR()); execute(TC_MEC_MEC013_SRV_UEINFLOOK_001_NF()); - execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); + //execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_OK()); + //execute(TC_MEC_MEC013_SRV_UELOCLOOK_001_BR()); 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()); diff --git a/ttcn/AtsMec_Location/module.mk b/ttcn/AtsMec_Location/module.mk index a60174076397598ea5e84d6ace87d6aaa1aa49cb..8bdf454f94445a840c4b2b84832e811c9bb1f19d 100644 --- a/ttcn/AtsMec_Location/module.mk +++ b/ttcn/AtsMec_Location/module.mk @@ -24,6 +24,9 @@ modules := ../LibCommon \ ../LibMec/ApplicationMobilityServiceAPI \ ../LibMec/FederationEnablementAPI \ ../LibMec/IoTAPI \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_QoSMeasurement/AtsMec_QoSMeasurementAPI_TestCases.ttcn b/ttcn/AtsMec_QoSMeasurement/AtsMec_QoSMeasurementAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..994de3755cac902b7ff28b10ae5ad8d464e254c3 --- /dev/null +++ b/ttcn/AtsMec_QoSMeasurement/AtsMec_QoSMeasurementAPI_TestCases.ttcn @@ -0,0 +1,2995 @@ +module AtsMec_QoSMeasurementAPI_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/QoSMeasurementAPI + import from QoSMeasurementAPI_TypesAndValues all; + import from QoSMeasurementAPI_Templates all; + import from QoSMeasurementAPI_Pics all; + import from QoSMeasurementAPI_Pixits all; + import from QoSMeasurementAPI_Functions all; + + // LibMec + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + group qos_lookup { + + /** + * @desc Check that the IUT responds with the list of QoS measurement subscriptions when queried by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOSLOOKUP_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_qos_measure_subscription(v_qos_measure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_QOS_API_LIST_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_qos_notification_subscription_list( + mw_notification_subscription_list + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Notification subscription list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOSLOOKUP_001_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOSLOOKUP_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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS & "/?subscriptionType=UnknownType", // Wrong URL structure: Invalid URI query parameters supported + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOSLOOKUP_001_BR2 + + /** + * @desc Check that the IUT responds with an error when no subscription are created + */ + testcase TC_MEC_MEC045_SRV_QOSLOOKUP_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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOSLOOKUP_001_NF + + /** + * @desc Check that the IUT responds with the list of QoS measurement subscriptions when queried by a MEC Application - Filter on subscriptionId + */ + testcase TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var QoSEventSubscription v_qos_event_subscription; + var charstring v_qos_measure_subscription_id, v_qos_event_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_qos_measure_subscription(v_qos_measure_subscription, v_qos_measure_subscription_id); + f_create_qos_event_subscription(v_qos_event_subscription, v_qos_event_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_QOS_API_LIST_SUBS & "?subscriptionId=" & oct2char(unichar2oct(v_qos_measure_subscription.subscriptionType, "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_qos_notification_subscription_list( + mw_notification_subscription_list( + { href := pattern "http?+" & PICS_ROOT_API & PX_QOS_API_LIST_SUBS }, + superset( + mw_subscription( + v_qos_measure_subscription.links.subscription.href, + v_qos_measure_subscription.subscriptionType + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Notification subscription list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_qos_subscription(v_qos_measure_subscription_id); + f_delete_qos_subscription(v_qos_event_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_01 + + /** + * @desc Check that the IUT responds with the list of QoS measurement subscriptions when queried by a MEC Application - Filter on subscriptionType + */ + testcase TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var QoSEventSubscription v_qos_event_subscription; + var charstring v_qos_measure_subscription_id, v_qos_event_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_qos_measure_subscription(v_qos_measure_subscription, v_qos_measure_subscription_id); + f_create_qos_event_subscription(v_qos_event_subscription, v_qos_event_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_QOS_API_LIST_SUBS & "?subscriptionType=" & oct2char(unichar2oct(v_qos_measure_subscription.subscriptionType, "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_qos_notification_subscription_list( + mw_notification_subscription_list( + { href := pattern "http?+" & PICS_ROOT_API & PX_QOS_API_LIST_SUBS }, + superset( + mw_subscription( + v_qos_measure_subscription.links.subscription.href, + v_qos_measure_subscription.subscriptionType + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Notification subscription list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_qos_subscription(v_qos_measure_subscription_id); + f_delete_qos_subscription(v_qos_event_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_02 + + /** + * @desc Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscriptionType + */ + testcase TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS & "?subscriptionType=" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_TYPE, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_01 + + /** + * @desc Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscriptionId + */ + testcase TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS & "?subscriptionId=" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_02 + + /** + * @desc Check that the IUT responds with a QoS measurement subscription when queried by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOSLOOKUP_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_qos_measure_subscription(v_qos_measure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_QOS_API_LIST_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_qos_measure_subscription( + v_qos_measure_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a QoS measurement 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOSLOOKUP_003_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOSLOOKUP_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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOSLOOKUP_003_NF + + } // End of group qos_lookup + + group qos_meas_sub_not { + + /** + * @desc Check that the IUT responds with a QoS measurement subscription when queried by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_info( + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + } + )))))); + 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_qos_measure_subscription( + mw_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + mw_links, + { PX_USER }, + { + mw_flow_info( + mw_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + } + )))))) -> 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 QoSMeasureSubscription ***"); + 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_QOS_API_LIST_SUBS & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a qoSMeasureSubscription, 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_01 + + /** + * @desc Check that the IUT acknowledges the creation of QoS measurement subscription request when commanded by a MEC Application - with reportingInterval + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_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_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_info( + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + }, + -, + PX_REPORTING_INTERVAL + )))))); + 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_qos_measure_subscription( + mw_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + mw_links, + { PX_USER }, + { + mw_flow_info( + mw_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + }, + -, + PX_REPORTING_INTERVAL + )))))) -> 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 QoSMeasureSubscription ***"); + 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_QOS_API_LIST_SUBS & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a qoSMeasureSubscription, 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_02 + + /** + * @desc Check that the IUT acknowledges the creation of QoS measurement subscription request when commanded by a MEC Application - with numberOfReports + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_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_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_info( + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + }, + PX_NUMBER_OF_REPORTS, + PX_REPORTING_INTERVAL + )))))); + 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_qos_measure_subscription( + mw_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + mw_links, + { PX_USER }, + { + mw_flow_info( + mw_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + }, + PX_NUMBER_OF_REPORTS, + PX_REPORTING_INTERVAL + )))))) -> 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 QoSMeasureSubscription ***"); + 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_QOS_API_LIST_SUBS & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a qoSMeasureSubscription, 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_03 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription_wrong( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_info( + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_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 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_MEC045_SRV_QOS_MEAS_SUB_NOT_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_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + omit, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_info( + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_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 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_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_info( + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + }, + -, -, -, -, -, + { websocketUri := PX_QOS_MEAS_SUB_WEB_SOCKET, requestWebsocketUri := omit } + + )))))); + 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_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_03 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - users not present (Note 2) + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + -, + { + m_flow_info( + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_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 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_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_04 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - flowInfo not present (Note 2) + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { 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 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_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_05 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid flowFilter + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_06() 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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { 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 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_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_06 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid condition on reportingInterval/measuringPeriod + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_07() 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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD + PX_REPORTING_INTERVAL + 1, // measuringPeriod shall be <= reportingInterval + -, + { PX_USER }, + { + m_flow_info( + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + }, + -, + PX_REPORTING_INTERVAL + + )))))); + 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_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_07 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid condition on measuringArea + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_08() 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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD + PX_REPORTING_INTERVAL + 1, // measuringPeriod shall be <= reportingInterval + -, + { PX_USER }, + { + m_flow_info( + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + }, + -, -, + { + m_measuring_area( + -, + PX_ACCESS_POINT_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 + )) { + 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_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_08 + + /** + * @desc Check that the IUT acknowledges the changes of an existing QoS measurement subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_qos_measure_subscription(v_qos_measure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_QOS_API_LIST_SUBS & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {JITTER}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_info( + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + } + )))))); + 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_qos_measure_subscription( + mw_qos_measure_subscription( + {JITTER}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + mw_links, + { PX_USER }, + { + mw_flow_info( + mw_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated qoSMeasureSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_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_MEC045_SRV_QOS_MEAS_SUB_NOT_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_qos_measure_subscription(v_qos_measure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_QOS_API_LIST_SUBS & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {JITTER}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_info( + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + } + )))))); + 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_002_NF + + /** + * @desc Check that the IUT acknowledges the cancellation of QoS measurement subscription when commanded by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_qos_measure_subscription(v_qos_measure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_QOS_API_LIST_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 cancels the qoSMeasureSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_003_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_qos_measure_subscription(v_qos_measure_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_QOS_API_LIST_SUBS & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully cancels the qoSMeasureSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_003_NF + + /** + * @desc Check that the IUT provides a test notification when requested by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_qos_measure_subscription(v_qos_measure_subscription, 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_qos_measure_subscription( + mw_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + mw_links + )))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_qos_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_01 + + /** + * @desc Check that the IUT provides a test notification when requested by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_qos_measure_subscription(v_qos_measure_subscription, v_subscription_id, true); + 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_qos_test_notification + )))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_qos_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_02 + + /** + * @desc Check that the IUT terminates notifications when the expiry timer expires + */ + testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSMeasureSubscription v_qos_measure_subscription; + var charstring v_subscription_id; + var timer v_expiry_timer; + var boolean v_no_more_notif_expected := false; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_qos_measure_subscription(v_qos_measure_subscription, v_subscription_id, -, PX_EXPIRY_DEADLINE); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + v_expiry_timer.start(int2float(PX_EXPIRY_DEADLINE.seconds)); + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_qos_measure_subscription( + mw_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + mw_links + )))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + if (v_no_more_notif_expected == false) { + tc_ac.start; + repeat; + } else { + log("*** " & testcasename() & ": FAIL: New notif received after expiry timer ended ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] v_expiry_timer.timeout { + v_no_more_notif_expected := true; + log("*** " & testcasename() & ": INFO: expiry timer ended ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": PASS: No notif received after expiry timer ended ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } // End of 'alt' statement + + // Postamble + f_delete_qos_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_005_OK + + } // End of group qos_meas_sub_not + + group qos_event_sub_not { + + /** + * @desc Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_event_subscription( + m_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + m_report_trigger( + JITTER + ) + } + )))))); + 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_qos_event_subscription( + mw_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + mw_links, + { PX_USER }, + { + mw_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + mw_report_trigger( + JITTER + ) + } + )))))) -> 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 QoSEventSubscription ***"); + 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_QOS_API_LIST_SUBS & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a qoSEventSubscription, 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_01 + + /** + * @desc Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application - With thresholds + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_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_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_event_subscription( + m_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + m_report_trigger( + JITTER, + PX_JITTER_THRESHOLD_HIGH, + PX_JITTER_THRESHOLD_LOW + ) + } + )))))); + 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_qos_event_subscription( + mw_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + mw_links, + { PX_USER }, + { + mw_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + mw_report_trigger( + JITTER, + PX_JITTER_THRESHOLD_HIGH, + PX_JITTER_THRESHOLD_LOW + ) + } + )))))) -> 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 QoSEventSubscription ***"); + 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_QOS_API_LIST_SUBS & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a qoSEventSubscription, 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid SubscritionType + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_event_subscription( + m_qos_event_subscription_wrong( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + m_report_trigger( + JITTER + ) + } + )))))); + 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_MEC045_SRV_QOS_EVENT_SUB_NOT_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_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_event_subscription( + m_qos_event_subscription( + omit, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + m_report_trigger( + JITTER + ) + } + )))))); + 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_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_event_subscription( + m_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + m_report_trigger( + JITTER + ) + }, + -, -, -, -, + { websocketUri := PX_QOS_MEAS_SUB_WEB_SOCKET, requestWebsocketUri := omit } + )))))); + 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_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_03 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - users not present (Note 2) + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_event_subscription( + m_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + omit, + { + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + m_report_trigger( + JITTER + ) + } + )))))); + 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_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_04 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - flowFilter not present (Note 2) + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_event_subscription( + m_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + omit, + { + m_report_trigger( + JITTER + ) + } + )))))); + 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_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_05 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid flowFilter + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_06() 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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_event_subscription( + m_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + {}, + { + m_report_trigger( + JITTER + ) + } + )))))); + 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_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_06 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid condition on monitoringArea + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_07() 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_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_event_subscription( + m_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + m_report_trigger( + JITTER + ) + }, + -, + { + m_monitoring_area( + -, + PX_ACCESS_POINT_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 + )) { + 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_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_07 + + /** + * @desc Check that the IUT acknowledges the changes of QoS event subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var QoSEventSubscription v_qos_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_qos_event_subscription(v_qos_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_QOS_API_LIST_SUBS & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_qos_event_subscription( + m_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + m_report_trigger( + LATENCY + ) + } + )))))); + 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_qos_event_subscription( + mw_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + mw_links, + { PX_USER }, + { + mw_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + mw_report_trigger( + LATENCY + ) + } + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a qoSEventSubscription, 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_OK + + /** + * @desc Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var QoSEventSubscription v_qos_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_qos_event_subscription(v_qos_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_QOS_API_LIST_SUBS & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_qos_event_subscription( + m_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + m_report_trigger( + LATENCY + ) + } + )))))); + 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_NF + + /** + * @desc Check that the IUT acknowledges the cancellation of QoS event subscription when commanded by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var QoSEventSubscription v_qos_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_qos_event_subscription(v_qos_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_QOS_API_LIST_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 cancels the qoSMeasureSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC045_SRV_QOS_EVENT_SUB_NOT_003_OK + + /** + * @desc Check that the IUT acknowledges the cancellation of QoS event subscription when commanded by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var QoSEventSubscription v_qos_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_qos_event_subscription(v_qos_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_QOS_API_LIST_SUBS & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with 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_qos_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_NF + + /** + * @desc Check that the IUT provides a test notification when requested by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_004_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSEventSubscription v_qos_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_qos_event_subscription(v_qos_event_subscription, 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_qos_measure_notification( + mw_qos_measure_notification( + mw_links + )))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_qos_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_004_OK_01 + + /** + * @desc Check that the IUT provides a notification when requested by a MEC Application + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_004_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSEventSubscription v_qos_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_qos_event_subscription(v_qos_event_subscription, v_subscription_id, true); + 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_qos_event_notification( + mw_qos_event_notification( + mw_links( + { href := pattern "http?+" & PICS_ROOT_API & PX_QOS_API_LIST_SUBS & "/" & v_subscription_id} + ))))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_qos_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_004_OK_02 + + /** + * @desc Check that the IUT terminates notifications when the expiry timer expires + */ + testcase TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var QoSEventSubscription v_qos_event_subscription; + var charstring v_subscription_id; + var timer v_expiry_timer; + var boolean v_no_more_notif_expected := false; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_QOS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_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_qos_event_subscription(v_qos_event_subscription, v_subscription_id, -, PX_EXPIRY_DEADLINE); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + v_expiry_timer.start(int2float(PX_EXPIRY_DEADLINE.seconds)); + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_qos_event_subscription( + mw_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + mw_links + )))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + if (v_no_more_notif_expected == false) { + tc_ac.start; + repeat; + } else { + log("*** " & testcasename() & ": FAIL: New notif received after expiry timer ended ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] v_expiry_timer.timeout { + v_no_more_notif_expected := true; + log("*** " & testcasename() & ": INFO: expiry timer ended ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": PASS: No notif received after expiry timer ended ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } // End of 'alt' statement + + // Postamble + f_delete_qos_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_005_OK + + } // End of group qos_event_sub_not + +} // End of module AtsMec_QoSMeasurementAPI_TestCases \ No newline at end of file diff --git a/ttcn/AtsMec_QoSMeasurement/AtsMec_QoSMeasurementAPI_TestControl.ttcn b/ttcn/AtsMec_QoSMeasurement/AtsMec_QoSMeasurementAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0e6ec589250ab1017a4b3b550ee7510f42b7d236 --- /dev/null +++ b/ttcn/AtsMec_QoSMeasurement/AtsMec_QoSMeasurementAPI_TestControl.ttcn @@ -0,0 +1,74 @@ +module AtsMec_QoSMeasurementAPI_TestControl { + + // LibMec/QoSMeasurementAPI + import from QoSMeasurementAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_QoSMeasurementAPI + import from AtsMec_QoSMeasurementAPI_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES and PICS_QOS_API_SUPPORTED) { + execute(TC_MEC_MEC045_SRV_QOSLOOKUP_001_OK()); + execute(TC_MEC_MEC045_SRV_QOSLOOKUP_001_BR()); + execute(TC_MEC_MEC045_SRV_QOSLOOKUP_001_NF()); + + execute(TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_01()); + execute(TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_02()); + execute(TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_01()); + execute(TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_02()); + + execute(TC_MEC_MEC045_SRV_QOSLOOKUP_003_OK()); + execute(TC_MEC_MEC045_SRV_QOSLOOKUP_003_NF()); + + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_01()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_02()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_03()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_01()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_02()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_03()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_04()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_05()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_06()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_07()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_08()); + + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_002_OK()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_002_NF()); + + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_003_OK()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_003_NF()); + + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_01()); + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_02()); + + execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_005_OK()); + + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_01()); + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_02()); + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_01()); + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_02()); + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_03()); + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_04()); + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_05()); + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_06()); + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_07()); + + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_OK()); + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_NF()); + + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_OK()); + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_NF()); + + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_004_OK_01()); + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_004_OK_02()); + + execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_005_OK()); + } + + } + +} // End of module AtsMec_QoSMeasurementAPI_TestControl \ No newline at end of file diff --git a/ttcn/AtsMec_QoSMeasurement/module.mk b/ttcn/AtsMec_QoSMeasurement/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..62223e5c9d46cd78659740c65b733c382542081b --- /dev/null +++ b/ttcn/AtsMec_QoSMeasurement/module.mk @@ -0,0 +1,42 @@ +suite := AtsMec_QoSMeasurementAPI + +sources := \ + AtsMec_QoSMeasurementAPI_TestCases.ttcn \ + AtsMec_QoSMeasurementAPI_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 \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ + ../../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_Rnis/AtsMec_RnisAPI_TestCases.ttcn b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn index 7fd34ac954231c1db79ef38cd5c5974274dcda10..43216349fa923d78aea99dcce4c77f4d747adf6a 100644 --- a/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_TestCases.ttcn +++ b/ttcn/AtsMec_Rnis/AtsMec_RnisAPI_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 012 V2.0.3 (2018-10) + * @see ETSI GS MEC 012, ETSI GS MEC 012 V2.2.1 (2022-02) */ module AtsMec_RnisAPI_TestCases { @@ -38,30 +38,6 @@ module AtsMec_RnisAPI_TestCases { import from LibMec_Pics all; import from LibMec_Pixits all; - testcase tc_HelloW() runs on HttpComponent system HttpTestAdapter { - var charstring v_str; // Used for Query path update - var integer v_start; // Used for Query path update - var integer v_count; // Used for Query path update - - var charstring v_uri := "/queries/zones/{zoneId}/accessPoints/{accessPointId}"; - - var charstring v_zoneId := "zoneId"; - v_str := regexp(v_uri, charstring: "(?+)({zoneId})?+", 0); - v_start := lengthof(v_str); - v_count := lengthof(v_uri) - (v_start + lengthof(v_zoneId)); - log("lengthof(v_uri): ", lengthof(v_uri)); - log("v_str: ", v_str); - log("v_start: ", v_start); - log("v_count: ", v_count); - v_uri := substr(v_uri, 0, v_start) & v_zoneId & substr(v_uri, v_start + lengthof(v_zoneId) , v_count) - log("v_uri: ", v_uri); - - v_str := "/queries/zones/status=[0,1,2,"; - log("v_str: ", substr(v_str, 0, lengthof(v_str) - 1) & "]"); - - setverdict(pass); - } - group rnis_notifications { /** @@ -103,9 +79,7 @@ module AtsMec_RnisAPI_TestCases { PX_V2X_CELL_ID ) } - ) - ) - ), + ))), v_json_body ); if (v_result == 0) { @@ -124,7 +98,7 @@ module AtsMec_RnisAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -135,17 +109,18 @@ module AtsMec_RnisAPI_TestCases { mw_body_json_cell_change_subscription( mw_cell_change_subscription( PX_CALLBACK_REFERENCE - )))))) { - tc_wait.stop; + )))))) { + tc_ac.stop; log("*** " & testcasename() & ": INFO: IUT successfully sends cell-change notification ***"); // 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 cell-change notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -188,7 +163,7 @@ module AtsMec_RnisAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -204,16 +179,17 @@ module AtsMec_RnisAPI_TestCases { PX_APP_INS_ID, -, PX_QCI - ))))))) { - tc_wait.stop; + ))))))) { + tc_ac.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 RAB establishment notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -248,7 +224,7 @@ module AtsMec_RnisAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -266,7 +242,7 @@ module AtsMec_RnisAPI_TestCases { -, PX_QCI ))))))) { - tc_wait.stop; + tc_ac.stop; // Send 204 No Content httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); @@ -274,7 +250,7 @@ module AtsMec_RnisAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully sends RAB modification notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -309,7 +285,7 @@ module AtsMec_RnisAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -327,7 +303,7 @@ module AtsMec_RnisAPI_TestCases { -, PX_QCI ))))))) { - tc_wait.stop; + tc_ac.stop; // Send 204 No Content httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); @@ -335,7 +311,7 @@ module AtsMec_RnisAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully sends RAB release notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -370,7 +346,7 @@ module AtsMec_RnisAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -386,7 +362,7 @@ module AtsMec_RnisAPI_TestCases { PX_APP_INS_ID, -//TODO PX_E_RAB_ID ))))))) { - tc_wait.stop; + tc_ac.stop; // Send 204 No Content httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); @@ -394,7 +370,7 @@ module AtsMec_RnisAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully sends RAB release notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -429,7 +405,7 @@ module AtsMec_RnisAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -445,7 +421,7 @@ module AtsMec_RnisAPI_TestCases { PX_APP_INS_ID, -//TODO PX_E_RAB_ID ))))))) { - tc_wait.stop; + tc_ac.stop; // Send 204 No Content httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); @@ -453,7 +429,7 @@ module AtsMec_RnisAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully sends RAB release notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -488,7 +464,7 @@ module AtsMec_RnisAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -504,7 +480,7 @@ module AtsMec_RnisAPI_TestCases { PX_APP_INS_ID, -//TODO PX_E_RAB_ID ))))))) { - tc_wait.stop; + tc_ac.stop; // Send 204 No Content httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); @@ -512,7 +488,7 @@ module AtsMec_RnisAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully sends RAB release notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -547,7 +523,7 @@ module AtsMec_RnisAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -561,7 +537,7 @@ module AtsMec_RnisAPI_TestCases { PX_LINKS_SELF, -//mw_filter_criteria )))))) { - tc_wait.stop; + tc_ac.stop; // Send 204 No Content httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); @@ -569,7 +545,7 @@ module AtsMec_RnisAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully sends RAB release notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -604,7 +580,7 @@ module AtsMec_RnisAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -618,7 +594,7 @@ module AtsMec_RnisAPI_TestCases { PX_LINKS_SELF, -//mw_filter_criteria )))))) { - tc_wait.stop; + tc_ac.stop; // Send 204 No Content httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); @@ -626,7 +602,7 @@ module AtsMec_RnisAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully sends RAB release notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -661,7 +637,7 @@ module AtsMec_RnisAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -671,7 +647,7 @@ module AtsMec_RnisAPI_TestCases { mw_http_message_body_json( mw_body_json_expiry_notification_rnis )))) { - tc_wait.stop; + tc_ac.stop; // Send 204 No Content httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); @@ -679,7 +655,7 @@ module AtsMec_RnisAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully sends RAB release notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -729,9 +705,7 @@ module AtsMec_RnisAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & "?subscription_type=" & oct2char(unichar2oct(PX_SUBSCRIPTION_HREF_VALUE, "UTF-8")), v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -745,7 +719,7 @@ module AtsMec_RnisAPI_TestCases { mw_subscriptions_list( mw_subscription_link_list_Link( ?//PX_LINKS_SELF.self_ - ))))))) { + ))))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription ***"); @@ -812,7 +786,7 @@ module AtsMec_RnisAPI_TestCases { PX_V2X_CELL_ID ) } - ))))))); + ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -824,7 +798,8 @@ module AtsMec_RnisAPI_TestCases { mw_http_message_body_json( mw_body_json_cell_change_subscription( mw_cell_change_subscription( - PX_CALLBACK_REFERENCE )))))) -> value v_response { + PX_CALLBACK_REFERENCE + )))))) -> value v_response { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription ***"); @@ -878,9 +853,7 @@ module AtsMec_RnisAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & "?subscription_type=wrongSubscriptionType", v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -893,10 +866,19 @@ module AtsMec_RnisAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - )))))) { + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request with ProblemDetails ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request w/o ProblemDetails ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -948,7 +930,7 @@ module AtsMec_RnisAPI_TestCases { PX_V2X_CELL_ID ) } - ))))))); + ))))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -961,10 +943,19 @@ module AtsMec_RnisAPI_TestCases { mw_body_json_problem_details( mw_problem_details( -, -, 400 - )))))) { + )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription with ProblemDetails ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription w/o ProblemDetails ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1058,9 +1049,7 @@ module AtsMec_RnisAPI_TestCases { m_http_request_get( PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & v_uri, v_headers - ) - ) - ); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1073,7 +1062,7 @@ module AtsMec_RnisAPI_TestCases { mw_body_json_cell_change_subscription( mw_cell_change_subscription( PX_CALLBACK_REFERENCE, - { self_ := { href := "https://" & PICS_HEADER_HOST & PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & v_uri } }, // TODO Rebuild PX_LINKS_SELF, + { self_ := { href := "http://" & PICS_HEADER_HOST & PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & v_uri } }, mw_filter_criteria_ho( "01", { mw_associate_id(UE_IPV4_ADDRESS, PX_ASSOCIATE_ID_VALUE) }, @@ -1083,8 +1072,7 @@ module AtsMec_RnisAPI_TestCases { PX_V2X_CELL_ID ) } - ) - )))))) { + ))))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription ***"); @@ -1154,9 +1142,7 @@ module AtsMec_RnisAPI_TestCases { PX_V2X_CELL_ID ) } - ) - ) - ), + ))), v_json_body ); if (v_result == 0) { @@ -1197,12 +1183,7 @@ module AtsMec_RnisAPI_TestCases { ), -, -, v_json_body.cellChangeSubscription.links - ) - ) - ) - ) - ) - ); + )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1215,7 +1196,7 @@ module AtsMec_RnisAPI_TestCases { mw_body_json_cell_change_subscription( mw_cell_change_subscription( PX_CALLBACK_REFERENCE & "_1", - { self_ := { href := "https://" & PICS_HEADER_HOST & PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & v_uri } }, // TODO Rebuild PX_LINKS_SELF, + { self_ := { href := "http://" & PICS_HEADER_HOST & PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & v_uri } }, // TODO Rebuild PX_LINKS_SELF, mw_filter_criteria_ho( "01", { mw_associate_id(UE_IPV4_ADDRESS, PX_ASSOCIATE_ID_VALUE) }, @@ -1226,7 +1207,7 @@ module AtsMec_RnisAPI_TestCases { ) } ) - )))))) { + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription ***"); @@ -1286,9 +1267,7 @@ module AtsMec_RnisAPI_TestCases { PX_V2X_CELL_ID ) } - ) - ) - ), + ))), v_json_body ); if (v_result == 0) { @@ -1313,7 +1292,7 @@ module AtsMec_RnisAPI_TestCases { m_http_request_delete( PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & v_uri, v_headers - ))); + ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body @@ -1322,7 +1301,7 @@ module AtsMec_RnisAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_204_no_content - )) { + )) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully deletes subscription ***"); @@ -1366,7 +1345,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & PX_UNKNOWN_SUBSCRIPTION_ID, + PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), v_headers ) ) @@ -1534,7 +1513,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & PX_UNKNOWN_SUBSCRIPTION_ID, + PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_cell_change_subscription( @@ -1604,7 +1583,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & PX_UNKNOWN_SUBSCRIPTION_ID, + PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1637,7 +1616,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service returns the RAB information when requested. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BV.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_016_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1676,7 +1654,7 @@ module AtsMec_RnisAPI_TestCases { mw_http_message_body_json( mw_body_json_rab_info( mw_rab_info( - -,//PX_APP_INS_ID, + -, -, { *, mw_cell_user_info( mw_ecgi( @@ -1704,8 +1682,8 @@ module AtsMec_RnisAPI_TestCases { ))))) { tc_ac.stop; - log("*** " & testcasename() & ": INCONC: IUT successfully responds with a RAB information, without any detail on this cell ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a RAB information, without any detail on this cell ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); @@ -1719,7 +1697,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service returns the PLMN information when requested. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BV.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_017_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1781,7 +1758,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service returns the S1 bearer information. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BV.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_018_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1849,7 +1825,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service returns the L2 measurements information. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BV.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_019_OK() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1922,7 +1897,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service returns an error when the RAB information is requested with a malformatted message. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_016_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -1976,7 +1950,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service returns an error when the RAB information is requested with a malformatted message. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_016_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2030,7 +2003,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service returns an error when the PLMN information is requested with a malformatted message. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_017_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2084,7 +2056,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service returns an error when the PLMN information for a not existing element is requested. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_017_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2138,7 +2109,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service returns an error when the S1 bearer information is requested with a malformatted message. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_018_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2192,7 +2162,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service returns an error when the S1 bearer information for a not existing element is requested. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_018_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2246,7 +2215,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service returns an error when the L2 measurements information is requested with a malformatted message. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_019_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -2300,7 +2268,6 @@ module AtsMec_RnisAPI_TestCases { /** * @desc Check that the RNIS service returns an error when the L2 measurements information for a not existing element is requested. - * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BI_BO.tplan2 */ testcase TC_MEC_MEC012_SRV_RNIS_019_NF() runs on HttpComponent system HttpTestAdapter { // Local variables diff --git a/ttcn/AtsMec_Rnis/module.mk b/ttcn/AtsMec_Rnis/module.mk index 5889511f550046f813715f03a50b68a311471a38..14f39e25df56d7c99762db58afa16fc7dabc4e48 100644 --- a/ttcn/AtsMec_Rnis/module.mk +++ b/ttcn/AtsMec_Rnis/module.mk @@ -24,6 +24,9 @@ modules := ../LibCommon \ ../LibMec/ApplicationMobilityServiceAPI \ ../LibMec/FederationEnablementAPI \ ../LibMec/IoTAPI \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_SelfServiceEnablement/AtsMec_SelfServiceEnablementAPI_TestCases.ttcn b/ttcn/AtsMec_SelfServiceEnablement/AtsMec_SelfServiceEnablementAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..67b7a0f5632f4e14742fdc6c09a6539d74e432bf --- /dev/null +++ b/ttcn/AtsMec_SelfServiceEnablement/AtsMec_SelfServiceEnablementAPI_TestCases.ttcn @@ -0,0 +1,3024 @@ + +module AtsMec_SelfServiceEnablementAPI_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/SelfServiceEnablementAPI + import from SelfServiceEnablementAPI_TypesAndValues all; + import from SelfServiceEnablementAPI_Templates all; + import from SelfServiceEnablementAPI_Functions all; + import from SelfServiceEnablementAPI_Pics all; + import from SelfServiceEnablementAPI_Pixits all; + + // LibMec + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Templates all; + import from LibMec_Pixits all; + + group tenant { + + /** + * @Desc Check that the IUT responds with a list of all available tenantInfo when requested to a CSE - No query parameters + */ + testcase TC_MEC_MEC048_MEO_CSE_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var TenantInfoList v_tenant_info_list := { + valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, "Retail", omit, PX_CSE_TENANT_NAME_1)), + valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_2, PX_CSE_CUSTOMER_NAME_2, "Education", omit, PX_CSE_TENANT_NAME_2)), + valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_3, PX_CSE_CUSTOMER_NAME_3, "Automotive", omit, PX_CSE_TENANT_NAME_3)) + }; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + var charstring_list v_tenant_id_list; + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info_list(v_tenant_info_list, v_tenant_id_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_CSE_TENANTS_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_cse_tenant_info_list( + { + mw_tenant_info( + PX_CSE_CUSTOMER_ID_1, + PX_CSE_CUSTOMER_NAME_1, + *, + ?, + PX_CSE_TENANT_NAME_1 + ), + mw_tenant_info( + PX_CSE_CUSTOMER_ID_2, + PX_CSE_CUSTOMER_NAME_2, + *, + ?, + PX_CSE_TENANT_NAME_2 + ), + mw_tenant_info( + PX_CSE_CUSTOMER_ID_3, + PX_CSE_CUSTOMER_NAME_3, + *, + ?, + PX_CSE_TENANT_NAME_3 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a TenantInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info_list(v_tenant_info_list); + + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC048_MEO_CSE_001_OK_01 + + /** + * @desc Check that the IUT responds with a list of all available tenantInfo when requested to a CSE - customerId attribute as query parameter + */ + testcase TC_MEC_MEC048_MEO_CSE_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var TenantInfoList v_tenant_info_list := { + valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, "Retail", omit, PX_CSE_TENANT_NAME_1)), + valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_2, PX_CSE_CUSTOMER_NAME_2, "Education", omit, PX_CSE_TENANT_NAME_2)), + valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_3, PX_CSE_CUSTOMER_NAME_3, "Automotive", omit, PX_CSE_TENANT_NAME_3)) + }; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info_list(v_tenant_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "?customerId=" & oct2char(unichar2oct(PX_CSE_CUSTOMER_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_cse_tenant_info_list( + { + mw_tenant_info( + PX_CSE_CUSTOMER_ID_1, + PX_CSE_CUSTOMER_NAME_1, + *, + ?, + PX_CSE_TENANT_NAME_1 + ), + mw_tenant_info( + PX_CSE_CUSTOMER_ID_3, + PX_CSE_CUSTOMER_NAME_3, + *, + ?, + PX_CSE_TENANT_NAME_3 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a TenantInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info_list(v_tenant_info_list); + + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC048_MEO_CSE_001_OK_02 + + /** + * @desc Check that the IUT responds with a list of all available tenantInfo when requested to a CSE - customerName as query parameter + */ + testcase TC_MEC_MEC048_MEO_CSE_001_OK_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var TenantInfoList v_tenant_info_list := { + valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, "Retail", omit, PX_CSE_TENANT_NAME_1)), + valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_2, PX_CSE_CUSTOMER_NAME_2, "Education", omit, PX_CSE_TENANT_NAME_2)), + valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_3, PX_CSE_CUSTOMER_NAME_3, "Automotive", omit, PX_CSE_TENANT_NAME_3)) + }; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info_list(v_tenant_info_list); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "?customerName=" & oct2char(unichar2oct(PX_CSE_CUSTOMER_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_cse_tenant_info_list( + { + mw_tenant_info( + PX_CSE_CUSTOMER_ID_1, + PX_CSE_CUSTOMER_NAME_1, + *, + ?, + PX_CSE_TENANT_NAME_1 + ), + mw_tenant_info( + PX_CSE_CUSTOMER_ID_2, + PX_CSE_CUSTOMER_NAME_2, + *, + ?, + PX_CSE_TENANT_NAME_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a TenantInfoList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info_list(v_tenant_info_list); + + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC048_MEO_CSE_001_OK_03 + + /** + * @Desc Check that the IUT creates a new tenantInfo when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_TENANTS_INFO, + v_headers, + m_http_message_body_json( + m_body_json_cse_tenant_info( + m_tenant_info( + PX_CSE_CUSTOMER_ID_2, + PX_CSE_CUSTOMER_NAME_2, + omit, + omit, + PX_CSE_TENANT_NAME_2 + )))))); + 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_cse_tenant_info( + mw_tenant_info( + PX_CSE_CUSTOMER_ID_2, + PX_CSE_CUSTOMER_NAME_2, + *, + ?, + PX_CSE_TENANT_NAME_2 + )))))) -> value v_response { + + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a TenantInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info(v_response.response.body.json_body.tenantInfo); + + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC048_MEO_CSE_002_OK + + /** + * @desc Check that the IUT responds with an error on creating a tenantInfo with resourceUseInfo and siteList + */ + testcase TC_MEC_MEC048_MEO_CSE_002_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_TENANTS_INFO, + v_headers, + m_http_message_body_json( + m_body_json_cse_tenant_info( + m_tenant_info( + PX_CSE_CUSTOMER_ID_1, + PX_CSE_CUSTOMER_NAME_1, + omit, + omit, + PX_CSE_TENANT_NAME_1, + m_resource_info(100, 50, 50, 1024, 512, 512, 2048, 1024, 1024), + { m_site_info(PX_CSE_SITE_ID_1, omit), + m_site_info(PX_CSE_SITE_ID_2, m_resource_info(100, 50, 50, 1024, omit, 512, 2048, 1024, omit)) } + )))))); + 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_MEC048_MEO_CSE_002_BR + + /** + * @Desc Check that the IUT responds with a specific tenantInfo when requested to a MEC Consumer + */ + testcase TC_MEC_MEC048_MEO_CSE_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, "Retail", omit, PX_CSE_TENANT_NAME_1)); + + var charstring v_tenant_id; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_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_cse_tenant_info( + mw_tenant_info( + PX_CSE_CUSTOMER_ID_1, + PX_CSE_CUSTOMER_NAME_1, + *, + ?, + PX_CSE_TENANT_NAME_1 + ) + + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with specific TenantInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info(v_tenant_info); + + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC048_MEO_CSE_003_OK + + /** + * @Desc Check that the IUT returns an error when requesting a not existing tenantInfo to a MEC Consumer + */ + testcase TC_MEC_MEC048_MEO_CSE_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_TENANTS_INFO & "/" & oct2char(unichar2oct(PX_CSE_TENANT_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 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_MEC048_MEO_CSE_003_NF + + /** + * @desc Check that the IUT updates an existing tenantInfo when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, "Retail", omit, PX_CSE_TENANT_NAME_1)); + var charstring v_tenant_id; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_id, + v_headers, + m_http_message_body_json( + m_body_json_cse_tenant_info( + m_tenant_info( + PX_NEW_CUSTOMER_ID, + PX_NEW_CUSTOMER_NAME, + omit, + v_tenant_id, + PX_NEW_TENANT_NAME + ) + ))))); + 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_cse_tenant_info( + mw_tenant_info( + PX_NEW_CUSTOMER_ID, + PX_NEW_CUSTOMER_NAME, + *, + ?, + PX_NEW_TENANT_NAME + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated TenantInfo 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_tenant_info(v_tenant_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_004_OK + + /** + * @desc Check that the IUT returns an error on updating a not existing tenantInfo requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_TENANTS_INFO & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_TENANT_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_cse_tenant_info( + m_tenant_info( + PX_NEW_CUSTOMER_ID, + PX_NEW_CUSTOMER_NAME, + omit, + omit, + PX_NEW_TENANT_NAME + ) + ))))); + 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_MEC048_MEO_CSE_004_NF + + /** + * @desc Check that the IUT returns an error on updating with invalid values tenantInfo requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_TENANTS_INFO & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_TENANT_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_cse_tenant_info( + m_tenant_info( + PX_NEW_CUSTOMER_ID, + PX_NEW_CUSTOMER_NAME, + omit, + omit, + PX_NEW_TENANT_NAME, + m_resource_info(100, 50, 50, 1024, 512, 512, 2048, 1024, 1024), + { m_site_info(PX_CSE_SITE_ID_1, omit) } + ) + ))))); + 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_MEC048_MEO_CSE_004_BR + + /** + * @Desc Check that the IUT removes a tenantInfo when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, "Retail", omit, PX_CSE_TENANT_NAME_1)); + var charstring v_tenant_id; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_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 deletes the tenantInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC048_MEO_CSE_005_OK + + /** + * @Desc Check that the IUT returns an error on deleting a not existing tenantInfo when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_TENANTS_INFO & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_TENANT_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_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC048_MEO_CSE_005_NF + + /** + * @Desc Check that the IUT returns a resourceQuotaInfo for a specific tenant when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_006_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, "Retail", omit, PX_CSE_TENANT_NAME_1)); + var ResourceQuotaInfo v_resource_quota_info := valueof(m_resource_quota_info(PX_CPU_QUOTA_1, PX_MEMORY_QUOTA_1, PX_DISK_QUOTA_1)); + var charstring v_tenant_id; + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + f_create_resource_quota_info(v_resource_quota_info, v_tenant_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_id & "/resources/quota_in_system", + 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_cse_resource_quota_info( + mw_resource_quota_info( + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + ) + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with specific ResourceQuotaInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info(v_tenant_info); + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC048_MEO_CSE_006_OK + + /** + * @Desc Check that the IUT returns an error on retrieving resourceQuotaInfo for a not existing tenant when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_006_NF() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_TENANTS_INFO & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_TENANT_ID , "UTF-8")) & "/resources/quota_in_system", + 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 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_MEC048_MEO_CSE_006_NF + + /** + * @desc Check that the IUT updates the resourceQuotaInfo for an existing tenant when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, "Retail", omit, PX_CSE_TENANT_NAME_1)); + var ResourceQuotaInfo v_resource_quota_info := valueof(m_resource_quota_info(PX_CPU_QUOTA_1, PX_MEMORY_QUOTA_1, PX_DISK_QUOTA_1)); + var charstring v_tenant_id; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + f_create_resource_quota_info(v_resource_quota_info, v_tenant_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_id & "/resources/quota_in_system", + v_headers, + m_http_message_body_json( + m_body_json_cse_resource_quota_info( + m_resource_quota_info( + 5, + 3072, + 50 + ) + ))))); + 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_cse_resource_quota_info( + mw_resource_quota_info( + 5, + 3072, + 50 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated ResourceQuotaInfo ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info(v_tenant_info); + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC048_MEO_CSE_007_OK + + /** + * @desc Check that the IUT returns an error on updating the resourceQuotaInfo for a not existing tenant when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_007_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_TENANTS_INFO & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_TENANT_ID , "UTF-8")) & "/resources/quota_in_system", + v_headers, + m_http_message_body_json( + m_body_json_cse_resource_quota_info( + m_resource_quota_info( + 5, + 2048, + 75 + ) + ))))); + 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_MEC048_MEO_CSE_007_NF + + /** + * @desc Check that the IUT creates the resourceQuotaInfo for an existing tenant when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_tenant_id; + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, omit, omit, PX_CSE_TENANT_NAME_1)); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_id & "/resources/quota_in_system", + v_headers, + m_http_message_body_json( + mw_body_json_cse_resource_quota_info( + m_resource_quota_info( + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_cse_resource_quota_info( + mw_resource_quota_info( + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + )))))) -> 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 creating the resourceQuotaInfo for an existing tenant ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + log("*** " & testcasename() & ": PASS: IUT passed in creating the resourceQuotaInfo for an existing tenant ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info(v_tenant_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_008_OK + + /** + * @desc Check that the IUT returns an error on creating the resourceQuotaInfo for a not existing tenant when requested to a CSE + */ + + testcase TC_MEC_MEC048_MEO_CSE_008_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_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_CSE_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_CSE_TENANTS_INFO & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_TENANT_ID, "UTF-8")) & "/resources/quota_in_system", + v_headers, + m_http_message_body_json( + m_body_json_cse_resource_quota_info( + m_resource_quota_info( + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + )))))); + 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_MEC048_MEO_CSE_008_NF + + /** + * @desc Check that the IUT returns the list of per site resource quota for a specific tenant when requested to a CSE - No filter + */ + testcase TC_MEC_MEC048_MEO_CSE_009_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var charstring v_tenant_id; + var charstring v_site_id; + var charstring_list v_site_id_list; + + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, omit, omit, PX_CSE_TENANT_NAME_1)); + var SiteResourceQuotaInfoList v_site_resource_quota_info := { + valueof(m_site_resource_quota_info(PX_SITE_ID_1,PX_CPU_QUOTA_1, PX_MEMORY_QUOTA_1, PX_DISK_QUOTA_1)), + valueof(m_site_resource_quota_info(PX_SITE_ID_2,PX_CPU_QUOTA_2, PX_MEMORY_QUOTA_2, PX_DISK_QUOTA_2)), + valueof(m_site_resource_quota_info(PX_SITE_ID_3,PX_CPU_QUOTA_3, PX_MEMORY_QUOTA_3, PX_DISK_QUOTA_3)) + }; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + f_create_site_resource_quota_info_list(v_site_resource_quota_info, v_site_id_list, v_tenant_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_id & "/resources/quota_in_system", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + tc_ac.start; + + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_cse_site_resource_quota_info_list( + { + mw_site_resource_quota_info( + PX_SITE_ID_1, + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + ), + mw_site_resource_quota_info( + PX_SITE_ID_2, + PX_CPU_QUOTA_2, + PX_MEMORY_QUOTA_2, + PX_DISK_QUOTA_2 + ), + mw_site_resource_quota_info( + PX_SITE_ID_3, + PX_CPU_QUOTA_3, + PX_MEMORY_QUOTA_3, + PX_DISK_QUOTA_3 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of per site resource quota for a specific tenant ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info(v_tenant_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_009_OK + + /** + * @desc Check that the IUT returns the list of per site resource quota for a specific tenant when requested to a CSE - siteId filter" + */ + testcase TC_MEC_MEC048_MEO_CSE_009_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_tenant_id; + var charstring_list v_site_id_list; + + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, omit, omit, PX_CSE_TENANT_NAME_1)); + var SiteResourceQuotaInfoList v_site_resource_quota_info := { + valueof(m_site_resource_quota_info(PX_SITE_ID_1,PX_CPU_QUOTA_1, PX_MEMORY_QUOTA_1, PX_DISK_QUOTA_1)), + valueof(m_site_resource_quota_info(PX_SITE_ID_2,PX_CPU_QUOTA_2, PX_MEMORY_QUOTA_2, PX_DISK_QUOTA_2)), + valueof(m_site_resource_quota_info(PX_SITE_ID_3,PX_CPU_QUOTA_3, PX_MEMORY_QUOTA_3, PX_DISK_QUOTA_3)) + }; + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + f_create_site_resource_quota_info_list(v_site_resource_quota_info, v_site_id_list, v_tenant_id); + + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_id & "/resources/quota_in_system?siteId=" & v_site_id_list[0] & "/" & v_site_id_list[1], + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_cse_site_resource_quota_info_list( + { + mw_site_resource_quota_info( + PX_SITE_ID_1, + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + ), + mw_site_resource_quota_info( + PX_SITE_ID_2, + PX_CPU_QUOTA_2, + PX_MEMORY_QUOTA_2, + PX_DISK_QUOTA_2 + ) + } + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the site resource quota for a specific tenant - siteId filter ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info(v_tenant_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_009_OK_01 + + /** + * @desc Check that the IUT returns an error on requesting site resource quota info on a not existing tenant when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_009_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_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_CSE_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_CSE_TENANTS_INFO & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_TENANT_ID, "UTF-8")) & "/resources/quota_in_system", + 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_MEC048_MEO_CSE_009_NF + + /** + * @desc Check that the IUT creates a site resource quota info for a existing tenant when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_site_id; + var charstring v_tenant_id; + + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, omit, omit, PX_CSE_TENANT_NAME_1)); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_id & "/resources/quota_in_system", + v_headers, + m_http_message_body_json( + m_body_json_cse_site_resource_quota_info( + m_site_resource_quota_info( + PX_SITE_ID_1, + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_cse_site_resource_quota_info( + mw_site_resource_quota_info( + PX_SITE_ID_1, + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + )))))) -> 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 responds with the list of per site resource quota for a specific tenant ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_location_header; + f_get_header(v_response.response.header, "Location", v_location_header); + // Build expected regex pattern with specific tenant ID + var charstring v_expected_pattern := "/cse/v1/tenants/" & v_tenant_id & "/resources/quota_in_system/[^/]+"; + if (regexp(v_location_header[0], v_expected_pattern, 0) != "") { + log("Location header matches expected pattern with tenant ID: " & v_tenant_id); + } else { + setverdict(fail, "Location header does NOT match expected pattern: ", v_location_header[0]); + } + } + log("*** " & testcasename() & ": PASS: IUT passed in creating the site resource quota for an existing tenant ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info(v_tenant_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_010_OK + + /** + * @desc Check that the IUT returns an error on creating a site resource quota with wrong parameters + */ + testcase TC_MEC_MEC048_MEO_CSE_010_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_site_id; + var charstring v_tenant_id; + + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, omit, omit, PX_CSE_TENANT_NAME_1)); + + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + f_init_default_headers_list(-, -, v_headers); + + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_id & "/resources/quota_in_system", + v_headers, + m_http_message_body_json( + m_body_json_cse_site_resource_quota_info( + m_site_resource_quota_info( + PX_SITE_ID_1, + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + - + )))))); + 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_tenant_info(v_tenant_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_010_BR + + /** + * @desc Check that the IUT returns the site resource quota for a specific tenant and site identifier when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_011_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var charstring v_tenant_id; + var charstring v_site_id; + + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, omit, omit, PX_CSE_TENANT_NAME_1)); + var SiteResourceQuotaInfo v_site_resource_quota_info_1 := valueof(m_site_resource_quota_info(PX_SITE_ID_1,PX_CPU_QUOTA_1, PX_MEMORY_QUOTA_1, PX_DISK_QUOTA_1)); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info,v_tenant_id); + f_create_site_resource_quota_info(v_site_resource_quota_info_1, v_site_id, v_tenant_id); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_id & "/resources/quota_in_system" & "/" & v_site_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + tc_ac.start; + + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_cse_site_resource_quota_info( + mw_site_resource_quota_info( + PX_SITE_ID_1, + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + ) + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the site resource quota for a specific tenant and site identifier when requested to a CSE ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info(v_tenant_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_011_OK + + /** + * @desc Check that the IUT returns an error on requesting site resource quota info on a not existing tenant when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_011_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_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_CSE_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_CSE_TENANTS_INFO & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_TENANT_ID, "UTF-8")) & "/resources/quota_in_system" & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SITE_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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_011_NF + + /** + * @desc Check that the IUT updates a site resource quota info for a existing tenant when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_012_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_tenant_id; + var charstring v_site_id; + + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, omit, omit, PX_CSE_TENANT_NAME_1)); + var SiteResourceQuotaInfo v_site_resource_quota_info_1 := valueof(m_site_resource_quota_info(PX_SITE_ID_1,PX_CPU_QUOTA_1, PX_MEMORY_QUOTA_1, PX_DISK_QUOTA_1)); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + f_create_site_resource_quota_info(v_site_resource_quota_info_1, v_site_id, v_tenant_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_id & "/resources/quota_in_system/" & v_site_id, + v_headers, + m_http_message_body_json( + m_body_json_cse_site_resource_quota_info( + m_site_resource_quota_info( + PX_SITE_ID_1, + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_2, + PX_DISK_QUOTA_2 + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_cse_site_resource_quota_info( + mw_site_resource_quota_info( + PX_SITE_ID_1, + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_2, + PX_DISK_QUOTA_2 + )))))) -> 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 responds with the list of per site resource quota for a specific tenant ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_location_header; + f_get_header(v_response.response.header, "Location", v_location_header); + // Build expected regex pattern with specific tenant ID + var charstring v_expected_pattern := "/cse/v1/tenants/" & v_tenant_id & "/resources/quota_in_system/[^/]+"; + if (regexp(v_location_header[0], v_expected_pattern, 0) != "") { + log("Location header matches expected pattern with tenant ID: " & v_tenant_id); + } else { + setverdict(fail, "Location header does NOT match expected pattern: ", v_location_header[0]); + } + } + + log("*** " & testcasename() & ": PASS: IUT passed in updating a site resource quota info for a existing tenant when requested to a CSE ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_tenant_info(v_tenant_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_012_OK + + /** + * @desc Check that the IUT returns an error updating a site resource quota info for a existing tenant when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_012_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_tenant_id; + var charstring v_site_id; + var charstring_list v_header_location; + + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, omit, omit, PX_CSE_TENANT_NAME_1)); + var SiteResourceQuotaInfo v_site_resource_quota_info_1 := valueof(m_site_resource_quota_info(PX_SITE_ID_1,PX_CPU_QUOTA_1, PX_MEMORY_QUOTA_1, PX_DISK_QUOTA_1)); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + f_create_site_resource_quota_info(v_site_resource_quota_info_1, v_site_id, v_tenant_id); + + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & v_tenant_id & "/resources/quota_in_system/" & v_site_id, + v_headers, + m_http_message_body_json( + m_body_json_cse_site_resource_quota_info( + m_site_resource_quota_info( + PX_SITE_ID_1, + -, + -, + - + )))))); + 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_tenant_info(v_tenant_info); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_012_BR + + /** + * @desc Check that the IUT returns an error updating a site resource quota info for a not existing tenant when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_012_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var charstring v_tenant_id; + var charstring v_site_id; + var charstring_list v_header_location; + + var TenantInfo v_tenant_info := valueof(m_tenant_info(PX_CSE_CUSTOMER_ID_1, PX_CSE_CUSTOMER_NAME_1, omit, omit, PX_CSE_TENANT_NAME_1)); + var SiteResourceQuotaInfo v_site_resource_quota_info_1 := valueof(m_site_resource_quota_info(PX_SITE_ID_1,PX_CPU_QUOTA_1, PX_MEMORY_QUOTA_1, PX_DISK_QUOTA_1)); + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_tenant_info(v_tenant_info, v_tenant_id); + f_create_site_resource_quota_info(v_site_resource_quota_info_1, v_site_id, v_tenant_id); + f_init_default_headers_list(-, -, v_headers); + + + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_TENANT_ID, "UTF-8")) & "/resources/quota_in_system/" & v_site_id, + v_headers, + m_http_message_body_json( + m_body_json_cse_site_resource_quota_info( + m_site_resource_quota_info( + PX_SITE_ID_1, + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + )))))); + 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_MEC048_MEO_CSE_012_NF + + } // End of group tenant + + group subscription{ + + /** + * @desc Check that the IUT returns the list of subscriptions when requested to a CSE - no filter + */ + testcase TC_MEC_MEC048_MEO_CSE_013_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ResourceUsageSubscription v_resource_usage_subscription; + var SiteResourceUsageSubscription v_site_resource_usage_subscription; + var ResourceUsageSubscription v_resource_usage_subscription_2; + var charstring v_res_usage_sub_id; + var charstring v_site_res_usage_sub_id; + var charstring v_res_usage_sub_id_2; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_resource_usage_subscription(v_resource_usage_subscription, v_res_usage_sub_id); + f_create_site_resource_usage_subscription(v_site_resource_usage_subscription, v_site_res_usage_sub_id); + f_create_resource_usage_subscription_2(v_resource_usage_subscription_2, v_res_usage_sub_id_2); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_CSE_LIST_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_cse_subscription_link_list( + mw_subscription_link_list( + mw_links_sub( + -, + { + mw_subscription( + v_resource_usage_subscription.links.self_.href, + "ResourceUsageSubscription" + ), + mw_subscription( + v_site_resource_usage_subscription.links.self_.href, + "SiteResourceUsageSubscription" + ), + mw_subscription( + v_resource_usage_subscription_2.links.self_.href, + "ResourceUsageSubscription" + ) + } + ) + + )))))) { + 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_cse_subscription(v_res_usage_sub_id); + f_delete_cse_subscription(v_site_res_usage_sub_id); + f_delete_cse_subscription(v_res_usage_sub_id_2); + + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_013_OK + + /** + * @desc Check that the IUT returns the list of subscriptions when requested to a CSE - subscription_type filter + */ + testcase TC_MEC_MEC048_MEO_CSE_013_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ResourceUsageSubscription v_resource_usage_subscription; + var SiteResourceUsageSubscription v_site_resource_usage_subscription; + var ResourceUsageSubscription v_resource_usage_subscription_2; + var charstring v_res_usage_sub_id; + var charstring v_site_res_usage_sub_id; + var charstring v_res_usage_sub_id_2; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_resource_usage_subscription(v_resource_usage_subscription, v_res_usage_sub_id); + f_create_site_resource_usage_subscription(v_site_resource_usage_subscription, v_site_res_usage_sub_id); + f_create_resource_usage_subscription_2(v_resource_usage_subscription_2, v_res_usage_sub_id_2); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_CSE_LIST_SUBS & "?" & "subscription_type=ResourceUsageSubscription", + 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_cse_subscription_link_list( + mw_subscription_link_list( + mw_links_sub( + -, + { + mw_subscription( + v_resource_usage_subscription.links.self_.href, + "ResourceUsageSubscription" + ), + mw_subscription( + v_resource_usage_subscription_2.links.self_.href, + "ResourceUsageSubscription" + ) + } + ) + + )))))) { + 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_cse_subscription(v_res_usage_sub_id); + f_delete_cse_subscription(v_site_res_usage_sub_id); + f_delete_cse_subscription(v_res_usage_sub_id_2); + + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_013_OK_02 + + /** + * @desc Check that the IUT creates a new subscription when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_014_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_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_resource_usage_subscription( + m_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + omit, omit, + omit, + PX_CSE_CUSTOMER_ID_1, + PX_CSE_TENANT_ID, + m_notification_trigger ( + e_tt_ten, + 4, + false + ) + )))))); + 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_resource_usage_subscription( + mw_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + *, + *, + PX_CSE_CUSTOMER_ID_1, + ?, + m_notification_trigger ( + e_tt_ten, + 4, + false + ) + )))))) -> 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 resourceUsgaeSubscription ***"); + 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_CSE_LIST_SUBS & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a resourceUsageSubscription, 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_cse_subscription(v_subscription_id); + + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_014_OK + + /** + * @desc Check that the IUT creates a new subscription when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_014_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_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_site_resource_usage_subscription( + m_site_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + -, + PX_CSE_CUSTOMER_ID_1, + PX_CSE_TENANT_ID, + { m_site_id(PX_CSE_SITE_ID_1), + m_site_id(PX_CSE_SITE_ID_2) }, + m_notification_trigger ( + e_tt_ten, + 4, + false + ) + )))))); + 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( + m_body_json_site_resource_usage_subscription( + m_site_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, omit, + -, + PX_CSE_CUSTOMER_ID_1, + PX_CSE_TENANT_ID, + { m_site_id(PX_CSE_SITE_ID_1), + m_site_id(PX_CSE_SITE_ID_2) }, + m_notification_trigger ( + e_tt_ten, + 4, + false + ) + )))))) -> 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 siteResourceUsgaeSubscription ***"); + 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_CSE_LIST_SUBS & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a siteResourceUsageSubscription, 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_cse_subscription(v_subscription_id); + + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_014_OK_02 + + /** + * @desc Check that the IUT returns an error on creating a new subscription when requested to a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_014_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_resource_usage_subscription( + m_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + omit, + PX_CSE_CUSTOMER_ID_1, + PX_CSE_TENANT_ID, + m_notification_trigger ( + e_tt_ten, + 4, + 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_MEC048_MEO_CSE_014_BR + + /** + * @desc Check that the IUT returns a subscription when requested by a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_015_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ResourceUsageSubscription v_resource_usage_subscription; + var SiteResourceUsageSubscription v_site_resource_usage_subscription; + var ResourceUsageSubscription v_resource_usage_subscription_2; + var charstring v_res_usage_sub_id; + var charstring v_site_res_usage_sub_id; + var charstring v_res_usage_sub_id_2; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_resource_usage_subscription(v_resource_usage_subscription, v_res_usage_sub_id); + f_create_site_resource_usage_subscription_2(v_site_resource_usage_subscription, v_site_res_usage_sub_id); + f_create_resource_usage_subscription_2(v_resource_usage_subscription_2, v_res_usage_sub_id_2); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_CSE_LIST_SUBS & "?" & "subscription_type=SiteResourceUsageSubscription", + 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_site_resource_usage_subscription( + mw_site_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + *, omit, + -, + PX_CSE_CUSTOMER_ID_1, + ?, + { m_site_id(PX_CSE_SITE_ID_1), + m_site_id(PX_CSE_SITE_ID_2) }, + m_notification_trigger ( + e_tt_ten, + 4, + false + ) + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SiteResourceUsageSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_cse_subscription(v_res_usage_sub_id); + f_delete_cse_subscription(v_site_res_usage_sub_id); + f_delete_cse_subscription(v_res_usage_sub_id_2); + + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC048_MEO_CSE_015_OK + + /** + * @desc Check that the IUT returns an error on requesting a not existing subscription when requested by a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_015_NF() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_LIST_SUBS & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 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_MEC048_MEO_CSE_015_NF + + /** + * @desc Check that the IUT updates an existing subscription when requested by a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_016_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SiteResourceUsageSubscription v_site_resource_usage_subscription; + var charstring v_site_res_usage_sub_id; + var Links v_links; + var HttpMessage v_response; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_site_resource_usage_subscription(v_site_resource_usage_subscription, v_site_res_usage_sub_id, v_links); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_CSE_LIST_SUBS & "/" & v_site_res_usage_sub_id, + v_headers, + m_http_message_body_json( + m_body_json_site_resource_usage_subscription( + m_site_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + v_links, + PX_CSE_CUSTOMER_ID_1, + PX_CSE_TENANT_ID, + { m_site_id(PX_CSE_SITE_ID_1), + m_site_id(PX_CSE_SITE_ID_2) }, + m_notification_trigger ( + e_tt_ten, + 4, + false + ) + )))))); + 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_site_resource_usage_subscription( + mw_site_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + ?, + PX_CSE_CUSTOMER_ID_1, + ?, + { m_site_id(PX_CSE_SITE_ID_1), + m_site_id(PX_CSE_SITE_ID_2) }, + m_notification_trigger ( + e_tt_ten, + 4, + false + ) + )))))) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates the siteResourceUsageSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_cse_subscription(v_site_res_usage_sub_id); + + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_016_OK + + /** + * @desc Check that the IUT returns an error updating an not existing subscription when requested by a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_016_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_LIST_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_site_resource_usage_subscription( + m_site_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + -, + PX_CSE_CUSTOMER_ID_1, + PX_CSE_TENANT_ID, + { m_site_id(PX_CSE_SITE_ID_1), + m_site_id(PX_CSE_SITE_ID_2) }, + m_notification_trigger ( + e_tt_ten, + 4, + false + ) + )))))); + 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_MEC048_MEO_CSE_016_NF + + /** + * @desc Check that the IUT returns an error updating an existing subscription with wrong parameters when requested by a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_016_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SiteResourceUsageSubscription v_site_resource_usage_subscription; + var charstring v_site_res_usage_sub_id; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_site_resource_usage_subscription(v_site_resource_usage_subscription, v_site_res_usage_sub_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_CSE_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_resource_usage_subscription( + m_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + -, + PX_CSE_CUSTOMER_ID_1, + PX_CSE_TENANT_ID, + m_notification_trigger ( + e_tt_ten, + 4, + 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_MEC048_MEO_CSE_016_BR + + /** + * @desc Check that the IUT deletes an existing subscription when requested by a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_017_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ResourceUsageSubscription v_resource_usage_subscription; + var charstring v_res_usage_sub_id; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_resource_usage_subscription(v_resource_usage_subscription, v_res_usage_sub_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_CSE_LIST_SUBS & "/" & v_res_usage_sub_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 deletes the resourceUsageSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC048_MEO_CSE_017_OK + + /** + * @desc Check that the IUT returns an error on a deletion of a not existing subscription when requested by a CSE + */ + testcase TC_MEC_MEC048_MEO_CSE_017_NF() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_CSE_LIST_SUBS & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 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_MEC048_MEO_CSE_017_NF + + } // End of group subscription + + group notification{ + + /** + * @desc Check that the CSE sends a site resource usage notification if the CSE has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC048_MEO_CSE_018_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SiteResourceUsageSubscription v_site_resource_usage_subscription; + var charstring v_site_res_usage_sub_id; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_site_resource_usage_subscription_2(v_site_resource_usage_subscription, v_site_res_usage_sub_id); + 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( + oct2char(unichar2oct(PX_CSE_SUB_CALLBACK_URI, "UTF-8")), + -, + mw_http_message_body_json( + mw_body_json_site_resource_usage_notification( + mw_site_resource_usage_notification( + { seconds := 1684748494, nanoSeconds := 123456789 }, + PX_CSE_CUSTOMER_ID_1, + ?, + mw_site_resource_use_info( + PX_SITE_ID_1, + 5 + ) + )))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_cse_subscription(v_site_res_usage_sub_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC048_MEO_CSE_018_OK + + /** + * @desc Check that the CSE sends a resource usage notification if the CSE has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC048_MEO_CSE_019_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ResourceUsageSubscription v_resource_usage_subscription; + var charstring v_res_usage_sub_id; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_resource_usage_subscription_2(v_resource_usage_subscription, v_res_usage_sub_id); + 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( + oct2char(unichar2oct(PX_CSE_SUB_CALLBACK_URI, "UTF-8")), + -, + mw_http_message_body_json( + mw_body_json_resource_usage_notification( + mw_resource_usage_notification( + *, + PX_CSE_CUSTOMER_ID_1, + ?, + mw_resource_use_info ( + 5 + ) + )))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_cse_subscription(v_res_usage_sub_id); + f_cf_01_http_notif_down(); + + } // End of testcase TC_MEC_MEC048_MEO_CSE_019_OK + + /** + * @desc Check that the CSE sends a notification on subscription expiration if the CSE has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC048_MEO_CSE_020_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var ResourceUsageSubscription v_resource_usage_subscription; + var charstring v_res_usage_sub_id; + + // Test control + if (not(PICS_SERVICES) or not(PICS_CSE_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_SERVICES and PICS_CSE_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_resource_usage_subscription_2(v_resource_usage_subscription, v_res_usage_sub_id); + action("Wait for subscription expiration"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + oct2char(unichar2oct(PX_CSE_SUB_CALLBACK_URI, "UTF-8")), + -, + mw_http_message_body_json( + mw_body_json_cse_expiry_notification( + mw_cse_expiry_notification( + ?, + { seconds := 1684748494, nanoSeconds := 123456789 } + ) + ))))) { + tc_ac.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 expiry notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_cse_subscription(v_res_usage_sub_id); + f_cf_01_http_notif_down(); + + } // End of testcase TC_MEC_MEC048_MEO_CSE_020_OK + + } //End of group notification + +} // End of module AtsMec_SelfServiceEnablementAPI_TestCases diff --git a/ttcn/AtsMec_SelfServiceEnablement/AtsMec_SelfServiceEnablementAPI_TestControl.ttcn b/ttcn/AtsMec_SelfServiceEnablement/AtsMec_SelfServiceEnablementAPI_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d418a221273a3f8c01be2a861f1bc3571864e751 --- /dev/null +++ b/ttcn/AtsMec_SelfServiceEnablement/AtsMec_SelfServiceEnablementAPI_TestControl.ttcn @@ -0,0 +1,69 @@ +module AtsMec_SelfServiceEnablementAPI_TestControl { + + // LibMec/SelfServiceEnablementAPI + import from SelfServiceEnablementAPI_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_SelfServiceEnablementAPI + import from AtsMec_SelfServiceEnablementAPI_TestCases all; + + control { + + if (PICS_CSE_API_SUPPORTED) { + + if (PICS_SERVICES) { + execute(TC_MEC_MEC048_MEO_CSE_001_OK_01()); + execute(TC_MEC_MEC048_MEO_CSE_001_OK_02()); + execute(TC_MEC_MEC048_MEO_CSE_001_OK_03()); + execute(TC_MEC_MEC048_MEO_CSE_002_OK()); + execute(TC_MEC_MEC048_MEO_CSE_002_BR()); + execute(TC_MEC_MEC048_MEO_CSE_003_OK()); + execute(TC_MEC_MEC048_MEO_CSE_003_NF()); + execute(TC_MEC_MEC048_MEO_CSE_004_OK()); + execute(TC_MEC_MEC048_MEO_CSE_004_NF()); + execute(TC_MEC_MEC048_MEO_CSE_004_BR()); + execute(TC_MEC_MEC048_MEO_CSE_005_OK()); + execute(TC_MEC_MEC048_MEO_CSE_005_NF()); + execute(TC_MEC_MEC048_MEO_CSE_006_OK()); + execute(TC_MEC_MEC048_MEO_CSE_006_NF()); + execute(TC_MEC_MEC048_MEO_CSE_007_OK()); + execute(TC_MEC_MEC048_MEO_CSE_007_NF()); + + execute(TC_MEC_MEC048_MEO_CSE_008_OK()); + execute(TC_MEC_MEC048_MEO_CSE_008_NF()); + execute(TC_MEC_MEC048_MEO_CSE_009_OK()); + execute(TC_MEC_MEC048_MEO_CSE_009_OK_01()); + execute(TC_MEC_MEC048_MEO_CSE_009_NF()); + execute(TC_MEC_MEC048_MEO_CSE_010_OK()); + execute(TC_MEC_MEC048_MEO_CSE_010_BR()); + execute(TC_MEC_MEC048_MEO_CSE_011_OK()); + execute(TC_MEC_MEC048_MEO_CSE_011_NF()); + execute(TC_MEC_MEC048_MEO_CSE_012_OK()); + execute(TC_MEC_MEC048_MEO_CSE_012_BR()); + execute(TC_MEC_MEC048_MEO_CSE_012_NF()); + + execute(TC_MEC_MEC048_MEO_CSE_013_OK()); + execute(TC_MEC_MEC048_MEO_CSE_013_OK_02()); + execute(TC_MEC_MEC048_MEO_CSE_014_OK()); + execute(TC_MEC_MEC048_MEO_CSE_014_OK_02()); + execute(TC_MEC_MEC048_MEO_CSE_014_BR()); + execute(TC_MEC_MEC048_MEO_CSE_015_OK()); + execute(TC_MEC_MEC048_MEO_CSE_015_NF()); + execute(TC_MEC_MEC048_MEO_CSE_016_OK()); + execute(TC_MEC_MEC048_MEO_CSE_016_NF()); + execute(TC_MEC_MEC048_MEO_CSE_016_BR()); + execute(TC_MEC_MEC048_MEO_CSE_017_OK()); + execute(TC_MEC_MEC048_MEO_CSE_017_NF()); + + execute(TC_MEC_MEC048_MEO_CSE_018_OK()); + execute(TC_MEC_MEC048_MEO_CSE_019_OK()); + execute(TC_MEC_MEC048_MEO_CSE_020_OK()); + } + + } + + } // End of 'control' statement + +} // End of module AtsMec_SelfServiceEnablementAPI_TestControl diff --git a/ttcn/AtsMec_SelfServiceEnablement/module.mk b/ttcn/AtsMec_SelfServiceEnablement/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..2094dd2012b4cce30db7253af79fd6869b8d6f1d --- /dev/null +++ b/ttcn/AtsMec_SelfServiceEnablement/module.mk @@ -0,0 +1,41 @@ +suite := AtsMec_SelfServiceEnablementAPI + +sources := \ + AtsMec_SelfServiceEnablementAPI_TestCases.ttcn \ + AtsMec_SelfServiceEnablementAPI_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 \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ + ../../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_SensorsSharingService/AtsMec_SensorsSharingService_TestCases.ttcn b/ttcn/AtsMec_SensorsSharingService/AtsMec_SensorsSharingService_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5c4ea653c1c802a83dbccb1b86ac8a38d955d256 --- /dev/null +++ b/ttcn/AtsMec_SensorsSharingService/AtsMec_SensorsSharingService_TestCases.ttcn @@ -0,0 +1,3438 @@ +module AtsMec_SensorsSharingService_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/SensorsSharingService + import from SensorsSharingService_TypesAndValues all; + import from SensorsSharingService_Templates all; + import from SensorsSharingService_Pics all; + import from SensorsSharingService_Pixits all; + import from SensorsSharingService_Functions all; + + // LibMec + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + group discovery { + + /** + * @desc Check that the IUT responds with the list of SensorDiscoveryInfo when queried by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSDISCOVERY_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_DISCOVERY & "?type=" & PX_SENSOR_IDENTIFIER & "&sensorPropertyList=" & PX_SENS_DISCOVERY_PROPERTY_LIST, + 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_sensor_discovery_infos + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list sensors info ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC046_SRV_SENSDISCOVERY_001_OK_01 + + /** + * @desc Check that the IUT responds with the list of SensorDiscoveryInfo when queried by a MEC Application - Using type filter + */ + testcase TC_MEC_MEC046_SRV_SENSDISCOVERY_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_DISCOVERY & "?type=" & PX_SENS_DISCOVERY_TYPE & "&sensorPropertyList=" & PX_SENS_DISCOVERY_PROPERTY_LIST, + 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_sensor_discovery_infos + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list sensors info ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC046_SRV_SENSDISCOVERY_001_OK_02 + + /** + * @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_MEC046_SRV_SENSDISCOVERY_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_DISCOVERY & "?sensorPropertyList=" & PX_SENS_DISCOVERY_PROPERTY_LIST, // type omitted + 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_MEC046_SRV_SENSDISCOVERY_001_BR + + /** + * @desc Check that the IUT responds with an error when the IUT does not have sensor(s) + */ + testcase TC_MEC_MEC046_SRV_SENSDISCOVERY_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_DISCOVERY & "?type=" & PX_SENS_DISCOVERY_UNKNOWN_TYPE & "&sensorPropertyList=" & PX_SENS_DISCOVERY_PROPERTY_LIST, + 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_MEC046_SRV_SENSDISCOVERY_001_NF + + /** + * @desc Check that the IUT responds with the list of subscriptions when queried by a MEC Application - No query parameters + */ + testcase TC_MEC_MEC046_SRV_SENSDISCOVERY_002_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryEventSubscription v_sensor_discovery_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_discovery_subscription(v_sensor_discovery_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_SENS_LIST_SUBS_DISCOVERY, + 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_subscription_link_list_sss( + mw_subscription_link_list( + mw_links_sub( + -, + superset( + { + href := v_sensor_discovery_event_subscription.links.self_.href, + subscriptionType := v_sensor_discovery_event_subscription.subscriptionType + } + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DISCOVERY); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSDISCOVERY_002_OK_01 + + /** + * @desc Check that the IUT responds with the list of subscriptions when queried by a MEC Application - With query parameters + */ + testcase TC_MEC_MEC046_SRV_SENSDISCOVERY_002_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryEventSubscription v_sensor_discovery_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_discovery_subscription(v_sensor_discovery_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_SENS_LIST_SUBS_DISCOVERY & "?sensorIdentifier=" & PX_SENSOR_IDENTIFIER, + 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_subscription_link_list_sss( + mw_subscription_link_list( + mw_links_sub( + -, + superset( + { + href := v_sensor_discovery_event_subscription.links.self_.href, + subscriptionType := v_sensor_discovery_event_subscription.subscriptionType + } + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DISCOVERY); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSDISCOVERY_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_MEC046_SRV_SENSDISCOVERY_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_DISCOVERY & "?sensorId=" & PX_SENSOR_IDENTIFIER, + 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_MEC046_SRV_SENSDISCOVERY_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_MEC046_SRV_SENSDISCOVERY_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryEventSubscription v_sensor_discovery_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_discovery_subscription(v_sensor_discovery_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_SENS_LIST_SUBS_DISCOVERY & "?sensorIdentifier=" & PX_UNKNOWN_SENSOR_IDENTIFIER, + 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DISCOVERY); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSDISCOVERY_002_NF + + /** + * @desc Check that the IUT responds with a SensorDiscoveryEventSubscription when queried by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSDISCOVERY_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryEventSubscription v_sensor_discovery_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_discovery_subscription(v_sensor_discovery_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_SENS_LIST_SUBS_DISCOVERY & "/" & 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_sensor_discovery_event_subscription( + v_sensor_discovery_event_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DISCOVERY); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSDISCOVERY_003_OK + + /** + * @desc Check that the IUT responds with a SensorDiscoveryEventSubscription when queried by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSDISCOVERY_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryEventSubscription v_sensor_discovery_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_DISCOVERY & "/" & PX_UNKNOWN_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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSDISCOVERY_003_NF + + } // End of group discovery + + group sensor_lookup { + + /** + * @desc Check that the IUT responds with the list of subscriptions when queried by a MEC Application - No query parameters + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorStatusSubscription v_sensor_status_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_status_subscription(v_sensor_status_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_SENS_LIST_SUBS_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_subscription_link_list_sss + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_STATUS); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSLOOKUP_001_OK_01 + + /** + * @desc Check that the IUT responds with the list of subscriptions when queried by a MEC Application - With query parameters + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorStatusSubscription v_sensor_status_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_status_subscription(v_sensor_status_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_SENS_LIST_SUBS_STATUS & "?sensorIdentifier=" & PX_SENSOR_IDENTIFIER, + 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_subscription_link_list_sss + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_STATUS); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSLOOKUP_001_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_MEC046_SRV_SENSLOOKUP_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_STATUS & "?sensorId=" & PX_SENSOR_IDENTIFIER, // Wrong query 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 of testcase TC_MEC_MEC046_SRV_SENSLOOKUP_001_BR + + /** + * @desc Check that the IUT responds with an error when the IUT does not have SensorStatus subscriptions registered + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_STATUS & "?sensorIdentifier=" & PX_UNKNOWN_SENSOR_IDENTIFIER, + 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_subscription_link_list_sss( + mw_subscription_link_list( + mw_links_sub( + { href := pattern "http?+" & PICS_ROOT_API & PX_SENS_SUBS }, + omit + ))))))) { + 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_MEC046_SRV_SENSLOOKUP_001_NF + + /** + * @desc Check that the IUT responds with the list of SensorStatusSubscription when queried by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorStatusSubscription v_sensor_status_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_status_subscription(v_sensor_status_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_SENS_LIST_SUBS_STATUS & "/" & 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_sensor_status_subscription( + v_sensor_status_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SensorStatusSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_STATUS); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSLOOKUP_002_OK + + /** + * @desc Check that the IUT responds with an error when the IUT does not have sensor(s) + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorStatusSubscription v_sensor_status_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_STATUS & "/" & PX_UNKNOWN_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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSLOOKUP_002_NF + + /** + * @desc Check that the IUT responds with the list of SensorData when queried by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_DATA & "?sensorIdentifier=" & PX_SENSOR_IDENTIFIER, + 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_sensor_datas( + superset( + mw_sensor_data( + PX_SENSOR_IDENTIFIER + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SensorData ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC046_SRV_SENSLOOKUP_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_MEC046_SRV_SENSLOOKUP_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_DATA, // Query parameters is required + 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_MEC046_SRV_SENSLOOKUP_003_BR + + /** + * @desc Check that the IUT responds with an error when the IUT does not have sensor(s) + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_DATA & "?" & PX_UNKNOWN_SENSOR_IDENTIFIER, + 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_MEC046_SRV_SENSLOOKUP_003_NF + + /** + * @desc Check that the IUT responds with the list of subscriptions when queried by a MEC Application - No query parameters + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_004_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_DATA, + 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_subscription_link_list_sss + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of 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_MEC046_SRV_SENSLOOKUP_004_OK_01 + + /** + * @desc Check that the IUT responds with the list of subscriptions when queried by a MEC Application - With query parameters + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_004_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_DATA & "?sensorIdentifier=" & PX_SENSOR_IDENTIFIER, + 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_subscription_link_list_sss + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of 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_MEC046_SRV_SENSLOOKUP_004_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_MEC046_SRV_SENSLOOKUP_004_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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 & "?sensorId=" & PX_SENSOR_IDENTIFIER, // Wrong query 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 of testcase TC_MEC_MEC046_SRV_SENSLOOKUP_004_BR + + /** + * @desc Check that the IUT responds with an error when the IUT does not have SensorData subscriptions registered + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_004_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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 & "?sensorIdentifier=" & PX_UNKNOWN_SENSOR_IDENTIFIER, + 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_MEC046_SRV_SENSLOOKUP_004_NF + + /** + * @desc Check that the IUT responds with the a SensorDataSubscriptions when queried by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_DATA & "/" & PX_SENSOR_IDENTIFIER, + 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_sensor_data_subscription( + v_sensor_data_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SensorDataSubscritption ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC046_SRV_SENSLOOKUP_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_MEC046_SRV_SENSLOOKUP_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_DATA & "/" & PX_UNKNOWN_SENSOR_IDENTIFIER, + 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_MEC046_SRV_SENSLOOKUP_005_NF + + /** + * @desc Check that the IUT responds with the list of SensorCharacteristic when queried by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_MGMT & "?sensorIdentifier=" & PX_SENSOR_IDENTIFIER, + 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_sensor_characteristics + )))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SensorDataSubscritption ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC046_SRV_SENSLOOKUP_006_OK + + /** + * @desc Check that the IUT acknowledges the change of the characteristics of one or more sensors when queried by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_007_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_MGMT, + v_headers, + m_http_message_body_json( + m_body_json_sensor_characteristic_infos( + { + m_sensor_characteristic_info( + PX_SENSOR_IDENTIFIER, + { + m_sensor_characteristic( + PX_CHARACTERISTIC_NAME, + PX_CHARACTERISTIC_VALUE + ) + } + ) + } + ))))); + 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_sensor_characteristic_infos( + superset( + mw_sensor_characteristic_info( + PX_SENSOR_IDENTIFIER, + { + mw_sensor_characteristic( + PX_CHARACTERISTIC_NAME, + PX_CHARACTERISTIC_VALUE + ) + } + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a SensorCharacteristicList ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC046_SRV_SENSLOOKUP_007_OK + + /** + * @desc Check that the IUT responds with an error when the a sensor does not have a characteristic + */ + testcase TC_MEC_MEC046_SRV_SENSLOOKUP_007_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_MGMT, + v_headers, + m_http_message_body_json( + m_body_json_sensor_characteristic_infos( + { + m_sensor_characteristic_info( + PX_UNKNOWN_SENSOR_IDENTIFIER, + { + m_sensor_characteristic( + PX_CHARACTERISTIC_NAME, + PX_CHARACTERISTIC_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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSLOOKUP_007_NF + + } // End of group sensor_lookup + + group sensor_sub_not { + + /** + * @desc Check that the IUT acknowledges the creation of SensorDiscoveryEventSubscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_DISCOVERY, + v_headers, + m_http_message_body_json( + m_body_json_sensor_discovery_event_subscription( + m_sensor_discovery_event_subscription( + PX_SENS_SUB_CALLBACK_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_sensor_discovery_event_subscription( + mw_sensor_discovery_event_subscription( + PX_SENS_SUB_CALLBACK_URI, + 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 SensorDiscoveryEventSubscription ***"); + 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_SENS_LIST_SUBS_DISCOVERY & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a sensorDiscoveryEventSubscription, 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DISCOVERY); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_OK + + /** + * @desc Check that the IUT provides a test notification when requested by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryEventSubscription v_sensor_discovery_event_subscription + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_sensor_discovery_subscription(v_sensor_discovery_event_subscription, v_subscription_id, true); + 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_sens_test_notification( + mw_test_notification( + -, + mw_links( + { href := pattern "http?+" & PICS_ROOT_API & PX_SENS_LIST_SUBS_DISCOVERY & "/" & v_subscription_id} + ))))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DISCOVERY); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_OK_01 + + /** + * @desc Check that the IUT provides a notification when requested by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryEventSubscription v_sensor_discovery_event_subscription + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_sensor_discovery_subscription(v_sensor_discovery_event_subscription, 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_sensor_discovery_event_notification( + mw_sensor_discovery_event_notification( + -, -, + mw_links( + { href := pattern "http?+" & PICS_ROOT_API & PX_SENS_LIST_SUBS_DISCOVERY & "/" & v_subscription_id} + ))))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DISCOVERY); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_BR_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_DISCOVERY, + v_headers, + m_http_message_body_json( + m_body_json_sensor_discovery_event_subscription( + m_sensor_discovery_event_subscription_wrong( // Invalid subscriptionType + PX_SENS_SUB_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 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_MEC046_SRV_SENSSUBNOT_SUB_NOT_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_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_BR_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_DISCOVERY, + v_headers, + m_http_message_body_json( + m_body_json_sensor_discovery_event_subscription( + m_sensor_discovery_event_subscription_wrong( + omit // Neither callbackReference nor websockNotifConfig 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_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_BR_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_BR_03() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_DISCOVERY, + v_headers, + m_http_message_body_json( + m_body_json_sensor_discovery_event_subscription( + m_sensor_discovery_event_subscription( + PX_SENS_SUB_CALLBACK_URI, // Both callbackReference and websockNotifConfig provided + -, -, -, -, + m_websock_notif_config( + PX_SENS_SUB_WB_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 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_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_BR_03 + + /** + * @desc Check that the IUT acknowledges the change of SensorDiscoveryEventSubscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryEventSubscription v_sensor_discovery_event_subscription + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_discovery_subscription(v_sensor_discovery_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + v_sensor_discovery_event_subscription.sensorInfo := valueof({ m_sensor_info("4") }); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_SENS_LIST_SUBS_DISCOVERY & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_sensor_discovery_event_subscription( + v_sensor_discovery_event_subscription + ))))); + 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_sensor_discovery_event_subscription( + v_sensor_discovery_event_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DISCOVERY); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_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_MEC046_SRV_SENSSUBNOT_SUB_NOT_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryEventSubscription v_sensor_discovery_event_subscription + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_discovery_subscription(v_sensor_discovery_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + v_sensor_discovery_event_subscription.sensorInfo := valueof({ m_sensor_info("4") }); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_SENS_LIST_SUBS_DISCOVERY & "/" & PX_UNKNOWN_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_sensor_discovery_event_subscription( + v_sensor_discovery_event_subscription + ))))); + 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 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DISCOVERY); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_002_NF + + /** + * @desc Check that the IUT acknowledges the cancellation of a SensorDiscoveryEventSubscription when commanded by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryEventSubscription v_sensor_discovery_event_subscription + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_discovery_subscription(v_sensor_discovery_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_SENS_LIST_SUBS_DISCOVERY & "/" & 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 cancels 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DISCOVERY); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_003_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryEventSubscription v_sensor_discovery_event_subscription + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_discovery_subscription(v_sensor_discovery_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_SENS_LIST_SUBS_DISCOVERY & "/" & PX_UNKNOWN_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 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DISCOVERY); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_003_NF + + /** + * @desc Check that the IUT acknowledges the creation of SensorStatusSubscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_STATUS, + v_headers, + m_http_message_body_json( + m_body_json_sensor_status_subscription( + m_sensor_status_subscription( + PX_SENS_SUB_CALLBACK_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_sensor_status_subscription( + mw_sensor_status_subscription( + PX_SENS_SUB_CALLBACK_URI, + 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 SensorStatusSubscription ***"); + 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_SENS_LIST_SUBS_STATUS & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a sensorStatusSubscription, 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_STATUS); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_OK + + /** + * @desc Check that the IUT provides a test notification when requested by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorStatusSubscription v_sensor_status_subscription + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_sensor_status_subscription(v_sensor_status_subscription, v_subscription_id, true); + 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_sens_test_notification( + mw_test_notification( + -, + mw_links + )))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_STATUS); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_OK_01 + + /** + * @desc Check that the IUT provides a notification when requested by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorStatusSubscription v_sensor_status_subscription + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_sensor_status_subscription(v_sensor_status_subscription, 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_sensor_status_notification( + mw_sensor_status_notification( + -, + mw_links( + { href := pattern "http?+" & PICS_ROOT_API & PX_SENS_LIST_SUBS_DISCOVERY & "/" & v_subscription_id} + ))))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_STATUS); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_BR_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_STATUS, + v_headers, + m_http_message_body_json( + m_body_json_sensor_status_subscription( + m_sensor_status_subscription_wrong( // Invalid subscriptionType + PX_SENS_SUB_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 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_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_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_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_BR_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_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_STATUS, + v_headers, + m_http_message_body_json( + m_body_json_sensor_status_subscription( + m_sensor_status_subscription( + omit // Neither callbackReference nor websockNotifConfig 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 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_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_BR_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference nor websockNotifConfig provided + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_BR_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_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_STATUS, + v_headers, + m_http_message_body_json( + m_body_json_sensor_status_subscription( + m_sensor_status_subscription( + PX_SENS_SUB_CALLBACK_URI, // Both callbackReference and websockNotifConfig provided + -, -, -, + m_websock_notif_config( + PX_SENS_SUB_WB_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 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_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_BR_03 + + /** + * @desc Check that the IUT acknowledges the changes of an existing SensorStatusSubscription when commanded by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_005_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryInfos v_sensor_discovery_infos; + var SensorStatusSubscription v_sensor_status_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_sensor_discovery(v_sensor_discovery_infos); + if (lengthof(v_sensor_discovery_infos) == 0) { + log("*** " & testcasename() & ": INCONC: No sensors discovered ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_create_sensor_status_subscription(v_sensor_status_subscription, v_subscription_id); + v_sensor_status_subscription.sensorIdentifierList := { v_sensor_discovery_infos[0].sensorType } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_SENS_LIST_SUBS_STATUS & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_sensor_status_subscription( + v_sensor_status_subscription + ))))); + 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_sensor_status_subscription( + v_sensor_status_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates with a sensorStatusSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_STATUS); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_005_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_MEC046_SRV_SENSSUBNOT_SUB_NOT_005_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryInfos v_sensor_discovery_infos; + var SensorStatusSubscription v_sensor_status_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_sensor_discovery(v_sensor_discovery_infos); + if (lengthof(v_sensor_discovery_infos) == 0) { + log("*** " & testcasename() & ": INCONC: No sensors discovered ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_create_sensor_status_subscription(v_sensor_status_subscription, v_subscription_id); + v_sensor_status_subscription.sensorIdentifierList := { v_sensor_discovery_infos[0].sensorType } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_SENS_LIST_SUBS_STATUS & "/" & PX_UNKNOWN_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_sensor_status_subscription( + v_sensor_status_subscription + ))))); + 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 sensorStatusSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_STATUS); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_005_NF + + /** + * @desc Check that the IUT acknowledges the cancellation of an existing SensorStatusSubscription when commanded by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_006_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorStatusSubscription v_sensor_status_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_status_subscription(v_sensor_status_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_SENS_LIST_SUBS_STATUS & "/" & 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 terminates a sensorStatusSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_STATUS); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_006_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_MEC046_SRV_SENSSUBNOT_SUB_NOT_006_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorStatusSubscription v_sensor_status_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_status_subscription(v_sensor_status_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_SENS_LIST_SUBS_STATUS & "/" & PX_UNKNOWN_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 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_STATUS); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_006_NF + + /** + * @desc Check that the IUT acknowledges the creation of SensorDataSubscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_STATUS, + v_headers, + m_http_message_body_json( + m_body_json_sensor_data_subscription( + m_sensor_data_subscription( + PX_SENS_SUB_CALLBACK_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_sensor_data_subscription( + mw_sensor_data_subscription( + PX_SENS_SUB_CALLBACK_URI, + mw_links( + { href := pattern "http?+" & PICS_ROOT_API & PX_SENS_LIST_SUBS_STATUS & "/" & v_subscription_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 SensorDataSubscription ***"); + 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_SENS_LIST_SUBS_STATUS & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a sensorStatusSubscription, 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_STATUS); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_OK + + /** + * @desc Check that the IUT provides a test notification when requested by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_OK_01() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_sensor_data_subscription(v_sensor_data_subscription, v_subscription_id, true); + 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_sens_test_notification( + mw_test_notification( + -, + mw_links( + { href := pattern "http?+" & PICS_ROOT_API & PX_SENS_LIST_SUBS_STATUS & "/" & v_subscription_id} + ))))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DATA); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_OK_01 + + /** + * @desc Check that the IUT provides a notification when requested by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_OK_02() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_sensor_data_subscription(v_sensor_data_subscription, 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_sensor_data_notification( + mw_sensor_data_notification( + -, + mw_links( + { href := pattern "http?+" & PICS_ROOT_API & PX_SENS_LIST_SUBS_DISCOVERY & "/" & v_subscription_id} + ))))))) { + tc_ac.stop; + + f_init_default_headers_list(-, -, v_headers); + httpPort_notif.send( + m_http_response( + m_http_response_ok_no_body( + v_headers + ))); + log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DATA); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_OK_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_BR_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_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_STATUS, + v_headers, + m_http_message_body_json( + m_body_json_sensor_data_subscription( + m_sensor_data_subscription_wrong( // Invalid subscriptionType + PX_SENS_SUB_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 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_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_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_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_BR_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_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_STATUS, + v_headers, + m_http_message_body_json( + m_body_json_sensor_data_subscription( + m_sensor_data_subscription( + omit // Neither callbackReference nor websockNotifConfig 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 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_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_BR_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference nor websockNotifConfig provided + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_BR_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_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_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_SENS_LIST_SUBS_STATUS, + v_headers, + m_http_message_body_json( + m_body_json_sensor_data_subscription( + m_sensor_data_subscription( + PX_SENS_SUB_CALLBACK_URI, // Both callbackReference and websockNotifConfig provided + -, -, -, + m_websock_notif_config( + PX_SENS_SUB_WB_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 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_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_BR_03 + + /** + * @desc Check that the IUT acknowledges the changes of an existing SensorDataSubscription when commanded by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryInfos v_sensor_discovery_infos; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_sensor_discovery(v_sensor_discovery_infos); + if (lengthof(v_sensor_discovery_infos) == 0) { + log("*** " & testcasename() & ": INCONC: No sensors discovered ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_create_sensor_data_subscription(v_sensor_data_subscription, v_subscription_id); + v_sensor_data_subscription.sensorIdentifierList := { v_sensor_discovery_infos[0].sensorType } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_SENS_LIST_SUBS_STATUS & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_sensor_data_subscription( + v_sensor_data_subscription + ))))); + 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_sensor_data_subscription( + v_sensor_data_subscription + ))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully updates with a sensorStatusSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DATA); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_008_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_MEC046_SRV_SENSSUBNOT_SUB_NOT_008_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDiscoveryInfos v_sensor_discovery_infos; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_sensor_discovery(v_sensor_discovery_infos); + if (lengthof(v_sensor_discovery_infos) == 0) { + log("*** " & testcasename() & ": INCONC: No sensors discovered ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_create_sensor_data_subscription(v_sensor_data_subscription, v_subscription_id); + v_sensor_data_subscription.sensorIdentifierList := { v_sensor_discovery_infos[0].sensorType } + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_SENS_LIST_SUBS_DATA & "/" & PX_UNKNOWN_SUBSCRIPTION_ID, + v_headers, + m_http_message_body_json( + m_body_json_sensor_data_subscription( + v_sensor_data_subscription + ))))); + 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 sensorStatusSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DATA); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_008_NF + + /** + * @desc Check that the IUT acknowledges the cancellation of an existing SensorDataSubscription when commanded by a MEC Application + */ + testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_data_subscription(v_sensor_data_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_SENS_LIST_SUBS_DATA & "/" & 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 terminates a sensorStatusSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, 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_MEC046_SRV_SENSSUBNOT_SUB_NOT_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 TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_009_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var SensorDataSubscription v_sensor_data_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_SENS_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_sensor_data_subscription(v_sensor_data_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_SENS_LIST_SUBS_DATA & "/" & PX_UNKNOWN_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 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_sensor_subscription(v_subscription_id, PX_SENS_LIST_SUBS_DATA); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_009_NF + + } // End of group sensor_sub_not + +} // End of module AtsMec_SensorsSharingService_TestCases \ No newline at end of file diff --git a/ttcn/AtsMec_SensorsSharingService/AtsMec_SensorsSharingService_TestControl.ttcn b/ttcn/AtsMec_SensorsSharingService/AtsMec_SensorsSharingService_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3c51f7d9405fd65e6c94013437a4fd2298a8f65c --- /dev/null +++ b/ttcn/AtsMec_SensorsSharingService/AtsMec_SensorsSharingService_TestControl.ttcn @@ -0,0 +1,94 @@ +module AtsMec_SensorsSharingService_TestControl { + + // LibMec/SensorsSharingService + import from SensorsSharingService_Pics all; + + // LibMec + import from LibMec_Pics all; + + // AtsMec_SensorsSharingService + import from AtsMec_SensorsSharingService_TestCases all; + + control { + + if (PICS_MEC_PLAT and PICS_SERVICES and PICS_SENS_API_SUPPORTED) { + execute(TC_MEC_MEC046_SRV_SENSDISCOVERY_001_OK_01()); + execute(TC_MEC_MEC046_SRV_SENSDISCOVERY_001_OK_02()); + execute(TC_MEC_MEC046_SRV_SENSDISCOVERY_001_BR()); + execute(TC_MEC_MEC046_SRV_SENSDISCOVERY_001_NF()); + + execute(TC_MEC_MEC046_SRV_SENSDISCOVERY_002_OK_01()); + execute(TC_MEC_MEC046_SRV_SENSDISCOVERY_002_OK_02()); + execute(TC_MEC_MEC046_SRV_SENSDISCOVERY_002_BR()); + execute(TC_MEC_MEC046_SRV_SENSDISCOVERY_002_NF()); + + execute(TC_MEC_MEC046_SRV_SENSDISCOVERY_003_OK()); + execute(TC_MEC_MEC046_SRV_SENSDISCOVERY_003_NF()); + + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_001_OK_01()); + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_001_OK_02()); + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_001_BR()); + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_001_NF()); + + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_002_OK()); + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_002_NF()); + + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_003_OK()); + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_003_BR()); + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_003_NF()); + + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_004_OK_01()); + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_004_OK_02()); + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_004_BR()); + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_004_NF()); + + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_005_OK()); + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_005_NF()); + + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_006_OK()); + + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_007_OK()); + execute(TC_MEC_MEC046_SRV_SENSLOOKUP_007_NF()); + + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_OK()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_OK_01()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_OK_02()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_BR_01()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_001_BR_02()); + + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_002_OK()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_002_NF()); + + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_003_OK()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_003_NF()); + + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_OK()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_OK_01()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_OK_02()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_BR_01()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_BR_02()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_004_BR_03()); + + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_005_OK()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_005_NF()); + + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_006_OK()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_006_NF()); + + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_OK()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_OK_01()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_OK_02()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_BR_01()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_BR_02()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_007_BR_03()); + + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_008_OK()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_008_NF()); + + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_009_OK()); + execute(TC_MEC_MEC046_SRV_SENSSUBNOT_SUB_NOT_009_NF()); + } + + } // End of 'alt' statement + +} // End of module AtsMec_SensorsSharingService_TestControl \ No newline at end of file diff --git a/ttcn/AtsMec_SensorsSharingService/module.mk b/ttcn/AtsMec_SensorsSharingService/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..41a34292a721bc540c20d70823cec62dc84165b7 --- /dev/null +++ b/ttcn/AtsMec_SensorsSharingService/module.mk @@ -0,0 +1,42 @@ +suite := AtsMec_SensorsSharingService + +sources := \ + AtsMec_SensorsSharingService_TestCases.ttcn \ + AtsMec_SensorsSharingService_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 \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ + ../../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_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..09663cb488d4007713b51a801a6e704375b9508a --- /dev/null +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn @@ -0,0 +1,1051 @@ +/** + * @author ETSI / STF569 + * @version $URL:$ + * $ID:$ + * @desc This module provides the MEC test cases. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V3.1.1 (2024-04) + */ +module AtsMec_BandwidthChangeEventSubAPI_TestCases { + + // JSON + import from Json all; + + // Libcommon + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibHttp_TypesAndValues all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/TrafficManagementAPI + import from TrafficManagementAPI_TypesAndValues all; + import from TrafficManagementAPI_Templates all; + import from TrafficManagementAPI_Functions all; + import from TrafficManagementAPI_Pics all; + import from TrafficManagementAPI_Pixits all; + + // LibMec + import from LibMec_Templates all; + import from LibMec_Functions all; + import from LibMec_Pics all; + import from LibMec_Pixits all; + + + group BWSUBLOOKUP{ + + /** + * @desc Check that the IUT responds with a list of BWM change event susbsciption when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_subscription_link_list( + mw_subscription_link( + mw_subscription_link_list( + -, + superset( + mw_subscription( + v_bw_chg_event_subscription.links.self_.href, + "BwChgEventSubscription" + ) + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BW event subscription list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_BR() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/?subscriptionType=UnknownType", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK + + /** + * @desc Check that the IUT responds with an error when no subscription are created + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_NF() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK + + /** + * @desc Check that the IUT responds with a list of subscriptions for notifications on services availability when queried by a MEC Application - Filter on subscription_type + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "?" & "subscription_type=bw_chg", + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_subscription_link_list( + mw_subscription_link( + mw_subscription_link_list( + -, + superset( + mw_subscription( + v_bw_chg_event_subscription.links.self_.href, + v_bw_chg_event_subscription.subscriptionType + ) + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BW event subscription list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK + + /** + * @desc Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscription_type + */ + testcase TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "?subscription_type=" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_TYPE, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF + + + /** + * @desc Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + v_bw_chg_event_subscription.subscriptionType, + v_bw_chg_event_subscription.callbackReference, + -, + mw_links( + v_bw_chg_event_subscription.links.self_ + ), + v_bw_chg_event_subscription.filterCriteria + + + + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BW event subscription list ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK + + /** + * @desc Check that the IUT responds with a individual BWM change event susbsciption when queried by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_get( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF + + } + + group BW_SUB { + + /** + * @desc Check that the IUT acknowledges the creation of BWM change event subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_SUBSCRIPTION_TYPE, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + {m_filter_criteria(PX_APP_INSTANCE_ID,-)} + + )))))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + PX_BW_SUBSCRIPTION_TYPE, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + {m_filter_criteria(PX_APP_INSTANCE_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 BwChgEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } else { + var charstring_list v_header_location; + f_get_header(v_response.response.header, "Location", v_header_location); + v_subscription_id := regexp( + v_header_location[0], + "?+" & PX_ME_BWM_SUB_URI & "/(?*)", + 0 + ); + } + log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwChgEventSubscription, SubscriptionId: ", v_subscription_id," ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_01() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_UNKNOWN_SUBSCRIPTION_TYPE, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + {m_filter_criteria} + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided + */ + + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_02() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_SUBSCRIPTION_TYPE, + -, + -, + -, + { + m_filter_criteria + } + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_02 + + /** + * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided + */ + + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_03() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_SUBSCRIPTION_TYPE, + PX_BW_EVENT_SUB_CALLBACK_URI, + { websocketUri := PX_BW_SUB_WEB_SOCKET, requestWebsocketUri := omit }, + -, + {m_filter_criteria} + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request + )) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_03 + + /** + * @desc Check that the IUT acknowledges the update of BWM change event subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & v_subscription_id, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_SUBSCRIPTION_TYPE, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + {m_filter_criteria} + + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + PX_BW_SUBSCRIPTION_TYPE, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + { + m_filter_criteria + } + )))))) { + tc_ac.stop; + + + log("*** " & testcasename() & ": PASS: IUT successfully responds with an updated BwSubscriptionNotification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK + + /** + * @desc Check that the IUT acknowledges an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_002_NF() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_put( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_SUBSCRIPTION_TYPE, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + { + m_filter_criteria ( + -, + - + ) + } + )))))); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK + + /** + * @desc Check that the IUT acknowledges the cancellation of BWM change event subscription request when commanded by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & v_subscription_id, + v_headers + ))); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully cancels the BwChgEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK + + /** + * @desc Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_003_NF() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_SUBSCRIPTION_ID, "UTF-8")), + v_headers + ))); + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT responds with an error cancelling the BwChgEventSubscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_003_OK + + /** + * @desc Check that the BWM service sends a notification about a bandwidth utility or the data volume if the BWM service has an associated subscription and the event is generated + */ + testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_004_OK() runs on HttpComponent system HttpTestAdapter { + + // Local variables + var Headers v_headers; + var HttpMessage v_response; + var BwChgEventSubscription v_bw_chg_event_subscription; + var charstring v_subscription_id; + + + // Test control + if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED)) { + log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + + // Preamble + f_create_bw_chg_event_subscription(v_bw_chg_event_subscription, v_subscription_id); + action("Trigger a event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + tc_ac.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + -, + -, + mw_http_message_body_json( + mw_body_json_bw_chg_event_notification( + mw_bw_chg_event_notification( + PX_BW_NOTIFICATION_TYPE, + -, + { + mw_data_vol_dispersion( + 1024,PX_APP_INSTANCE_ID,- + ) + }, + v_bw_chg_event_subscription.links + + )))))) -> value v_response { + tc_ac.stop; + + 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 notification ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_delete_bw_chg_event_subscription(v_subscription_id); + f_cf_01_http_notif_down(); + } // End of testcase TC_MEC_MEC015_SRV_BW_SUB_NOT_004_OK + + } + +} \ No newline at end of file diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn index 1026770d48daa8a45ed0539dcb05974e0a5b9316..4838dab4a5685a4ef234d8f5c806efe5e28c19c3 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V2.1.1 (2020-06) + * @see ETSI GS MEC 015, ETSI GS MEC 015, Draft ETSI GS MEC 015 V3.1.1 (2024-04) */ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { @@ -141,13 +141,17 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { 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 ), * @@ -209,16 +213,22 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { 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 - )))))) { + mw_body_json_mts_session_info_list( + { + *, + 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 an MtsSessionInfo list ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with an MtsSessionInfo list - app_instance_id ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -228,7 +238,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_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, oct2char(unichar2oct(v_mts_session_info.sessionId, "UTF-8"))); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_02 @@ -271,14 +281,19 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { 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 - )))))) { + mw_body_json_mts_session_info_list( + { + *, + 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 ***"); @@ -291,7 +306,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_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, oct2char(unichar2oct(v_mts_session_info.sessionId, "UTF-8"))); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_002_OK_03 @@ -334,14 +349,19 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_mts_session_info( + mw_body_json_mts_session_info_list( + { + *, 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 ***"); @@ -506,7 +526,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { PX_APP_INSTANCE_ID, APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd, // QoS - LowCost, // MtsMode + QoS, // MtsMode Downlink // TrafficDirection )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -584,7 +604,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { PX_APP_INSTANCE_ID, FLOW_SPECIFIC_MTS_SESSION, // Request type m_qosd, // QoS - LowCost, // MtsMode + QoS, // MtsMode Downlink, // TrafficDirection -, -, { m_flow_filter("10.10.10.10", 1010) } // FIXME Use PIXITs @@ -721,7 +741,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & oct2char(unichar2oct(v_mts_session_info.sessionId, "UTF-8")), v_headers ))); @@ -741,7 +761,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { )))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with a BwInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a MTS session ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -751,7 +771,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_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, oct2char(unichar2oct(v_mts_session_info.sessionId, "UTF-8"))); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_004_OK @@ -785,7 +805,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & "mts/v0/mts_sessions/" & PX_UNKNOWN_APP_INSTANCE_ID, // Wrong version number + PICS_ROOT_API & "mts/v0/mts_sessions/" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")), // Wrong version number v_headers ) ) @@ -794,12 +814,8 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { 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 the correct error code ***"); @@ -846,7 +862,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & PX_UNKNOWN_APP_INSTANCE_ID, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")), v_headers ) ) @@ -904,7 +920,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & v_mts_session_id, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & oct2char(unichar2oct(v_mts_session_info.sessionId, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_mts_session_info( @@ -912,10 +928,10 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { PX_APP_INSTANCE_ID, APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd_1, // QoS - LowCost, // MtsMode + QoS, // MtsMode Downlink // TrafficDirection )))))); - + f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body tc_ac.start; alt { @@ -928,7 +944,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { PX_APP_INSTANCE_ID, APPLICATION_SPECIFIC_MTS_SESSION, // Request type mw_qosd_1, // QoS - LowCost, // MtsMode + QoS, // MtsMode Downlink // TrafficDirection )))))) { tc_ac.stop; @@ -943,7 +959,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_delete_mts_session_info_resource(PX_APP_INSTANCE_ID, oct2char(unichar2oct(v_mts_session_info.sessionId, "UTF-8"))); f_cf_01_http_down(); } // End of testcase TC_MEC_MEC015_SRV_MTS_005_OK @@ -980,10 +996,12 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { m_body_json_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, - FLOW_SPECIFIC_MTS_SESSION, // Request type + APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd_1, // QoS - LowCost, // MtsMode - Downlink // TrafficDirection + QoS, // MtsMode + Downlink, // TrafficDirection + -,-, + { m_flow_filter("10.10.10.10", 1010) } )))))); // Test Body @@ -1156,7 +1174,7 @@ module AtsMec_MultiAccessSteeringInfoAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & PX_UNKNOWN_APP_INSTANCE_ID, + PICS_ROOT_API & PX_ME_MTS_SESSIONS_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")), v_headers ))); diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn index f3b601d76972bdb8b9851b73a9e21f774ad69631..6a05b125de1e624f69f141e599ab70c99ea8fbfa 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V2.2.1 (2020-06) + * @see ETSI GS MEC 015, Draft ETSI GS MEC 015 V3.1.1 (2024-04) */ module AtsMec_TrafficManagementAPI_TestCases { @@ -47,7 +47,7 @@ module AtsMec_TrafficManagementAPI_TestCases { 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 ***"); @@ -77,7 +77,7 @@ module AtsMec_TrafficManagementAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_bw_info_list + mw_body_json_bw_info_list({}) )))) { tc_ac.stop; @@ -100,6 +100,8 @@ module AtsMec_TrafficManagementAPI_TestCases { testcase TC_MEC_MEC015_SRV_TM_001_OK_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)) { @@ -114,11 +116,12 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); 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, + PICS_ROOT_API & PX_ME_BWM_URI & "?app_instance_id=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -130,13 +133,19 @@ module AtsMec_TrafficManagementAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_bw_info( - mw_bw_info( - PX_APP_INSTANCE_ID - )))))) { + mw_body_json_bw_info_list( + { + *, + mw_bw_info( + PX_APP_INSTANCE_ID + ), + * + } + + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo List***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -146,6 +155,7 @@ 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_001_OK_02 @@ -155,6 +165,8 @@ module AtsMec_TrafficManagementAPI_TestCases { testcase TC_MEC_MEC015_SRV_TM_001_OK_03() 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)) { @@ -169,11 +181,12 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); 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, + PICS_ROOT_API & PX_ME_BWM_URI & "?app_name=" & oct2char(unichar2oct(PX_APP_NAME, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -185,12 +198,17 @@ module AtsMec_TrafficManagementAPI_TestCases { 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 - )))))) { + mw_body_json_bw_info_list( + { + *, + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + PX_APP_NAME + ), + * + } + ))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***"); @@ -203,6 +221,7 @@ 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_001_OK_03 @@ -212,6 +231,9 @@ module AtsMec_TrafficManagementAPI_TestCases { testcase TC_MEC_MEC015_SRV_TM_001_OK_04() 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)) { @@ -226,11 +248,12 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test adapter configuration // Preamble + f_create_bw_allocation_resource(PX_APP_INSTANCE_ID, v_bw_allocation_id, v_bw_info); 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, + PICS_ROOT_API & PX_ME_BWM_URI & "?session_id=" & oct2char(unichar2oct(v_bw_info.allocationId, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -242,16 +265,21 @@ module AtsMec_TrafficManagementAPI_TestCases { 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 - )))))) { + mw_body_json_bw_info_list( + { + *, + mw_bw_info( + PX_APP_INSTANCE_ID, + -, -, -, + PX_APP_NAME, + v_bw_info.allocationId + ), + * + } + ))))) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with the required BwInfo - session_id ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -261,6 +289,7 @@ 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_001_OK_04 @@ -288,7 +317,7 @@ module AtsMec_TrafficManagementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_BWM_URI & "?appInstId=" & PX_APP_INSTANCE_ID, + PICS_ROOT_API & PX_ME_BWM_URI & "?appInstId=" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -339,7 +368,7 @@ module AtsMec_TrafficManagementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_BWM_URI & "?app_instance_id=" & PX_UNKNOWN_APP_INSTANCE_ID, + PICS_ROOT_API & PX_ME_BWM_URI & "?app_instance_id=" & oct2char(unichar2oct(PX_UNKNOWN_APP_INSTANCE_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -390,7 +419,7 @@ module AtsMec_TrafficManagementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_BWM_URI & "?app_name=" & PX_UNKNOWN_APP_NAME, + PICS_ROOT_API & PX_ME_BWM_URI & "?app_name=" & oct2char(unichar2oct(PX_UNKNOWN_APP_NAME, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -441,7 +470,7 @@ module AtsMec_TrafficManagementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_BWM_URI & "?session_id=" & PX_UNKNOWN_APP_ALLOCATION_ID, + PICS_ROOT_API & PX_ME_BWM_URI & "?session_id=" & oct2char(unichar2oct(PX_UNKNOWN_APP_ALLOCATION_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -494,7 +523,7 @@ module AtsMec_TrafficManagementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_BWM_URI, v_headers, m_http_message_body_json( m_body_json_bw_info( @@ -526,7 +555,7 @@ module AtsMec_TrafficManagementAPI_TestCases { // Check HTTP Location header if (f_check_headers(v_response.response.header) == false) { - log("*** " & testcasename() & ": FAIL: IUT failed in Area subscription ***"); + log("*** " & testcasename() & ": FAIL: IUT failed in creation of a bandwidthAllocation resource ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } else { var charstring_list v_header_location; @@ -540,6 +569,7 @@ module AtsMec_TrafficManagementAPI_TestCases { 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 ***"); @@ -576,7 +606,7 @@ module AtsMec_TrafficManagementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_BWM_URI, v_headers, m_http_message_body_json( m_body_json_bw_info( @@ -587,7 +617,7 @@ module AtsMec_TrafficManagementAPI_TestCases { Downlink, PX_APP_NAME, PX_APP_ALLOCATION_ID, - { m_session_filter("10.10.10.10", 1010) } // FIXME Use PIXITs + { m_session_filter(PX_SESSION_IPv4, PX_SESSION_PORT), m_session_filter(PX_SESSION_IPv4, PX_SESSION_PORT) } // sessionFilter shall be omitted when APPLICATION_SPECIFIC_BW_ALLOCATION )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -637,7 +667,7 @@ module AtsMec_TrafficManagementAPI_TestCases { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")), + PICS_ROOT_API & PX_ME_BWM_URI, v_headers, m_http_message_body_json( m_body_json_bw_info( @@ -762,7 +792,7 @@ module AtsMec_TrafficManagementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, + PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_BW_ALLOCATION_ID, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -816,18 +846,21 @@ module AtsMec_TrafficManagementAPI_TestCases { 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( + 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 + APPLICATION_SPECIFIC_BW_ALLOCATION, + "2048", + Downlink, + PX_APP_NAME, + PX_APP_ALLOCATION_ID )))))); // Test Body @@ -887,15 +920,15 @@ module AtsMec_TrafficManagementAPI_TestCases { 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 + v_bw_info.sessionFilter := { valueof(m_session_filter(PX_SESSION_IPv4, PX_SESSION_PORT)) }; // 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 + 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 @@ -944,9 +977,9 @@ module AtsMec_TrafficManagementAPI_TestCases { // 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); - } + // 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( @@ -998,23 +1031,26 @@ module AtsMec_TrafficManagementAPI_TestCases { // Test component configuration f_cf_01_http_up(); - - // Test adapter configuration - + + // oct2char(unichar2oct(PX_UNKNOWN_BW_ALLOCATION_ID, "UTF-8")), + // Preamble + f_init_default_headers_list(-, -, v_headers); 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( + PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_BW_ALLOCATION_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, - "2048", // FixedAllocation - Downlink - )))))); + "2048", + Downlink, + PX_APP_NAME, + PX_UNKNOWN_BW_ALLOCATION_ID + )))))); // Test Body tc_ac.start; @@ -1074,7 +1110,8 @@ module AtsMec_TrafficManagementAPI_TestCases { m_body_json_bw_info_deltas( m_bw_info_deltas( PX_APP_INSTANCE_ID, - APPLICATION_SPECIFIC_BW_ALLOCATION + APPLICATION_SPECIFIC_BW_ALLOCATION, + v_bw_info.allocationId )))))); // Test Body @@ -1145,7 +1182,7 @@ module AtsMec_TrafficManagementAPI_TestCases { PX_APP_INSTANCE_ID, APPLICATION_SPECIFIC_BW_ALLOCATION, v_bw_info.allocationId, - { m_session_filter("10.10.10.10", 1010) } // FIXME Use PIXITs + { m_session_filter(PX_SESSION_IPv4, PX_SESSION_PORT) } // FIXME Use PIXITs )))))); // Test Body @@ -1213,7 +1250,7 @@ module AtsMec_TrafficManagementAPI_TestCases { PX_APP_INSTANCE_ID, SESSION_SPECIFIC_BW_ALLOCATION, v_bw_info.allocationId - //{ m_session_filter("10.10.10.10", 1010) } sessionFilter shall be present + //{ m_session_filter(PX_SESSION_IPv4, PX_SESSION_PORT) } sessionFilter shall be present )))))); // Test Body @@ -1267,7 +1304,7 @@ module AtsMec_TrafficManagementAPI_TestCases { httpPort.send( m_http_request( m_http_request_patch( - PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, + PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_BW_ALLOCATION_ID, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_bw_info_deltas( @@ -1321,9 +1358,9 @@ module AtsMec_TrafficManagementAPI_TestCases { // 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); - } + // if (v_bw_allocation_id == "") { + // f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + // } f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( @@ -1344,6 +1381,7 @@ module AtsMec_TrafficManagementAPI_TestCases { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); + setverdict(pass, "IUT successfully responds to deletion"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -1379,14 +1417,14 @@ module AtsMec_TrafficManagementAPI_TestCases { // 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); - } + // 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_delete( - PICS_ROOT_API & PX_ME_BWM_URI & "/" & PX_UNKNOWN_BW_ALLOCATION_ID, + PICS_ROOT_API & PX_ME_BWM_URI & "/" & oct2char(unichar2oct(PX_UNKNOWN_BW_ALLOCATION_ID, "UTF-8")), v_headers ))); @@ -1395,11 +1433,10 @@ module AtsMec_TrafficManagementAPI_TestCases { alt { [] httpPort.receive( mw_http_response( - mw_http_response_204_no_content - )) { + mw_http_response_404_not_found + )) { tc_ac.stop; - - log("*** " & testcasename() & ": PASS: IUT successfully responds to deletion ***"); + log("*** " & testcasename() & ": PASS: IUT responds with an error when a request for an unknown URI is sent by a MEC Application ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { diff --git a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn index 842fd6f4f7ab4614a5f20d835d06cf00df3dc81f..260f4ceb36b58cde9bdafef3cb3c7c3144ee37e1 100644 --- a/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn +++ b/ttcn/AtsMec_TrafficManagement/AtsMec_TrafficManagementAPI_TestControl.ttcn @@ -41,6 +41,23 @@ module AtsMec_TrafficManagementAPI_TestControl { execute(TC_MEC_MEC015_SRV_TM_006_OK()); execute(TC_MEC_MEC015_SRV_TM_006_NF()); } + + if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED) { + execute(TC_MEC_MEC015_SRV_BWMSUBLOOKUP_001_OK()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_BR()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_001_NF()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_002_OK()); + execute(TP_MEC_MEC015_SRV_BWSUBLOOKUP_002_NF()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_OK()); + execute(TC_MEC_MEC015_SRV_BWSUBLOOKUP_003_NF()); + + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_001_OK()); + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_01()); + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_02()); + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_001_BR_03()); + execute(TC_MEC_MEC015_SRV_BW_SUB_NOT_002_OK()); + } + if (PICS_MEC_PLAT and PICS_MULTI_ACCESS_TRAFFIC_STEERING_API_SUPPORTED) { execute(TC_MEC_MEC015_SRV_MTS_001_OK()); diff --git a/ttcn/AtsMec_TrafficManagement/module.mk b/ttcn/AtsMec_TrafficManagement/module.mk index b24f6e67199837784cd80a079844a37c172c6c5c..8b5b3b471c12cdec2703747b681aa1f302d68238 100644 --- a/ttcn/AtsMec_TrafficManagement/module.mk +++ b/ttcn/AtsMec_TrafficManagement/module.mk @@ -2,6 +2,7 @@ suite := AtsMec_TrafficManagement sources := \ AtsMec_TrafficManagementAPI_TestCases.ttcn \ + AtsMec_BandwidthChangeEventSubAPI_TestCases.ttcn \ AtsMec_MultiAccessSteeringInfoAPI_TestCases.ttcn \ AtsMec_TrafficManagementAPI_TestControl @@ -25,6 +26,9 @@ modules := ../LibCommon \ ../LibMec/ApplicationMobilityServiceAPI \ ../LibMec/FederationEnablementAPI \ ../LibMec/IoTAPI \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn index 7c4418c71fdd841f97470fe31f351dcfe844e597..f8d87cd20d2597d80aed9deef507282cccf7bb71 100644 --- a/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn +++ b/ttcn/AtsMec_UEidentity/AtsMec_UEidentityAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 003, ETSI GS MEC 014 V3.1.1 + * @see ETSI GS MEC 003, ETSI GS MEC 014 V3.2.1 */ module AtsMec_UEidentityAPI_TestCases { @@ -60,7 +60,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - 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")), + 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); @@ -115,7 +115,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - 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")), + PICS_ROOT_API & PX_ME_APP_Q_UE_IDENTITY_ID_URI & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/ue_identity_tag_info?ueTag=" & oct2char(unichar2oct(PX_UE_IDENTITY_TAG, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -125,15 +125,11 @@ module AtsMec_UEidentityAPI_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 ProblemDetails set to 400 Bad Request ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { @@ -170,7 +166,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - 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")), + 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); @@ -179,13 +175,13 @@ module AtsMec_UEidentityAPI_TestCases { 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( + 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 ***"); @@ -230,7 +226,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - 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", + 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( @@ -304,7 +300,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - 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", + 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( @@ -368,7 +364,7 @@ module AtsMec_UEidentityAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - 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", + 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_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn index f94289ef1de39b9bcc46037d96384bb94f66922f..bc631d21ba3dc90c4a1de1a1208159470612aae9 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestCases.ttcn @@ -7,7 +7,7 @@ * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. * All rights reserved. - * @see ETSI GS MEC 002, Draft ETSI GS MEC 030 V2.1.1 (2020-04) + * @see ETSI GS MEC 002, Draft ETSI GS MEC 030 V3.3.1 (2024-06) */ module AtsMec_V2XInformationServiceAPI_TestCases { @@ -398,7 +398,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { /** * @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 { + testcase TC_MEC_MEC030_SRV_V2X_002_BR_01() runs on HttpComponent system HttpTestAdapter { // Local variables var Headers v_headers; @@ -419,7 +419,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { 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, + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/uu_mbms_provisioning_info?zone_info=" & PX_V2X_LATITUDE, // Wrong query parameter v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -444,7 +444,58 @@ module AtsMec_V2XInformationServiceAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_MEC030_SRV_V2X_002_BR + } // End of testcase TC_MEC_MEC030_SRV_V2X_002_BR_01 + + /** + * @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_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 & ",ecgi," & PX_V2X_ECGI, // Wrong query 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 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_02 /** * @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application @@ -629,7 +680,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { 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, + PICS_ROOT_API & PX_ME_V2X_QUERIES_URI & "/pc5_provisioning_info?location_info=" & PX_V2X_LATITUDE & ",ecgi," & PX_V2X_ECGI, v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -870,6 +921,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_v2x_msg_distribution_server_info( { m_v2x_msg_distribution_server( + m_info_protocol({ AMQP_1_0 }) ) } @@ -929,43 +981,48 @@ module AtsMec_V2XInformationServiceAPI_TestCases { m_predicted_qos( -, PX_LOC_GRANULARITY, + -, -, -, + /*m_prediction_area( + m_location_info( + m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + ), + m_location_info_geo_area(43.72, 10.41) + ), + "100" + ) 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_stream(PX_STREAM_ID_1, { m_qos_kpi("latency", "1"), m_qos_kpi("ul_bitrate", "1") }), + m_stream(PX_STREAM_ID_2, { m_qos_kpi("latency", "1"), m_qos_kpi("ul_bitrate", "1") }), + m_stream(PX_STREAM_ID_3, { m_qos_kpi("latency", "1"), m_qos_kpi("ul_bitrate", "1") }) } - )/*, + ),*/ { - 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 - ) - } - ) - }*/ + { + routeInfo := + { + m_route_info( + m_location_info( + omit/*m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + )*/, + m_location_info_geo_area(PX_QoS_LAT_1, PX_QoS_LON_1) + ), + m_time_stamp(PX_QoS_TS_1) + ), + m_route_info( + m_location_info( + omit/*m_ecgi( + PX_V2X_CELL_ID, + m_plmn(PX_MCC, PX_MNC) + )*/, + m_location_info_geo_area(PX_QoS_LAT_2, PX_QoS_LON_2) + ), + m_time_stamp(PX_QoS_TS_2) + )}}} )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -978,8 +1035,33 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_message_body_json( mw_body_json_v2x_predicted_qos( mw_predicted_qos( - -, - PX_LOC_GRANULARITY + SINGLE_UE_PREDICTION, + PX_LOC_GRANULARITY, + m_qos( + { + m_stream(PX_STREAM_ID_1, { m_qos_kpi("rsrp", "60", "1"), m_qos_kpi("rsrq", "20", "1") }), + m_stream(PX_STREAM_ID_2, { m_qos_kpi("rsrp", "55", "1"), m_qos_kpi("rsrq", "13", "1") }) + } + ), + -, -, + { + { + routeInfo := + { + mw_route_info( + mw_location_info( + omit, + mw_location_info_geo_area(PX_QoS_LAT_1, PX_QoS_LON_1) + ), + mw_time_stamp(PX_QoS_TS_1) + ), + mw_route_info( + mw_location_info( + omit, + mw_location_info_geo_area(PX_QoS_LAT_2, PX_QoS_LON_2) + ), + mw_time_stamp(PX_QoS_TS_2) + )}}} )))))) { tc_ac.stop; @@ -1027,43 +1109,25 @@ module AtsMec_V2XInformationServiceAPI_TestCases { 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 - ) - } - ) - }*/ + { + routeInfo := + { + m_route_info( + m_location_info( + omit, + m_location_info_geo_area(PX_QoS_LAT_1, PX_QoS_LON_1) + ), + m_time_stamp(PX_QoS_TS_1) + ), + m_route_info( + m_location_info( + omit, + m_location_info_geo_area(PX_QoS_LAT_2, PX_QoS_LON_2) + ), + m_time_stamp(PX_QoS_TS_2) + )}}} )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1120,43 +1184,25 @@ module AtsMec_V2XInformationServiceAPI_TestCases { 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 - ) - } - ) - }*/ + { + routeInfo := + { + m_route_info( + m_location_info( + omit, + m_location_info_geo_area(PX_QoS_LAT_1_OUT_OF_COVERAGE, PX_QoS_LON_1_OUT_OF_COVERAGE) + ), + m_time_stamp(PX_QoS_TS_1) + ), + m_route_info( + m_location_info( + omit, + m_location_info_geo_area(PX_QoS_LAT_2, PX_QoS_LON_2) + ), + m_time_stamp(PX_QoS_TS_2) + )}}} )))))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1347,8 +1393,14 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_v2x_subscription_link_list - )))) { + mw_body_json_v2x_subscription_link_list( + mw_subscription_link_list( + mw_subscription_links( + -, + superset(m_subscription_( + v_prov_chg_uu_uni_subscription.links.self_.href, + v_prov_chg_uu_uni_subscription.subscriptionType + ))))))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); @@ -1404,8 +1456,14 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_v2x_subscription_link_list - )))) { + mw_body_json_v2x_subscription_link_list( + mw_subscription_link_list( + mw_subscription_links( + -, + superset(m_subscription_( + v_prov_chg_uu_mbms_subscription.links.self_.href, + v_prov_chg_uu_mbms_subscription.subscriptionType + ))))))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); @@ -1461,8 +1519,14 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_v2x_subscription_link_list - )))) { + mw_body_json_v2x_subscription_link_list( + mw_subscription_link_list( + mw_subscription_links( + -, + superset(m_subscription_( + v_prov_chg_pc5_subscription.links.self_.href, + v_prov_chg_pc5_subscription.subscriptionType + ))))))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); @@ -1519,8 +1583,14 @@ module AtsMec_V2XInformationServiceAPI_TestCases { mw_http_response( mw_http_response_ok( mw_http_message_body_json( - mw_body_json_v2x_subscription_link_list - )))) { + mw_body_json_v2x_subscription_link_list( + mw_subscription_link_list( + mw_subscription_links( + -, + superset(m_subscription_( + v_v2x_msg_subscription.links.self_.href, + v_v2x_msg_subscription.subscriptionType + ))))))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of SubscriptionLinks ***"); @@ -1619,7 +1689,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_V2X_URI & "/subscriptions/_prov_chg_uu_uni_", // Invalid subscription type + PICS_ROOT_API & PX_ME_V2X_URI & "?subscription_type=unknown_prov_chg_uu_uni", // Invalid subscription type v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -3018,7 +3088,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { } // 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 + * @desc Check that the IUT responds with the correct error code when a request with incorrect parameters is sent by a MEC Application */ testcase TC_MEC_MEC030_SRV_V2X_010_BR() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3091,7 +3161,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { } // 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 + * @desc Check that the IUT responds with the correct error code when a request with incorrect parameters is sent by a MEC Application */ testcase TC_MEC_MEC030_SRV_V2X_010_NF() runs on HttpComponent system HttpTestAdapter { // Local variables @@ -3439,7 +3509,7 @@ module AtsMec_V2XInformationServiceAPI_TestCases { } // 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 + * @desc Check that the IUT responds with the correct error code when a request with incorrect parameters is sent by a MEC Application */ testcase TC_MEC_MEC030_SRV_V2X_011_NF() runs on HttpComponent system HttpTestAdapter { // Local variables diff --git a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn index 5b6023314553055f7efcb6faedc31b7ca824325e..098fcd1fc323681d1bb553a2538fc27dd4998be2 100644 --- a/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn +++ b/ttcn/AtsMec_V2XInformationService/AtsMec_V2XInformationServiceAPI_TestControl.ttcn @@ -19,7 +19,8 @@ module AtsMec_V2XInformationServiceAPI_TestControl { 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_BR_01()); + execute(TC_MEC_MEC030_SRV_V2X_002_BR_02()); execute(TC_MEC_MEC030_SRV_V2X_002_NF()); execute(TC_MEC_MEC030_SRV_V2X_003_OK_01()); diff --git a/ttcn/AtsMec_V2XInformationService/module.mk b/ttcn/AtsMec_V2XInformationService/module.mk index 4e4bc434dc0aa80d046e527f314d9bc756e6e3f3..5f02cdc6d1b444a23e7572af7fc35a844bde0456 100644 --- a/ttcn/AtsMec_V2XInformationService/module.mk +++ b/ttcn/AtsMec_V2XInformationService/module.mk @@ -24,6 +24,9 @@ modules := ../LibCommon \ ../LibMec/ApplicationMobilityServiceAPI \ ../LibMec/FederationEnablementAPI \ ../LibMec/IoTAPI \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn index 975a4207746a3f4f46ff3e243eb5868b35f703c2..3bd42c6a194e9e611a7c7525b2bb85b60a68cee1 100644 --- a/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn +++ b/ttcn/AtsMec_WlanInformation/AtsMec_WlanInformationAPI_TestCases.ttcn @@ -843,7 +843,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id, + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & oct2char(unichar2oct(v_subscription_id, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -956,7 +956,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id, + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & oct2char(unichar2oct(v_subscription_id, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_assoc_sta_subscription( @@ -1030,7 +1030,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id, + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & oct2char(unichar2oct(v_subscription_id, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_assoc_sta_subscription( @@ -1164,7 +1164,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id, + PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & oct2char(unichar2oct(v_subscription_id, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1268,7 +1268,7 @@ module AtsMec_WlanInformationAPI_TestCases { f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body - tc_wait.start; + tc_ac.start; alt { [] httpPort_notif.receive( mw_http_request( @@ -1281,7 +1281,7 @@ module AtsMec_WlanInformationAPI_TestCases { mw_ap_identity( PX_MAC_ID ))))))) { - tc_wait.stop; + tc_ac.stop; f_init_default_headers_list(-, -, v_headers); httpPort_notif.send( @@ -1292,7 +1292,7 @@ module AtsMec_WlanInformationAPI_TestCases { log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_wait.timeout { + [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Expected message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } @@ -1533,7 +1533,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements" & "/" & v_measurement_config_id, + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements" & "/" & oct2char(unichar2oct(v_measurement_config_id, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1602,7 +1602,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements"& "/" & v_measurement_config_id & "_Invalid", + PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements"& "/" & oct2char(unichar2oct(v_measurement_config_id, "UTF-8")) & "_Invalid", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1657,7 +1657,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id, + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & oct2char(unichar2oct(v_measurement_config_id, "UTF-8")), v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -1738,7 +1738,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_put( - PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id & "_Invalid", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & oct2char(unichar2oct(v_measurement_config_id, "UTF-8")) & "_Invalid", v_headers, m_http_message_body_json( m_body_json_wlan_measurement_config( @@ -1807,7 +1807,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id, + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & oct2char(unichar2oct(v_measurement_config_id, "UTF-8")), v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); @@ -1861,7 +1861,7 @@ module AtsMec_WlanInformationAPI_TestCases { httpPort.send( m_http_request( m_http_request_delete( - PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id & "_invalid", + PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & oct2char(unichar2oct(v_measurement_config_id, "UTF-8")) & "_invalid", v_headers ))); f_selfOrClientSyncAndVerdict(c_prDone, e_success); diff --git a/ttcn/AtsMec_WlanInformation/module.mk b/ttcn/AtsMec_WlanInformation/module.mk index f5432313efa46742fdb7eb52abebae2558eb40c9..09a542714e59b10bdd922e85bf3ce4d50e69a743 100644 --- a/ttcn/AtsMec_WlanInformation/module.mk +++ b/ttcn/AtsMec_WlanInformation/module.mk @@ -24,6 +24,9 @@ modules := ../LibCommon \ ../LibMec/ApplicationMobilityServiceAPI \ ../LibMec/FederationEnablementAPI \ ../LibMec/IoTAPI \ + ../LibMec/QoSMeasurementAPI \ + ../LibMec/SensorsSharingService \ + ../LibMec/SelfServiceEnablementAPI \ ../../titan-test-system-framework/ccsrc/Framework \ ../../titan-test-system-framework/ccsrc/loggers \ ../../titan-test-system-framework/ccsrc/Protocols/Http \ diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn index 443257a3999569ecce71e4c1a56e42add4becfeb..aabe432009f10eb95d69e094e6d71ce1c3709bbd 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Functions.ttcn @@ -82,7 +82,7 @@ module ApplicationMobilityServiceAPI_Functions { 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")), + PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(p_app_mobility_service_id, "UTF-8")), v_headers ))); @@ -157,7 +157,7 @@ module ApplicationMobilityServiceAPI_Functions { 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")), + PICS_ROOT_API & PX_ME_APP_AMS_URI & "/" & oct2char(unichar2oct(p_app_instance_id, "UTF-8")), v_headers ))); @@ -193,7 +193,7 @@ module ApplicationMobilityServiceAPI_Functions { m_body_json_ams_mobility_procedure_subscription( m_mobility_procedure_subscription( PX_CALLBACK_REFERENCE, - m_filter_criteria, + m_filter_criteria(PX_APP_INS_ID), -, -, -, { seconds := (f_get_current_timestamp_utc() / 1000) + 60, nanoSeconds := 0 } )))))); @@ -207,7 +207,7 @@ module ApplicationMobilityServiceAPI_Functions { mw_body_json_ams_mobility_procedure_subscription( mw_mobility_procedure_subscription( PX_CALLBACK_REFERENCE, - mw_filter_criteria, + mw_filter_criteria(PX_APP_INS_ID), mw_links )))))) -> value v_response { tc_ac.stop; diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn index 6b6d4858fb06245c067deeb7df5bd8212815b7d1..ccf11a24674a482511122345fe08cb15191dbe6b 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Pixits.ttcn @@ -20,7 +20,7 @@ module ApplicationMobilityServiceAPI_Pixits { 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 Json.String PX_CALLBACK_REFERENCE := "http://127.0.0.1/callback"; modulepar charstring PX_CALLBACK_URI := "http://127.0.0.1/callback"; diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn index 6426d0688a3496be95018da208f2dc818eb35499..5ffaa84f0c4679d1ee0fd83ec78f4998801c4e81 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_Templates.ttcn @@ -121,7 +121,7 @@ module ApplicationMobilityServiceAPI_Templates { 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 + in template (omit) MobilityStatusList p_mobilityStatus := omit ) := { appInstanceId := p_appInstanceId, associateId := p_associateId, @@ -131,7 +131,7 @@ module ApplicationMobilityServiceAPI_Templates { template FilterCriteria mw_filter_criteria( template Json.String p_appInstanceId := *, template AssociateId p_associateId := *, - template MobilityStatus p_mobilityStatus := * + template MobilityStatusList p_mobilityStatus := * ) := { appInstanceId := p_appInstanceId, associateId := p_associateId, @@ -296,7 +296,7 @@ module ApplicationMobilityServiceAPI_Templates { 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 + in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Subscriptions p_subscription ) := { links := p_links, subscription := p_subscription @@ -304,7 +304,7 @@ module ApplicationMobilityServiceAPI_Templates { template (present) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList mw_subscription_link_list( template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?, - template (present) ApplicationMobilityServiceAPI_TypesAndValues.Subscription p_subscription := ? + template (present) ApplicationMobilityServiceAPI_TypesAndValues.Subscriptions p_subscription := ? ) := { links := p_links, subscription := p_subscription diff --git a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn index c9b400f6eda38d593f6887c80d559871050be082..cb739f52c7ab3a603c2621dbb737239e959b3241 100644 --- a/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationMobilityServiceAPI/ttcn/ApplicationMobilityServiceAPI_TypesAndValues.ttcn @@ -2,7 +2,7 @@ * @author ETSI / STF569 / TTF T027 * @version $Url$ * $Id$ - * @desc Types and Values for ETSI GS MEC 021 V3.1.1 (2023-10) + * @desc Types and Values for ETSI GS MEC 021 V3.1.1 (2024-02) * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. @@ -22,10 +22,10 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.2.2-1: Attributes of RegistrationInfo */ type record RegistrationInfo { - Json.String appMobilityServiceId, + Json.String appMobilityServiceId optional, ServiceConsumerId serviceConsumerId, DeviceInformation deviceInformation optional, Json.UInteger expiryTime optional @@ -36,7 +36,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.2.2-1: Attributes of RegistrationInfo */ type record ServiceConsumerId { Json.String appInstanceId optional, @@ -49,7 +49,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.2.2-1: Attributes of RegistrationInfo */ type record DeviceInformation_ { Json.String associateId, @@ -60,7 +60,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.2.2-1: Attributes of RegistrationInfo */ type enumerated ContextTransferState { NOT_TRANSFERRED, @@ -76,7 +76,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.2.3-1: Attributes of AdjacentAppInstanceInfo */ type record AdjacentAppInstanceInfo { Json.String appInstanceId, @@ -96,7 +96,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription */ type record MobilityProcedureSubscription { Json.String subscriptionType, @@ -114,7 +114,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription */ type record Links { LinkType self_ @@ -126,12 +126,12 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription */ type record FilterCriteria { Json.String appInstanceId optional, AssociateId associateId optional, - MobilityStatus mobilityStatus optional + MobilityStatusList mobilityStatus optional } type set of FilterCriteria FilterCriterias; @@ -144,7 +144,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription */ type record AdjacentAppInfoSubscription { Json.String subscriptionType, @@ -162,7 +162,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription */ type record AdjacentFilterCriteria { Json.String appInstanceId optional @@ -172,11 +172,11 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.3.4-1: Attributes of the SubscriptionLinkList */ type record SubscriptionLinkList { Links links, - Subscription subscription + Subscriptions subscription optional } with { variant (links) "name as '_links'"; } @@ -185,12 +185,13 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.3.4-1: Attributes of the SubscriptionLinkList */ type record Subscription { Json.AnyURI href, Json.String subscriptionType } + type record of Subscription Subscriptions; /** * @desc This type represents a notification from AMS with regards to mobility procedure @@ -200,7 +201,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.4.2-1: Attributes of the MobilityProcedureNotification */ type record MobilityProcedureNotification { Json.String notificationType, @@ -217,7 +218,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.4.2-1: Attributes of the MobilityProcedureNotification */ type record TargetAppInfo { Json.String appInstanceId, @@ -226,15 +227,14 @@ module ApplicationMobilityServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) 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" } + type record of MobilityStatus MobilityStatusList; /** * @desc This type represents a notification from AMS with regards to change on adjacent application instances information @@ -242,7 +242,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.4.3-1: Attributes of the AdjacentAppInfoNotification */ type record AdjacentAppInfoNotification { Json.String notificationType, @@ -260,7 +260,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.4.4-1: Attributes of the ExpiryNotification */ type record ExpiryNotification { Json.String notificationType, @@ -273,7 +273,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.4.5-1: Attributes of AppMobilityServiceLevel */ type record AppMobilityServiceLevel { AppMobilityServiceLevelEnmu appMobilityServiceLevel @@ -281,7 +281,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.4.5-1: Attributes of AppMobilityServiceLevel */ type enumerated AppMobilityServiceLevelEnmu { APP_MOBILITY_NOT_ALLOWED (1), @@ -295,7 +295,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.4.6-1: Attributes of the TestNotification */ type record TestNotification { Json.String notificationType, @@ -307,7 +307,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { /** * @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 V3.1.1 (2023-10) Clause 7.5.2 Type: CommunicationInterface + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Clause 7.5.2 Type: CommunicationInterface */ type record CommunicationInterface { IpAddresses ipAddresses optional @@ -317,7 +317,7 @@ 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 V3.1.1 (2023-10) Clause 7.5.2 Type: CommunicationInterface + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Clause 7.5.2 Type: CommunicationInterface */ type record IpAddress { Json.String host, @@ -330,7 +330,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Clause 7.5.4 Type: LinkType */ type record LinkType { Json.AnyURI href @@ -340,7 +340,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Table 7.5.5-1: Attributes of MECHostInformation */ type record MECHostInformation { Json.String hostName optional, @@ -351,7 +351,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Clause 6.2.5.3 Type: KeyValuePairs */ type record KeyValuePairs { Json.String key_name, @@ -362,7 +362,7 @@ module ApplicationMobilityServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 021 V3.1.1 (2024-02) Clause 7.5.7 Type: WebsockNotifConfig */ type record WebsockNotifConfig { Json.AnyURI websocketUri optional, diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn index ecff7dd1a8cc6cf36b974ddb100d60fef232b788..243a9123e744578627d6baecb2874e787bb40b23 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Functions.ttcn @@ -143,11 +143,13 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions { mw_http_message_body_json( mw_body_json_app_pkg_info( mw_app_pkg_info( - -, -, - PX_APP_PKG_NAME, - PX_APP_PKG_VERSION, - -, - mw_checksum + -, + mw_checksum(-, PX_CHECKSUM), + CREATED, + -, + -, + - + )))))) -> value v_response { tc_ac.stop; diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn index 027b5cc26de1b7a01049a4b03b3da2a6b7d6accc..cf91989272c208b8924a3b663fa5f7382b844e19 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits.ttcn @@ -53,7 +53,13 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits { modulepar Json.String PX_CHECKSUM := "CHECKSUM"; modulepar Json.String PX_APP_PKG_PATH := "APP_PKG_PATH"; - + + modulepar OnboardingState PX_ONBOARDED_STATE_ONBOARDED := ONBOARDED; + + modulepar OnboardingState PX_ONBOARDED_STATE := CREATED; + + modulepar AppPkgInfo_OperationalState PX_APPPKGINFO_OPERATIONAL_STATE := ENABLED; + modulepar OperationalState PX_OPERATIONAL_STATE := STARTED; modulepar UsageState PX_USAGE_STATE := NOT_IN_USE; diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn index b914cc021008429ac735901d7b606e3d6184bc1a..cb314d43a76f311d18ffcc6645bc21d85db6bfe3 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_Templates.ttcn @@ -189,7 +189,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { in String p_appPkgName, in String p_appPkgVersion, in template (value) Checksum p_checksum, - in AnyURI p_appPkgPath + in template (omit) AnyURI p_appPkgPath := omit ) := { appPkgName := p_appPkgName, appPkgVersion := p_appPkgVersion, @@ -213,71 +213,96 @@ 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, + // template (omit) AppPkgInfo m_app_pkg_info( + // in template (value) Checksum p_checksum, + // in template (value) OnboardingState p_onboardingState, + // in template (value) AppPkgInfo_OperationalState p_operationalState, + // in template (value) UsageState p_usageState, + // in template (value) AppPkgInfo_Links p_links, + // ) := { + // checksum := p_checksum, + // onboardingState := p_onboardingState, + // operationalState := p_operationalState, + // usageState := p_usageState, + // links := p_links + // } // End of template m_app_pkg_info + + template (present) AppPkgInfo mw_app_pkg_info( + template (present) Json.String p_id := ?, + template (present) Checksum p_checksum := ?, + template (present) OnboardingState p_onboardingState := ?, + template (present) AppPkgInfo_OperationalState p_operationalState := ?, + template (present) UsageState p_usageState := ?, + template (present) AppPkgInfo_Links p_links := ?, + template Json.String p_appDId := *, + template Json.String p_appProvider := *, + template Json.String p_appName := *, + template Json.String p_appSoftwareVersion := *, + template Json.String p_appDVersion := *, + template Json.String p_signingCertificate := *, + template AppPkgSWImageInfo p_softwareImages := *, + template AppPkgArtifactInfo p_additionalArtifacts := *, + template AppPkgInfo_MecInfo p_mecInfo := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_userDefinedData := *, + template ProblemDetails p_onboardingFailureDetails := * + ) := { + id := p_id, appDId := p_appDId, appProvider := p_appProvider, appName := p_appName, appSoftwareVersion := p_appSoftwareVersion, appDVersion := p_appDVersion, checksum := p_checksum, - signingCertificate := omit, + signingCertificate := p_signingCertificate, softwareImages := p_softwareImages, - additionalArtifacts := omit, + additionalArtifacts := p_additionalArtifacts, onboardingState := p_onboardingState, operationalState := p_operationalState, usageState := p_usageState, mecInfo := p_mecInfo, - userDefinedData := omit, - onboardingFailureDetails := omit, + userDefinedData := p_userDefinedData, + onboardingFailureDetails := p_onboardingFailureDetails, 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) AppPkgInfo_Links p_links := ? - ) := { - id := p_id, + } // End of template mw_app_pkg_info + + template (present) AppPkgInfo mw_app_pkg_info_onboarded( + template (present) Json.String p_id := ?, + template (present) Json.String p_appDId := ?, + template (present) Json.String p_appName := ?, + 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 := ?, + template Json.String p_appProvider := *, + template Json.String p_signingCertificate := *, + template AppPkgArtifactInfo p_additionalArtifacts := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_userDefinedData := *, + template ProblemDetails p_onboardingFailureDetails := * + ) := { + + id := p_id, appDId := p_appDId, - appProvider := *, + appProvider := p_appProvider, appName := p_appName, appSoftwareVersion := p_appSoftwareVersion, appDVersion := p_appDVersion, checksum := p_checksum, - signingCertificate := *, + signingCertificate := p_signingCertificate, softwareImages := p_softwareImages, - additionalArtifacts := *, + additionalArtifacts := p_additionalArtifacts, onboardingState := p_onboardingState, operationalState := p_operationalState, usageState := p_usageState, mecInfo := p_mecInfo, - userDefinedData := *, - onboardingFailureDetails := *, + userDefinedData := p_userDefinedData, + onboardingFailureDetails := p_onboardingFailureDetails, links := p_links + } // End of template mw_app_pkg_info template (value) Checksum m_checksum( @@ -578,7 +603,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { 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) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilterList p_trafficFilter, in template (value) Action p_action, in template (omit) InterfaceDescriptor p_dstInterface := omit ) := { @@ -594,7 +619,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { 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) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilterList p_trafficFilter := ?, template (present) Action p_action := ?, template InterfaceDescriptor p_dstInterface := * ) := { @@ -607,22 +632,22 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // 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 - ) :={ + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_AddressList p_srcAddress := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_AddressList p_dstAddress := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_PortList p_srcPort := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_PortList p_dstPort := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_ProtocolList p_protocol := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_TagList p_tag := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_UriList p_uri := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_PacketLabelList p_packetLabel := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_TunnelAddressList p_srcTunnelAddress := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_TunnelAddressList p_tgtTunnelAddress := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_TunnelPortList p_srcTunnelPort := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_TunnelPortList p_dstTunnelPort := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_QCI p_qCI := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_DSCP p_dSCP := omit, + in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_TC p_tC := omit + ) :={ srcAddress := p_srcAddress, dstAddress := p_dstAddress, srcPort := p_srcPort, @@ -641,22 +666,22 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates { } // 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 := * - ) :={ + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_AddressList p_srcAddress := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_AddressList p_dstAddress := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_PortList p_srcPort := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_PortList p_dstPort := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_ProtocolList p_protocol := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_TagList p_tag := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_UriList p_uri := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_PacketLabelList p_packetLabel := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_TunnelAddressList p_srcTunnelAddress := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_TunnelAddressList p_tgtTunnelAddress := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_TunnelPortList p_srcTunnelPort := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_TunnelPortList p_dstTunnelPort := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_QCI p_qCI := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_DSCP p_dSCP := *, + template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter_TC p_tC := * + ) :={ srcAddress := p_srcAddress, dstAddress := p_dstAddress, srcPort := p_srcPort, diff --git a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn index 1a945263c24025d9c1e64dfaf4bc1b5646d5b845..2c4bad42d42baf287fedf40777ee9b67b2821ec1 100644 --- a/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI/ttcn/ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / TTF T012 / TTF T027 + * @author ETSI / TTF T012 / TTF T027 / TTF T043 * @version $Url$ * $Id$ * @desc Types ANd Values for ETSI GS MEC 010-2 V3.2.1 (2023-06) @@ -214,7 +214,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { Json.String trafficRuleId, FilterType filterType, Json.Integer priority, - TrafficFilter trafficFilter, + ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilterList trafficFilter, Action action_, InterfaceDescriptor dstInterface optional } with { @@ -228,8 +228,6 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { type enumerated FilterType { FLOW, PACKET - } with { - variant "JSON: as number" } /** @@ -242,45 +240,90 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { 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 - */ + * @desc Identify the traffic ip address. + */ + type Json.String TrafficFilter_Address; + type set of TrafficFilter_Address TrafficFilter_AddressList; + + /** + * @desc Used to match all IPv4 packets that have the same Differentiated Services Code Point (DSCP). + */ + type Json.UInteger TrafficFilter_DSCP; + + /** + * @desc Identify the traffic ip address. + */ + type Json.String TrafficFilter_Port; + type record length(1..infinity) of TrafficFilter_Port TrafficFilter_PortList; + + /** + * @desc Protocol of the traffic filter. + */ + type Json.String TrafficFilter_Protocol; + type set of TrafficFilter_Protocol TrafficFilter_ProtocolList; + + /** + * @desc Used to match all packets that have the same Quality Class Indicator (QCI). + */ + type Json.UInteger TrafficFilter_QCI; + + /** + * @desc Used to match all IPv6 packets that have the same Traffic Class. + */ + type Json.UInteger TrafficFilter_TC; + + /** + * @desc Used for tag based traffic rule. + */ + type Json.String TrafficFilter_Tag; + type set of TrafficFilter_Tag TrafficFilter_TagList; + + /** + * @desc Used for uri based traffic rule. + */ + type Json.String TrafficFilter_Uri; + type set of TrafficFilter_Uri TrafficFilter_UriList; + + /** + * @desc Used for packetLabel based traffic rule. + */ + type Json.String TrafficFilter_PacketLabel; + type set of TrafficFilter_PacketLabel TrafficFilter_PacketLabelList; + + + /** + * @desc Used for GTP tunnel based traffic rule. + */ + type Json.String TrafficFilter_TunnelAddress; + type set of TrafficFilter_TunnelAddress TrafficFilter_TunnelAddressList; + + /** + * @desc Used for GTP tunnel based traffic rule. + */ + type Json.String TrafficFilter_TunnelPort; + type set of TrafficFilter_TunnelPort TrafficFilter_TunnelPortList; + 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 - } + TrafficFilter_AddressList srcAddress optional, + TrafficFilter_AddressList dstAddress optional, + TrafficFilter_PortList srcPort optional, + TrafficFilter_PortList dstPort optional, + TrafficFilter_ProtocolList protocol optional, + TrafficFilter_TagList tag optional, + TrafficFilter_UriList uri optional, + TrafficFilter_PacketLabelList packetLabel optional, + TrafficFilter_TunnelAddressList srcTunnelAddress optional, + TrafficFilter_TunnelAddressList tgtTunnelAddress optional, + TrafficFilter_TunnelPortList srcTunnelPort optional, + TrafficFilter_TunnelPortList dstTunnelPort optional, + TrafficFilter_QCI qCI optional, + TrafficFilter_DSCP dSCP optional, + TrafficFilter_TC tC optional + } + type set of TrafficFilter TrafficFilterList; /** * @desc The InterfaceDescriptor data type describes an interface of a MEC application @@ -1323,25 +1366,25 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { Json.String appProvider optional, Checksum checksum, KeyValuePairs userDefinedData optional, - Json.AnyURI appPkgPath + Json.AnyURI appPkgPath optional } /** * @desc The data type AppPkgInfo represents the parameters for an application package resource * @member id Identifier of the application package resource - * @member appDId The application descriptor identifier - * @member appProvider The provider's name of the onboarded application package - * @member appName Name of the onboarded application - * @member appSoftwareVersion Software version of the application. This is updated when there is any change to the software in the onboarded application package - * @member appDVersion Version of the application descriptor - * @member checksum Checksum of the onboarded application package - * @member signingCertificate The singleton signing certificate if it is included as a file in the AppD archive - * @member softwareImages Information of application software image in application package - * @member additionalArtifacts Additional information of application package artifacts that are not application software images - * @member onboardingState Onboarding state of application package - * @member operationalState Operational state of the onboarded application package + * @member appDId The application descriptor identifier. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member appProvider The provider's name of the onboarded application package. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member appName Name of the onboarded application. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member appSoftwareVersion Software version of the application. This is updated when there is any change to the software in the onboarded application package. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member appDVersion Version of the application descriptor. It shall be present after the application package content has been on-boarded and absent otherwise. + * @member checksum Checksum of the onboarded application package. This attribute shall not be present before the application package content is on-boarded. + * @member signingCertificate The singleton signing certificate if it is included as a file in the AppD archive. This attribute shall not be present before the application package content is on-boarded. + * @member softwareImages Information of application software image in application package. This attribute shall not be present before the application package content is on-boarded. + * @member additionalArtifacts Additional information of application package artifacts that are not application software images. This attribute shall not be present before the application package content is on-boarded. + * @member onboardingState Onboarding state of application package. This attribute shall not be present before the application package content is on-boarded. + * @member operationalState Operational state of the onboarded application package. This attribute shall not be present before the application package content is on-boarded. * @member usageState Usage state of the onboarded instance of the application package - * @member mecInfo The MEC version that compatible with this application + * @member mecInfo The MEC version that compatible with this application. This attribute shall not be present before the application package content is on-boarded. * @member userDefinedData User defined data for the application package * @member onboardingFailureDetails Failure details of current onboarding procedure * @member links Links to resources related to this resource @@ -1349,22 +1392,22 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues { */ type record AppPkgInfo { Json.String id, - Json.String appDId, + Json.String appDId optional, Json.String appProvider optional, - Json.String appName, - Json.String appSoftwareVersion, - Json.String appDVersion, + Json.String appName optional, + Json.String appSoftwareVersion optional, + Json.String appDVersion optional, Checksum checksum, Json.String signingCertificate optional, - AppPkgSWImageInfo softwareImages, + AppPkgSWImageInfo softwareImages optional, AppPkgArtifactInfo additionalArtifacts optional, OnboardingState onboardingState, AppPkgInfo_OperationalState operationalState, UsageState usageState, - AppPkgInfo_MecInfo mecInfo, + AppPkgInfo_MecInfo mecInfo optional, KeyValuePairs userDefinedData optional, ProblemDetails onboardingFailureDetails optional, - AppPkgInfo_Links links + AppPkgInfo_Links links optional } with { variant (links) "name as '_links'"; } diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Functions.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Functions.ttcn index 0f43a1f941f3888618e93f15ad7c370b5a641623..9ac892f77d7181c895210b84facdbe0f276da7c3 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Functions.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Functions.ttcn @@ -33,6 +33,7 @@ module DeviceApplicationInterfaceAPI_Functions { ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; + var UserAppInstanceInfoList v_userAppInstanceInfo := {{appInstanceId := omit, referenceURI := omit, appLocation := {countryCode := "countryCode", civicAddressElement := {{caType := 7, caValue := "caValue"}, {caType := 7, caValue := "caValue"}}, area := {coordinates := {{{2.302136, 2.302136}, {2.302136, 2.302136}}, {{2.302136, 2.302136}, {2.302136, 2.302136}}}}}}}; f_init_default_headers_list(-, -, v_headers); httpPort.send( @@ -43,14 +44,18 @@ module DeviceApplicationInterfaceAPI_Functions { m_http_message_body_json( m_body_json_device_info_app_context( m_device_app_context( - PX_ASSOCIATE_DEV_APPID, - m_app_context_info( - PX_APPD_ID, - PX_UNKNOWN_APP_NAME, - PX_APP_PROVIDER, - PX_APPD_VERSION - ), - PX_DEVICE_APP_CALLBACK + -, + PX_ASSOCIATE_DEV_APPID, + m_app_context_info( + PX_APPD_ID, + PX_APP_NAME, + PX_APP_PROVIDER, + PX_APPD_VERSION, + PX_APP_DESCRIPTION, + PX_APP_SOFT_VERSION, + v_userAppInstanceInfo + ), + PX_DEVICE_APP_CALLBACK ) ) ) diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Pixits.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Pixits.ttcn index 49e31f2f4c6ea2a2b87a834b28a98bf195822802..56a6d9ffd322dfe2ad456019a6b8d713992ac27e 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Pixits.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Pixits.ttcn @@ -3,34 +3,46 @@ module DeviceApplicationInterfaceAPI_Pixits { // JSON import from Json all; - modulepar charstring PX_DEVICE_APP_LIST_URI := "/dev_app/v1/app_list"; + modulepar Json.String PX_APP_INSTANCE_ID := "81c51643-8c6f-4781-ad45-f8a457ca549b"; - modulepar charstring PX_DEVICE_APP_CTX_URI := "/dev_app/v1/app_contexts"; + modulepar Json.String PX_DEVICE_APP_NAME := ""; - modulepar charstring PX_DEVICE_APP_LOC_URI := "/dev_app/v1/obtain_app_loc_availability"; + modulepar Json.String PX_DEVICE_UNKNOWN_APP_NAME := ""; - modulepar charstring PX_DEVICE_APP_NAME := ""; + modulepar Json.String PX_ASSOCIATE_DEV_APPID := "bcee2135-2750-4d23-b786-a3062a371c8a"; - modulepar charstring PX_DEVICE_UNKNOWN_APP_NAME := ""; + modulepar Json.String PX_UNKNOWN_ASSOCIATE_DEV_APPID := "bcee2135-2750-4d23"; - modulepar charstring PX_ASSOCIATE_DEV_APPID := ""; + modulepar Json.String PX_INVALID_ASSOCIATE_DEV_APPID := ""; - modulepar charstring PX_INVALID_ASSOCIATE_DEV_APPID := ""; + modulepar Json.String PX_DEVICE_APP_CALLBACK := "http://clientApp.example.com/location_notifications/123456"; - modulepar charstring PX_DEVICE_APP_CALLBACK := ""; + modulepar Json.String PX_DEVICE_NEW_APP_CALLBACK := ""; - modulepar charstring PX_DEVICE_NEW_APP_CALLBACK := ""; + modulepar Json.String PX_APPD_ID := ""; + + modulepar Json.String PX_APPD_ID_2 := "Ccee2135-2750-4d23-b786-a3062a371c8a"; - modulepar charstring PX_APPD_ID := ""; + modulepar Json.String PX_APP_NAME := "onboarded-demo4"; - modulepar charstring PX_APP_NAME := ""; + modulepar Json.String PX_APP_NAME_2 := "demo2"; - modulepar charstring PX_UNKNOWN_APP_NAME := ""; + modulepar Json.String PX_UNKNOWN_APP_NAME := "UNKNOWN"; - modulepar charstring PX_APP_PROVIDER := ""; + modulepar Json.String PX_APP_PROVIDER := "ETSI"; - modulepar charstring PX_APPD_VERSION := ""; + modulepar Json.String PX_APP_PROVIDER_2 := "ETSI_2"; - modulepar charstring PX_UNKNOWN_APP_CONTEXT_ID := ""; + modulepar Json.String PX_APPD_VERSION := "v0.1.0"; + + modulepar Json.String PX_APPD_VERSION_2 := "v0.1.1"; + + modulepar Json.String PX_APP_SOFT_VERSION := "v0.1.0" + + modulepar Json.String PX_APP_SOFT_VERSION_2 := "v0.1.1" + + modulepar Json.String PX_APP_DESCRIPTION := "" + + modulepar Json.String PX_UNKNOWN_APP_CONTEXT_ID := "ccee2135-2750-4d23-b786-a3062a371c8aaa"; } // End of module DeviceApplicationInterfaceAPI_Pixits diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Templates.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Templates.ttcn index 8b1ab83eaba1949555ab2ada8e6ad683a88c4a41..8114254c78eabea7b814f1cb3ee722bb458065fc 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Templates.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_Templates.ttcn @@ -12,13 +12,14 @@ module DeviceApplicationInterfaceAPI_Templates { template (omit) AppContext m_device_app_context( + in template (omit) Json.String p_contextID := omit, in template (value) Json.String p_associateDevAppId, in template (value) ApplicationContext_AppInfo p_appInfo, in template (omit) Json.AnyURI p_callbackReference := omit, in template (omit) boolean p_appLocationUpdates := omit, in template (omit) boolean p_appAutoInstantiation := omit ) := { - contextId := omit, + contextId := p_contextID, associateDevAppId := p_associateDevAppId, callbackReference := p_callbackReference, appLocationUpdates := p_appLocationUpdates, @@ -82,24 +83,23 @@ module DeviceApplicationInterfaceAPI_Templates { appPackageSource := p_appPackageSource } // End ot template mw_app_context_info - template (value) ApplicationLocationAvailability m_application_location_availability( - in Json.String p_associateDevAppId, - in template (value) ApplicationLocationAvailability_AppInfo p_appInfo + template (omit) ApplicationLocationAvailability m_application_location_availability( + in template (value) Json.String p_associateDevAppId, + in template (omit) ApplicationLocationAvailability_AppInfo p_appInfo := omit ) := { associateDevAppId := p_associateDevAppId, appInfo := p_appInfo } // End of template m_application_location_availability - template (present) ApplicationLocationAvailability mw_application_location_availability( - template (present) Json.String p_associateDevAppId := ?, - template (present) ApplicationLocationAvailability_AppInfo p_appInfo := ? - ) := { + template ApplicationLocationAvailability mw_application_location_availability( + template (present) Json.String p_associateDevAppId := ?, + template (present) ApplicationLocationAvailability_AppInfo p_appInfo := ? + ) := { associateDevAppId := p_associateDevAppId, appInfo := p_appInfo } // End of template mw_application_location_availability template (omit) ApplicationLocationAvailability_AppInfo m_application_location_availability_info( - in Json.String p_appDId, in Json.String p_appName, in Json.String p_appProvider, in Json.String p_appDVersion, @@ -108,7 +108,6 @@ module DeviceApplicationInterfaceAPI_Templates { in template (omit) AvailableLocationsList p_availableLocations := omit, in template (omit) Json.AnyURI p_appPackageSource := omit ) := { - appDId := p_appDId, appName := p_appName, appProvider := p_appProvider, appSoftVersion := p_appSoftVersion, @@ -118,8 +117,7 @@ module DeviceApplicationInterfaceAPI_Templates { appPackageSource := p_appPackageSource } // End of template m_application_location_availability_info - template (present) ApplicationLocationAvailability_AppInfo mw_application_location_availability_info( - template (present) Json.String p_appDId := ?, + template ApplicationLocationAvailability_AppInfo mw_application_location_availability_info( template (present) Json.String p_appName := ?, template (present) Json.String p_appProvider := ?, template (present) Json.String p_appDVersion := ?, @@ -128,7 +126,6 @@ module DeviceApplicationInterfaceAPI_Templates { template AvailableLocationsList p_availableLocations := *, template Json.AnyURI p_appPackageSource := * ) := { - appDId := p_appDId, appName := p_appName, appProvider := p_appProvider, appSoftVersion := p_appSoftVersion, diff --git a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn index 228478d8d257ee0f12a950abaaba4be078b675c1..f1b0575c03cd5877fb5fa0ca74796a98e8e3f200 100644 --- a/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/DeviceApplicationInterfaceAPI/ttcn/DeviceApplicationInterfaceAPI_TypesAndValues.ttcn @@ -2,7 +2,7 @@ * @author ETSI / TTF T012 / TTF T027 * @version $Url$ * $Id$ - * @desc Types ANd Values for ETSI GS MEC 016 V2.2.1 (2020-04) + * @desc Types ANd Values for ETSI GS MEC 016 V3.1.1 (2024-03) * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. @@ -16,7 +16,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc Information on available applications * @member appList List of user applications available to the device application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record ApplicationList { AppList appList optional @@ -26,7 +26,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @desc Information on available applications * @member appInfo List of user applications available to the device application * @member vendorSpecificExt Extension for vendor specific information - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record AppListItem { ApplicationList_AppInfo appInfo, @@ -44,7 +44,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appDescription Human readable description of the MEC application * @member appLocation Identifies the locations of the MEC application * @member appCharcs Characteristics of the application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record ApplicationList_AppInfo { Json.String appDId, @@ -60,7 +60,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc Extension for vendor specific information * @member vendorId Vendor identifier - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record VendorSpecificExt { Json.String vendorId @@ -73,7 +73,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member latency The target round trip time in milliseconds supported by the MEC system for the MEC application instance * @member bandwidth The required connection bandwidth in kbit/s for the use of the MEC application instance * @member serviceCont Required service continuity mode for this application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type record AppCharcs { Json.UInteger memory optional, @@ -85,7 +85,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc Required service continuity mode for this application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.2 Type: ApplicationList */ type enumerated ServiceCount { SERVICE_CONTINUITY_NOT_REQUIRED (0), @@ -102,7 +102,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appLocationUpdates Used by the device application to request to receive notifications at the callbackReference URI relating to location availability for user application instantiation * @member appAutoInstantiation Provides indication to the MEC system that instantiation of the requested application is desired should a requested appLocation become available that was not at the time of the request * @member appInfo - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.3 Type: AppContext */ type record AppContext { Json.String contextId optional, @@ -123,7 +123,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appDescription Human readable description of the MEC application * @member userAppInstanceInfo List of user application instance information * @member appPackageSource URI of the application package - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.3 Type: AppContext */ type record ApplicationContext_AppInfo { Json.String appDId, @@ -141,7 +141,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appInstanceId Identifier of the user application instance * @member referenceURI Address of the user application instance * @member appLocation Location of the user application instance - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.3 Type: AppContext */ type record UserAppInstanceInfo { Json.String appInstanceId optional, @@ -154,7 +154,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @desc Information on locations available instantiation of new user application instances * @member associateDevAppId Uniquely identifies the device application * @member appInfo - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.4 Type: ApplicationLocationAvailability */ type record ApplicationLocationAvailability { Json.String associateDevAppId, @@ -171,10 +171,9 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member appDescription Human readable description of the MEC application * @member availableLocations MEC application location constraints * @member appPackageSource URI of the application package. Shall be included in the request - * @seeETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability + * @seeETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.4 Type: ApplicationLocationAvailability */ type record ApplicationLocationAvailability_AppInfo { - Json.String appDId, Json.String appName, Json.String appProvider, Json.String appSoftVersion optional, @@ -187,7 +186,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { /** * @desc * @member appLocation Shall only be included in the response, where it indicates a location constraint available in the MEC system - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.2.4 Type: ApplicationLocationAvailability */ type record AvailableLocations { LocationConstraints appLocation optional @@ -200,7 +199,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member contextId Uniquely identifies the application context in the MEC system * @member appInstanceId Identifier of the user application instance * @member referenceURI Address of the user application. Used as the reference URI for the application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.2 Type: AddressChangeNotification + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.4.2 Type: AddressChangeNotification */ type record AddressChangeNotification { Json.String notificationType, @@ -213,7 +212,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @desc Notification from the UALCMP regarding the deletion of an application context by the MEC system * @member notificationType Shall be set to "ApplicationContextDeleteNotification" * @member contextId Uniquely identifies the application context in the MEC system - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.3 Type: ApplicationContextDeleteNotification + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.4.3 Type: ApplicationContextDeleteNotification */ type record ApplicationContextDeleteNotification { Json.String notificationType, @@ -225,7 +224,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member notificationType Shall be set to "ApplicationContextUpdateNotification" * @member contextId Uniquely identifies the application context in the MEC system * @member userAppInstanceInfo List of user application instance information - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.4 Type: ApplicationContextUpdateNotification + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.4.4 Type: ApplicationContextUpdateNotification */ type record ApplicationContextUpdateNotification { Json.String notificationType, @@ -238,7 +237,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member notificationType Shall be set to "ApplicationLocationAvailabilityNotification" * @member contextId Uniquely identifies the application context in the MEC system * @member availableLocations Locations available to the MEC application - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification */ type record ApplicationLocationAvailabilityNotification { Json.String notificationType, @@ -251,11 +250,11 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @member countryCode The two-letter ISO 3166 [7] country code in capital letters. Shall be present in case the "area" attribute is absent * @member civicAddressElement Zero or more elements comprising the civic address * @member area Geographic area. Shall be absent if the "civicAddressElement" attribute is present - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record LocationConstraints { Json.String countryCode optional, - CivicAddressElement civicAddressElement optional, + CivicAddressElementList civicAddressElement optional, Polygon area optional } type set of LocationConstraints LocationConstraintsList; @@ -264,43 +263,55 @@ module DeviceApplicationInterfaceAPI_TypesAndValues { * @desc Elements comprising the civic address * @member caType Describe the content type of caValue. The value of caType shall comply with section 3.4 of IETF RFC 4776 * @member caValue Content of civic address element corresponding to the caType. The format caValue shall comply with section 3.4 of IETF RFC 4776 - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record CivicAddressElement { Json.Integer caType, Json.String caValue } + type set of CivicAddressElement CivicAddressElementList /** * @desc - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ - type record Polygon { - Json.String type_, - Geometry geometry, - Properties properties, - Json.String this_ - } with { - variant (type_) "name as 'type'"; - variant (this_) "name as 'this'"; - } + // 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 Polygon { + Coordinates coordinates +} with { + variant (coordinates) "name as 'coordinates'" +} /** * @desc - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record Geometry { - Json.String type_, - Coordinates coordinates + Json.String type_ optional, + Coordinates coordinates_ } with { variant (type_) "name as 'type'"; + variant (coordinates_) "name as 'coordinates'"; } - type set of Json.Number Coordinate; - type set of Coordinate Coordinates; + + + +type record length(2) of Json.Number Position; +type set of Position LinearRing; +type set of LinearRing Coordinates; + /** * @desc - * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints + * @see ETSI GS MEC 016 V3.1.1 (2024-03) Clause 6.5.2 Type: LocationConstraints */ type record Property { Json.String key, diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn index 08ce93a3ce487298fe69917176142b16638f579c..9a17c9f98563629dec82294127e42ff5b8035eb3 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Functions.ttcn @@ -86,6 +86,72 @@ module EdgePlatformApplicationEnablementAPI_Functions { } // End of 'alt' statement } // End of function f_create_service_info + function f_start_service_info( + in ServiceInfo p_service_info + ) runs on HttpComponent { + var Headers v_headers; + + // Send confirm_ready + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/applications/" & oct2char(unichar2oct(p_service_info.serInstanceId, "UTF-8")) & "/confirm_ready", + v_headers, + m_http_message_body_json( + m_body_json_app_ready_confirmation( + { indication := "READY" } + ))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": INFO: IUT successfully responds with a AppReadyConf ***"); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_start_service_info + + function f_stop_service_info( + in ServiceInfo p_service_info + ) runs on HttpComponent { + var Headers v_headers; + + // Send termination_confirm + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_APP_SUPPORT_URI & "/applications/" & oct2char(unichar2oct(p_service_info.serInstanceId, "UTF-8")) & "/confirm_ready", + v_headers, + m_http_message_body_json( + m_body_json_app_termination_confirmation( + { operationAction := TERMINATING } + ))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + + log("*** " & testcasename() & ": INFO: IUT successfully responds with a AppReadyConf ***"); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_stop_service_info + function f_create_service_info_with_liveness( out ServiceInfo p_service_info, out charstring p_subscription_id @@ -413,4 +479,181 @@ module EdgePlatformApplicationEnablementAPI_Functions { } // End of function f_app_deletion + function f_publish_api( + in ServiceInfo p_service_info, + out ServiceAPIDescription p_service_api_description + ) 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_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(p_service_info.serInstanceId, "UTF-8")) & "/service-apis", + v_headers, + m_http_message_body_json( + m_body_json_service_api_description( + m_service_api_description( + p_service_info.serInstanceId, + p_service_info.serName, + { + m_aef_profile( + "12345", + { m_version }, + m_mec_transport_info_capif_ext, + HTTP_2 + ) + }, + m_mec_service_info_capif_ext( + -, -, + m_category_ref( + "catalogueHref", + p_service_info.serName, + p_service_info.serName, + p_service_info.version + )), + -, + p_service_info.serName, + { "WeatherInfo" } + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_json( + mw_body_json_service_api_description( + mw_service_api_description( + p_service_info.serInstanceId, + p_service_info.serName + )))))) -> value v_response { + tc_ac.stop; + + p_service_api_description := v_response.response.body.json_body.service_api_description; + log("*** " & testcasename() & ": Info: IUT successfully responds with to the service APIs: ", p_service_api_description, " ***"); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_publish_api + + function f_delete_published_api( + in Json.String p_service_instance_id, + in Json.String p_service_app_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_CAPIF_PUBLISH_API_URI & "/" & oct2char(unichar2oct(p_service_instance_id, "UTF-8")) & "/service-apis/" & oct2char(unichar2oct(p_service_app_id, "UTF-8")), + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) -> value v_response { + tc_ac.stop; + + log("*** " & testcasename() & ": Info: IUT successfully responds with the HTTP code 204 ***"); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_delete_published_api + + function f_create_subscription( + in Json.String p_app_instance_id := PX_APP_INSTANCE_ID, + out EventSubscription p_event_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_CAPIF_SUBSCRIBE_URI & "/" & oct2char(unichar2oct(p_app_instance_id, "UTF-8")) & "/subscriptions", + v_headers, + m_http_message_body_json( + m_body_json_capif_event_subscription( + m_event_subscription( + { + SERVICE_API_AVAILABLE, + SERVICE_API_UPDATE + }, + PX_CAPIF_NOTIF_CALLBACK_URI + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_capif_event_subscription( + mw_event_subscription( + { + SERVICE_API_AVAILABLE, + SERVICE_API_UPDATE + }, + PX_CAPIF_NOTIF_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_ME_CAPIF_SUBSCRIBE_URI & "/" & oct2char(unichar2oct(p_app_instance_id, "UTF-8")) & "/subscriptions" & "/(?*)", + 0 + ); + p_event_subscription := v_response.response.body.json_body.capif_event_subscription; + log("f_create_subscrition: INFO: IUT successfully responds to the subscrition creation: p_event_subscription=", p_event_subscription); + log("f_create_subscrition: INFO: IUT successfully responds to the subscrition creation: p_subscription_id=", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_subscrition: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_subscription + + function f_delete_subscription( + in Json.String p_app_instance_id := PX_APP_INSTANCE_ID, + 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_CAPIF_SUBSCRIBE_URI & "/" & oct2char(unichar2oct(p_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 { + log("f_delete_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_delete_subscription + } // End of module EdgePlatformApplicationEnablementAPI_Functions diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn index 3b54f9ad39468c22fe11b56d7d2bc2448fa60e94..dac6566f10c97a50e2f1210fafc140fff89ecd91 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Pixits.ttcn @@ -69,5 +69,11 @@ module EdgePlatformApplicationEnablementAPI_Pixits { modulepar TrafficRule_Id PX_NON_EXISTENT_TRAFFIC_RULE_ID := "trafficRuleId99"; modulepar charstring PX_LINK_LIV := "mec_service_mgmt/v1/resource_uri_allocated_by_MEC_platform"; + + modulepar Json.String PX_API_NAME := "MEC-013"; + + modulepar Json.String PX_API_ID := "46ce37bd-b526-4781-a298-f43594aa6f40"; + + modulepar Json.AnyURI PX_CAPIF_NOTIF_CALLBACK_URI := "http://www.etsi.org"; } // End of module EdgePlatformApplicationEnablementAPI_Pixits diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn index 74c1915614f26a331e22038afab587da6bc588f8..f432ca23843236d33446a079c1dfe050b0ded212 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_Templates.ttcn @@ -20,9 +20,9 @@ module EdgePlatformApplicationEnablementAPI_Templates { import from EdgePlatformApplicationEnablementAPI_Pixits all; template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo m_security_info( - in GrantTypesList p_grantTypes := { OAUTH2_CLIENT_CREDENTIALS }, - in TokenEndpoint p_tokenEndpoint := "/mecSerMgmtApi/security/MyTokenEndPoint" - ) := { + in GrantTypesList p_grantTypes := { OAUTH2_CLIENT_CREDENTIALS }, + in TokenEndpoint p_tokenEndpoint := "/mecSerMgmtApi/security/MyTokenEndPoint" + ) := { oAuth2Info := { grantTypes := p_grantTypes, tokenEndpoint := p_tokenEndpoint @@ -31,9 +31,9 @@ module EdgePlatformApplicationEnablementAPI_Templates { } // End of template m_security_info template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo mw_security_info( - template (present) GrantTypesList p_grantTypes := ?, - template (present) TokenEndpoint p_tokenEndpoint := ? - ) := { + template (present) GrantTypesList p_grantTypes := ?, + template (present) TokenEndpoint p_tokenEndpoint := ? + ) := { oAuth2Info := { grantTypes := p_grantTypes, tokenEndpoint := p_tokenEndpoint @@ -142,6 +142,30 @@ module EdgePlatformApplicationEnablementAPI_Templates { links := p_links } // End of template mw_service_info + template (value) CategoryRef m_category_ref( + in template (value) CategoryRef_Href p_href, + in template (value) CategoryRef_Id p_id, + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.Name p_name, + in template (value) CategoryRef_Version p_version + ) := { + href := p_href, + id := p_id, + name := p_name, + version := p_version + } // End of template m_category_ref + + template (present) CategoryRef mw_category_ref( + template (present) CategoryRef_Href p_href := ?, + template (present) CategoryRef_Id p_id := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.Name p_name := ?, + template (present) CategoryRef_Version p_version := ? + ) := { + href := p_href, + id := p_id, + name := p_name, + version := p_version + } // End of template mw_category_ref + template (value) SubscriptionLinkList m_subscription_link_list( in template (value) Links p_links ) := { @@ -207,6 +231,10 @@ module EdgePlatformApplicationEnablementAPI_Templates { in template (omit) ServiceDependencies p_appServiceOptional := omit, in template (omit) FeatureDependencies p_appFeatureRequired := omit, in template (omit) FeatureDependencies p_appFeatureOptional := omit, + in template (omit) ScheduledCommunicationTimes p_scheds := omit, + in template (omit) ServiceArea p_svcArea := omit, + in template (omit) EASServiceKPI p_svcKpi := omit, + in template (omit) AppInfo.permLvl p_permLvl := omit, in template (omit) Json.Bool p_isInsByMec := omit, in template (omit) AppProfile p_appProfile := omit ) := { @@ -220,6 +248,10 @@ module EdgePlatformApplicationEnablementAPI_Templates { appServiceOptional := p_appServiceOptional, appFeatureRequired := p_appFeatureRequired, appFeatureOptional := p_appFeatureOptional, + scheds := p_scheds, + svcArea := p_svcArea, + svcKpi := p_svcKpi, + permLvl := p_permLvl, isInsByMec := p_isInsByMec, appProfile := p_appProfile } // End of template m_app_info @@ -235,6 +267,10 @@ module EdgePlatformApplicationEnablementAPI_Templates { template ServiceDependencies p_appServiceOptional := *, template FeatureDependencies p_appFeatureRequired := *, template FeatureDependencies p_appFeatureOptional := *, + template ScheduledCommunicationTimes p_scheds := *, + template ServiceArea p_svcArea := *, + template EASServiceKPI p_svcKpi := *, + template AppInfo.permLvl p_permLvl := *, template Json.Bool p_isInsByMec := *, template AppProfile p_appProfile := * ) := { @@ -248,6 +284,10 @@ module EdgePlatformApplicationEnablementAPI_Templates { appServiceOptional := p_appServiceOptional, appFeatureRequired := p_appFeatureRequired, appFeatureOptional := p_appFeatureOptional, + scheds := p_scheds, + svcArea := p_svcArea, + svcKpi := p_svcKpi, + permLvl := p_permLvl, isInsByMec := p_isInsByMec, appProfile := p_appProfile } // End of template mw_app_info @@ -430,7 +470,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { in TrafficRule_Id p_trafficRuleId, in TrafficRule_FilterType p_filterType := FLOW, in TrafficRule_Priority p_priority := 1, - in TrafficFilterList p_trafficFilter := {}, + in EdgePlatformApplicationEnablementAPI_TypesAndValues.TrafficFilterList p_trafficFilter := {}, in TrafficRule_Action p_action_ := FORWARD_ENCAPSULATED, in TrafficRule_State p_state := ACTIVE ) := { @@ -447,7 +487,7 @@ module EdgePlatformApplicationEnablementAPI_Templates { template (present) TrafficRule_Id p_trafficRuleId := ?, template (present) TrafficRule_FilterType p_filterType := ?, template (present) TrafficRule_Priority p_priority := ?, - template (present) TrafficFilterList p_trafficFilter := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.TrafficFilterList p_trafficFilter := ?, template (present) TrafficRule_Action p_action_ := ?, template (present) TrafficRule_State p_state := ? ) := { @@ -459,5 +499,359 @@ module EdgePlatformApplicationEnablementAPI_Templates { dstInterface := *, state := p_state } // End of template mw_traffic_rule - + + template (omit) DiscoveredAPIs m_discovered_apis( + in template (value) ServiceAPIDescriptions p_serviceAPIDescriptions, + in template (omit) SupportedFeatures p_suppFeat := omit + ) := { + serviceAPIDescriptions := p_serviceAPIDescriptions, + suppFeat := p_suppFeat + } // End of template m_discovered_apis + + template (present) DiscoveredAPIs mw_discovered_apis( + template (present) ServiceAPIDescriptions p_serviceAPIDescriptions := ?, + template SupportedFeatures p_suppFeat := omit + ) := { + serviceAPIDescriptions := p_serviceAPIDescriptions, + suppFeat := p_suppFeat + } // End of template mw_discovered_apis + + template (omit) ServiceAPIDescription m_service_api_description( + in template (value) Json.String p_apiName, + in template (value) Json.String p_apiId, + in template (value) AefProfiles p_aefProfiles, + in template (value) MecServiceInfoCapifExt p_mecServiceInfoCapifExt, + in template (omit) ApiStatus p_apiStatus := omit, + in template (omit) Json.String p_description := omit, + in template (omit) SupportedFeatures p_supportedFeatures := omit, + in template (omit) ShareableInformation p_shareableInfo := omit, + in template (omit) Json.String p_serviceAPICategory := omit, + in template (omit) Json.String p_ccfId := omit, + in template (omit) SupportedFeatures p_apiSuppFeats := omit, + in template (omit) PublishedApiPath p_pubApiPath := omit, + in template (omit) Json.String p_apiProvName := omit + ) := { + apiName := p_apiName, + apiId := p_apiId, + apiStatus := p_apiStatus, + aefProfiles := p_aefProfiles, + description := p_description, + supportedFeatures := p_supportedFeatures, + shareableInfo := p_shareableInfo, + serviceAPICategory := p_serviceAPICategory, + ccfId := p_ccfId, + apiSuppFeats := p_apiSuppFeats, + pubApiPath := p_pubApiPath, + apiProvName := p_apiProvName, + mecServiceInfoCapifExt := p_mecServiceInfoCapifExt + } // End of template m_service_api_description + + template (present) ServiceAPIDescription mw_service_api_description( + template (present) Json.String p_apiName := ?, + template (present) Json.String p_apiId := ?, + template (present) AefProfiles p_aefProfiles := ?, + template (present) MecServiceInfoCapifExt p_mecServiceInfoCapifExt := ?, + template ApiStatus p_apiStatus := omit, + template Json.String p_description := *, + template SupportedFeatures p_supportedFeatures := *, + template ShareableInformation p_shareableInfo := omit, + template Json.String p_serviceAPICategory := *, + template Json.String p_ccfId := omit, + template SupportedFeatures p_apiSuppFeats := omit, + template PublishedApiPath p_pubApiPath := omit, + template Json.String p_apiProvName := * + ) := { + apiName := p_apiName, + apiId := p_apiId, + apiStatus := p_apiStatus, + aefProfiles := p_aefProfiles, + description := p_description, + supportedFeatures := p_supportedFeatures, + shareableInfo := p_shareableInfo, + serviceAPICategory := p_serviceAPICategory, + ccfId := p_ccfId, + apiSuppFeats := p_apiSuppFeats, + pubApiPath := p_pubApiPath, + apiProvName := p_apiProvName, + mecServiceInfoCapifExt := p_mecServiceInfoCapifExt + } // End of template mw_service_api_description + + template (omit) AefProfile m_aef_profile( + in template (value) Json.String p_aefId, + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.Versions p_versions, + in template (value) MecTransportInfoCapifExt p_mecTransportInfoCapifExt, + in template (omit) Protocol p_protocol := omit, + in template (omit) DataFormat p_dataFormat := omit, + in template (omit) SecurityMethods p_securityMethods := omit, + in template (omit) Json.String p_domainName := omit, + in template (omit) InterfaceDescriptions p_interfaceDescriptions := omit, + in template (omit) AefLocation p_aefLocation := omit, + in template (omit) ServiceKpis p_serviceKpis := omit, + in template (omit) IpAddrRange p_ueIpRange := omit + ) := { + aefId := p_aefId, + versions := p_versions, + protocol := p_protocol, + dataFormat := p_dataFormat, + securityMethods := p_securityMethods, + domainName := p_domainName, + interfaceDescriptions := p_interfaceDescriptions, + aefLocation := p_aefLocation, + serviceKpis := p_serviceKpis, + ueIpRange := p_ueIpRange, + mecTransportInfoCapifExt := p_mecTransportInfoCapifExt + } // End of template m_aef_profile + + template (present) AefProfile mw_aef_profile( + template (present) Json.String p_aefId := ?, + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.Versions p_versions := ?, + template (present) MecTransportInfoCapifExt p_mecTransportInfoCapifExt := ?, + template Protocol p_protocol := *, + template DataFormat p_dataFormat := *, + template SecurityMethods p_securityMethods := *, + template Json.String p_domainName := *, + template InterfaceDescriptions p_interfaceDescriptions := *, + template AefLocation p_aefLocation := *, + template ServiceKpis p_serviceKpis := *, + template IpAddrRange p_ueIpRange := * + ) := { + aefId := p_aefId, + versions := p_versions, + protocol := p_protocol, + dataFormat := p_dataFormat, + securityMethods := p_securityMethods, + domainName := p_domainName, + interfaceDescriptions := p_interfaceDescriptions, + aefLocation := p_aefLocation, + serviceKpis := p_serviceKpis, + ueIpRange := p_ueIpRange, + mecTransportInfoCapifExt := p_mecTransportInfoCapifExt + } // End of template mw_aef_profile + + template (omit) MecServiceInfoCapifExt m_mec_service_info_capif_ext( + in EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType p_serializer := JSON, + in ServiceState p_state := ACTIVE, + in template (value) CategoryRef p_category, + in template (omit) LocalityType p_scopeOfLocality := omit, + in template (omit) Json.Bool p_consumedLocalOnly := omit, + in template (omit) Json.Bool p_isLocal := omit + ) := { + serializer := p_serializer, + state := p_state, + scopeOfLocality := p_scopeOfLocality, + consumedLocalOnly := p_consumedLocalOnly, + isLocal := p_isLocal, + category := p_category + } // End of template m_mec_service_info_capif_ext + + template (present) MecServiceInfoCapifExt mw_mec_service_info_capif_ext( + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.SerializerType p_serializer := JSON, + template (present) ServiceState p_state := ACTIVE, + template (present) CategoryRef p_category, + template LocalityType p_scopeOfLocality := *, + template Json.Bool p_consumedLocalOnly := *, + template Json.Bool p_isLocal := * + ) := { + serializer := p_serializer, + state := p_state, + scopeOfLocality := p_scopeOfLocality, + consumedLocalOnly := p_consumedLocalOnly, + isLocal := p_isLocal, + category := p_category + } // End of template mw_mec_service_info_capif_ext + + template (omit) MecTransportInfoCapifExt m_mec_transport_info_capif_ext( + in template (value) Json.String p_name := "REST", + in template (value) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type := REST_HTTP, + in template (value) Json.String p_protocol := "HTTP", + in template (value) Json.String p_version := "2.0", + in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security := omit, + in template (omit) Json.String p_description := omit + ) := { + name := p_name, + description := p_description, + type_ := p_type, + protocol := p_protocol, + version := p_version, + security := p_security, + implSpecificInfo := omit + } // End of template m_mec_transport_info_capif_ext + + template (present) MecTransportInfoCapifExt mw_mec_transport_info_capif_ext( + template (present) Json.String p_name := "REST", + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType p_type := REST_HTTP, + template (present) Json.String p_protocol := "HTTP", + template (present) Json.String p_version := "2.0", + template EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo p_security := *, + template Json.String p_description := omit + ) := { + name := p_name, + description := p_description, + type_ := p_type, + protocol := p_protocol, + version := p_version, + security := p_security, + implSpecificInfo := omit + } // End of template mw_mec_transport_info_capif_ext + + template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.Version m_version( + in template (value) Json.String p_apiVersion := PX_SERVICE_INFO_VERSION, + in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.DateTime p_expiry := omit, + in template (omit) Resources p_resources := omit, + in template (omit) CustOperations p_custOperations := omit + ) := { + apiVersion := p_apiVersion, + expiry := p_expiry, + resources := p_resources, + custOperations := p_custOperations + } // End of template m_version + + template (present) EdgePlatformApplicationEnablementAPI_TypesAndValues.Version mw_version( + template (present) Json.String p_apiVersion := PX_SERVICE_INFO_VERSION, + template EdgePlatformApplicationEnablementAPI_TypesAndValues.DateTime p_expiry := *, + template Resources p_resources := *, + template CustOperations p_custOperations := * + ) := { + apiVersion := p_apiVersion, + expiry := p_expiry, + resources := p_resources, + custOperations := p_custOperations + } // End of template mw_version + + template (omit) ServiceAPIDescriptionPatch m_service_api_description_patch( + in template (value) MecServiceInfoCapifExt p_mecServiceInfoCapifExt, + in template (omit) Json.String p_serviceAPICategory := omit, + in template (omit) ShareableInformation p_shareableInfo := omit, + in template (omit) Json.String p_ccfId := omit, + in template (omit) SupportedFeatures p_apiSuppFeats := omit, + in template (omit) PublishedApiPath p_pubApiPath := omit, + in template (omit) ApiStatus p_apiStatus := omit + ) := { + shareableInfo := p_shareableInfo, + serviceAPICategory := p_serviceAPICategory, + ccfId := p_ccfId, + apiSuppFeats := p_apiSuppFeats, + pubApiPath := p_pubApiPath, + apiStatus := p_apiStatus, + mecServiceInfoCapifExt := p_mecServiceInfoCapifExt + } // End of template m_service_api_description_patch + + template (present) ServiceAPIDescriptionPatch mw_service_api_description_patch( + template (present) MecServiceInfoCapifExt p_mecServiceInfoCapifExt := ?, + template Json.String p_serviceAPICategory := *, + template ShareableInformation p_shareableInfo := omit, + template Json.String p_ccfId := omit, + template SupportedFeatures p_apiSuppFeats := omit, + template PublishedApiPath p_pubApiPath := omit, + template ApiStatus p_apiStatus := omit + ) := { + shareableInfo := p_shareableInfo, + serviceAPICategory := p_serviceAPICategory, + ccfId := p_ccfId, + apiSuppFeats := p_apiSuppFeats, + pubApiPath := p_pubApiPath, + apiStatus := p_apiStatus, + mecServiceInfoCapifExt := p_mecServiceInfoCapifExt + } // End of template mw_service_api_description_patch + + template (omit) EventSubscription m_event_subscription( + in template (value) CAPIFEvents p_events, + in template (value) Json.AnyURI p_notificationDestination, + in template (omit) CAPIFEventFilters p_eventFilters := omit, + in template (omit) ReportingInformation p_eventReq := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) SupportedFeatures p_supportedFeatures := omit + ) := { + events := p_events, + eventFilters := p_eventFilters, + eventReq := p_eventReq, + notificationDestination := p_notificationDestination, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + supportedFeatures := p_supportedFeatures + } // End of template m_event_subscription + + template (present) EventSubscription mw_event_subscription( + template (present) CAPIFEvents p_events := ?, + template (present) Json.AnyURI p_notificationDestination := ?, + template CAPIFEventFilters p_eventFilters := *, + template ReportingInformation p_eventReq := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template SupportedFeatures p_supportedFeatures := * + ) := { + events := p_events, + eventFilters := p_eventFilters, + eventReq := p_eventReq, + notificationDestination := p_notificationDestination, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + supportedFeatures := p_supportedFeatures + } // End of template mw_event_subscription + + template (omit) CAPIFEventFilter m_capif_event_filter( + in template (omit) CAPIFEventFilter.apiIds p_apiIds := omit, + in template (omit) CAPIFEventFilter.apiInvokerIds p_apiInvokerIds := omit, + in template (omit) CAPIFEventFilter.aefIds p_aefIds := omit + ) := { + apiIds := p_apiIds, + apiInvokerIds := p_apiInvokerIds, + aefIds := p_aefIds + } // End of template m_capif_event_filter + + template CAPIFEventFilter mw_capif_event_filter( + template CAPIFEventFilter.apiIds p_apiIds := *, + template CAPIFEventFilter.apiInvokerIds p_apiInvokerIds := *, + template CAPIFEventFilter.aefIds p_aefIds := * + ) := { + apiIds := p_apiIds, + apiInvokerIds := p_apiInvokerIds, + aefIds := p_aefIds + } // End of template mw_capif_event_filter + + template (omit) EventSubscriptionPatch m_event_subscription_patch( + in template (value) CAPIFEvents p_events, + in template (omit) CAPIFEventFilters p_eventFilters := omit, + in template (omit) ReportingInformation p_eventReq := omit, + in template (omit) Json.AnyURI p_notificationDestination := omit + ) := { + events := p_events, + eventFilters := p_eventFilters, + eventReq := p_eventReq, + notificationDestination := p_notificationDestination + } // End of template m_event_subscription_patch + + template (present) EventSubscriptionPatch mw_event_subscription_patch( + template (present) CAPIFEvents p_events := ?, + template CAPIFEventFilters p_eventFilters := *, + template ReportingInformation p_eventReq := *, + template Json.AnyURI p_notificationDestination := * + ) := { + events := p_events, + eventFilters := p_eventFilters, + eventReq := p_eventReq, + notificationDestination := p_notificationDestination + } // End of template mw_event_subscription_patch + + template (omit) EventNotification m_event_notification( + in template (value) Json.String p_subscriptionId, + in template (value) CAPIFEvent p_events, + in template (omit) CAPIFEventDetail p_eventDetail := omit + ) := { + subscriptionId := p_subscriptionId, + events := p_events, + eventDetail := p_eventDetail + } // End of template m_event_notification + + template (present) EventNotification mw_event_notification( + template (present) Json.String p_subscriptionId := ?, + template (present) CAPIFEvent p_events := ?, + template CAPIFEventDetail p_eventDetail := * + ) := { + subscriptionId := p_subscriptionId, + events := p_events, + eventDetail := p_eventDetail + } // End of template mw_event_notification + } // End of module EdgePlatformApplicationEnablementAPI_Templates diff --git a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn index ad62b1cebb180b5be7b494b8e8e3489f2ddb1fe2..4d36d742de8d9ba17a95a0cc4e5ff50a0a6979ef 100644 --- a/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/EdgePlatformApplicationEnablementAPI/ttcn/EdgePlatformApplicationEnablementAPI_TypesAndValues.ttcn @@ -36,7 +36,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.4.2-1: Attributes of AppTerminationNotification */ type record AppTerminationNotification { NotificationType notificationType, @@ -52,7 +52,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * 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 + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.4.3-1: Attributes of AppTerminationConfirmation */ type record AppTerminationConfirmation { OperationAction operationAction @@ -61,7 +61,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.4.4-1: Attributes of AppReadyConfirmation */ type record AppReadyConfirmation { Json.String indication @@ -79,7 +79,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.3.2-1: Attributes of AppTerminationNotificationSubscription */ type record AppTerminationNotificationSubscription { SubscriptionType subscriptionType, @@ -102,7 +102,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.6.6-1: Enumeration ServiceState */ type enumerated ServiceState { ACTIVE (0), @@ -116,7 +116,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.2.4-1: Attributes of ServiceLivenessInfo */ type record ServiceLivenessInfo { ServiceState state, @@ -127,7 +127,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc This type represents changes to the liveness information of a MEC service instance * @member state Update to the state of the MEC service instance to indicate that the service is still alive. - * @see ETSI GS MEC 011 V3.2.1 Table 8.1.2.5-1: Attributes of ServiceLivenessUpdate + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.2.5-1: Attributes of ServiceLivenessUpdate */ type record ServiceLivenessUpdate { ServiceState state @@ -166,7 +166,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.2.5-1: Attributes of CurrentTime */ type enumerated TimeSourceStatus { TRACEABLE (1), @@ -178,7 +178,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.2.5-1: Attributes of CurrentTime */ type record CurrentTime { Seconds seconds, @@ -198,25 +198,58 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 scheds The availability schedule of the application server + * @member svcArea The list of geographical and topological areas that the application server serves + * @member svcKpi Service characteristics provided by the application server + * @member permLvl Level of service permissions supported by the application server * @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 + * @see ETSI GS MEC 011 V3.3.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.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, + ScheduledCommunicationTimes scheds optional, + ServiceArea svcArea optional, + EASServiceKPI svcKpi optional, + record of Json.String permLvl optional, Json.Bool isInsByMec optional, AppProfile appProfile optional } // End of type AppInfo + /** + * @desc + * @see ETSI TS 129 222 V18.7.0 (2025-01) ??? + */ + type record ScheduledCommunicationTime { + // TODO + } // End of type ScheduledCommunicationTime + type record of ScheduledCommunicationTime ScheduledCommunicationTimes; + + /** + * @desc + * @see ETSI TS 129 558 V18.10.0 (2025-06) Table 9.1.5.2.5-1: Definition of type ServiceArea + */ + type record ServiceArea { + // TODO + } // End of type ServiceArea + + /** + * @desc + * @see ETSI TS 129 558 V18.10.0 (2025-06) Table 8.1.5.2.4-1: Definition of type EASServiceKPI + */ + type record EASServiceKPI { + // TODO + } // End of type EASServiceKPI + /** * @desc * @see ETSI TS 129 558 V17.2.0 @@ -252,7 +285,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * 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 + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.5.3-1: Attributes of DestinationInterface */ type record DestinationInterface { InterfaceType interfaceType, @@ -308,7 +341,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * 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 + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.2.3-1: Attributes of DnsRule */ type record DnsRule { DnsRule_Id dnsRuleId, @@ -370,7 +403,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 6.3.2-1: Attributes of the LinkType */ type record LinkType { Href href @@ -385,7 +418,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @desc Self-referring URI. */ type record Mp1SubscriptionLinkList_Links { - LinkType self_, + LinkType self_, Mp1SubscriptionLinkList_SubscriptionList subscription optional } with { variant (self_) "name as 'self'"; @@ -421,7 +454,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record Links { LinkType self_, @@ -433,7 +466,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record SubscriptionLinkList { Links links @@ -445,10 +478,10 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 6.2.2-1: Attributes of the SubscriptionLinkList */ type record Subscription_ { - Json.AnyURI href, + Json.AnyURI href, SubscriptionType subscriptionType } type record length(1..infinity) of Subscription_ Subscriptions; @@ -479,7 +512,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.5.4-1: Attributes of SecurityInfo */ type record SecurityInfo { OAuth2Info oAuth2Info optional, @@ -502,16 +535,32 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc 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. + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.4.2-1: Attributes of ServiceAvailabilityNotification */ type record SerAvailabilityNotificationSubscription { - SerAvailabilityNotificationSubscription_SubscriptionType subscriptionType, + SerAvailabilityNotificationSubscription_SubscriptionType subscriptionType, SerAvailabilityNotificationSubscription_CallbackReference callbackReference, - Self links optional, - FilteringCriteria filteringCriteria optional + Self links optional, + FilteringCriteria filteringCriteria optional } with { variant (links) "name as '_links'"; } + /** + * @desc 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. + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.4.2-1: Attributes of ServiceAvailabilityNotification + */ + type record ServiceReference { + LinkType links optional, + SerName serName, + SerInstanceId serInstanceId, + ServiceState state, + ChangeType changeType + } with { + variant (links) "name as '_links'"; + } + type set of ServiceReference ServiceReferenceList; + /** * @desc Shall be set to SerAvailabilityNotificationSubscription. */ @@ -524,14 +573,14 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.3.2-1: Attributes of SerAvailabilityNotificationSubscription */ type record FilteringCriteria { SerInstanceIdList serInstanceIds optional, - SerNameList serNames optional, - CategoryRefList serCategories optional, - ServiceStateList states optional, - Json.Bool isLocal optional + SerNameList serNames optional, + CategoryRefList serCategories optional, + ServiceStateList states optional, + Json.Bool isLocal optional } /** @@ -539,13 +588,15 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { */ type record ServiceAvailabilityNotification { SerAvailabilityNotificationSubscription_SubscriptionType notificationType, - ServiceInfoList services, - Subscription links + ServiceReferenceList serviceReferences, + Subscription links + } with { + variant (links) "name as '_links'"; } /** * @desc The enumeration SerializerTypes represents types of serializers. - * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.3-1: Enumeration SerializerType + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.6.3-1: Enumeration SerializerType */ type enumerated SerializerType { JSON, @@ -580,7 +631,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc Contains the types of locality. - * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.5-1: Enumeration LocalityType + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.6.5-1: Enumeration LocalityType */ type enumerated LocalityType { MEC_SYSTEM, @@ -625,22 +676,22 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.2.2-1: Attributes of ServiceInfo */ type record ServiceInfo { - SerInstanceId serInstanceId optional, - SerName serName, - CategoryRef serCategory optional, + SerInstanceId serInstanceId optional, + SerName serName, + CategoryRef serCategory optional, ServiceInfo_Version version, - ServiceState state, - TransportId transportId optional, - TransportInfo transportInfo optional, - SerializerType serializer, - LocalityType scopeOfLocality optional, - Json.Bool consumedLocalOnly optional, - Json.Bool isLocal optional, - Json.UInteger livenessInterval optional, - ServiceInfo_Link links optional + ServiceState state, + TransportId transportId optional, + TransportInfo transportInfo optional, + SerializerType serializer, + LocalityType scopeOfLocality optional, + Json.Bool consumedLocalOnly optional, + Json.Bool isLocal optional, + Json.UInteger livenessInterval optional, + ServiceInfo_Link links optional } with { variant (links) "name as '_links'"; } @@ -719,14 +770,14 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.2.4-1: Attributes of TimingCaps */ type record NtpServers { - NtpServerAddrType ntpServerAddrType, - NtpServerAddr ntpServerAddr, - MinPollingInterval minPollingInterval, - MaxPollingInterval maxPollingInterval, - LocalPriority localPriority, + NtpServerAddrType ntpServerAddrType, + NtpServerAddr ntpServerAddr, + MinPollingInterval minPollingInterval, + MaxPollingInterval maxPollingInterval, + LocalPriority localPriority, AuthenticationOption authenticationOption, AuthenticationKeyNum authenticationKeyNum } @@ -736,9 +787,9 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @desc NTP server detail. */ type record TimingCaps_PtpMasters { - NtpServers_PtpMasterIpAddress ptpMasterIpAddress, + NtpServers_PtpMasterIpAddress ptpMasterIpAddress, NtpServers_PtpMasterLocalPriority ptpMasterLocalPriority, - DelayReqMaxRate delayReqMaxRate + DelayReqMaxRate delayReqMaxRate } type set of TimingCaps_PtpMasters TimingCaps_PtpMastersList; @@ -747,7 +798,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.2.4-1: Attributes of TimingCaps */ type record TimingCaps { TimeStamp timeStamp optional, @@ -800,6 +851,12 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { type Json.String TrafficFilter_TunnelAddress; type set of TrafficFilter_TunnelAddress TrafficFilter_TunnelAddressList; + type Json.String TrafficFilter_Uri; + type set of TrafficFilter_Uri TrafficFilter_UriList; + + type Json.String TrafficFilter_PacketLabel; + type set of TrafficFilter_PacketLabel TrafficFilter_PacketLabelList; + /** * @desc Used for GTP tunnel based traffic rule. */ @@ -821,22 +878,22 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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, - TrafficFilter_AddressList dstAddress optional, - TrafficFilter_PortList srcPort optional, - TrafficFilter_PortList dstPort optional, - TrafficFilter_ProtocolList protocol optional, - TrafficFilter_TagList tag optional, + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.5.2-1: Attributes of TrafficFilter + */ + type record TrafficFilter { // FIXME FSCOM Need to duplicate to prevent C++ incomplete type error + TrafficFilter_AddressList srcAddress optional, + TrafficFilter_AddressList dstAddress optional, + TrafficFilter_PortList srcPort optional, + TrafficFilter_PortList dstPort optional, + TrafficFilter_ProtocolList protocol optional, + TrafficFilter_TagList tag optional, TrafficFilter_TunnelAddressList srcTunnelAddress optional, TrafficFilter_TunnelAddressList tgtTunnelAddress optional, - TrafficFilter_TunnelPortList srcTunnelPort optional, - TrafficFilter_TunnelPortList dstTunnelPort optional, - TrafficFilter_QCI qCI optional, - TrafficFilter_DSCP dSCP optional, - TrafficFilter_TC tC optional + TrafficFilter_TunnelPortList srcTunnelPort optional, + TrafficFilter_TunnelPortList dstTunnelPort optional, + TrafficFilter_QCI qCI optional, + TrafficFilter_DSCP dSCP optional, + TrafficFilter_TC tC optional } type set of TrafficFilter TrafficFilterList; @@ -887,16 +944,16 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * 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 + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.2.2-1: Attributes of TrafficRule */ type record TrafficRule { - TrafficRule_Id trafficRuleId, - TrafficRule_FilterType filterType, - TrafficRule_Priority priority, - TrafficFilterList trafficFilter, - TrafficRule_Action action_, - DestinationInterfaceList dstInterface optional, - TrafficRule_State state + TrafficRule_Id trafficRuleId, + TrafficRule_FilterType filterType, + TrafficRule_Priority priority, + EdgePlatformApplicationEnablementAPI_TypesAndValues.TrafficFilterList trafficFilter, + TrafficRule_Action action_, + DestinationInterfaceList dstInterface optional, + TrafficRule_State state } with { variant (action_) "name as 'action'"; } @@ -938,11 +995,11 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.5.3-1: Attributes of EndPointInfo */ type record EndPointInfo { - EndPointInfo_UriList uris optional, - EndPointInfo_FqdnList fqdn optional, + EndPointInfo_UriList uris optional, + EndPointInfo_FqdnList fqdn optional, EndPointInfo_AddressList addresses optional, EndPointInfo_Alternative alternative optional } @@ -958,17 +1015,17 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.2.3-1: Attributes of TransportInfo */ type record TransportInfo { - TransportInfo_Id id, - TransportInfo_Name name, - TransportInfo_Description description optional, - TransportType type_, - TransportInfo_Protocol protocol, - TransportInfo_Version version, - EndPointInfo endpoint, - SecurityInfo security, + TransportInfo_Id id, + TransportInfo_Name name, + TransportInfo_Description description optional, + TransportType type_, + TransportInfo_Protocol protocol, + TransportInfo_Version version, + EndPointInfo endpoint, + SecurityInfo security, TransportInfo_ImplSpecificInfo implSpecificInfo optional } with { variant (type_) "name as 'type'"; @@ -977,7 +1034,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { /** * @desc The enumeration TransportType represents types of transports. - * @see ETSI GS MEC 011 V3.2.1 Table 8.1.6.4-1: Enumeration TransportType + * @see ETSI GS MEC 011 V3.3.1 Table 8.1.6.4-1: Enumeration TransportType */ type enumerated TransportType { REST_HTTP, @@ -1012,14 +1069,662 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 011 V3.3.1 Table 7.1.5.4-1: Attributes of TunnelInfo */ type record TunnelInfo { - TunnelInfo_TunnelType tunnelType, + TunnelInfo_TunnelType tunnelType, TunnelInfo_TunnelDstAddress tunnelDstAddress optional, TunnelInfo_TunnelSrcAddress tunnelSrcAddress optional } + /** + * @desc This type represents the structured data types to be used in resource representations of the CAPIF_Discover_Service_API. + * @member serviceAPIDescriptions Description of the service API as published by the service + * @member suppFeat Contains the list of supported features among the ones + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.1.4.2.2-1: Definition of type DiscoveredAPIs + */ + type record DiscoveredAPIs { + ServiceAPIDescriptions serviceAPIDescriptions optional, + SupportedFeatures suppFeat optional + } + + /** + * @desc This type represents the structured data types to be used in resource representations of the CAPIF_Publish_Service_API + * @member apiName API name, it is set as {apiName} part of the URI structure + * @member apiId API identifier assigned by the CCF to the published service API + * @member apiStatus Indicates the API status + * @member aefProfiles AEF profile information, which includes the exposed API details (e.g. protocol) + * @member description Text description of the API + * @member supportedFeatures The supported optional features of the CAPIF API + * @member shareableInfo + * @member serviceAPICategory The service API category to which the service API belongs to + * @member ccfId CCF identifier which can be contacted further for discovering the details of service API information + * @member apiSuppFeats Provided by the consumer to indicate the features supported by the service API + * @member pubApiPath It contains the published API path within the same CAPIF provider domain + * @member apiProvName Represents the API provider name + * @member vendorSpecific-urn:etsi:mec:capifext:service-info + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.2.2-1: Definition of type ServiceAPIDescription + */ + type record ServiceAPIDescription { + Json.String apiName, + Json.String apiId optional, + ApiStatus apiStatus optional, + AefProfiles aefProfiles optional, + Json.String description optional, + SupportedFeatures supportedFeatures optional, + ShareableInformation shareableInfo optional, + Json.String serviceAPICategory optional, + Json.String ccfId optional, + SupportedFeatures apiSuppFeats optional, + PublishedApiPath pubApiPath optional, + Json.String apiProvName optional, + MecServiceInfoCapifExt mecServiceInfoCapifExt + } with { + variant (mecServiceInfoCapifExt) "name as 'vendorSpecific-urn:etsi:mec:capifext:service-info'"; + } + type record length (1 .. infinity) of ServiceAPIDescription ServiceAPIDescriptions; + + /** + * @desc MecServiceInfoCapifExt + * @see ETSI GS MEC 011 V3.3.1 (2024-11) Table 9.1.5.1-1: Attributes of the MecServiceInfoCapifExt data type + */ + type record MecServiceInfoCapifExt { + SerializerType serializer, + ServiceState state, + LocalityType scopeOfLocality optional, + Json.Bool consumedLocalOnly optional, + Json.Bool isLocal optional, + CategoryRef category + } + + /** + * @desc MecTransportInfoCapifExt + * @see ETSI GS MEC 011 V3.3.1 (2024-11) Table 9.1.5.2-1: Attributes of the MecTransportInfoCapifExt + */ + type record MecTransportInfoCapifExt { + Json.String name, + Json.String description optional, + TransportType type_, + Json.String protocol, + Json.String version, + SecurityInfo security, + Json.String implSpecificInfo optional + } with { + variant (type_) "name as 'type'"; + } + + /** + * @desc This type represents the API status + * @member serviceAPIDescriptions Indicates the list of AEF ID(s) where the API is active + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.2.12-1: Definition of type ApiStatus + */ + type record ApiStatus { + record of Json.String aefIds optional + } + + /** + * @desc This type represents the API status + * @member isShareable Communication type used by the custom operation + * @member capifProvDoms + * @member operations + * @member description + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.2.8-1: Definition of type ShareableInformation + */ + type record ShareableInformation { + Json.Bool isShareable, + CapifProvDoms capifProvDoms optional + } + type record of Json.String CapifProvDoms; + + /** + * @desc This type represents the AEF profile information + * @member aefId AEF identifier + * @member versions API version + * @member protocol Protocol used by the API + * @member dataFormat Data format used by the API + * @member securityMethods Security methods supported by the AEF for all interfaces + * @member domainName Contains the domain name information used to construct the “apiRoot†variable of the API URI + * @member interfaceDescriptions Interface details + * @member aefLocation The location information (e.g. civic address, GPS coordinates, data center ID) where the AEF providing the service API is located + * @member serviceKpis Contains information about the service characteristics provided by the service API + * @member ueIpRange The list of public IP ranges of UEs + * @member vendorSpecific-urn:etsi:mec:capifext:transport-info + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.2.4-1: Definition of type AefProfile + */ + type record AefProfile { + Json.String aefId, + Versions versions, + Protocol protocol optional, + DataFormat dataFormat optional, + SecurityMethods securityMethods optional, + Json.String domainName optional, + InterfaceDescriptions interfaceDescriptions optional, + AefLocation aefLocation optional, + ServiceKpis serviceKpis optional, + IpAddrRange ueIpRange optional, + MecTransportInfoCapifExt mecTransportInfoCapifExt + } with { + variant (mecTransportInfoCapifExt) "name as 'vendorSpecific-urn:etsi:mec:capifext:transport-info'"; + } + type record length (1 .. infinity) of AefProfile AefProfiles; + + /** + * @desc A string used to indicate the features supported by an API + * @see ETSI TS 129 571 V18.10.0 (2025-07) + */ + type Json.String SupportedFeature; + type record length (1 .. infinity) of SupportedFeature SupportedFeatures; + + /** + * @desc + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.2.9-1: Definition of type PublishedApiPath + */ + type record PublishedApiPath { + record of Json.String ccfIds optional + } + + /** + * @desc This type represents the API version + * @member apiVersion API major version in URI + * @member expiry Expiry date and time of the AEF service + * @member resources Resources supported by the API + * @member custOperations Custom operations without resource association + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.2.5-1: Definition of type Version + */ + type record Version { + Json.String apiVersion, + DateTime expiry optional, + Resources resources optional, + CustOperations custOperations optional + } + type record of Version Versions; + type record length (1 .. infinity) of Json.String Resources; + + /** + * @desc This type represents the structured data types to be used in resource representations of the CAPIF_Publish_Service_API + * @member apiName API name, it is set as {apiName} part of the URI structure + * @member apiId API identifier assigned by the CCF to the published service API + * @member apiStatus Indicates the API status + * @member serviceAPICategory The service API category to which the service API belongs to + * @member ccfId CCF identifier which can be contacted further for discovering the details of service API information + * @member apiSuppFeats Provided by the consumer to indicate the features supported by the service API + * @member pubApiPath It contains the published API path within the same CAPIF provider domain + * @member apiProvName Represents the API provider name + * @member vendorSpecific-urn:etsi:mec:capifext:service-info + * @see ETSI GS MEC 011 V3.3.1 (2024-11) Table 9.1.2.2-1: Definition of type ServiceAPIDescriptionPatch + */ + type record ServiceAPIDescriptionPatch { + ShareableInformation shareableInfo optional, + Json.String serviceAPICategory optional, + Json.String ccfId optional, + SupportedFeatures apiSuppFeats optional, + PublishedApiPath pubApiPath optional, + ApiStatus apiStatus optional, + MecServiceInfoCapifExt mecServiceInfoCapifExt + } with { + variant (mecServiceInfoCapifExt) "name as 'vendorSpecific-urn:etsi:mec:capifext:service-info'"; + } + + /** + * @desc EventSubscription + * @member events Subscribed events + * @member eventFilters Subscribed event filters + * @member eventReq Represents the reporting requirements of the event subscription + * @member notificationDestination URI where the notification should be delivered to + * @member requestTestNotification Set to "true" by Subscriber to request the CAPIF core function to send a test notification + * @member websockNotifConfig Configuration parameters to set up notification delivery over Websocket protocol + * @member supportedFeatures Used to negotiate the supported optional features of the API + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.3.4.2.2-1: Definition of type EventSubscription + */ + type record EventSubscription { + CAPIFEvents events, + CAPIFEventFilters eventFilters optional, + ReportingInformation eventReq optional, + Json.AnyURI notificationDestination, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + SupportedFeatures supportedFeatures optional + } + + /** + * @desc CAPIFEvent + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.3.4.3.3-1: Enumeration CAPIFEvent + */ + type enumerated CAPIFEvent { + SERVICE_API_AVAILABLE, + SERVICE_API_UNAVAILABLE, + SERVICE_API_UPDATE, + API_INVOKER_ONBOARDED, + API_INVOKER_OFFBOARDED, + SERVICE_API_INVOCATION_SUCCESS, + SERVICE_API_INVOCATION_FAILURE, + ACCESS_CONTROL_POLICY_UPDATE, + ACCESS_CONTROL_POLICY_UNAVAILABLE, + API_INVOKER_AUTHORIZATION_REVOKED, + API_INVOKER_UPDATED, + API_TOPOLOGY_HIDING_CREATED, + API_TOPOLOGY_HIDING_REVOKED + } + type record of CAPIFEvent CAPIFEvents; + + /** + * @desc CAPIFEventFilter + * @member apiIds Applicability API identifiers that the event subscriber wants to know in the interested event + * @member apiInvokerIds SAPI invokers that the event subscriber wants to know in the interested event + * @member aefIds String identifying the AEF + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.3.4.2.4-1: Definition of type CAPIFEventFilter + */ + type record CAPIFEventFilter { + record of Json.String apiIds optional, + record of Json.String apiInvokerIds optional, + record of Json.String aefIds optional + } + type record of CAPIFEventFilter CAPIFEventFilters; + + /** + * @desc EventSubscriptionPatch + * @member events Subscribed events + * @member eventFilters Subscribed event filters + * @member eventReq Represents the reporting requirements of the event subscription + * @member notificationDestination URI where the notification should be delivered to + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.3.4.2.8-1: Definition of type EventSubscriptionPatch + */ + type record EventSubscriptionPatch { + CAPIFEvents events, + CAPIFEventFilters eventFilters optional, + ReportingInformation eventReq optional, + Json.AnyURI notificationDestination optional + } + + /** + * @desc EventNotification + * @member subscriptionId Identifier of the subscription resource to which the notification is related – CAPIF resource identifier + * @member events Notifications of individual events + * @member eventDetail Detailed information for the event + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.3.4.2.3-1: Definition of type EventNotification + */ + type record EventNotification { + Json.String subscriptionId, + CAPIFEvent events, + CAPIFEventDetail eventDetail optional + } + + /** + * @desc CAPIFEventDetail + * @member serviceAPIDescriptions Description of the service API as published by the APF + * @member apiIds API identifiers + * @member apiInvokerIds API invokers that are onboarded/offboarded + * @member accCtrlPolList Access control policy updated list + * @member invocationLogs Invocation logs + * @member apiTopoHide Topology hiding information for a service API + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.3.4.2.5-1: Definition of type CAPIFEventDetail + */ + type record CAPIFEventDetail { + ServiceAPIDescriptions serviceAPIDescriptions optional, + record of Json.String apiIds optional, + record of Json.String apiInvokerIds optional, + AccessControlPolicyListExt accCtrlPolList optional, + InvocationLogs invocationLogs, + TopologyHiding apiTopoHide optional + } + + /** + * @desc AccessControlPolicyListExt + * @member apiId Identifier of the service API + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.3.4.2.6-1: Definition of type AccessControlPolicyListExt + */ + type record AccessControlPolicyListExt { + Json.String apiId + } + + /** + * @desc TopologyHiding + * @member apiId Identifier of the service API + * @member routingRules Routing rules + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.3.4.2.7-1: Definition of type TopologyHiding + */ + type record TopologyHiding { + Json.String apiId, + RoutingRules routingRules + } + + /** + * @desc RoutingRule + * @member ipv4AddrRanges The IPv4 address range for the API invocation source IP address + * @member ipv6AddrRanges The IPv6 address range for the API invocation source IP address + * @member aefProfile The target AEF profile + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.10.4.2.3-1: Definition of type RoutingRule + */ + type record RoutingRule { + Ipv4AddressRange ipv4AddrRanges optional, + Ipv6AddressRange ipv6AddrRanges optional, + AefProfile aefProfile + } + type record of RoutingRule RoutingRules; + + /** + * @desc Ipv4AddressRange + * @member start First value identifying the start of an IPv4 address range + * @member end Last value identifying the end of an IPv4 address range + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.10.4.2.4-1: Definition of type Ipv4AddressRange + */ + type record Ipv4AddressRange { + Ipv4Addr start_, + Ipv4Addr end_ + } with { + variant (start_) "name as 'start'"; + variant (end_) "name as 'end'"; + } + type record of Ipv4AddressRange Ipv4AddressRanges; + + /** + * @desc Ipv6AddressRange + * @member start First value identifying the start of an IPv6 address range + * @member end Last value identifying the end of an IPv6 address range + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.10.4.2.4-1: Definition of type Ipv6AddressRange + */ + type record Ipv6AddressRange { + Ipv6Addr start_, + Ipv6Addr end_ + } with { + variant (start_) "name as 'start'"; + variant (end_) "name as 'end'"; + } + type record of Ipv6AddressRange Ipv6AddressRanges; + + + /** + * @desc WebsockNotifConfig + * @member websocketUri Set by the SCEF to indicate to the SCS/AS the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set by the SCS/AS to indicate that the Websocket delivery is requested + * @see ETSI TS 129 122 V16.17.0 (2024-04 Table 5.2.1.2.10-1: Definition of the WebsockNotifConfig data type + */ + type record WebsockNotifConfig { + Link websocketUri optional, + Json.Bool requestWebsocketUri optional + } + + /** + * @desc InvocationLog + * @member aefId Identity information of the API exposing function requesting logging of service API invocations + * @member apiInvokerId Identity of the API invoker which invoked the service API + * @member logs Service API invocation log + * @member supportedFeatures Used to negotiate the supported optional features of the API + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.7.4.2.2-1: Definition of type InvocationLog + */ + type record InvocationLog { + Json.String aefId, + Json.String apiInvokerId, + Logs logs, + SupportedFeature supportedFeatures optional + } + type record of InvocationLog InvocationLogs; + + /** + * @desc Log + * @see ETSI TS 129 222 V18.7.0 (2025-01) Table 8.7.4.2.3-1: Definition of type Log + */ + type record Log { + Json.String apiId, + Json.String apiName, + Json.String apiVersion, + Json.String resourceName, + Json.AnyURI uri optional, + Protocol protocol, + Operation operation optional, + Json.String result, + DateTime invocationTime optional, + DurationMs invocationLatency optional, + Json.String inputParameters optional, // Defined as ANY TYPE + Json.String outputParameters optional, // Defined as ANY TYPE + InterfaceDescription srcInterface optional, + InterfaceDescription dstInterface optional, + Json.String fwdInterface optional + } + type record of Log Logs; + + /** + * @desc This type represents the Protocol used by the API + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.3.3-1: Enumeration Protocol + */ + type enumerated Protocol { + HTTP_1_1, + HTTP_2, + MQTT, + WEBSOCKET + } + + /** + * @desc This type represents the Data format used by the API + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.3.4-1: Enumeration DataFormat + */ + type enumerated DataFormat { + JSON, + XML, + PROTOBUF3, + WEBSOCKET + } + + /** + * @desc This type represents the security method used by the API + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.3.6-1: Enumeration SecurityMethod + */ + type enumerated SecurityMethod { + PSK, + PKI, + OAUTH + } + type record of SecurityMethod SecurityMethods; + + /** + * @desc This type represents an interface details + * @param ipv4Addr String identifying an IPv4 address + * @param ipv6Addr String identifying an IPv6 address + * @param fqdn String containing a Fully Qualified Domain Name. + * @param port_ Port number + * @param apiPrefix A string representing an optional deployment specific string (API prefix) + * @param securityMethods Security methods supported by the interface + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.2.3-1: Definition of type InterfaceDescription + */ + type record InterfaceDescription { + Ipv4Addr ipv4Addr optional, + Ipv6Addr ipv6Addr optional, + Fqdn fqdn optional, + Port port_ optional, + Json.String apiPrefix optional, + SecurityMethods securityMethods optional + } with { + variant (port_) "name as 'port'"; + } + type record length (1 .. infinity) of InterfaceDescription InterfaceDescriptions; + + /** + * @desc This type represents the location information + * @param civicAddr Identifies the civic address where the AEF providing the service API is located + * @param geoArea Identifies the geographic area where the AEF providing the service API is located + * @param dcId Identifies the data center where the AEF providing the service API is located + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.2.10-1: Definition of type AefLocation + */ + type record AefLocation { + CivicAddress civicAddr optional, + GeographicArea geoArea optional, + Json.String dcId optional + } + + /** + * @desc This type represents the information about the service characteristics provided by the service API + * @param maxReqRate Contains the maximum request rate (i.e.,number of requests per second) from the API Invoker that is supported by any service producer of the service API + * @param maxRestime Contains the maximum response time (expressed in seconds) supported for the API Invoker's service requests + * @param availability Contains the advertised percentage of time any service producer of the service API is available for the API Invoker's use + * @param avalComp Contains the maximum compute resource available for the API Invoker + * @param avalGraComp Contains the maximum graphical compute resource available for the API Invoker + * @param avalMem Contains the maximum memory resource available for the API Invoker + * @param avalStor Contains the maximum storage resource available for the API Invoker + * @param conBand Contains the connection bandwidth (expressed in kbps) advertised for the API Invoker's use + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.2.13-1: Definition of type ServiceKpis + */ + type record ServiceKpi { + Json.UInteger maxReqRate optional, + DurationSec maxRestime optional, + Json.UInteger availability optional, + Json.String avalComp optional, + Json.String avalGraComp optional, + Json.String avalMem optional, + Json.String avalStor optional, + Json.UInteger conBand optional + } + type record length (1 .. infinity) of ServiceKpi ServiceKpis; + + /** + * @desc This type represents the information about the service characteristics provided by the service API + * @param commType Communication type used by the custom operation + * @param custOpName It is set as {custOpName} part of the URI structure for a custom operation without resource association + * @param operations Supported HTTP methods for the custom operation + * @param description Text description of the custom operation + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.2.7-1: Definition of type CustomOperation + */ + type record CustomOperation { + CommunicationType commType, + Json.String custOpName, + Operations operations, + Json.String description optional + } + type record length (1 .. infinity) of CustomOperation CustOperations; + + /** + * @desc This type represents the information about the service characteristics provided by the service API + * @param ueIpv4AddrRanges Represents the IPv4 Address ranges of the UE(s) + * @param ueIpv6AddrRanges Represents the IPv6 Address ranges of the UE(s) + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.2.14-1: Definition of type IpAddrRange + */ + type record IpAddrRange { + Ipv4AddressRanges ueIpv4AddrRanges optional, + Ipv6AddressRanges ueIpv6AddrRanges optional + } + + /** + * @desc This type represents the communication type + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.3.5-1: Enumeration CommunicationType + */ + type enumerated CommunicationType { + REQUEST_RESPONSE, + SUBSCRIBE_NOTIFY + } + + /** + * @desc This type represents the HTTP methods + * @see ETSI TS 129 222 V18.6.0 (2024-07) Table 8.2.4.3.7-1: Enumeration Operation + */ + type enumerated Operation { + GET, + POST, + PUT, + PATCH, + DELETE + } + type record length (1 .. infinity) of Operation Operations; + + type Json.UInteger Port; + + type record CivicAddress { + + } + + type record GeographicArea { + + } + + /** + * @desc ReportingInformation + * @member immRep Indication of immediate reporting + * @member notifMethod RepreRepresents the maximum number of reports, after which the subscription ceases to existsents the notification method (periodic, one time, on event detection) + * @member maxReportNbr Represents the maximum number of reports, after which the subscription ceases to exist + * @member DateTime Represents the time at which the subscription ceases to exist + * @member repPeriod Indicates the time interval between successive event notifications + * @member sampRatio Indicates the ratio of the random subset to target UEs, event reports only relates to the subset + * @member partitionCriteria Defines criteria for partitioning the UEs in order to apply the sampling ratio for each partition + * @member grpRepTime Indicates the time during which the event reports detected for the concerned UEs are aggregated in a group in order to be reported together to the NF service consumer + * @member notifFlag Indicates the notification flag, which is used to mute/unmute notifications and to retrieve events stored during a period of muted notifications + * @see ETSI TS 129 523 V17.9.0 (2025-07) Table 5.6.2.4-1: Definition of type ReportingInformation + */ + type record ReportingInformation { + Json.Bool immRep optional, + NotificationMethod notifMethod optional, + Json.UInteger maxReportNbr optional, + DateTime monDur optional, + DurationSec repPeriod optional, + SamplingRatio sampRatio optional, + PartitioningCriteria partitionCriteria optional, + DurationSec grpRepTime optional, + NotificationFlag notifFlag optional + } + + /** + * desc String with format "date-time" as defined in OpenAPI Specification + * @see ETSI TS 129 571 V18.10.0 (2025-07) Table 5.2.2-1: Simple Data Types + */ + type Json.String DateTime; + + /** + * desc Unsigned integer identifying a period of time in units of seconds + * @see ETSI TS 129 571 V18.10.0 (2025-07) Table 5.2.2-1: Simple Data Types + */ + type Json.Number DurationSec; + type Json.Number DurationMs; + + /** + * desc String identifying a IPv4 address formatted in the "dotted decimal" notation + * @see ETSI TS 129 571 V18.10.0 (2025-07) Table 5.2.2-1: Simple Data Types + */ + type Json.String Ipv4Addr; + + /** + * desc String identifying a IPv6 address formatted in the "dotted decimal" notation + * @see ETSI TS 129 571 V18.10.0 (2025-07) Table 5.2.2-1: Simple Data Types + */ + type Json.String Ipv6Addr; + + // FIXME See ETSI TS 129 571 V18.10.0 (2025-07) Table 5.2.2-1: Simple Data Types + type Json.String Fqdn; + + /** + * desc Unsigned integer indicating Sampling Ratio + * @see ETSI TS 129 571 V18.10.0 (2025-07) Table 5.2.2-1: Simple Data Types + */ + type Json.Integer SamplingRatio; + + /** + * desc Used to partition UEs before applying sampling + * @see ETSI TS 129 571 V18.10.0 (2025-07) 5.5.3.13 Enumeration: PartitioningCriteria + */ + type enumerated PartitioningCriteria { + TAC, + SUBPLMN, + GEOAREA, + SNSSAI, + DNN + } + + /** + * @desc NotificationMethod + * @see ETSI TS 129 508 V17.16.0 (2025-06) 5.4.3.37 Enumeration: NotificationFlag + */ + type enumerated NotificationFlag { + ACTIVATE, + DEACTIVATE, + RETRIEVAL + } + + /** + * @desc NotificationMethod + * @see ETSI TS 129 508 V17.16.0 (2025-06) 5.6.3.4 Enumeration: NotificationMethod + */ + type enumerated NotificationMethod { + PERIODIC, + ONE_TIME, + ON_EVENT_DETECTION + } + } with { encode "JSON" } // End of module EdgePlatformApplicationEnablementAPI_TypesAndValues diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn index 1c300b9b8f11d052936f2ce226250728e61d67d8..b5aa41d2b626d588f1a2c30cacd533a0b6165843 100644 --- a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Functions.ttcn @@ -16,12 +16,13 @@ module FederationEnablementAPI_Functions { import from LibHttp_JsonTemplates all; import from LibHttp_TestSystem all; - // LibMec/FixedAccessInformationServiceAPI + // LibMec/FederationEnablementAPI import from FederationEnablementAPI_TypesAndValues all; import from FederationEnablementAPI_Templates all; import from FederationEnablementAPI_Pixits all; // LibMec + import from LibMec_TypesAndValues all; import from LibMec_Templates all; import from LibMec_Functions all; import from LibMec_Pics all; @@ -39,7 +40,7 @@ module FederationEnablementAPI_Functions { httpPort.send( m_http_request( m_http_request_post( - PICS_ROOT_API & PX_FED_API_SUB, + PICS_ROOT_API & PX_FED_API_SYS_INFO, v_headers, m_http_message_body_json( m_body_json_fed_system_info( @@ -52,8 +53,11 @@ module FederationEnablementAPI_Functions { mw_http_response_201_created( mw_http_message_body_json( mw_body_json_fed_system_info( - p_system_info - ))))) -> value v_response { + mw_system_info( + p_system_info.systemName, + p_system_info.systemProvider, + ? + )))))) -> value v_response { tc_ac.stop; p_system_info := v_response.response.body.json_body.systemInfo; @@ -63,7 +67,7 @@ module FederationEnablementAPI_Functions { 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( @@ -71,12 +75,12 @@ module FederationEnablementAPI_Functions { ) 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")), + PICS_ROOT_API & PX_FED_API_SYS_INFO & "/" & oct2char(unichar2oct(p_system_info.systemId, "UTF-8")), v_headers ))); tc_ac.start; @@ -91,7 +95,7 @@ module FederationEnablementAPI_Functions { 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( @@ -114,4 +118,91 @@ module FederationEnablementAPI_Functions { } } // End of function f_delete_system_info_list + function f_create_system_update_notification_subscription( + out SystemUpdateNotificationSubscription p_system_update_notification_subscription, + out charstring p_subscription_id, + in template (omit) SystemIds p_system_ids := omit, + in template (omit) TimeStamp p_expiry_deadline := omit + ) 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_FED_API_SUB, + v_headers, + m_http_message_body_json( + m_body_json_system_update_notification_subscription( + m_system_update_notification_subscription( + PX_FED_SUB_CALLBACK_URI, + -, + p_system_ids, + p_expiry_deadline + + )))))); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_system_update_notification_subscription( + mw_system_update_notification_subscription( + PX_FED_SUB_CALLBACK_URI, + mw_links_fed + )))))) -> 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_FED_API_SUB & "/(?*)", + 0 + ); + p_system_update_notification_subscription := v_response.response.body.json_body.systemUpdateNotificationSubscription; + log("f_create_system_update_notification_subscription: INFO: IUT successfully responds to the subscription: ", p_system_update_notification_subscription); + log("f_create_system_update_notification_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + } // End of function f_create_system_update_notification_subscription + + function 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_FED_API_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_sensor_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_subscription + } // End of modue FederationEnablementAPI_Functions \ No newline at end of file diff --git a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn index 269774067972260bf75193cbefedc06b46a0acec..1e4d6575bdc7f79a1802589235e67f23c0cc77a9 100644 --- a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Pixits.ttcn @@ -1,8 +1,8 @@ module FederationEnablementAPI_Pixits { - + // JSON import from Json all; - + // LibCommon import from LibCommon_BasicTypesAndValues all; @@ -33,10 +33,18 @@ module FederationEnablementAPI_Pixits { modulepar Json.String PX_FED_SYSTEM_PROVIDER_UNKNOWN := "systemProvider666"; - modulepar Json.String PX_FED_ENDPOINT_URI_1 := ""; + modulepar Json.String PX_FED_ENDPOINT_URI_1 := "http://ur1"; + + modulepar Json.String PX_FED_ENDPOINT_URI_2 := "http://ur2"; + + modulepar Json.String PX_FED_ENDPOINT_URI_3 := "http://ur3"; + + modulepar charstring PX_FED_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; + + modulepar charstring PX_FED_UNKNOWN_SUBSCRIPTION_ID := "UNKNOWN_SUBSCRIPTION_ID"; - modulepar Json.String PX_FED_ENDPOINT_URI_2 := ""; + modulepar charstring PX_SYSTEM_ID_1 := ""; - modulepar Json.String PX_FED_ENDPOINT_URI_3 := ""; + modulepar charstring PX_SYSTEM_ID_2 := ""; } // 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 index a724d4e0ad97be03f96b17a161ec6592f4cf5e85..8ebb71e25f9fdbfa0738eb02928e6f08b6dc5a04 100644 --- a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_Templates.ttcn @@ -1,11 +1,14 @@ module FederationEnablementAPI_Templates { - + // JSON import from Json all; // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; @@ -48,4 +51,159 @@ module FederationEnablementAPI_Templates { endPoint := p_end_point } // End of template mw_system_info_update + template (value) FedServiceInfo m_fed_service_info( + in template (value) Json.String p_system_id, + in template (value) MecHostInformation p_mec_host_information, + in template (value) ServiceInfo p_service_info + ) := { + systemId := p_system_id, + mecHostInformation := p_mec_host_information, + serviceInfo := p_service_info + } // End of template m_fed_service_info + + template (present) FedServiceInfo mw_fed_service_info( + template (present) Json.String p_system_id := ?, + template (present) MecHostInformation p_mec_host_information := ?, + template (present) ServiceInfo p_service_info := ? + ) := { + systemId := p_system_id, + mecHostInformation := p_mec_host_information, + serviceInfo := p_service_info + } // End of template mw_fed_service_info + + template (omit) MecHostInformation m_mec_host_information( + in template (omit) Json.String p_host_name := omit, + in template (value) KeyValuePairs p_host_id + ) := { + hostName := p_host_name, + hostId := p_host_id + } // End of template m_mec_host_information + + template (present) MecHostInformation mw_mec_host_information( + template Json.String p_host_name := *, + template (present) KeyValuePairs p_host_id := ? + ) := { + hostName := p_host_name, + hostId := p_host_id + } // End of template mw_mec_host_information + + template (omit) SystemUpdateNotificationSubscription m_system_update_notification_subscription( + in template (value) Json.AnyURI p_callback_reference, + in template (omit) FederationEnablementAPI_TypesAndValues.Links p_links := omit, + in template (omit) SystemIds p_system_id := omit, + in template (omit) TimeStamp p_expiry_deadline := omit + ) := { + subscriptionType := "SystemUpdateNotificationSubscription", + callbackReference := p_callback_reference, + links := p_links, + systemId := p_system_id, + expiryDeadline := p_expiry_deadline + } // End of template m_system_update_notification_subscription + + template (omit) SystemUpdateNotificationSubscription m_system_update_notification_subscription_wrong( + in template (omit) Json.AnyURI p_callback_reference := omit, + in template (omit) FederationEnablementAPI_TypesAndValues.Links p_links := omit, + in template (omit) SystemIds p_system_id := omit, + in template (omit) TimeStamp p_expiry_deadline := omit + ) := { + subscriptionType := "SystemUpdateNotificationSub", + callbackReference := p_callback_reference, + links := p_links, + systemId := p_system_id, + expiryDeadline := p_expiry_deadline + } // End of template m_system_update_notification_subscription_wrong( + + template (present) SystemUpdateNotificationSubscription mw_system_update_notification_subscription( + template (present) Json.AnyURI p_callback_reference := ?, + template FederationEnablementAPI_TypesAndValues.Links p_links := *, + template SystemIds p_system_id := *, + template TimeStamp p_expiry_deadline := * + ) := { + subscriptionType := "SystemUpdateNotificationSubscription", + callbackReference := p_callback_reference, + links := p_links, + systemId := p_system_id, + expiryDeadline := p_expiry_deadline + } // End of template mw_system_update_notification_subscription + + template (value) FederationEnablementAPI_TypesAndValues.Links m_links_fed( + in template (value) FederationEnablementAPI_TypesAndValues.LinkType p_self_ + ) := { + self_ := p_self_ + } // End of template m_links_fed + + template (present) FederationEnablementAPI_TypesAndValues.Links mw_links_fed( + template (present) FederationEnablementAPI_TypesAndValues.LinkType p_self_ := ? + ) := { + self_ := p_self_ + } // End of template mw_links_fed + + template (value) FederationEnablementAPI_TypesAndValues.SubscriptionLinkList m_subscription_link_list_fed( + in template (value) LinksList p_links + ) := { + links := p_links + } // End of template m_subscription_link_list_fed + + template (present) FederationEnablementAPI_TypesAndValues.SubscriptionLinkList mw_subscription_link_list_fed( + template (present) LinksList p_links := ? + ) := { + links := p_links + } // End of template mw_subscription_link_list_fed + + template (value) SystemUpdateNotification m_system_update_notification( + in template (value) SystemInfoList p_updated_system_info, + in template (value) LinksSub p_links + ) := { + notificationType := "SystemUpdateNotification", + updatedSystemInfo := p_updated_system_info, + links := p_links + } // End of template m_system_update_notification + + template (present) SystemUpdateNotification mw_system_update_notification( + template (present) SystemInfoList p_updated_system_info := ?, + template (present) LinksSub p_links := ? + ) := { + notificationType := "SystemUpdateNotification", + updatedSystemInfo := p_updated_system_info, + links := p_links + } // End of template mw_system_update_notification + + template (present) LinksSub mw_links_sub( + template (present) FederationEnablementAPI_TypesAndValues.LinkType p_subscription := ? + ) := { + subscription := p_subscription + } // End of template mw_links_sub + + template (value) LinksList m_links_list( + in template (value) FederationEnablementAPI_TypesAndValues.LinkType p_self_, + in template (value) FederationEnablementAPI_TypesAndValues.Subscriptions p_subscription + ) := { + self_ := p_self_, + subscription := p_subscription + } // End of template m_links_list + + template (present) LinksList mw_links_list( + template (present) FederationEnablementAPI_TypesAndValues.LinkType p_self_ := ?, + template (present) FederationEnablementAPI_TypesAndValues.Subscriptions p_subscription := ? + ) := { + self_ := p_self_, + subscription := p_subscription + } // End of template mw_links_list + + template (value) FederationEnablementAPI_TypesAndValues.Subscription m_subscription_fed( + in Json.AnyURI p_href, + in Json.String p_subscription_type := "SystemUpdateNotificationSubscription" + ) := { + href := p_href, + subscriptionType := p_subscription_type + } // End of template m_subscription_fed + + template (present) FederationEnablementAPI_TypesAndValues.Subscription mw_subscription_fed( + template (present) Json.AnyURI p_href := ?, + template (present) Json.String p_subscription_type := "SystemUpdateNotificationSubscription" + ) := { + href := p_href, + subscriptionType := p_subscription_type + } // End of template mw_subscription_fed + } // 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 index 77cf613dbee93969c63424248700af1db3a3dade..b55f41d2cf104eb1d3a1654049c4ec05608383d7 100644 --- a/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/FederationEnablementAPI/ttcn/FederationEnablementAPI_TypesAndValues.ttcn @@ -1,23 +1,32 @@ /** - * @desc The ETSI MEC ISG MEC040 Radio Network Information API described using OpenAPI - * @see TODO + * @version $Url$ + * $Id$ + * @desc The ETSI MEC ISG MEC040 Federation enablement API + * @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 FederationEnablementAPI_TypesAndValues { - + // JSON import from Json all; - + // LibCommon import from LibCommon_BasicTypesAndValues all; + // LibMec + import from LibMec_TypesAndValues all; + + // LibMec/EdgePlatformApplicationEnablementAPI 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 + * @see ETSI GS MEC 040 V3.3.1 (2025-03) Table 6.2.2-1: Attributes of SystemInfo */ type record SystemInfo { Json.String systemId optional, // Shall be absent in POST request @@ -25,18 +34,154 @@ module FederationEnablementAPI_TypesAndValues { Json.String systemProvider } // End of type SystemInfo type set of SystemInfo SystemInfoList; + type set of Json.String SystemIds; /** * @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 + * @see ETSI GS MEC 040 V3.3.1 (2025-03) Table 6.2.3-1: Attributes of SystemInfoUpdate */ type record SystemInfoUpdate { - Json.String systemName optional, + Json.String systemName optional, EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo endPoint optional } // End of type SystemInfoUpdate + /** + * @desc Information of a MEC service in a MEC federation + * @member systemId Identifier of the MEC system + * @member mecHostInformation Represent the information of the MEC host + * @member serviceInfo Represent the information of a MEC service + * @see ETSI GS MEC 040 V3.3.1 (2025-03) Table 6.2.4-1: Attributes of FedServiceInfo + */ + type record FedServiceInfo { + Json.String systemId, + MecHostInformation mecHostInformation, + ServiceInfo serviceInfo + } // End of type FedServiceInfo + + /** + * @desc The type represents the information of the MEC host + * @member hostName Human-readable name of MEC host + * @member hostId Deployment-specific information to identify a MEC host + * @see ETSI GS MEC 040 V3.3.1 (2025-03) Table 6.2.4-1: Attributes of FedServiceInfo + */ + 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 040 V3.3.1 (2025-03) Table 6.2.4-1: Attributes of FedServiceInfo + */ + type record KeyValuePairs { + Json.String key_name, + anytype key_value // FIXME To be refined + } + + /** + * @desc This type represents a subscription to the notifications from the MEC federator related to information update of the MEC systems in the MEC federation. + * @param subscriptionType Shall be set to "SystemUpdateNotificationSubscription" + * @param callbackReference URI selected by the MEC orchestrator to receive notifications on the subscribed MEC system information updates in the MEC federation. + * @param _links Hyperlink related to the resource + * @param systemId Identifier of the MEC system + * @param expiryDeadline The expiration time of the subscription determined by the MEC Federation Enablement Service + * @see ETSI GS MEC 040 V3.3.1 (2025-03) Table 6.3.2-1: Attributes of SystemUpdateNotificationSubscriptionn + */ + type record SystemUpdateNotificationSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, // For error cases + Links links optional, + SystemIds systemId optional, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a list of links related to existing subscriptions for subscription service consumers of the MEC federation + * @param _links List of hyperlinks related to the resource + * @see EETSI GS MEC 040 V3.3.1 (2025-03) Table 6.3.3-1: Attributes of SubscriptionLinkList + */ + type record SubscriptionLinkList { + LinksList links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents the information that the MEC federator notifies the subscribed MEC orchestrator about the information update of the MEC systems in the MEC federation + * @param notificationType Shall be set to "SystemUpdateNotification" + * @param updatedSystemInfo Updated information of the MEC system(s) in the MEC federation + * @param _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 040 V3.3.1 (2025-03) Table 6.4.2-1: Attributes of SystemUpdateNotification + */ + type record SystemUpdateNotification { + Json.String notificationType, + SystemInfoList updatedSystemInfo, + LinksSub links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Object containing hyperlinks related to the resource + * @member subscription A link to the related subscription + * @see ETSI GS MEC 040 V3.3.1 (2025-03) Table 6.4.2-1: Attributes of SystemUpdateNotification + */ + type record LinksSub { + LinkType subscription + } + + /** + * @desc List of hyperlinks related to the resource + * @param self_ List of hyperlinks related to the resource + * @param subscription A link to a subscription + * @see ETSI GS MEC 040 V3.3.1 (2025-03) Table 6.3.3-1: Attributes of SubscriptionLinkList + */ + type record LinksList { + LinkType self_, + Subscriptions subscription + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc A link to a subscription + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 040 V3.3.1 (2025-03) Table 6.3.3-1: Attributes of SubscriptionLinkList + */ + type record Subscription { + Json.AnyURI href, + Json.String subscriptionType + } + type set of Subscription Subscriptions; + + /** + * @desc Self-referring URI + * @member href URI referring to a resource + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.6.1-1: Definition of type LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc Hyperlink related to the resource + * @member self_ Self-referring URI + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.4.1-1: Attributes of the TestNotification + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + } with { + extension "anytype integer, float, boolean, universal charstring"; encode "JSON" } // End of module FederationEnablementAPI_TypesAndValues \ No newline at end of file diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn index b338fce62ee5e09a3fff9bf683f62cb36063ddc0..77cf995149d323c7ded4fa57aa2d71f478872653 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Functions.ttcn @@ -31,7 +31,8 @@ module IoTAPI_Functions { import from LibMec_Pixits all; function f_create_device_info( - out DeviceInfo p_device_info + in DeviceInfo p_device_info, + out charstring p_resource_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -44,13 +45,8 @@ module IoTAPI_Functions { 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 - )))))); + p_device_info + ))))); tc_ac.start; alt { [] httpPort.receive( @@ -58,15 +54,19 @@ module IoTAPI_Functions { 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 { + p_device_info + ))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_resource_id; + f_get_header(v_response.response.header, "Location", v_resource_id); + // Extract HTTP subssription id + p_resource_id := regexp( + v_resource_id[0], + "?+" & PX_IOT_API_SUB & "/(?*)", + 0 + ); 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); } @@ -106,10 +106,11 @@ module IoTAPI_Functions { } // End of function f_delete_device_info function f_create_device_info_list( - out DeviceInfoList p_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) { - f_create_device_info(p_device_info_list[i]); + var charstring v_resource_id; + f_create_device_info(p_device_info_list[i], v_resource_id); } } // End of function f_create_device_info_list @@ -124,7 +125,8 @@ module IoTAPI_Functions { } // End of function f_delete_device_info_list function f_create_iot_platform_info( - out IotPlatformInfo p_iot_platform_info + inout IotPlatformInfo p_iot_platform_info, + out charstring p_resource_id ) runs on HttpComponent { var Headers v_headers; var HttpMessage v_response; @@ -137,21 +139,8 @@ module IoTAPI_Functions { 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 - ) - } - )))))); + p_iot_platform_info + ))))); tc_ac.start; alt { [] httpPort.receive( @@ -159,23 +148,19 @@ module IoTAPI_Functions { 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 { + p_iot_platform_info + ))))) -> value v_response { tc_ac.stop; + // Extract HTTP Location header + var charstring_list v_resource_id; + f_get_header(v_response.response.header, "Location", v_resource_id); + // Extract HTTP subssription id + p_resource_id := regexp( + v_resource_id[0], + "?+" & PX_IOT_API_LIST_PLTF_SUB & "/(?*)", + 0 + ); 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); } @@ -215,10 +200,11 @@ module IoTAPI_Functions { } // End of function f_delete_iot_platform_info function f_create_iot_platform_info_list( - out IotPlatformInfoList p_iot_platform_info_list + inout 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]); + var charstring v_resource_id; + f_create_iot_platform_info(p_iot_platform_info_list[i], v_resource_id); } } // End of function f_create_iot_platform_info_list diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn index 1d9f8ed4046ec0180cb5d2ef3845703341097656..abefb4479b9fc9588de413e115ad39850b288f2c 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Pixits.ttcn @@ -9,79 +9,79 @@ module IoTAPI_Pixits { // LibMec/EdgePlatformApplicationEnablementAPI import from EdgePlatformApplicationEnablementAPI_TypesAndValues all; - modulepar Json.String PX_IOT_DEVICE_ID_1 := ""; + modulepar Json.String PX_IOT_DEVICE_ID_1 := "c33bb020-0e03-11f0-be75-87e8cfed7b5d"; - modulepar Json.String PX_IOT_DEVICE_SUPI_1 := ""; + modulepar Json.String PX_IOT_DEVICE_SUPI_1 := "000d0100f110f0ff00001000503054"; - modulepar Json.String PX_IOT_DEVICE_IMSI_1 := ""; + modulepar Json.String PX_IOT_DEVICE_IMSI_1 := "310170845466094"; modulepar Json.String PX_IOT_DEVICE_AUTH_1 := ""; - modulepar Json.String PX_IOT_DEVICE_ID_2 := ""; + modulepar Json.String PX_IOT_DEVICE_ID_2 := "c806310c-0e03-11f0-afd1-3f0b93d224c6"; - modulepar Json.String PX_IOT_DEVICE_SUPI_2 := ""; + modulepar Json.String PX_IOT_DEVICE_SUPI_2 := "000d0100f110f0ff00001000503055"; - modulepar Json.String PX_IOT_DEVICE_IMSI_2 := ""; + modulepar Json.String PX_IOT_DEVICE_IMSI_2 := "470040123456789"; modulepar Json.String PX_IOT_DEVICE_AUTH_2 := ""; - modulepar Json.String PX_IOT_DEVICE_ID_3 := ""; + modulepar Json.String PX_IOT_DEVICE_ID_3 := "cc9e276a-0e03-11f0-8184-b3b4628a9ed7"; - modulepar Json.String PX_IOT_DEVICE_SUPI_3 := ""; + modulepar Json.String PX_IOT_DEVICE_SUPI_3 := "000d0100f110f0ff00001000503056"; - modulepar Json.String PX_IOT_DEVICE_IMSI_3 := ""; + modulepar Json.String PX_IOT_DEVICE_IMSI_3 := "502130123456789"; modulepar Json.String PX_IOT_DEVICE_AUTH_3 := ""; - modulepar Json.String PX_IOT_DEVICE_ID_UNKNOWN := ""; + modulepar Json.String PX_IOT_DEVICE_ID_UNKNOWN := "IOT_DEVICE_ID_UNKNOWN"; - modulepar Json.String PX_IOT_ENDPOINT_URI_1 := ""; + modulepar Json.String PX_IOT_ENDPOINT_URI_1 := "http://www.example1.org"; - modulepar Json.String PX_IOT_ENDPOINT_URI_2 := ""; + modulepar Json.String PX_IOT_ENDPOINT_URI_2 := "http://www.example2.org"; - modulepar Json.String PX_IOT_ENDPOINT_URI_3 := ""; + modulepar Json.String PX_IOT_ENDPOINT_URI_3 := "http://www.example3.org"; - modulepar Json.String PX_REQUESTED_PLTF_ID := ""; + modulepar Json.String PX_REQUESTED_PLTF_ID := "8b1807a6-0dff-11f0-8bd0-e30e57baed12"; - modulepar Json.String PX_IOT_PLTF_ID_1 := ""; + modulepar Json.String PX_IOT_PLTF_ID_1 := "8b1807a6-0dff-11f0-8bd0-e30e57baed12"; - modulepar Json.String PX_IOT_PLTF_ID_2 := ""; + modulepar Json.String PX_IOT_PLTF_ID_2 := "942f71bc-0dff-11f0-a4b6-530955284a2c"; - modulepar Json.String PX_IOT_PLTF_ID_3 := ""; + modulepar Json.String PX_IOT_PLTF_ID_3 := "99d59790-0dff-11f0-aca2-d33261fd0cc1"; - modulepar Json.String PX_MB_TRANSPORTINFO_ID_1 := ""; + modulepar Json.String PX_MB_TRANSPORTINFO_ID_1 := "9f2bd66e-0dff-11f0-ae86-8b5374b85d18"; - modulepar Json.String PX_MB_TRANSPORTINFO_NAME_1 := ""; + modulepar Json.String PX_MB_TRANSPORTINFO_NAME_1 := "TranportInfo1"; modulepar EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType PX_MB_TRANSPORTINFO_TYPE_1 - := REST_HTTP; + := MB_TOPIC_BASED; - modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_1 := ""; + modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_1 := "MQTT"; - modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_1 := ""; + modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_1 := "3.1"; - modulepar Json.String PX_MB_TRANSPORTINFO_ID_2 := ""; + modulepar Json.String PX_MB_TRANSPORTINFO_ID_2 := "b9719a72-0dff-11f0-b0cc-f3e45e5b1f38"; - modulepar Json.String PX_MB_TRANSPORTINFO_NAME_2 := ""; + modulepar Json.String PX_MB_TRANSPORTINFO_NAME_2 := "TranportInfo2"; modulepar EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType PX_MB_TRANSPORTINFO_TYPE_2 - := REST_HTTP; + := MB_TOPIC_BASED; - modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_2 := ""; + modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_2 := "MQTT"; - modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_2 := ""; + modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_2 := "3.1"; - modulepar Json.String PX_MB_TRANSPORTINFO_ID_3 := ""; + modulepar Json.String PX_MB_TRANSPORTINFO_ID_3 := "de1bcb5e-0dff-11f0-ac6a-a3e46bfe4bb6"; - modulepar Json.String PX_MB_TRANSPORTINFO_NAME_3 := ""; + modulepar Json.String PX_MB_TRANSPORTINFO_NAME_3 := "TranportInfo3"; modulepar EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportType PX_MB_TRANSPORTINFO_TYPE_3 - := REST_HTTP; + := MB_TOPIC_BASED; - modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_3 := ""; + modulepar Json.String PX_MB_TRANSPORTINFO_PROTOCOL_3 := "MQTT"; - modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_3 := ""; + modulepar Json.String PX_MB_TRANSPORTINFO_VERSION_3 := "3.1"; - modulepar Json.String PX_IOT_PLTF_ID_UNKNOWN := ""; + modulepar Json.String PX_IOT_PLTF_ID_UNKNOWN := "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 index 12199bd8eec3167c4fea7dbbf299a4a4d85f10fd..91fcef071c10eb9ea899b2110009619b5cdf23a6 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_Templates.ttcn @@ -17,7 +17,7 @@ module IoTAPI_Templates { template (omit) DeviceInfo m_device_info( in Json.String p_deviceId, in Json.String p_deviceAuthenticationInfo, - in Json.Bool p_enabled := false, + in Json.Bool p_enabled := true, in template (omit) Json.String p_supi := omit, in template (omit) Json.String p_imsi := omit, in template (omit) Json.String p_requestedIotPlatformId := omit, @@ -90,7 +90,7 @@ module IoTAPI_Templates { 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 Json.Bool p_enabled := true, in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_customServicesTransportInfo := omit ) := { @@ -102,7 +102,7 @@ module IoTAPI_Templates { template (omit) IotPlatformInfo m_iot_platform_info_error( in Json.String p_iotPlatformId, - in Json.Bool p_enabled := false, + in Json.Bool p_enabled := true, in template (omit) EdgePlatformApplicationEnablementAPI_TypesAndValues.TransportInfoList p_customServicesTransportInfo := omit ) := { diff --git a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn index 20969c40a6718a96c94310a50faa0906343236e9..33c5ebcb4700b045f57d699abdca7631c3cf7b06 100644 --- a/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/IoTAPI/ttcn/IoTAPI_TypesAndValues.ttcn @@ -89,7 +89,7 @@ module IoTAPI_TypesAndValues { */ type record IotPlatformInfo { Json.String iotPlatformId, - MBTransportInfoList userTransportInfo optional, // optional on;ly for the 400 Bad Request TP + MBTransportInfoList userTransportInfo optional, // optional only for the 400 Bad Request TP TransportInfoList customServicesTransportInfo optional, Json.Bool enabled } // End of IotPlatformInfo @@ -118,6 +118,8 @@ module IoTAPI_TypesAndValues { EdgePlatformApplicationEnablementAPI_TypesAndValues.EndPointInfo endpoint, EdgePlatformApplicationEnablementAPI_TypesAndValues.SecurityInfo security, ImplSpecificInfo implSpecificInfo + } with { + variant (type_) "name as 'type'"; } // End of type MBTransportInfo type set of MBTransportInfo MBTransportInfoList; @@ -137,8 +139,6 @@ module IoTAPI_TypesAndValues { type set of Json.String UplinkTopics; type set of Json.String DownlinkTopics; - type set 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 diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn index 1a665cc9812ed4fc4a14613a0245c5ba1d69bc86..e1456c5aaa0a5ed4a2b1a7556b3f5fc3a53eae85 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn @@ -24,7 +24,7 @@ module LocationAPI_Templates { accessPointId := p_access_point_id, zoneId := p_zone_id, resourceURL := p_resource_url, - timestamp_ := p_timestamp, + timeStamp := p_timestamp, locationInfo := omit, civicInfo := omit, ancillaryInfo := omit, @@ -42,7 +42,7 @@ module LocationAPI_Templates { accessPointId := p_access_point_id, zoneId := p_zone_id, resourceURL := p_resource_url, - timestamp_ := p_timestamp, + timeStamp := p_timestamp, locationInfo := *, civicInfo := *, ancillaryInfo := *, @@ -84,7 +84,7 @@ module LocationAPI_Templates { offsetAngle := omit, includedAngle := omit, shape := p_shape, - timestamp_ := omit, + timeStamp := omit, velocity := omit } // End of template m_location_info @@ -106,7 +106,7 @@ module LocationAPI_Templates { offsetAngle := *, includedAngle := *, shape := p_shape, - timestamp_ := *, + timeStamp := *, velocity := * } // End of template mw_location_info @@ -907,13 +907,13 @@ module LocationAPI_Templates { template (value) TerminalDistance m_terminal_distance(in Json.Number p_distance) := { distance := p_distance, accuracy := omit, - timestamp_ := 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_ := * + timeStamp := * } // End of template mw_terminal_distance } // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn index e7f86e40a8e3399d686257fb58c451899fda1017..4e1ca47bc03f9f03ee23a8e160021c006c30e2c8 100644 --- a/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn @@ -20,7 +20,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.2.5 Type: UserList */ type record UserList { UserInfos user optional, @@ -32,7 +32,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.5.4 Type: WebsockNotifConfig */ type record WebsockNotifConfig { Json.AnyURI websocketUri optional, @@ -44,7 +44,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.5.5 Type: UserEventPara */ type record UserEventPara { Json.Bool reportingLocationReq optional, @@ -68,7 +68,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.5.6 Type: ReportingCtrl */ type record ReportingCtrl { Json.UInteger minimumInterval optional, @@ -81,7 +81,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.5.7 Type: AreaInfo */ type record AreaInfo { Shape shape, @@ -103,7 +103,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.5.8 Type: Point */ type record Point { Json.Number latitude, @@ -127,7 +127,7 @@ 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 V3.1.1 (2023-01) Clause 6.5.3 Type: LocationInfo + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.5.3 Type: LocationInfo */ type record LocationInfo { Latitude latitude, @@ -143,15 +143,13 @@ module LocationAPI_TypesAndValues { Json.UInteger offsetAngle optional, Json.UInteger includedAngle optional, Shape shape, - TimeStamp timestamp_ optional, + 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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Table 6.5.3-1: Definition of type LocationInfo */ type enumerated Shape { ELLIPSOID_ARC (1), @@ -167,7 +165,7 @@ module LocationAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Table 6.5.3-1: Definition of type LocationInfo */ type enumerated VelocityType { HORIZONTAL (1), @@ -189,7 +187,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Table 6.5.3-1: Definition of type LocationInfo */ type record Velocity { VelocityType velocityType, @@ -202,7 +200,7 @@ module LocationAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.6.1 accessPointId */ type Json.String AccessPointId; @@ -214,7 +212,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.2.1 Zonal presence data types */ type record ZoneInfo { ZoneId zoneId, @@ -230,7 +228,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.2.1 Zonal presence data types */ type record ZoneList { ZoneInfos zone optional, @@ -249,7 +247,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.2.1 Zonal presence data types */ type record AccessPointInfo { AccessPointId accessPointId, @@ -273,7 +271,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.2.1 Zonal presence data types */ type record AccessPointList { ZoneId zoneId, @@ -309,7 +307,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.7.5 Enumeration: ConnectionType */ type enumerated ConnectionType { LTE, @@ -449,20 +447,6 @@ module LocationAPI_TypesAndValues { */ 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 set of UserEventType UserEventCriteria; - /** * @desc Definition of type CivicAddress * @member country The two-letter ISO 3166 country code in capital ASCII letters @@ -540,27 +524,26 @@ module LocationAPI_TypesAndValues { * @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 The identity of the zone the user is currently within, - * @member timestamp Date and time that location was collected + * @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 V3.1.1 (2023-01) Clause 6.2.2 Type: UserInfo + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.2.2 Type: UserInfo */ type record UserInfo { Address address_, AccessPointId accessPointId, ZoneId zoneId, ResourceURL resourceURL optional, - TimeStamp timestamp_, + TimeStamp timeStamp , LocationInfo locationInfo optional, CivicAddress civicInfo optional, AncillaryInfo ancillaryInfo optional, RelativeLocationInfo relativeLocationInfo optional } with { variant (address_) "name as 'address'"; - variant (timestamp_) "name as 'timestamp'"; } // End of type UserInfo /** @@ -569,7 +552,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.2.3 */ type record RelativeLocationInfo { MapInfo mapInfo, @@ -583,7 +566,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.2.4 */ type record MapInfoOrigin { Json.Number latitude, @@ -596,7 +579,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.2.4 */ type record MapInfo { Json.String mapId, @@ -615,18 +598,16 @@ module LocationAPI_TypesAndValues { } /** - * @desc 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 + * @desc 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 * @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 + * @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 - } with { - variant (timestamp_) "name as 'timestamp'"; + TimeStamp timeStamp optional } /** @@ -651,7 +632,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.2.1A Terminal location data types */ type record TerminalLocation { Address address_, @@ -669,7 +650,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.2.1A Terminal location data types */ type record ServiceError { Json.String messageId, @@ -681,7 +662,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.3.3 Type: NotificationSubscriptionList */ type record Subscription { Json.AnyURI href optional, @@ -693,7 +674,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.3.3 Type: NotificationSubscriptionList */ type record NotificationSubscriptionList { Subscriptions subscription optional, @@ -712,7 +693,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.3.4 Type: UserLocationEventSubscription */ type record UserLocationEventSubscription { Json.String subscriptionType, @@ -741,7 +722,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.3.5 Type: UserLocationPeriodicSubscription */ type record UserLocationPeriodicSubscription{ Json.String subscriptionType, @@ -796,7 +777,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.3.6 Type: ZoneLocationEventSubscription */ type record ZoneLocationEventSubscription { Json.String subscriptionType, @@ -829,7 +810,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.3.7 Type: ZoneStatusSubscription */ type record ZoneStatusSubscription { Json.String subscriptionType, @@ -865,7 +846,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.3.8 Type: UserAreaSubscription */ type record UserAreaSubscription { Json.String subscriptionType, @@ -887,7 +868,7 @@ module LocationAPI_TypesAndValues { /** * @desc List of the users to be monitored - * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.3.8 Type: UserAreaSubscription + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.3.8 Type: UserAreaSubscription */ type set of Json.AnyURI AddressList; @@ -908,7 +889,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.3.9 Type: UserDistanceSubscription */ type record UserDistanceSubscription { Json.String subscriptionType, @@ -933,7 +914,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.4.3 Type: TestNotification */ type record TestNotification { Json.String notificationType, @@ -945,8 +926,8 @@ module LocationAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.4.3 Type: TestNotification + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.4.4 Type: UserLocationEventNotification */ type record LinksSubscription { LinkType subscription @@ -964,7 +945,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.4.4 Type: UserLocationEventNotification */ type record UserLocationEventNotification { Json.String notificationType, @@ -995,7 +976,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.4.5 Type: UserLocationPeriodicNotification */ type record UserLocationPeriodicNotification { Json.String notificationType, @@ -1022,7 +1003,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.4.6 Type: ZoneLocationEventNotification */ type record ZoneLocationEventNotification { Json.String notificationType, @@ -1045,7 +1026,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.4.7 Type: ZoneStatusNotification */ type record ZoneStatusNotification { Json.String notificationType, @@ -1078,7 +1059,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.4.8 Type: UserAreaNotification */ type record UserAreaNotification { Json.String notificationType, @@ -1101,7 +1082,7 @@ module LocationAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 013 V3.2.1 (2024-11) Clause 6.4.9 Type: UserDistanceNotification */ type record UserDistanceNotification { Json.String notificationType, diff --git a/ttcn/LibMec/QoSMeasurementAPI/module.mk b/ttcn/LibMec/QoSMeasurementAPI/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..a5da7e5d353bf7f540fc1e70ffefcc9f7192e71e --- /dev/null +++ b/ttcn/LibMec/QoSMeasurementAPI/module.mk @@ -0,0 +1,6 @@ +sources := \ + ttcn/QoSMeasurementAPI_Pics.ttcn \ + ttcn/QoSMeasurementAPI_Pixits.ttcn \ + ttcn/QoSMeasurementAPI_Templates.ttcn \ + ttcn/QoSMeasurementAPI_Functions.ttcn \ + ttcn/QoSMeasurementAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_Functions.ttcn b/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_Functions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6552b50f6e7a2280a22e914fae26232287df84f7 --- /dev/null +++ b/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_Functions.ttcn @@ -0,0 +1,201 @@ +module QoSMeasurementAPI_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/QoSMeasurementAPI + import from QoSMeasurementAPI_TypesAndValues all; + import from QoSMeasurementAPI_Templates all; + import from QoSMeasurementAPI_Pics all; + import from QoSMeasurementAPI_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; + + function f_create_qos_measure_subscription( + out QoSMeasureSubscription p_qos_measure_subscription, + out charstring p_subscription_id, + in template (omit) boolean p_test_notification := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) 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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_measure_subscription( + m_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_info( + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + )) + }, + -, -, -, -, + p_test_notification, + -, + p_expiryDeadline + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_qos_measure_subscription( + mw_qos_measure_subscription( + {LATENCY, JITTER, THROUGHPUT}, + PX_QOS_MEAS_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + 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_QOS_API_LIST_SUBS & "/(?*)", + 0 + ); + p_qos_measure_subscription := v_response.response.body.json_body.qos_measure_subscription; + log("f_create_qos_measure_subscription: INFO: IUT successfully responds to the subscription: ", p_qos_measure_subscription); + log("f_create_qos_measure_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_qos_measure_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_qos_measure_subscription + + function f_create_qos_event_subscription( + out QoSEventSubscription p_qos_event_subscription, + out charstring p_subscription_id, + in template (omit) boolean p_test_notification := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) 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_QOS_API_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_qos_event_subscription( + m_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + -, + { PX_USER }, + { + m_flow_filter( + PX_SOURCE_IP, + {PX_SOURCE_PORT} + ) + }, + { + m_report_trigger( + JITTER + ) + }, + -, -, -, + p_test_notification, + -, + p_expiryDeadline + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_qos_event_subscription( + mw_qos_event_subscription( + PX_QOS_EVENT_SUB_CALLBACK_URI, + PX_MEASURING_PERIOD, + 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_QOS_API_LIST_SUBS & "/(?*)", + 0 + ); + p_qos_event_subscription := v_response.response.body.json_body.qos_event_subscription; + log("f_create_qos_event_subscription: INFO: IUT successfully responds to the subscription: ", p_qos_event_subscription); + log("f_create_qos_event_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_qos_event_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_qos_event_subscription + + function f_delete_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_QOS_API_LIST_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_qos_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_qos_subscription + +} // End of module QoSMeasurementAPI_Functions diff --git a/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_Pics.ttcn b/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_Pics.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..81d66947982aba4d22eacdb7a3d57f40132d80e2 --- /dev/null +++ b/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_Pics.ttcn @@ -0,0 +1,8 @@ +module QoSMeasurementAPI_Pics { + + /** + * @desc Does the IUT support MEC QoS Measurment API? + */ + modulepar boolean PICS_QOS_API_SUPPORTED := true; + +} // End of module QoSMeasurementAPI_Pics diff --git a/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_Pixits.ttcn b/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_Pixits.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3ea8ed1da1823c5564fac897553cd1f4bb084cc1 --- /dev/null +++ b/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_Pixits.ttcn @@ -0,0 +1,47 @@ +module QoSMeasurementAPI_Pixits { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/QoSMeasurementAPI + import from QoSMeasurementAPI_TypesAndValues all; + + // LibMec + import from LibMec_TypesAndValues all; + + modulepar Json.String PX_UNKNOWN_SUBSCRIPTION_ID := "UnknownSubId"; + + modulepar Json.String PX_UNKNOWN_SUBSCRIPTION_TYPE := "UnknownSubType"; + + modulepar Json.AnyURI PX_QOS_MEAS_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; + + modulepar Json.AnyURI PX_QOS_EVENT_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; + + modulepar Json.String PX_USER := "10.100.0.1"; + + modulepar Json.String PX_SOURCE_IP := "10.100.0.20"; + + modulepar Json.UInteger PX_SOURCE_PORT := 12345; + + modulepar Json.UInteger PX_MEASURING_PERIOD := 30; + + modulepar Json.UInteger PX_NUMBER_OF_REPORTS := 10; + + modulepar Json.UInteger PX_REPORTING_INTERVAL := 30; + + modulepar Json.AnyURI PX_QOS_MEAS_SUB_WEB_SOCKET := "ws://clientApp.example.com/location_notifications/123456"; + + modulepar Json.String PX_ACCESS_POINT_ID := "5g-small-cell-2"; + + modulepar Json.String PX_ZONE_ID := "zone01"; + + modulepar TimeStamp PX_EXPIRY_DEADLINE := { seconds := 30, nanoSeconds := 0 }; + + modulepar Json.UInteger PX_JITTER_THRESHOLD_HIGH := 10; + + modulepar Json.UInteger PX_JITTER_THRESHOLD_LOW := 5; + +} // End of module QoSMeasurementAPI_Pixits diff --git a/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_Templates.ttcn b/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_Templates.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6de18bfa0c8d07269c42ed2e76ebc8b25a40dfd9 --- /dev/null +++ b/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_Templates.ttcn @@ -0,0 +1,519 @@ +module QoSMeasurementAPI_Templates { + + // JSON + import from Json all; + + // LibMec + import from LibMec_TypesAndValues all; + + // Lib QoSMeasurementAPI + import from QoSMeasurementAPI_TypesAndValues all; + + template (omit) NotificationSubscriptionList m_notification_subscription_list( + in template (value) LinkType 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) LinkType p_resourceURL := ?, + template Subscriptions p_subscription := * + ) := { + subscription := p_subscription, + resourceURL := p_resourceURL + } // End of template mw_notification_subscription_list + + template (omit) QoSMeasureSubscription m_qos_measure_subscription( + in MetricTypes p_metricType, + in template (omit) Json.AnyURI p_callbackReference, + in Json.UInteger p_measuringPeriod, + in template (omit) Links p_links := omit, + in template (omit) Users p_users := omit, + in template (omit) FlowInfos p_flowInfo := omit, + in template (omit) Json.UInteger p_numberOfReports := omit, + in template (omit) Json.UInteger p_reportingInterval := omit, + in template (omit) MeasuringAreas p_measuringArea := omit, + in template (omit) MeasuringTimes p_measuringTime := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "QoSMeasureSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + users := p_users, + flowInfo := p_flowInfo, + numberOfReports := p_numberOfReports, + reportingInterval := p_reportingInterval, + measuringPeriod := p_measuringPeriod, + measuringArea := p_measuringArea, + measuringTime := p_measuringTime, + metricType := p_metricType, + expiryDeadline := p_expiryDeadline + } // End of template m_qos_measure_subscription + + template (omit) QoSMeasureSubscription m_qos_measure_subscription_wrong( + in MetricTypes p_metricType, + in template (omit) Json.AnyURI p_callbackReference, + in Json.UInteger p_measuringPeriod, + in template (omit) Links p_links := omit, + in template (omit) Users p_users := omit, + in template (omit) FlowInfos p_flowInfo := omit, + in template (omit) Json.UInteger p_numberOfReports := omit, + in template (omit) Json.UInteger p_reportingInterval := omit, + in template (omit) MeasuringAreas p_measuringArea := omit, + in template (omit) MeasuringTimes p_measuringTime := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) modifies m_qos_measure_subscription := { + subscriptionType := "QoSMeasureSub" + } // End of template m_qos_measure_subscription_wrong + + template (present) QoSMeasureSubscription mw_qos_measure_subscription( + template (present) MetricTypes p_metricType := ?, + template (present) Json.AnyURI p_callbackReference := ?, + template (present) Json.UInteger p_measuringPeriod := ?, + template Links p_links := *, + template Users p_users := *, + template FlowInfos p_flowInfo := *, + template Json.UInteger p_numberOfReports := *, + template Json.UInteger p_reportingInterval := *, + template MeasuringAreas p_measuringArea := *, + template MeasuringTimes p_measuringTime := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "QoSMeasureSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + users := p_users, + flowInfo := p_flowInfo, + numberOfReports := p_numberOfReports, + reportingInterval := p_reportingInterval, + measuringPeriod := p_measuringPeriod, + measuringArea := p_measuringArea, + measuringTime := p_measuringTime, + metricType := p_metricType, + expiryDeadline := p_expiryDeadline + } // End of template mw_qos_measure_subscription + + template (omit) FlowInfo m_flow_info( + in template (value) FlowFilter p_flowFilter, + in template (omit) Json.UInteger p_samplingRate := omit + ) := { + samplingRate := p_samplingRate, + flowFilter := p_flowFilter + } // End of template m_flow_info + + template (present) FlowInfo mw_flow_info( + template (present) FlowFilter p_flowFilter := ?, + template Json.UInteger p_samplingRate := * + ) := { + samplingRate := p_samplingRate, + flowFilter := p_flowFilter + } // End of template mw_flow_info + + template (omit) FlowFilter m_flow_filter( + in template (omit) Json.String p_sourceIp := omit, + in template (omit) Ports p_sourcePort := omit, + in template (omit) Json.String p_dstIp := omit, + in template (omit) Ports p_dstPort := omit, + in template (omit) Json.UInteger p_protocol := omit, + in template (omit) Json.UInteger p_dscp := omit, + in template (omit) Json.UInteger 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 FlowFilter mw_flow_filter( + template Json.String p_sourceIp := *, + template Ports p_sourcePort := *, + template Json.String p_dstIp := *, + template Ports p_dstPort := *, + template Json.UInteger p_protocol := *, + template Json.UInteger p_dscp := *, + template Json.UInteger p_flowlabel := * + ) := { + 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 (omit) MeasuringArea m_measuring_area( + in template (omit) AreaInfo p_areaInfo := omit, + in template (omit) Json.String p_accessPointId := omit, + in template (omit) Json.String p_zoneId := omit + ) := { + areaInfo := p_areaInfo, + accessPointId := p_accessPointId, + zoneId := p_zoneId + } // End of template m_measuring_area + + template MeasuringArea mw_measuring_area( + template AreaInfo p_areaInfo := *, + template Json.String p_accessPointId := *, + template Json.String p_zoneId := * + ) := { + areaInfo := p_areaInfo, + accessPointId := p_accessPointId, + zoneId := p_zoneId + } // End of template mw_measuring_area + + template (value) MeasuringTime m_measuring_time( + in Json.String p_startTime, + in Json.String p_endTime + ) := { + startTime := p_startTime, + endTime := p_endTime + } // End of template m_measuring_time + + template (present) MeasuringTime mw_measuring_time( + template (present) Json.String p_startTime := ?, + template (present) Json.String p_endTime := ? + ) := { + startTime := p_startTime, + endTime := p_endTime + } // End of template mw_measuring_time + + template (omit) QoSEventSubscription m_qos_event_subscription( + in template (omit) Json.AnyURI p_callbackReference, + in Json.UInteger p_measuringPeriod, + in template (omit) Links p_links := omit, + in template (omit) Users p_users := omit, + in template (omit) FlowFilters p_flowFilter := omit, + in template (omit) ReportTriggers p_reportTrigger := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) MonitoringAreas p_monitoringArea := omit, + in template (omit) MonitoringTimes p_monitoringTime := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "QoSEventSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + users := p_users, + flowFilter := p_flowFilter, + reportTrigger := p_reportTrigger, + reportingCtrl := p_reportingCtrl, + measuringPeriod := p_measuringPeriod, + monitoringArea := p_monitoringArea, + monitoringTime := p_monitoringTime, + expiryDeadline := p_expiryDeadline + } // End of template m_qos_event_subscription + + template (omit) QoSEventSubscription m_qos_event_subscription_wrong( + in template (omit) Json.AnyURI p_callbackReference, + in Json.UInteger p_measuringPeriod, + in template (omit) Links p_links := omit, + in template (omit) Users p_users := omit, + in template (omit) FlowFilters p_flowFilter := omit, + in template (omit) ReportTriggers p_reportTrigger := omit, + in template (omit) ReportingCtrl p_reportingCtrl := omit, + in template (omit) MonitoringAreas p_monitoringArea := omit, + in template (omit) MonitoringTimes p_monitoringTime := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) modifies m_qos_event_subscription := { + subscriptionType := "QoSEventSub" + } // End of template m_qos_event_subscription_wrong + + template (present) QoSEventSubscription mw_qos_event_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template (present) Json.UInteger p_measuringPeriod := ?, + template Links p_links := *, + template Users p_users := *, + template FlowFilters p_flowFilter := *, + template ReportTriggers p_reportTrigger := *, + template ReportingCtrl p_reportingCtrl := *, + template MonitoringAreas p_monitoringArea := *, + template MonitoringTimes p_monitoringTime := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "QoSEventSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + users := p_users, + flowFilter := p_flowFilter, + reportTrigger := p_reportTrigger, + reportingCtrl := p_reportingCtrl, + measuringPeriod := p_measuringPeriod, + monitoringArea := p_monitoringArea, + monitoringTime := p_monitoringTime, + expiryDeadline := p_expiryDeadline + } // End of template mw_q_s_event_subscription + + template (omit) ReportTrigger m_report_trigger( + in template (value) MetricType p_metricType, + in template (omit) Json.UInteger p_upperThreshold := omit, + in template (omit) Json.UInteger p_lowerThreshold := omit + ) := { + metricType := p_metricType, + upperThreshold := p_upperThreshold, + lowerThreshold := p_lowerThreshold + } // End of template m_report_trigger + + template (present) ReportTrigger mw_report_trigger( + template (present) MetricType p_metricType := ?, + template Json.UInteger p_upperThreshold := *, + template Json.UInteger p_lowerThreshold := * + ) := { + metricType := p_metricType, + upperThreshold := p_upperThreshold, + lowerThreshold := p_lowerThreshold + } // End of template mw_report_trigger + + template (omit) MonitoringArea m_monitoring_area( + in template (omit) AreaInfo p_areaInfo := omit, + in template (omit) Json.String p_accessPointId := omit, + in template (omit) Json.String p_zoneId := omit + ) := { + areaInfo := p_areaInfo, + accessPointId := p_accessPointId, + zoneId := p_zoneId + } // End of template m_monitoring_area + + template MonitoringArea mw_monitoring_area( + template AreaInfo p_areaInfo := *, + template Json.String p_accessPointId := *, + template Json.String p_zoneId := * + ) := { + areaInfo := p_areaInfo, + accessPointId := p_accessPointId, + zoneId := p_zoneId + } // End of template mw_monitoring_area + + template (value) MonitoringTime m_monitoring_time( + in Json.String p_startTime, + in Json.String p_endTime + ) := { + startTime := p_startTime, + endTime := p_endTime + } // End of template m_monitoring_time + + template (present) MonitoringTime mw_monitoring_time( + template (present) Json.String p_startTime := ?, + template (present) Json.String p_endTime := ? + ) := { + startTime := p_startTime, + endTime := p_endTime + } // End of template mw_monitoring_time + + template (value) TestNotification m_test_notification( + in Json.String p_notificationType, + in template (value) Links p_links + ) := { + notificationType := p_notificationType, + links := p_links + } // End of template m_test_notification + + template (present) TestNotification mw_test_notification( + template (present) Json.String p_notificationType := ?, + template (present) Links p_links := ? + ) := { + notificationType := p_notificationType, + links := p_links + } // End of template mw_test_notification + + template (omit) QoSMeasureNotification m_qos_measure_notification( + in template (value) Links p_links, + in template (omit) SubscriptionState p_subscriptionState := omit, + in template (omit) QoSMeasureResults p_qoSMeasureResult := omit, + in template (omit) TimeStamp p_timeStamp := omit + ) := { + notificationType := "QoSMeasureNotification", + timeStamp := p_timeStamp, + subscriptionState := p_subscriptionState, + qoSMeasureResult := p_qoSMeasureResult, + links := p_links + } // End of template m_qos_measure_notification + + template (present) QoSMeasureNotification mw_qos_measure_notification( + template (present) Links p_links := ?, + template SubscriptionState p_subscriptionState := *, + template QoSMeasureResults p_qoSMeasureResult := *, + template TimeStamp p_timeStamp := * + ) := { + notificationType := "QoSMeasureNotification", + timeStamp := p_timeStamp, + subscriptionState := p_subscriptionState, + qoSMeasureResult := p_qoSMeasureResult, + links := p_links + } // End of template mw_qos_measure_notification + + template (omit) QoSMeasureResult m_qos_measure_result( + in template (value) FlowFilter p_flow, + in template (omit) Json.AnyURI p_user := omit, + in template (omit) MeasuringArea p_measuringArea := omit, + in template (omit) MeasuringTime p_measuringTime := omit, + in template (omit) Json.UInteger p_latency := omit, + in template (omit) Json.UInteger p_jitter := omit, + in template (omit) Json.UInteger p_throughput := omit, + in template (omit) Json.UInteger p_loss_rate := omit, + in template (omit) Json.UInteger p_error_rate := omit + ) := { + user := p_user, + flow := p_flow, + measuringArea := p_measuringArea, + measuringTime := p_measuringTime, + latency := p_latency, + jitter := p_jitter, + throughput := p_throughput, + loss_rate := p_loss_rate, + error_rate := p_error_rate + } // End of template m_qos_measure_result + + template (present) QoSMeasureResult mw_qos_measure_result( + template (present) FlowFilter p_flow := ?, + template Json.AnyURI p_user := *, + template MeasuringArea p_measuringArea := *, + template MeasuringTime p_measuringTime := *, + template Json.UInteger p_latency := *, + template Json.UInteger p_jitter := *, + template Json.UInteger p_throughput := *, + template Json.UInteger p_loss_rate := *, + template Json.UInteger p_error_rate := * + ) := { + user := p_user, + flow := p_flow, + measuringArea := p_measuringArea, + measuringTime := p_measuringTime, + latency := p_latency, + jitter := p_jitter, + throughput := p_throughput, + loss_rate := p_loss_rate, + error_rate := p_error_rate + } // End of template mw_qos_measure_result + + template (omit) QoSEventNotification m_qos_event_notification( + in template (value) Links p_links, + in template (value) FlowFilters p_flow, + in template (value) MetricType p_metricType, + in template (value) QoSEvent p_qosEvent, + in template (omit) SubscriptionState p_subscriptionState := omit, + in template (omit) Json.AnyURI p_user := omit, + in template (omit) MeasuringArea p_measuringArea := omit, + in template (omit) TimeStamp p_timeStamp := omit + ) := { + notificationType := "QoSEventNotification", + timeStamp := p_timeStamp, + subscriptionState := p_subscriptionState, + user := p_user, + flow := p_flow, + metricType := p_metricType, + qosEvent := p_qosEvent, + measuringArea := p_measuringArea, + links := p_links + } // End of template m_qos_event_notification + + template (present) QoSEventNotification mw_qos_event_notification( + template (present) Links p_links := ?, + template (present) FlowFilters p_flow := ?, + template (present) MetricType p_metricType := ?, + template (present) QoSEvent p_qosEvent := ?, + template SubscriptionState p_subscriptionState := *, + template Json.AnyURI p_user := *, + template MeasuringArea p_measuringArea := *, + template TimeStamp p_timeStamp := * + ) := { + notificationType := "QoSEventNotification", + timeStamp := p_timeStamp, + subscriptionState := p_subscriptionState, + user := p_user, + flow := p_flow, + metricType := p_metricType, + qosEvent := p_qosEvent, + measuringArea := p_measuringArea, + links := p_links + } // End of template mw_qos_event_notification + + template (value) Point m_point( + in Json.Number p_latitude, + in Json.Number p_longitude + ) := { + latitude := p_latitude, + longitude := p_longitude + } // End of template m_point + + template (present) Point mw_point( + template (present) Json.Number p_latitude := ?, + template (present) Json.Number p_longitude := ? + ) := { + latitude := p_latitude, + longitude := p_longitude + } // End of template mw_point + + template (omit) ReportingCtrl m_reporting_ctrl( + in template (omit) Json.UInteger p_minimumInterval := omit, + in template (omit) Json.UInteger p_maximumFrequency := omit, + in template (omit) Json.UInteger p_maximumCount := omit + ) := { + minimumInterval := p_minimumInterval, + maximumFrequency := p_maximumFrequency, + maximumCount := p_maximumCount + } // End of template m_reporting_ctrl + + template ReportingCtrl mw_reporting_ctrl( + template Json.UInteger p_minimumInterval := *, + template Json.UInteger p_maximumFrequency := *, + template Json.UInteger p_maximumCount := * + ) := { + minimumInterval := p_minimumInterval, + maximumFrequency := p_maximumFrequency, + maximumCount := p_maximumCount + } // End of template mw_reporting_ctrl + + 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 (value) Links m_links( + in template (value) LinkType p_subscription + ) :={ + subscription := p_subscription + } // End of template m_links + + template (present) Links mw_links( + template (present) LinkType p_subscription := ? + ) :={ + subscription := p_subscription + } // End of template mw_links + +} // End of module QoSMeasurementAPI_Templates diff --git a/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_TypesAndValues.ttcn b/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_TypesAndValues.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1c6c044827931b4528ada71d51c6127b59036334 --- /dev/null +++ b/ttcn/LibMec/QoSMeasurementAPI/ttcn/QoSMeasurementAPI_TypesAndValues.ttcn @@ -0,0 +1,388 @@ +module QoSMeasurementAPI_TypesAndValues { + + // JSON + import from Json all; + + // LibMec + import from LibMec_TypesAndValues all; + + /** + * @desc This type contains a list of subscriptions + * @param subscription The URI referring to the subscription + * @param resourceURL Self-referring URL + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.3.1-1: Definition of type NotificationSubscriptionList + */ + type record NotificationSubscriptionList { + Subscriptions subscription optional, + LinkType resourceURL + } + + /** + * @desc This type represents a subscription to the notifications from QMS about QoS measurement + * @param subscriptionType Shall be set to "QoSMeasureSubscription" + * @param callbackReference URI exposed by the client on which to receive notifications via HTTP + * @param requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @param websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @param _links Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests + * @param users Address of user (e.g. 'sip' URI, 'tel' URI, 'acr'URI) + * @param flowInfo The information of the measured flows + * @param numberOfReports If not present, the subscription is active until it is actively terminated via HTTP DELETE + * @param reportingInterval The reportingInterval determines the interval between two contiguous reports. + * @param measuringPeriod It determines measuring frequency. + * @param measuringArea Area constraint for the measuring task + * @param measuringTime Time constraint for the measuring task + * @param metricType The expected measuring result type + * @param expiryDeadline The expiration time of the subscription determined by the QoS Measurement Subscribe Service + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.3.2-1: Definition of type QoSMeasureSubscription + */ + type record QoSMeasureSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + Users users optional, + FlowInfos flowInfo optional, + Json.UInteger numberOfReports optional, + Json.UInteger reportingInterval optional, + Json.UInteger measuringPeriod, + MeasuringAreas measuringArea optional, + MeasuringTimes measuringTime optional, + MetricTypes metricType, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + type set of Json.AnyURI Users; + + /** + * @desc This type represents a subscription to the notifications from QMS about QoS measurement + * @param samplingRate he sampling rate determines the proportion of flows that meet the flowFilter to be measured + * @param flowFilter Traffic flow filtering criteria + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.3.2-1: Definition of type QoSMeasureSubscription + */ + type record FlowInfo { + Json.UInteger samplingRate optional, + FlowFilter flowFilter + } + type set of FlowInfo FlowInfos; + + /** + * @desc Traffic flow filtering criteria + * @param sourceIp Source address identity of measured flow + * @param sourcePort Source port identity of measured flow + * @param dstIp Destination address identity of measured flow + * @param dstPort Destination port identity of measured flow + * @param protocol Protocol number + * @param dscp DSCP in the IPv4 header or Traffic Class in the IPv6 header + * @param flowlabel Flow Label in the IPv6 header, applicable only if the flow is IPv6 + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.3.2-1: Definition of type QoSMeasureSubscription + */ + type record FlowFilter { + Json.String sourceIp optional, + Ports sourcePort optional, + Json.String dstIp optional, + Ports dstPort optional, + Json.UInteger protocol optional, + Json.UInteger dscp optional, + Json.UInteger flowlabel optional + } + type set of FlowFilter FlowFilters; + + /** + * @desc Area constraint for the measuring task. Traffic of users entering the area will be measured + * @param areaInfo It describes the measured area + * @param accessPointId The identity of the access point the user is currently on + * @param zoneId The identity of the zone the user is currently within + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.3.2-1: Definition of type QoSMeasureSubscription + */ + type record MeasuringArea { + AreaInfo areaInfo optional, + Json.String accessPointId optional, + Json.String zoneId optional + } + type set of MeasuringArea MeasuringAreas; + + /** + * @desc Time constraint for the measuring task + * @param startTime The format is a string representing the hour, and the minute in a day + * @param endTime The format is a string representing the hour, and the minute in a day + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.3.2-1: Definition of type QoSMeasureSubscription + */ + type record MeasuringTime { + Json.String startTime, + Json.String endTime + } + type set of MeasuringTime MeasuringTimes; + + /** + * @desc This type represents QoS measuring result type + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.6.3-1: Enumeration MetricType + */ + type enumerated MetricType { + LATENCY, + JITTER, + THROUGHPUT, + LOSS_RATE, + ERROR_RATE + } + type set of MetricType MetricTypes; + + /** + * @desc This type represents a subscription to the notifications from QMS about QoS events, e.g. some metrics regarding network performance has achieved the alarm threshold + * @param subscriptionType Shall be set to "QoSEventSubscription" + * @param callbackReference URI exposed by the client on which to receive notifications via HTTP + * @param requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @param websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @param links Hyperlink related to the resource + * @param flowFilter Traffic flow filtering criteria. If the flowFilter field is included, at least one of its subfields shall be included + * @param reportTrigger The trigger leading to the notification + * @param reportingCtrl Provides parameters that ctrl the reporting + * @param measuringPeriod It determines measuring frequency + * @param monitoringArea Area constraint for the monitoring task + * @param monitoringTime Time in a day for the monitoring task + * @param expiryDeadline The expiration time of the subscription determined by the QoS Measurement Subscribe Service + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.3.3-1: Definition of type QoSEventSubscription + */ + type record QoSEventSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + Users users optional, + FlowFilters flowFilter optional, + ReportTriggers reportTrigger optional, + ReportingCtrl reportingCtrl optional, + Json.UInteger measuringPeriod, + MonitoringAreas monitoringArea optional, + MonitoringTimes monitoringTime optional, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc The trigger leading to the notification + * @param metricType The monitoring metric type + * @param upperThreshold Threshold which if crossed upward shall cause a notification + * @param lowerThreshold Threshold which if crossed downward shall cause a notification + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.3.3-1: Definition of type QoSEventSubscription + */ + type record ReportTrigger { + MetricType metricType, + Json.UInteger upperThreshold optional, + Json.UInteger lowerThreshold optional + } + type record length (1 .. infinity) of ReportTrigger ReportTriggers; + + /** + * @desc Area constraint for the monitoring task + * @param areaInfo It describes the measured area + * @param accessPointId The identity of the access point the user is currently on + * @param zoneId The identity of the zone the user is currently within + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.3.3-1: Definition of type QoSEventSubscription + */ + type record MonitoringArea { + AreaInfo areaInfo optional, + Json.String accessPointId optional, + Json.String zoneId optional + } + type set of MonitoringArea MonitoringAreas; + + /** + * @desc Time in a day for the monitoring task + * @param startTime The format is a string representing the hour, and the minute in a day + * @param endTime The format is a string representing the hour, and the minute in a day + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.3.3-1: Definition of type QoSEventSubscription + */ + type record MonitoringTime { + Json.String startTime, + Json.String endTime + } + type set of MonitoringTime MonitoringTimes; + + /** + * @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 + * @member notificationType Shall be set to "TestNotification" + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.4.1-1: Attributes of the TestNotification + */ + type record TestNotification { + Json.String notificationType, + Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from QMS with regards to QoS measurement + * @member notificationType Shall be set to "QoSMeasureNotification" + * @member timeStamp Time stamp + * @member subscriptionState It shall be absent if the related subscription has no numberOfReports attribute, and shall be present otherwise + * @member qoSMeasureResult The QoS measuring result + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.4.2-1: Attributes of the QoSMeasureNotification + */ + type record QoSMeasureNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + SubscriptionState subscriptionState optional, + QoSMeasureResults qoSMeasureResult optional, + Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc It shall be absent if the related subscription has no numberOfReports attribute, and shall be present otherwise + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.4.2-1: Attributes of the QoSMeasureNotification + */ + type enumerated SubscriptionState { + ACTIVE, + FINISHED + } + + /** + * @desc The QoS measuring result + * @member user Address of user (e.g. 'sip' URI, 'tel' URI, 'acr' URI) + * @member flow Flow information + * @member measuringArea The area information for measurement reporting + * @member measuringTime The time section for measurement reporting + * @member latency The Unit is millisecond + * @member jitter The Unit is millisecond + * @member throughput The Unit is kbit/s + * @member loss_rate The integer represents percent + * @member error_rate The integer represents percent + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.4.2-1: Attributes of the QoSMeasureNotification + */ + type record QoSMeasureResult { + Json.AnyURI user optional, + FlowFilter flow, + MeasuringArea measuringArea optional, + MeasuringTime measuringTime optional, + Json.UInteger latency optional, + Json.UInteger jitter optional, + Json.UInteger throughput optional, + Json.UInteger loss_rate optional, + Json.UInteger error_rate optional + } + type set of QoSMeasureResult QoSMeasureResults; + + /** + * @desc This type represents a notification from QMS with regards to QoS event + * @member notificationType Shall be set to "QoSEventNotification"" + * @member timeStamp Time stamp + * @member subscriptionState It shall be absent if the related subscription has no numberOfReports attribute, and shall be present otherwise + * @member qoSMeasureResult The QoS measuring result + * @member links Object containing hyperlinks related to the resource + * @member flow Flow information + * @member metricType The monitoring metric type + * @member qosEvent The reporting event + * @member measuringArea The area information for event reporting + * @member + * @member + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.4.3-1: Attributes of the QoSEventNotification + */ + type record QoSEventNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + SubscriptionState subscriptionState optional, + Json.AnyURI user optional, + FlowFilters flow, + MetricType metricType, + QoSEvent qosEvent, + MeasuringArea measuringArea optional, + Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents the parameters that describe an area + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.6.4-1: Enumeration QoSEvent + */ + type enumerated AreaInfo { + CIRCLE, + POLYGON + } + + /** + * @desc This type represents the geographical location of a point + * @param latitude Location latitude, expressed in the range -90° to +90° + * @param longitude Location longitude, expressed in the range -180° to +180° + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.5.4-1: Attributes of type Point + */ + type record Point { + Json.Number latitude, + Json.Number longitude + } + + /** + * @desc This type represents the parameters that control the report times and frequency + * @param minimumInterval Location latitude, expressed in the range -90° to +90° + * @param maximumFrequency Maximum frequency (in seconds) of notifications per subscription + * @param maximumCount Maximum number of notifications + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.5.6-1: Attributes of type ReportingCtrl + */ + type record ReportingCtrl { + Json.UInteger minimumInterval optional, + Json.UInteger maximumFrequency optional, + Json.UInteger maximumCount optional + } + + /** + * @desc It shall be absent if the related subscription has no numberOfReports attribute, and shall be present otherwise + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.6.4-1: Enumeration QoSEvent + */ + type enumerated QoSEvent { + ABOVE_UPPER_THRESHOLD, + BELOW_LOWER_THRESHOLD + } + + /** + * @desc The service consumer's subscriptions + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 045 V3.1.1 (2024-03) 6.3.1 Type: NotificationSubscriptionList + */ + type record Subscription { + Json.AnyURI href, + Json.String subscriptionType + } + type set of Subscription Subscriptions; + + /** + * @desc This type represents a type of link + * @member href URI referring to a resource + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Clause 6.6.2 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc Hyperlink related to the resource + * @member subscription URI identifying the subscription for the test notification + * @see ETSI GS MEC 045 V3.1.1 (2024-03) Table 6.4.1-1: Attributes of the TestNotification + */ + type record Links { + LinkType subscription + } + + /** + * @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 045 V3.1.1 (2024-03) Clause 6.5.2 Type: WebsockNotifConfig + */ + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } + + type set of Json.UInteger Ports; + +} with { + encode "JSON" +} // End of module QoSMeasurementAPI_TypesAndValues diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn index 83d31c10e80c358f22dec3474de2d830292ab522..1ca9de5238c3419bff4bd2330d0451cefee90575 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn @@ -41,7 +41,7 @@ module RnisAPI_Templates { } // End of template mw_subscription_link_list_Link template (value) Subscription_ m_subscription( - in LinkType p_href, + in Json.AnyURI p_href, in Json.String p_subscriptionType ) := { href := p_href, @@ -49,7 +49,7 @@ module RnisAPI_Templates { } // End of temlate m_subscription template (present) Subscription_ mw_subscription( - template (present) LinkType p_href := ?, + template (present) Json.AnyURI p_href := ?, template (present) Json.String p_subscriptionType := ? ) := { href := p_href, diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn index 7a0834698a1953d6219cf184ca880c2108f3f8a1..cb444d9cff385b3a2d89a28f708d0b4a56b55869 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn @@ -626,7 +626,7 @@ module RnisAPI_TypesAndValues { * @see ETSI GS MEC 012 V2.2.1 (2022-02) Table 6.3.10-1: Attributes of the SubscriptionLinkList */ type record Subscription_ { - LinkType href, + Json.AnyURI href, Json.String subscriptionType } type set of Subscription_ Subscription; diff --git a/ttcn/LibMec/SelfServiceEnablementAPI/module.mk b/ttcn/LibMec/SelfServiceEnablementAPI/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..586b4c07641576299520ca8bb6b4f58d91f80087 --- /dev/null +++ b/ttcn/LibMec/SelfServiceEnablementAPI/module.mk @@ -0,0 +1,6 @@ +sources := \ + ttcn/SelfServiceEnablementAPI_Pics.ttcn \ + ttcn/SelfServiceEnablementAPI_Pixits.ttcn \ + ttcn/SelfServiceEnablementAPI_Templates.ttcn \ + ttcn/SelfServiceEnablementAPI_Functions.ttcn \ + ttcn/SelfServiceEnablementAPI_TypesAndValues.ttcn diff --git a/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_Functions.ttcn b/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_Functions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..659a0d5ffa0335478cc0f866958efbb3b28ff226 --- /dev/null +++ b/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_Functions.ttcn @@ -0,0 +1,583 @@ +module SelfServiceEnablementAPI_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_JsonMessageBodyTypes all; + import from LibHttp_Functions all; + import from LibHttp_Templates all; + import from LibHttp_JsonTemplates all; + import from LibHttp_TestSystem all; + + // LibMec/SelfServiceEnablementAPI + import from SelfServiceEnablementAPI_TypesAndValues all; + import from SelfServiceEnablementAPI_Templates all; + import from SelfServiceEnablementAPI_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; + + function f_create_tenant_info_list( + inout TenantInfoList p_tenant_info_list, + out charstring_list p_tenant_id_list + ) runs on HttpComponent { + log(">>> f_create_tenant_info_list: ", p_tenant_info_list); + var charstring v_tenant_id; + p_tenant_id_list := {}; + for (var integer i := 0; i < lengthof(p_tenant_info_list); i := i + 1) { + f_create_tenant_info(p_tenant_info_list[i], v_tenant_id); + if (lengthof(v_tenant_id) > 0) { + p_tenant_id_list := p_tenant_id_list & { v_tenant_id }; + } + } + } // End of function f_create_tenant_info_list + + function f_create_tenant_info( + inout TenantInfo p_tenant_info, + out charstring p_tenant_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + log(">>> f_create_tenant_info: ", p_tenant_info); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_CSE_TENANTS_INFO, + v_headers, + m_http_message_body_json( + m_body_json_cse_tenant_info( + m_tenant_info( + p_tenant_info.customerId, + p_tenant_info.customerName, + p_tenant_info.customerCategory, + omit, + p_tenant_info.tenantName + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_cse_tenant_info( + mw_tenant_info( + p_tenant_info.customerId, + p_tenant_info.customerName, + p_tenant_info.customerCategory, + ?, + p_tenant_info.tenantName + ) + ))))) -> value v_response { + tc_ac.stop; + + // Extract HTTP Location header + var charstring_list v_tenant_id; + f_get_header(v_response.response.header, "Location", v_tenant_id); + // Extract HTTP tenant id + if (ispresent(v_tenant_id) and lengthof(v_tenant_id) > 0) { + p_tenant_id := regexp( + v_tenant_id[0], + "?+" & PX_CSE_TENANTS_INFO & "/(?*)", + 0 + ); + + p_tenant_info := v_response.response.body.json_body.tenantInfo; + log("f_create_tenant_info: INFO: IUT successfully creates the Tenants: ", p_tenant_info); + } + } + [] tc_ac.timeout { + log("f_create_tenant_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_tenant_info + + function f_delete_tenant_info_list( + in TenantInfoList p_tenant_info_list + ) runs on HttpComponent { + for (var integer i := 0; i < lengthof(p_tenant_info_list); i := i + 1) { + if (ispresent(p_tenant_info_list[i].tenantId)) { + f_delete_tenant_info(p_tenant_info_list[i]); + } + } + } // End of function f_delete_tenant_info_list + + function f_delete_tenant_info( + in TenantInfo p_tenant_info + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + // Check if tenantId is present + if (not ispresent(p_tenant_info.tenantId)) { + log("f_delete_tenant_info: INCONC: tenantId not present, cannot delete."); + return; + } + + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & oct2char(unichar2oct(p_tenant_info.tenantId, "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_tenant_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_tenant_info + + function f_create_resource_quota_info( + inout ResourceQuotaInfo p_resource_quota_info, + in charstring p_tenant_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + log(">>> f_create_resource_quota_info: ", p_resource_quota_info); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & p_tenant_id & "/resources/quota_in_system", + v_headers, + m_http_message_body_json( + m_body_json_cse_resource_quota_info( + m_resource_quota_info( + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + ) + ))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_cse_resource_quota_info( + mw_resource_quota_info( + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + ) + ))))) -> value v_response { + tc_ac.stop; + + p_resource_quota_info := v_response.response.body.json_body.resourceQuotaInfo; + log("f_create_resource_quota_info: INFO: IUT successfully creates the resources: ", p_resource_quota_info); + } + [] tc_ac.timeout { + log("f_create_resource_quota_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_resource_quota_info + + function f_create_site_resource_quota_info_list( + inout SiteResourceQuotaInfoList p_site_resource_quota_info, + out charstring_list p_site_resource_quota_info_id_list, + in charstring p_tenant_id + ) runs on HttpComponent { + log(">>> f_create_site_resource_quota_info_list: ", p_site_resource_quota_info); + var charstring v_site_resource_quota_info_id; + p_site_resource_quota_info_id_list := {}; + for (var integer i := 0; i < lengthof(p_site_resource_quota_info); i := i + 1) { + f_create_site_resource_quota_info(p_site_resource_quota_info[i], -, p_tenant_id); + p_site_resource_quota_info_id_list := p_site_resource_quota_info_id_list & { v_site_resource_quota_info_id }; + } + } // End of function f_create_site_resource_quota_info_list + + function f_create_site_resource_quota_info( + inout SiteResourceQuotaInfo p_site_resource_quota_info, + out charstring v_site_id, + in charstring p_tenant_id + ) runs on HttpComponent { + var Headers v_headers; + var HttpMessage v_response; + + log(">>> f_create_site_resource_quota_info: ", p_site_resource_quota_info); + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_CSE_TENANTS_INFO & "/" & p_tenant_id & "/resources/quota_in_system", + v_headers, + m_http_message_body_json( + m_body_json_cse_site_resource_quota_info( + m_site_resource_quota_info( + PX_SITE_ID_1, + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + ) + ))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_cse_site_resource_quota_info( + mw_site_resource_quota_info( + PX_SITE_ID_1, + PX_CPU_QUOTA_1, + PX_MEMORY_QUOTA_1, + PX_DISK_QUOTA_1 + ) + ))))) -> value v_response { + tc_ac.stop; + p_site_resource_quota_info := v_response.response.body.json_body.siteResourceQuotaInfo; + + // Extract HTTP Location header + var charstring_list site_id; + f_get_header(v_response.response.header, "Location", site_id); + // Extract HTTP subssription id + v_site_id := regexp( + site_id[0], + "?+" & PX_CSE_TENANTS_INFO & "/" & p_tenant_id & "/(?*)", + 0 + ); + + log("f_create_site_resource_quota_info: INFO: IUT successfully creates the resources: ", p_site_resource_quota_info); + } + [] tc_ac.timeout { + log("f_create_site_resource_quota_info: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_site_resource_quota_info + + function f_create_resource_usage_subscription( + out ResourceUsageSubscription p_resource_usage_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_CSE_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_resource_usage_subscription( + m_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + omit, + PX_CSE_CUSTOMER_ID_1, + PX_CSE_TENANT_ID, + m_notification_trigger( + e_tt_ten, + 5, + true + ) + ) + ))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_resource_usage_subscription( + mw_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + -, + PX_CSE_CUSTOMER_ID_1, + ?, + ? + ) + ))))) -> 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 subscription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_CSE_LIST_SUBS & "/(?*)", + 0 + ); + p_resource_usage_subscription := v_response.response.body.json_body.resourceUsageSubscription; + log("f_create_resource_usage_subscription: INFO: IUT successfully responds to the subscription: ", p_resource_usage_subscription); + log("f_create_resource_usage_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_resource_usage_subscription: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_resource_usage_subscription + + function f_create_site_resource_usage_subscription( + out SiteResourceUsageSubscription p_site_resource_usage_subscription, + out charstring p_subscription_id, + out Links p_links + ) 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_CSE_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_site_resource_usage_subscription( + m_site_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + omit, + PX_CSE_CUSTOMER_ID_1, + PX_CSE_TENANT_ID, + { m_site_id(PX_CSE_SITE_ID_1), + m_site_id(PX_CSE_SITE_ID_2) }, + m_notification_trigger( + e_tt_ten, + 5, + true + ) + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_site_resource_usage_subscription( + mw_site_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + -, + PX_CSE_CUSTOMER_ID_1, + ? + ) + ))))) -> 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 subscription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_CSE_LIST_SUBS & "/(?*)", + 0 + ); + p_site_resource_usage_subscription := v_response.response.body.json_body.siteResourceUsageSubscription; + p_links := v_response.response.body.json_body.siteResourceUsageSubscription.links; + + log("f_create_site_resource_usage_subscription: INFO: IUT successfully responds to the subscription: ", p_site_resource_usage_subscription); + log("f_create_site_resource_usage_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_site_resource_usage_subscription: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_site_resource_usage_subscription + + function f_create_resource_usage_subscription_2( + out ResourceUsageSubscription p_resource_usage_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_CSE_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_resource_usage_subscription( + m_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + omit, + PX_CSE_CUSTOMER_ID_1, + PX_CSE_TENANT_ID, + m_notification_trigger ( + e_tt_ten, + 4, + false + ) + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_resource_usage_subscription( + mw_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + -, + PX_CSE_CUSTOMER_ID_1, + ? + ) + ))))) -> 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 subscription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_CSE_LIST_SUBS & "/(?*)", + 0 + ); + p_resource_usage_subscription := v_response.response.body.json_body.resourceUsageSubscription; + log("f_create_resource_usage_subscription_2: INFO: IUT successfully responds to the subscription: ", p_resource_usage_subscription); + log("f_create_resource_usage_subscription_2: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_resource_usage_subscription_2: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_resource_usage_subscription_2 + + function f_create_site_resource_usage_subscription_2( + out SiteResourceUsageSubscription p_site_resource_usage_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_CSE_LIST_SUBS, + v_headers, + m_http_message_body_json( + m_body_json_site_resource_usage_subscription( + m_site_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, omit, + omit, + PX_CSE_CUSTOMER_ID_1, + PX_CSE_TENANT_ID, + { m_site_id(PX_CSE_SITE_ID_1), + m_site_id(PX_CSE_SITE_ID_2) }, + m_notification_trigger ( + e_tt_ten, + 4, + false + ) + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_site_resource_usage_subscription( + mw_site_resource_usage_subscription( + PX_CSE_SUB_CALLBACK_URI, + true, + omit, + -, + PX_CSE_CUSTOMER_ID_1, + ?, + { mw_site_id(PX_CSE_SITE_ID_1), + mw_site_id(PX_CSE_SITE_ID_2) }, + mw_notification_trigger ( + e_tt_ten, + 4, + false + ) + ) + ))))) -> 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 subscription id + p_subscription_id := regexp( + v_subscription_id[0], + "?+" & PX_CSE_LIST_SUBS & "/(?*)", + 0 + ); + p_site_resource_usage_subscription := v_response.response.body.json_body.siteResourceUsageSubscription; + log("f_create_site_resource_usage_subscription_2: INFO: IUT successfully responds to the subscription: ", p_site_resource_usage_subscription); + log("f_create_site_resource_usage_subscription_2: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_site_resource_usage_subscription_2: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_site_resource_usage_subscription + + function f_delete_cse_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_CSE_LIST_SUBS & "/" & p_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + log("f_delete_cse_subscription: INFO: Subscription successfully deleted: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_delete_cse_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_cse_subscription + +} // End of module SelfServiceEnablementAPI_Functions diff --git a/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_Pics.ttcn b/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_Pics.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e663e98bbc492666e1bdc4ae32f56e1fb6fa86d0 --- /dev/null +++ b/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_Pics.ttcn @@ -0,0 +1,8 @@ +module SelfServiceEnablementAPI_Pics { + + /** + * @desc Does the IUT support CSE API? + */ + modulepar boolean PICS_CSE_API_SUPPORTED := true; + +} // End of module SelfServiceEnablementAPI_Pics diff --git a/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_Pixits.ttcn b/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_Pixits.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e585010d7f2bdb46e3f205311680cd9b9014f655 --- /dev/null +++ b/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_Pixits.ttcn @@ -0,0 +1,76 @@ +module SelfServiceEnablementAPI_Pixits { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/SelfServiceEnablementAPI + import from SelfServiceEnablementAPI_TypesAndValues all; + + modulepar Json.String PX_CSE_CUSTOMER_ID_1 := "customer01" + + modulepar Json.String PX_CSE_CUSTOMER_NAME_1 := "customerName"; + + modulepar Json.String PX_CSE_TENANT_ID := ""; + + modulepar Json.String PX_CSE_TENANT_NAME_1 := "tenantX"; + + modulepar Json.String PX_CSE_CUSTOMER_ID_2 := "customer02" + + modulepar Json.String PX_CSE_CUSTOMER_NAME_2 := "customerName02"; + + modulepar Json.String PX_CSE_TENANT_NAME_2 := "tenantY"; + + modulepar Json.String PX_CSE_CUSTOMER_ID_3 := "customer03" + + modulepar Json.String PX_CSE_CUSTOMER_NAME_3 := "customerName03"; + + modulepar Json.String PX_CSE_TENANT_NAME_3 := "tenantName03"; + + modulepar Json.String PX_CSE_SITE_ID_1 := "site-001"; + + modulepar Json.String PX_CSE_SITE_ID_2 := "site-002"; + + modulepar Json.String PX_NON_EXISTENT_TENANT_ID := "9344"; + + modulepar Json.String PX_NEW_CUSTOMER_ID := ""; + + modulepar Json.String PX_NEW_CUSTOMER_NAME := "newCustomer"; + + modulepar Json.String PX_NEW_TENANT_NAME := "newTenat"; + + modulepar Json.String PX_SITE_ID_1 := "209153c9-0c28-428f-930f-d61328c30ffd"; + + modulepar Json.String PX_SITE_ID_2 := "77e093bc-830c-4bcc-9ad8-6c3eff048335"; + + modulepar Json.String PX_SITE_ID_3 := "7d6b6123-b3b7-413e-ae73-b8bb349bda46"; + + modulepar Json.Integer PX_CPU_QUOTA_1 := 4; + + modulepar Json.Integer PX_MEMORY_QUOTA_1 := 2048; + + modulepar Json.Integer PX_DISK_QUOTA_1 := 50; + + modulepar Json.Integer PX_CPU_QUOTA_2 := 4; + + modulepar Json.Integer PX_MEMORY_QUOTA_2 := 2048; + + modulepar Json.Integer PX_DISK_QUOTA_2 := 50; + + modulepar Json.Integer PX_CPU_QUOTA_3 := 4; + + modulepar Json.Integer PX_MEMORY_QUOTA_3 := 2048; + + modulepar Json.Integer PX_DISK_QUOTA_3 := 50; + + modulepar Json.String PX_NON_EXISTENT_SITE_ID := "9344"; + + modulepar Json.AnyURI PX_CSE_SUB_CALLBACK_URI := "http://127.0.0.1/callback"; + + modulepar Json.String PX_UNKNOWN_SUBSCRIPTION_ID := "0787"; + + modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"; + +} // End of module SelfServiceEnablementAPI_Pixits diff --git a/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_Templates.ttcn b/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_Templates.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a0421e515cdfd1feb81b4eaf377c83758753e886 --- /dev/null +++ b/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_Templates.ttcn @@ -0,0 +1,482 @@ +module SelfServiceEnablementAPI_Templates { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec + import from LibMec_TypesAndValues all; + + // Lib/SelfServiceEnablementAPI + import from SelfServiceEnablementAPI_TypesAndValues all; + + template (omit) TenantInfo m_tenant_info( + in Json.String p_customerId, + in Json.String p_customerName, + in template (omit) Json.String p_customerCategory, + in template (omit) Json.String p_tenantId, + in Json.String p_tenantName, + in template (omit) ResourceInfo p_resourceUseInfo := omit, + in template (omit) SiteInfoList p_siteList := omit + ) := { + customerId := p_customerId, + customerName := p_customerName, + customerCategory := p_customerCategory, + tenantId := p_tenantId, + tenantName := p_tenantName, + resourceUseInfo := p_resourceUseInfo, + siteList := p_siteList + } // End of template m_tenant_info + + template (present) TenantInfo mw_tenant_info( + template (present) Json.String p_customerId := ?, + template (present) Json.String p_customerName := ?, + template Json.String p_customerCategory := *, + template Json.String p_tenantId := *, + template (present) Json.String p_tenantName := ?, + template ResourceInfo p_resourceUseInfo := *, + template SiteInfoList p_siteList := * + ) := { + customerId := p_customerId, + customerName := p_customerName, + customerCategory := p_customerCategory, + tenantId := p_tenantId, + tenantName := p_tenantName, + resourceUseInfo := p_resourceUseInfo, + siteList := p_siteList + } // End of template mw_tenant_info + + template (omit) ResourceQuotaInfo m_resource_quota_info( + in template (omit) Json.Integer p_cpuQuota, + in template (omit) Json.Integer p_memoryQuota, + in template (omit) Json.Integer p_diskQuota + ) := { + cpuQuota := p_cpuQuota, + memoryQuota := p_memoryQuota, + diskQuota := p_diskQuota + } // End of template m_resource_quota_info + + template (present) ResourceQuotaInfo mw_resource_quota_info( + template Json.Integer p_cpuQuota := *, + template Json.Integer p_memoryQuota := *, + template Json.Integer p_diskQuota := * + ) := { + cpuQuota := p_cpuQuota, + memoryQuota := p_memoryQuota, + diskQuota := p_diskQuota + } // End of template mw_resource_quota_info + + template (omit) SiteResourceQuotaInfo m_site_resource_quota_info( + in Json.String p_siteId, + in template (omit) Json.Integer p_cpuQuota := omit, + in template (omit) Json.Integer p_memoryQuota :=omit, + in template (omit) Json.Integer p_diskQuota := omit + ) := { + siteId := p_siteId, + cpuQuota := p_cpuQuota, + memoryQuota := p_memoryQuota, + diskQuota := p_diskQuota + } // End of template m_site_resource_quota_info + + template (present) SiteResourceQuotaInfo mw_site_resource_quota_info( + template (present) Json.String p_siteId := ?, + template Json.Integer p_cpuQuota := *, + template Json.Integer p_memoryQuota := *, + template Json.Integer p_diskQuota := * + ) := { + siteId := p_siteId, + cpuQuota := p_cpuQuota, + memoryQuota := p_memoryQuota, + diskQuota := p_diskQuota + } // End of template mw_site_resource_quota_info + + template (omit) ResourceUsageSubscription m_resource_usage_subscription( + in template (omit) Json.AnyURI p_callbackReference, + in template (omit) Json.Bool p_requestTestNotification, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, + in Json.String p_customerId, + in Json.String p_tenantId, + in template (value) NotificationTrigger p_notificationTrigger, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "ResourceUsageSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + customerId := p_customerId, + tenantId := p_tenantId, + notificationTrigger := p_notificationTrigger, + expiryDeadline := p_expiryDeadline + } // End of template m_resource_usage_subscription + + template (present) ResourceUsageSubscription mw_resource_usage_subscription( + template Json.AnyURI p_callbackReference := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template Links p_links := *, + template (present) Json.String p_customerId := ?, + template (present) Json.String p_tenantId := ?, + template (present) NotificationTrigger p_notificationTrigger := ?, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "ResourceUsageSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + customerId := p_customerId, + tenantId := p_tenantId, + notificationTrigger := p_notificationTrigger, + expiryDeadline := p_expiryDeadline + } // End of template mw_resource_usage_subscription + + template (value) NotificationTrigger m_notification_trigger( + in template (value) TriggerType p_triggerType, + in Json.UInt8 p_threshold, + in Json.Bool p_greaterOrLess + ) := { + triggerType := p_triggerType, + threshold := p_threshold, + greaterOrLess := p_greaterOrLess + } // End of template m_notification_trigger + + template (present) NotificationTrigger mw_notification_trigger( + template (present) TriggerType p_triggerType := ?, + template (present) Json.UInt8 p_threshold := ?, + template (present) Json.Bool p_greaterOrLess := ? + ) := { + triggerType := p_triggerType, + threshold := p_threshold, + greaterOrLess := p_greaterOrLess + } // End of template mw_notification_trigger + + template (omit) SiteResourceUsageSubscription m_site_resource_usage_subscription( + in template (omit) Json.AnyURI p_callbackReference, + in template (omit) Json.Bool p_requestTestNotification, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, + in Json.String p_customerId, + in Json.String p_tenantId, + in template (value) SiteIdList p_siteList, + in template (value) NotificationTrigger p_notificationTrigger, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "SiteResourceUsageSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + customerId := p_customerId, + tenantId := p_tenantId, + siteList := p_siteList, + notificationTrigger := p_notificationTrigger, + expiryDeadline := p_expiryDeadline + } // End of template m_site_resource_usage_subscription + + template (present) SiteResourceUsageSubscription mw_site_resource_usage_subscription( + template Json.AnyURI p_callbackReference := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template Links p_links := *, + template (present) Json.String p_customerId := ?, + template (present) Json.String p_tenantId := ?, + template (present) SiteIdList p_siteList := ?, + template (present) NotificationTrigger p_notificationTrigger := ?, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "SiteResourceUsageSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + customerId := p_customerId, + tenantId := p_tenantId, + siteList := p_siteList, + notificationTrigger := p_notificationTrigger, + expiryDeadline := p_expiryDeadline + } // End of template mw_site_resource_usage_subscription + + template (value) SubscriptionLinkList m_subscription_link_list( + in template (value) LinksSub p_links + ) := { + links := p_links + } // End of template m_subscription_link_list + + template (present) SubscriptionLinkList mw_subscription_link_list( + template (present) LinksSub p_links := ? + ) := { + links := p_links + } // End of template mw_subscription_link_list + + template (omit) ResourceUsageNotification m_resource_usage_notification( + in template (omit) TimeStamp p_timeStamp := omit, + in Json.String p_customerId, + in Json.String p_tenantId, + in template (value) ResourceUseInfo p_resourceUseInfo + ) := { + notificationType := "ResourceUsageNotification", + timeStamp := p_timeStamp, + customerId := p_customerId, + tenantId := p_tenantId, + resourceUseInfo := p_resourceUseInfo + } // End of template m_resource_usage_notification + + template (present) ResourceUsageNotification mw_resource_usage_notification( + template TimeStamp p_timeStamp := *, + template (present) Json.String p_customerId := ?, + template (present) Json.String p_tenantId := ?, + template (present) ResourceUseInfo p_resourceUseInfo := ? + ) := { + notificationType := "ResourceUsageNotification", + timeStamp := p_timeStamp, + customerId := p_customerId, + tenantId := p_tenantId, + resourceUseInfo := p_resourceUseInfo + } // End of template mw_resource_usage_notification + + template (omit) ResourceUseInfo m_resource_use_info( + in template (omit) Json.Integer p_cpuUsed, + in template (omit) Json.Integer p_cpuRemain, + in template (omit) Json.Integer p_memoryUsed, + in template (omit) Json.Integer p_memoryRemain, + in template (omit) Json.Integer p_diskUsed, + in template (omit) Json.Integer p_diskRemain + ) := { + cpuUsed := p_cpuUsed, + cpuRemain := p_cpuRemain, + memoryUsed := p_memoryUsed, + memoryRemain := p_memoryRemain, + diskUsed := p_diskUsed, + diskRemain := p_diskRemain + } // End of template m_resource_use_info + + template ResourceUseInfo mw_resource_use_info( + template Json.Integer p_cpuUsed := *, + template Json.Integer p_cpuRemain := *, + template Json.Integer p_memoryUsed := *, + template Json.Integer p_memoryRemain := *, + template Json.Integer p_diskUsed := *, + template Json.Integer p_diskRemain := * + ) := { + cpuUsed := p_cpuUsed, + cpuRemain := p_cpuRemain, + memoryUsed := p_memoryUsed, + memoryRemain := p_memoryRemain, + diskUsed := p_diskUsed, + diskRemain := p_diskRemain + } // End of template mw_resource_use_info + + template (omit) SiteResourceUsageNotification m_site_resource_usage_notification( + in template (omit) TimeStamp p_timeStamp := omit, + in Json.String p_customerId, + in Json.String p_tenantId, + in template (value) SiteResourceUseInfo p_siteResourceUseInfo + ) := { + notificationType := "SiteResourceUsageNotification", + timeStamp := p_timeStamp, + customerId := p_customerId, + tenantId := p_tenantId, + siteResourceUseInfo := p_siteResourceUseInfo + } // End of template m_site_resource_usage_notification + + template (present) SiteResourceUsageNotification mw_site_resource_usage_notification( + template TimeStamp p_timeStamp := *, + template (present) Json.String p_customerId := ?, + template (present) Json.String p_tenantId := ?, + template (present) SiteResourceUseInfo p_siteResourceUseInfo := ? + ) := { + notificationType := "SiteResourceUsageNotification", + timeStamp := p_timeStamp, + customerId := p_customerId, + tenantId := p_tenantId, + siteResourceUseInfo := p_siteResourceUseInfo + } // End of template mw_site_resource_usage_notification + + template (omit) SiteResourceUseInfo m_site_resource_use_info( + in Json.String p_siteId, + in template (omit) Json.Integer p_cpuUsed, + in template (omit) Json.Integer p_cpuRemain, + in template (omit) Json.Integer p_memoryUsed, + in template (omit) Json.Integer p_memoryRemain, + in template (omit) Json.Integer p_diskUsed, + in template (omit) Json.Integer p_diskRemain + ) := { + siteId := p_siteId, + cpuUsed := p_cpuUsed, + cpuRemain := p_cpuRemain, + memoryUsed := p_memoryUsed, + memoryRemain := p_memoryRemain, + diskUsed := p_diskUsed, + diskRemain := p_diskRemain + } // End of template m_site_resource_use_info + + template (present) SiteResourceUseInfo mw_site_resource_use_info( + template (present) Json.String p_siteId := ?, + template Json.Integer p_cpuUsed := *, + template Json.Integer p_cpuRemain := *, + template Json.Integer p_memoryUsed := *, + template Json.Integer p_memoryRemain := *, + template Json.Integer p_diskUsed := *, + template Json.Integer p_diskRemain := * + ) := { + siteId := p_siteId, + cpuUsed := p_cpuUsed, + cpuRemain := p_cpuRemain, + memoryUsed := p_memoryUsed, + memoryRemain := p_memoryRemain, + diskUsed := p_diskUsed, + diskRemain := p_diskRemain + } // End of template mw_site_resource_use_info + + template (value) ExpiryNotification m_cse_expiry_notification( + in template (value) LinksExpiry p_links, + in template (value) TimeStamp p_expiryDeadline + ) := { + notificationType := "ExpiryNotification", + links := p_links, + expiryDeadline := p_expiryDeadline + } // End of template m_expiry_notification + + template (present) ExpiryNotification mw_cse_expiry_notification( + template (present) LinksExpiry p_links := ?, + template (present) TimeStamp p_expiryDeadline := ? + ) := { + notificationType := "ExpiryNotification", + links := p_links, + expiryDeadline := p_expiryDeadline + + } // End of template mw_expiry_notification + + template (value) Links m_links( + in template (value) LinkType p_self_ + ) :={ + self_ := p_self_ + } // End of template m_links + + template (present) Links mw_links( + template (present) LinkType p_self_ := ? + ) :={ + self_ := p_self_ + } // End of template mw_links + + template (value) LinksSub m_links_sub( + in template (value) LinkType p_self_, + in template (omit) Subscriptions p_subscription := omit + ) :={ + self_ := p_self_, + subscriptions := p_subscription + } // End of template m_links_sub + + template (present) LinksSub mw_links_sub( + template (present) LinkType p_self_ := ?, + template Subscriptions p_subscription := * + ) :={ + self_ := p_self_, + subscriptions := p_subscription + } // End of template mw_links_sub + + 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) SiteInfo m_site_info( + in Json.String p_siteId, + in template (omit) ResourceInfo p_resourceInfo := omit + ) := { + siteId := p_siteId, + resourceInfo := p_resourceInfo + } // End of template m_site_info + + template (present) SiteInfo mw_site_info( + template (present) Json.String p_siteId := ?, + template ResourceInfo p_resourceInfo := * + ) := { + siteId := p_siteId, + resourceInfo := p_resourceInfo + } // End of template mw_site_info + + template (value) SiteId m_site_id( + in Json.String p_siteId + ) := { + siteId := p_siteId + } // End of template m_site_id + + template (present) SiteId mw_site_id( + template (present) Json.String p_siteId := ? + ) := { + siteId := p_siteId + } // End of template mw_site_id + + template (omit) ResourceInfo m_resource_info( + in template (omit) Json.Integer p_cpuQuota, + in template (omit) Json.Integer p_cpuUsed, + in template (omit) Json.Integer p_cpuRemain, + in template (omit) Json.Integer p_memoryQuota, + in template (omit) Json.Integer p_memoryUsed, + in template (omit) Json.Integer p_memoryRemain, + in template (omit) Json.Integer p_diskQuota, + in template (omit) Json.Integer p_diskUsed, + in template (omit) Json.Integer p_diskRemain + ) := { + cpuQuota := p_cpuQuota, + cpuUsed := p_cpuUsed, + cpuRemain := p_cpuRemain, + memoryQuota := p_memoryQuota, + memoryUsed := p_memoryUsed, + memoryRemain := p_memoryRemain, + diskQuota := p_diskQuota, + diskUsed := p_diskUsed, + diskRemain := p_diskRemain + } // End of template m_resource_info + + template (present) ResourceInfo mw_resource_info( + template Json.Integer p_cpuQuota := *, + template Json.Integer p_cpuUsed := *, + template Json.Integer p_cpuRemain := *, + template Json.Integer p_memoryQuota := *, + template Json.Integer p_memoryUsed := *, + template Json.Integer p_memoryRemain := *, + template Json.Integer p_diskQuota := *, + template Json.Integer p_diskUsed := *, + template Json.Integer p_diskRemain := * + ) := { + cpuQuota := p_cpuQuota, + cpuUsed := p_cpuUsed, + cpuRemain := p_cpuRemain, + memoryQuota := p_memoryQuota, + memoryUsed := p_memoryUsed, + memoryRemain := p_memoryRemain, + diskQuota := p_diskQuota, + diskUsed := p_diskUsed, + diskRemain := p_diskRemain + } // End of template mw_resource_info + + template (value) LinksExpiry m_link_expiry( + in template (value) LinkType p_subscription + ) := { + subscription := p_subscription + } //End of temaplate m_link_expiry + + template (present) LinksExpiry mw_link_expiry( + template (present) LinkType p_subscription := ? + ) := { + subscription := p_subscription + } //End of temaplate mw_link_expiry + +} // End of module SelfServiceEnablementAPI_Templates diff --git a/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_TypesAndValues.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..668f1e0b483c877d79c61fb2043d24e9a5c3770a --- /dev/null +++ b/ttcn/LibMec/SelfServiceEnablementAPI/ttcn/SelfServiceEnablementAPI_TypesAndValues.ttcn @@ -0,0 +1,361 @@ +module SelfServiceEnablementAPI_TypesAndValues { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec + import from LibMec_TypesAndValues all; + + /** + * @desc This type represents the information on a tenant + * @param customerId Identifier of the customer + * @param customerName Name of the customer + * @param customerCategory Category of the customer + * @param tenantId Identifier of the tenant + * @param tenantName Name of the tenant + * @param resourceUseInfo Resource in the MEC system that can be used by the tenant + * @param siteList A list of edge sites that can be used by the tenant + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.2.2-1: Attributes of type TenantInfo + */ + type record TenantInfo { + Json.String customerId, + Json.String customerName, + Json.String customerCategory optional, + Json.String tenantId optional, + Json.String tenantName, + ResourceInfo resourceUseInfo optional, + SiteInfoList siteList optional + } + type set of TenantInfo TenantInfoList; + + /** + * @desc This type represents the information on the computing resource quota for a tenant in a MEC system + * @param cpuQuota Allowed number of CPUs in the MEC system that can be used by the tenant + * @param memoryQuota Allowed amount of memory (MB) in the MEC system that can be used by the tenant + * @param diskQuota Allowed amount of disk (GB) in the MEC system that can be used by the tenant + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.2.3-1: Attributes of type ResourceQuotaInfo + */ + type record ResourceQuotaInfo { + Json.Integer cpuQuota optional, + Json.Integer memoryQuota optional, + Json.Integer diskQuota optional + } + + /** + * @desc This type represents the information on the computing resource quota for a tenant in an edge site + * @param siteId Identifier of an edge site + * @param cpuQuota Allowed number of CPUs in the MEC system that can be used by the tenant + * @param memoryQuota Allowed amount of memory (MB) in the MEC system that can be used by the tenant + * @param diskQuota Allowed amount of disk (GB) in the MEC system that can be used by the tenant + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.2.4-1: Attributes of type SiteResourceQuotaInfo + */ + type record SiteResourceQuotaInfo { + Json.String siteId, + Json.Integer cpuQuota optional, + Json.Integer memoryQuota optional, + Json.Integer diskQuota optional + } + type set of SiteResourceQuotaInfo SiteResourceQuotaInfoList; + + /** + * @desc This type represents a subscription to get updates on the computing resource usage of a tenant in a MEC system + * @param subscriptionType Shall be set to "ResourceUsageSubscription" + * @param callbackReference URI exposed by the client on which to receive notifications via HTTP + * @param requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @param websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications + * @param _links Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests + * @param customerId Identifier to uniquely specify the customer for the subscription + * @param tenantId Identifier of the tenant + * @param notificationTrigger Set for trigger-based event notification reporting + * @param expiryDeadline The expiration time of the subscription determined by the CSE + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.3.2-1: Attributes of type ResourceUsageSubscription + */ + type record ResourceUsageSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + Json.String customerId, + Json.String tenantId, + NotificationTrigger notificationTrigger, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a subscription to get updates on the computing resource usage of a tenant in one or multiple edge sites + * @param subscriptionType Shall be set to "SiteResourceUsageSubscription" + * @param callbackReference URI exposed by the client on which to receive notifications via HTTP + * @param requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @param websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the WAIS and the service consumer for notifications + * @param _links Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests + * @param customerId Identifier to uniquely specify the customer for the subscription + * @param tenantId Identifier of the tenant + * @param notificationTrigger Set for trigger-based event notification reporting + * @param expiryDeadline The expiration time of the subscription determined by the CSE + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.3.3-1: Attributes of type SiteResourceUsageSubscription + */ + type record SiteResourceUsageSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + Json.String customerId, + Json.String tenantId, + SiteIdList siteList, + NotificationTrigger notificationTrigger, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a list of links related to currently existing subscriptions for the service consumer + * @param _links List of hyperlinks related to the resource + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.3.4-1: Attributes of type SubscriptionLinkList + */ + type record SubscriptionLinkList { + LinksSub links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a notification from CSE with regards to the computing resource usage of a tenant in a MEC system + * @param notificationType Shall be set to "ResourceUsageNotification" + * @param timeStamp Time stamp + * @param customerId Identifier to uniquely specify the customer for the subscription + * @param tenantId Identifier of the tenant + * @param resourceUseInfo Resource usage in the MEC system by the tenant + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.4.2-1: Attributes of type ResourceUsageNotification + */ + type record ResourceUsageNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Json.String customerId, + Json.String tenantId, + ResourceUseInfo resourceUseInfo + } + + /** + * @desc This type represents resource usage in the MEC system by the tenant + * @param cpuUsed Used number of CPUs by the tenant + * @param cpuRemain Remaining number of CPUs that can be used by the tenant + * @param memoryUsed Used amount of memory (MB) by the tenant + * @param memoryRemain Remaining amount of memory (MB) that can be used by the tenant + * @param diskUsed Used amount of disk (GB) by the tenant + * @param diskRemain Remaining amount of disk (GB) that can be used by the tenant + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.4.2-1: Attributes of type ResourceUseInfo + */ + type record ResourceUseInfo { + Json.Integer cpuUsed optional, + Json.Integer cpuRemain optional, + Json.Integer memoryUsed optional, + Json.Integer memoryRemain optional, + Json.Integer diskUsed optional, + Json.Integer diskRemain optional + } + + /** + * @desc This type represents a notification from CSE with regards to the computing resource usage of a tenant in one or multiple edge sites + * @param notificationType Shall be set to "SiteResourceUsageNotification" + * @param timeStamp Time stamp + * @param customerId Identifier to uniquely specify the customer for the subscriptionc + * @param tenantId Identifier of the tenant + * @param resourceUseInfo Resource usage in the MEC system by the tenant + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.4.3-1: Attributes of type SiteResourceUsageNotification + */ + type record SiteResourceUsageNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + Json.String customerId, + Json.String tenantId, + SiteResourceUseInfo siteResourceUseInfo + } + + /** + * @desc This type represents resource usage in the edge sites by the tenant + * @param siteId Identifier of an edge site + * @param cpuUsed Used number of CPUs by the tenant + * @param cpuRemain Remaining number of CPUs that can be used by the tenant + * @param memoryUsed Used amount of memory (MB) by the tenant + * @param memoryRemain Remaining amount of memory (MB) that can be used by the tenant + * @param diskUsed Used amount of disk (GB) by the tenant + * @param diskRemain Remaining amount of disk (GB) that can be used by the tenant + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.4.3-1: Attributes of type SiteResourceUseInfo + */ + type record SiteResourceUseInfo { + Json.String siteId, + Json.Integer cpuUsed optional, + Json.Integer cpuRemain optional, + Json.Integer memoryUsed optional, + Json.Integer memoryRemain optional, + Json.Integer diskUsed optional, + Json.Integer diskRemain optional + } + type set of SiteResourceUseInfo SiteResourceUseInfoList; + + /** + * @desc This type represents a notification from CSE with regards to expiry of an existing subscription + * @param notificationType Shall be set to "ExpiryNotification" + * @param _links Object containing hyperlinks related to the resource + * @param expiryDeadline Time stamp + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.4.4-1: Attributes of type ExpiryNotification + */ + type record ExpiryNotification { + Json.String notificationType, + LinksExpiry links, + TimeStamp expiryDeadline + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents the information on an edge site + * @param siteId Identifier of an edge site + * @param resourceInfo Resource information in the edge site that is associated with a specific tenant + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.5.2-1: Attributes of type SiteInfo + */ + type record SiteInfo { + Json.String siteId, + ResourceInfo resourceInfo optional + } + type set of SiteInfo SiteInfoList; + /** + * @desc This type represents the resource information in an edge site or a MEC system that is associated with a tenant + * @param cpuQuota Allowed number of CPUs that can be used by the tenant + * @param cpuUsed Used number of CPUs by the tenant + * @param cpuRemain Remaining number of CPUs that can be used by the tenant + * @param memoryQuota Allowed amount of memory (MB) that can be used by the tenant + * @param memoryUsed Used amount of memory (MB) by the tenant + * @param memoryRemain Remaining amount of memory (MB) that can be used by the tenant + * @param diskQuota Allowed amount of disk (GB) that can be used by the tenant + * @param diskUsed Used amount of disk (GB) by the tenant + * @param diskRemain Remaining amount of disk (GB) that can be used by the tenant + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.5.3-1: Attributes of type ResourceInfo + */ + type record ResourceInfo { + Json.Integer cpuQuota optional, + Json.Integer cpuUsed optional, + Json.Integer cpuRemain optional, + Json.Integer memoryQuota optional, + Json.Integer memoryUsed optional, + Json.Integer memoryRemain optional, + Json.Integer diskQuota optional, + Json.Integer diskUsed optional, + Json.Integer diskRemain optional + } + + /** + * @desc This type represents the set for trigger-based event notification reporting. + * @param triggerType Trigger for the notification + * @param threshold Threshold for trigger-based event reporting + * @param greaterOrLess Indicator for the triggering condition + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.3.2-1: Attributes of type NotificationTrigger + */ + type record NotificationTrigger { + TriggerType triggerType, + Json.UInt8 threshold, + Json.Bool greaterOrLess + } + + /** + * @desc Trigger for the notification + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.3.2-1: Enumeration TriggerType + */ + type enumerated TriggerType { + e_tt_ten (10), // 10 = Notification trigged based on the number of used CPUs + e_tt_eleven (11), // 11 = Notification trigged based on the number of remaining CPUs + e_tt_twenty (20), // 20 = Notification trigged based on the amount of used memory + e_tt_twentyone (21), // 21 = Notification trigged based on the amount of remaining memory + e_tt_thirty (30), // 30 = Notification trigged based on the amount of used disk + e_tt_thirtyone (31) // 31 = Notification trigged based on the amount of remaining disk + } with { + variant "JSON: as number" + } + + /** + * @desc Hyperlink related to the resource + * @param self Self-referring URI + * @param subscription URI identifying the subscription for the test notification + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.3.4-1: Attributes of type LinksSub + */ + type record LinksSub { + LinkType self_, + Subscriptions subscriptions optional + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc The service consumer's subscriptions + * @param href The URI referring to the subscription + * @param subscriptionType Type of the subscription + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.3.4-1: Attributes of type Subscription + */ + + type record Subscription { + Json.AnyURI href, + Json.String subscriptionType + } + type set of Subscription Subscriptions; + + /** + * @desc Hyperlink related to the resource + * @param self Self-referring URI + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.3.2-1: Attributes of type Links + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc This type represents a type of link + * @param href URI referring to a resource + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.5.6-1 : Attributes of type LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc This type represents the identifier of an edge site. + * @param siteId Identifier of an edge site + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.5.5-1: Attributes of type SiteId + */ + type record SiteId { + Json.String siteId + } + type set of SiteId SiteIdList; + + /** + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @param websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @param requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.5.4-1 Attributes of type WebsockNotifConfig + */ + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } + + /** + * @desc This type represents the hyperlink related to the resource. + * @param subscription URI identifying the subscription which has expired. + * @see ETSI GS MEC 048 V3.2.1 (2025-08) Table 6.4.4-1: Attributes of type LinksExpiry + */ + type record LinksExpiry { + LinkType subscription + } + +} with { + encode "JSON" +} // End of module SelfServiceEnablementAPI_TypesAndValues diff --git a/ttcn/LibMec/SensorsSharingService/module.mk b/ttcn/LibMec/SensorsSharingService/module.mk new file mode 100644 index 0000000000000000000000000000000000000000..497f187ecff58b1d37473f71f3c2d7ea77cdfc22 --- /dev/null +++ b/ttcn/LibMec/SensorsSharingService/module.mk @@ -0,0 +1,6 @@ +sources := \ + ttcn/SensorsSharingService_Pics.ttcn \ + ttcn/SensorsSharingService_Pixits.ttcn \ + ttcn/SensorsSharingService_Templates.ttcn \ + ttcn/SensorsSharingService_Functions.ttcn \ + ttcn/SensorsSharingService_TypesAndValues.ttcn diff --git a/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_Functions.ttcn b/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_Functions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c19ae490b49a7decacc576bd67f860f9f8f83696 --- /dev/null +++ b/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_Functions.ttcn @@ -0,0 +1,273 @@ +module SensorsSharingService_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/SensorsSharingService + import from SensorsSharingService_TypesAndValues all; + import from SensorsSharingService_Templates all; + import from SensorsSharingService_Pics all; + import from SensorsSharingService_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; + + function f_sensor_discovery( + out SensorDiscoveryInfos p_sensor_discovery_infos + ) 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_get( + PICS_ROOT_API & PX_SENS_DISCOVERY, + 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_sensor_discovery_infos + )))) -> value v_response { + tc_ac.stop; + + p_sensor_discovery_infos := v_response.response.body.json_body.sensor_discovery_infos + log("f_sensor_discovery: IUT successfully responds with a list sensors info"); + } + [] tc_ac.timeout { + log("f_sensor_discovery: Expected message not received ***"); + } + } // End of 'alt' statement + + } // End of function f_sensor_discovery + + function f_create_sensor_discovery_subscription( + out SensorDiscoveryEventSubscription p_sensor_discovery_event_subscription, + out charstring p_subscription_id, + in template (omit) boolean p_test_notification := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) 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_SENS_LIST_SUBS_DISCOVERY, + v_headers, + m_http_message_body_json( + m_body_json_sensor_discovery_event_subscription( + m_sensor_discovery_event_subscription( + PX_SENS_SUB_CALLBACK_URI, + -, -, -, + p_test_notification, + -, + p_expiryDeadline + + + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_sensor_discovery_event_subscription( + mw_sensor_discovery_event_subscription( + PX_SENS_SUB_CALLBACK_URI, + 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_SENS_LIST_SUBS_DISCOVERY & "/(?*)", + 0 + ); + p_sensor_discovery_event_subscription := v_response.response.body.json_body.sensor_discovery_event_subscription; + log("f_create_sensor_discovery_subscription: INFO: IUT successfully responds to the subscription: ", p_sensor_discovery_event_subscription); + log("f_create_sensor_discovery_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_sensor_discovery_subscription: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_sensor_discovery_subscription + + function f_create_sensor_status_subscription( + out SensorStatusSubscription p_sensor_status_subscription, + out charstring p_subscription_id, + in template (omit) boolean p_test_notification := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) 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_SENS_LIST_SUBS_STATUS, + v_headers, + m_http_message_body_json( + m_body_json_sensor_status_subscription( + m_sensor_status_subscription( + PX_SENS_SUB_CALLBACK_URI, + -, -, + p_test_notification, + -, + p_expiryDeadline + + + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_sensor_status_subscription( + mw_sensor_status_subscription( + PX_SENS_SUB_CALLBACK_URI, + 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_SENS_LIST_SUBS_STATUS & "/(?*)", + 0 + ); + p_sensor_status_subscription := v_response.response.body.json_body.sensor_status_subscription; + log("f_create_sensor_status_subscription: INFO: IUT successfully responds to the subscription: ", p_sensor_status_subscription); + log("f_create_sensor_status_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_sensor_status_subscription: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_sensor_status_subscription + + function f_create_sensor_data_subscription( + out SensorDataSubscription p_sensor_data_subscription, + out charstring p_subscription_id, + in template (omit) boolean p_test_notification := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) 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_SENS_LIST_SUBS_DATA, + v_headers, + m_http_message_body_json( + m_body_json_sensor_data_subscription( + m_sensor_data_subscription( + PX_SENS_SUB_CALLBACK_URI, + -, -, + p_test_notification, + -, + p_expiryDeadline + + + )))))); + + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_sensor_data_subscription( + mw_sensor_data_subscription( + PX_SENS_SUB_CALLBACK_URI, + 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_SENS_LIST_SUBS_STATUS & "/(?*)", + 0 + ); + p_sensor_data_subscription := v_response.response.body.json_body.sensor_data_subscription; + log("f_create_sensor_data_subscription: INFO: IUT successfully responds to the subscription: ", p_sensor_data_subscription); + log("f_create_sensor_data_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_sensor_data_subscription: Expected message not received"); + } + } // End of 'alt' statement + } // End of function f_create_sensor_data_subscription + + function f_delete_sensor_subscription( + in charstring p_subscription_id, + in charstring p_uri + ) 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 & p_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_sensor_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_sensor_subscription + +} // End of module SensorsSharingService_Functions diff --git a/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_Pics.ttcn b/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_Pics.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2604384114ec490e4a6ce969d6ca12ac10a25f8c --- /dev/null +++ b/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_Pics.ttcn @@ -0,0 +1,8 @@ +module SensorsSharingService_Pics { + + /** + * @desc Does the IUT support MEC Sensors-Sharing Service API? + */ + modulepar boolean PICS_SENS_API_SUPPORTED := true; + +} // End of module SensorsSharingService_Pics diff --git a/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_Pixits.ttcn b/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_Pixits.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..04f87d0e8cf90b2c8bc2493b6b36cc050c6ba982 --- /dev/null +++ b/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_Pixits.ttcn @@ -0,0 +1,35 @@ +module SensorsSharingService_Pixits { + + // JSON + import from Json all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec/SensorsSharingService + import from SensorsSharingService_TypesAndValues all; + + // LibMec + import from LibMec_TypesAndValues all; + + modulepar Json.AnyURI PX_SENS_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; + + modulepar Json.AnyURI PX_SENS_SUB_WB_URI := "ws://clientApp.example.com/"; + + modulepar charstring PX_SENS_DISCOVERY_TYPE := ""; + + modulepar charstring PX_SENS_DISCOVERY_UNKNOWN_TYPE := "UNKNOWN_TYPE"; + + modulepar charstring PX_SENS_DISCOVERY_PROPERTY_LIST := ""; // Could be [], string or [string1 string2] + + modulepar charstring PX_SENSOR_IDENTIFIER := ""; + + modulepar charstring PX_UNKNOWN_SENSOR_IDENTIFIER := "UNKNOWN_SENSOR_IDENTIFIER"; + + modulepar charstring PX_UNKNOWN_SUBSCRIPTION_ID := "UNKNOW_SUBSCRIPTION_ID"; + + modulepar Json.String PX_CHARACTERISTIC_NAME := ""; + + modulepar Json.String PX_CHARACTERISTIC_VALUE := ""; + +} // End of module SensorsSharingService_Pixits diff --git a/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_Templates.ttcn b/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_Templates.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..742fa1e9d510e5f80ece0c0d04a86e7366100450 --- /dev/null +++ b/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_Templates.ttcn @@ -0,0 +1,492 @@ +module SensorsSharingService_Templates { + + // JSON + import from Json all; + + // LibMec + import from LibMec_TypesAndValues all; + + // Lib/SensorsSharingService + import from SensorsSharingService_TypesAndValues all; + + template (omit) SensorDiscoveryInfo m_sensor_discovery_info( + in Json.String p_sensorIdentifier, + in Json.String p_sensorType, + in template (value) SensorPropertyList p_sensorPropertyList, + in template (value) Point p_sensorPosition, + in template (omit) SensorCharacteristics p_sensorCharacteristicList := omit + ) := { + sensorIdentifier := p_sensorIdentifier, + sensorType := p_sensorType, + sensorPropertyList := p_sensorPropertyList, + sensorCharacteristicList := p_sensorCharacteristicList, + sensorPosition := p_sensorPosition + } // End of template m_sensor_discovery_info + + template (present) SensorDiscoveryInfo mw_sensor_discovery_info( + template (present) Json.String p_sensorIdentifier := ?, + template (present) Json.String p_sensorType := ?, + template (present) SensorPropertyList p_sensorPropertyList := ?, + template (present) Point p_sensorPosition := ?, + template SensorCharacteristics p_sensorCharacteristicList := * + ) := { + sensorIdentifier := p_sensorIdentifier, + sensorType := p_sensorType, + sensorPropertyList := p_sensorPropertyList, + sensorCharacteristicList := p_sensorCharacteristicList, + sensorPosition := p_sensorPosition + } // End of template mw_sensor_discovery_info + + template (value) SensorStatusInfo m_sensor_status_info( + in Json.String p_sensorIdentifier, + in template (value) SensorStatusType p_sensorStatusType + ) := { + sensorIdentifier := p_sensorIdentifier, + sensorStatusType := p_sensorStatusType + } // End of template m_sensor_status_info + + template (present) SensorStatusInfo mw_sensor_status_info( + template (present) Json.String p_sensorIdentifier := ?, + template (present) SensorStatusType p_sensorStatusType := ? + ) := { + sensorIdentifier := p_sensorIdentifier, + sensorStatusType := p_sensorStatusType + } // End of template mw_sensor_status_info + + template (omit) SensorData m_sensor_data( + in Json.String p_sensorIdentifier, + in Json.String p_data, + in Json.String p_dataFormat, + in Json.String p_dataUnitOfMeasure, + in template (omit) TimeStamp p_dataTimestamp := omit + ) := { + sensorIdentifier := p_sensorIdentifier, + data := p_data, + dataFormat := p_dataFormat, + dataUnitOfMeasure := p_dataUnitOfMeasure, + dataTimestamp := p_dataTimestamp + } // End of template m_sensor_data + + template (present) SensorData mw_sensor_data( + template (present) Json.String p_sensorIdentifier := ?, + template (present) Json.String p_data := ?, + template (present) Json.String p_dataFormat := ?, + template (present) Json.String p_dataUnitOfMeasure := ?, + template TimeStamp p_dataTimestamp := omit + ) := { + sensorIdentifier := p_sensorIdentifier, + data := p_data, + dataFormat := p_dataFormat, + dataUnitOfMeasure := p_dataUnitOfMeasure, + dataTimestamp := p_dataTimestamp + } // End of template mw_sensor_data + + template (omit) SensorDiscoveryEventSubscription m_sensor_discovery_event_subscription( + in template (omit) Json.AnyURI p_callbackReference, + in template (omit) Links p_links := omit, + in template (omit) SensorInfos p_sensorInfo := omit, + in template (omit) AreaInfos p_geographicalArea := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "SensorDiscoveryEventSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + sensorInfo := p_sensorInfo, + geographicalArea := p_geographicalArea, + expiryDeadline := p_expiryDeadline + } // End of template m_sensor_discovery_event_subscription + + template (omit) SensorDiscoveryEventSubscription m_sensor_discovery_event_subscription_wrong( + in template (omit) Json.AnyURI p_callbackReference, + in template (omit) Links p_links := omit, + in template (omit) SensorInfos p_sensorInfo := omit, + in template (omit) AreaInfos p_geographicalArea := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) modifies m_sensor_discovery_event_subscription := { + subscriptionType := "SensorDiscoveryEventSub" + } // End of template m_sensor_discovery_event_subscription_wrong + + template (present) SensorDiscoveryEventSubscription mw_sensor_discovery_event_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template Links p_links := *, + template SensorInfos p_sensorInfo := *, + template AreaInfos p_geographicalArea := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "SensorDiscoveryEventSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + sensorInfo := p_sensorInfo, + geographicalArea := p_geographicalArea, + expiryDeadline := p_expiryDeadline + } // End of template mw_sensor_discovery_event_subscription + + template (omit) SensorCharacteristicInfo m_sensor_characteristic_info( + in Json.String p_sensorIdentifier, + in template (omit) SensorCharacteristics p_sensorCharacteristicList := omit + ) := { + sensorIdentifier := p_sensorIdentifier, + sensorCharacteristicList := p_sensorCharacteristicList + } // End of template m_sensor_characteristic_info + + template (present) SensorCharacteristicInfo mw_sensor_characteristic_info( + template (present) Json.String p_sensorIdentifier := ?, + template SensorCharacteristics p_sensorCharacteristicList := * + ) := { + sensorIdentifier := p_sensorIdentifier, + sensorCharacteristicList := p_sensorCharacteristicList + } // End of template mw_sensor_characteristic_info + + template (omit) SensorStatusSubscription m_sensor_status_subscription( + in template (omit) Json.AnyURI p_callbackReference, + in template (omit) Links p_links := omit, + in template (omit) SensorIdentifierList p_sensorIdentifierList := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "SensorStatusSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + sensorIdentifierList := p_sensorIdentifierList, + expiryDeadline := p_expiryDeadline + } // End of template m_sensor_status_subscription + + template (omit) SensorStatusSubscription m_sensor_status_subscription_wrong( + in template (omit) Json.AnyURI p_callbackReference, + in template (omit) Links p_links := omit, + in template (omit) SensorIdentifierList p_sensorIdentifierList := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) modifies m_sensor_status_subscription := { + subscriptionType := "SensorStatusSub" + } // End of template m_sensor_status_subscription_wrong + + template (present) SensorStatusSubscription mw_sensor_status_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template Links p_links := *, + template SensorIdentifierList p_sensorIdentifierList := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "SensorStatusSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + sensorIdentifierList := p_sensorIdentifierList, + expiryDeadline := p_expiryDeadline + } // End of template mw_sensor_status_subscription + + template (omit) SensorDataSubscription m_sensor_data_subscription( + in template (omit) Json.AnyURI p_callbackReference, + in template (omit) Links p_links := omit, + in template (omit) SensorIdentifierList p_sensorIdentifierList := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) := { + subscriptionType := "SensorDataSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + sensorIdentifierList := p_sensorIdentifierList, + expiryDeadline := p_expiryDeadline + } // End of template m_sensor_data_subscription + + template (omit) SensorDataSubscription m_sensor_data_subscription_wrong( + in template (omit) Json.AnyURI p_callbackReference, + in template (omit) Links p_links := omit, + in template (omit) SensorIdentifierList p_sensorIdentifierList := omit, + in template (omit) Json.Bool p_requestTestNotification := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) TimeStamp p_expiryDeadline := omit + ) modifies m_sensor_data_subscription := { + subscriptionType := "SensorDataSubs" + } // End of template m_sensor_data_subscription_wrong + + template (present) SensorDataSubscription mw_sensor_data_subscription( + template (present) Json.AnyURI p_callbackReference := ?, + template Links p_links := *, + template SensorIdentifierList p_sensorIdentifierList := *, + template Json.Bool p_requestTestNotification := *, + template WebsockNotifConfig p_websockNotifConfig := *, + template TimeStamp p_expiryDeadline := * + ) := { + subscriptionType := "SensorDataSubscription", + callbackReference := p_callbackReference, + requestTestNotification := p_requestTestNotification, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + sensorIdentifierList := p_sensorIdentifierList, + expiryDeadline := p_expiryDeadline + } // End of template mw_sensor_data_subscription + + template (value) SubscriptionLinkList m_subscription_link_list( + in template (value) LinksSub p_links + ) := { + links := p_links + } // End of template m_subscription_link_list + + template (present) SubscriptionLinkList mw_subscription_link_list( + template (present) LinksSub p_links := ? + ) := { + links := p_links + } // End of template mw_subscription_link_list + + template (omit) LinksSub m_links_sub( + in template (value) LinkType p_self_, + in template (omit) Subscriptions p_subscriptions := omit + ) := { + self_ := p_self_, + subscriptions := p_subscriptions + } // End of template m_links_sub + + template (present) LinksSub mw_links_sub( + template (present) LinkType p_self_ := ?, + template Subscriptions p_subscriptions := * + ) := { + self_ := p_self_, + subscriptions := p_subscriptions + } // End of template mw_links_sub + + template (value) TestNotification m_test_notification( + in Json.String p_notificationType, + in template (value) Links p_links + ) := { + notificationType := p_notificationType, + links := p_links + } // End of template m_test_notification + + template (present) TestNotification mw_test_notification( + template (present) Json.String p_notificationType := ?, + template (present) Links p_links := ? + ) := { + notificationType := p_notificationType, + links := p_links + } // End of template mw_test_notification + + template (omit) SensorInfo m_sensor_info( + in Json.String p_type_, + in template (omit) SensorPropertyList p_sensorPropertyList := omit, + in template (omit) SensorCharacteristics p_sensorCharacteristicList := omit + ):= { + type_ := p_type_, + sensorPropertyList := p_sensorPropertyList, + sensorCharacteristicList := p_sensorCharacteristicList + } // End of template m_sensor_info + + template (present) SensorInfo mw_sensor_info( + template (present) Json.String p_type_ := ?, + template SensorPropertyList p_sensorPropertyList := *, + template SensorCharacteristics p_sensorCharacteristicList := * + ):= { + type_ := p_type_, + sensorPropertyList := p_sensorPropertyList, + sensorCharacteristicList := p_sensorCharacteristicList + } // End of template mw_sensor_info + + template (omit) SensorDiscoveryEventNotification m_sensor_discovery_event_notification( + in template (value) SensorDiscoveryEventType p_sensorDiscoveryEventType, + in template (value) SensorDiscoveryInfos p_sensorDiscoveryInfo, + in template (value) Links p_links, + in template (omit) TimeStamp p_timeStamp := omit + ) := { + notificationType := "SensorDiscoveryEventNotification", + timeStamp := p_timeStamp, + sensorDiscoveryEventType := p_sensorDiscoveryEventType, + sensorDiscoveryInfo := p_sensorDiscoveryInfo, + links := p_links + } // End of template m_sensor_discovery_event_notification + + template (present) SensorDiscoveryEventNotification mw_sensor_discovery_event_notification( + template (present) SensorDiscoveryEventType p_sensorDiscoveryEventType := ?, + template (present) SensorDiscoveryInfos p_sensorDiscoveryInfo := ?, + template (present) Links p_links := ?, + template TimeStamp p_timeStamp := * + ) := { + notificationType := "SensorDiscoveryEventNotification", + timeStamp := p_timeStamp, + sensorDiscoveryEventType := p_sensorDiscoveryEventType, + sensorDiscoveryInfo := p_sensorDiscoveryInfo, + links := p_links + } // End of template mw_sensor_discovery_event_notification + + template (omit) SensorStatusNotification m_sensor_status_notification( + in template (value) SensorStatusInfos p_sensorStatusInfo, + in template (value) Links p_links, + in template (omit) TimeStamp p_timeStamp := omit + ) := { + notificationType := "SensorStatusNotification", + timeStamp := p_timeStamp, + sensorStatusInfo := p_sensorStatusInfo, + links := p_links + } // End of template m_sensor_status_notification + + template (present) SensorStatusNotification mw_sensor_status_notification( + template (present) SensorStatusInfos p_sensorStatusInfo := ?, + template (present) Links p_links := ?, + template TimeStamp p_timeStamp := * + ) := { + notificationType := "SensorStatusNotification", + timeStamp := p_timeStamp, + sensorStatusInfo := p_sensorStatusInfo, + links := p_links + } // End of template mw_sensor_status_notification + + template (omit) SensorDataNotification m_sensor_data_notification( + in template (value) SensorDatas p_sensorData, + in template (value) Links p_links, + in template (omit) TimeStamp p_timeStamp := omit + ) := { + notificationType := "SensorDataNotification", + timeStamp := p_timeStamp, + sensorData := p_sensorData, + links := p_links + } // End of template m_sensor_data_notification + + template (present) SensorDataNotification mw_sensor_data_notification( + template (present) SensorDatas p_sensorData := ?, + template (present) Links p_links := ?, + template TimeStamp p_timeStamp := * + ) := { + notificationType := "SensorDataNotification", + timeStamp := p_timeStamp, + sensorData := p_sensorData, + links := p_links + } // End of template mw_sensor_data_notification + + template (omit) ExpiryNotification m_expiry_notification( + in template (value) Links p_links, + in template (omit) TimeStamp p_timeStamp := omit + ) := { + notificationType := "ExpiryNotification", + timeStamp := p_timeStamp, + links := p_links + } // End of template m_expiry_notification + + template (present) ExpiryNotification mw_expiry_notification( + template (present) Links p_links := ?, + template TimeStamp p_timeStamp := * + ) := { + notificationType := "ExpiryNotification", + timeStamp := p_timeStamp, + links := p_links + } // End of template mw_expiry_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 Json.Number p_latitude, + in Json.Number p_longitude + ) := { + latitude := p_latitude, + longitude := p_longitude + } // End of template m_point + + template (present) Point mw_point( + template (present) Json.Number p_latitude := ?, + template (present) Json.Number p_longitude := ? + ) := { + latitude := p_latitude, + longitude := p_longitude + } // End of template mw_point + + template (omit) SensorCharacteristic m_sensor_characteristic( + in Json.String p_characteristicName, + in Json.String p_characteristicValue, + in template (omit) Json.String p_characteristicUnitOfMeasure := omit + ) := { + characteristicName := p_characteristicName, + characteristicValue := p_characteristicValue, + characteristicUnitOfMeasure := p_characteristicUnitOfMeasure + } // End of template m_sensor_characteristic + + template (present) SensorCharacteristic mw_sensor_characteristic( + template (present) Json.String p_characteristicName := ?, + template (present) Json.String p_characteristicValue := ?, + template Json.String p_characteristicUnitOfMeasure := * + ) := { + characteristicName := p_characteristicName, + characteristicValue := p_characteristicValue, + characteristicUnitOfMeasure := p_characteristicUnitOfMeasure + } // End of template mw_sensor_characteristic + + 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 (value) Links m_links( + in template (value) LinkType p_self_ + ) :={ + self_ := p_self_ + } // End of template m_links + + template (present) Links mw_links( + template (present) LinkType p_self_ := ? + ) :={ + self_ := p_self_ + } // End of template mw_links + + template (omit) WebsockNotifConfig m_websock_notif_config( + in Json.AnyURI p_websocketUri, + in template (omit) Json.Bool p_requestWebsocketUri := omit + ) := { + websocketUri := p_websocketUri, + requestWebsocketUri := p_requestWebsocketUri + } // End of template m_websock_notif_config + + template (present) WebsockNotifConfig mw_websock_notif_config( + template (present) Json.AnyURI p_websocketUri := ?, + template Json.Bool p_requestWebsocketUri := * + ) := { + websocketUri := p_websocketUri, + requestWebsocketUri := p_requestWebsocketUri + } // End of template mw_websock_notif_config + +} // End of module SensorsSharingService_Templates diff --git a/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_TypesAndValues.ttcn b/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_TypesAndValues.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..5ee57ea0dbf020e685b5f5d186735dc0b31d2ef6 --- /dev/null +++ b/ttcn/LibMec/SensorsSharingService/ttcn/SensorsSharingService_TypesAndValues.ttcn @@ -0,0 +1,377 @@ +module SensorsSharingService_TypesAndValues { + + // JSON + import from Json all; + + // LibMec + import from LibMec_TypesAndValues all; + + /** + * @desc This type represents the information about type, properties and characteristics that are related to a sensor + * @param sensorIdentifier Unique identifier of the sensor + * @param sensorType Type of the sensor + * @param sensorPropertyList It indicates the list of properties that the sensor can sense + * @param sensorCharacteristicList The sensor' characteristics + * @param sensorPosition Geographical position of the sensor + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.2.1-1: Definition of type SensorDiscoveryInfo + */ + type record SensorDiscoveryInfo { + Json.String sensorIdentifier, + Json.String sensorType, + SensorPropertyList sensorPropertyList, + SensorCharacteristics sensorCharacteristicList optional, + Point sensorPosition + } + type set of SensorDiscoveryInfo SensorDiscoveryInfos; + type record length (1 .. infinity) of Json.String SensorPropertyList; + + /** + * @desc This type represents the information related to the status of a sensor + * @param sensorIdentifier Unique identifier of the sensor + * @param sensorStatusType The status of the sensor + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.2.2-1: Definition of type SensorStatusInfo + */ + type record SensorStatusInfo { + Json.String sensorIdentifier, + SensorStatusType sensorStatusType + } + type set of SensorStatusInfo SensorStatusInfos; + + /** + * @desc The status of the sensor + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.2.2-1: Definition of type SensorStatusInfo + */ + type enumerated SensorStatusType { + ERROR, + ONLINE, + OFFLINE + } + + /** + * @desc This type represents the data that are gathered from a sensor with the related information + * @param sensorIdentifier Unique identifier of the sensor + * @param data Data measurement provided by the sensor + * @param dataFormat Format of the data + * @param dataUnitOfMeasure Unit of Measure of the data + * @param dataTimestamp Time instant at which the data have been collected + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.2.3-1: Definition of type SensorData + */ + type record SensorData { + Json.String sensorIdentifier, + Json.String data, + Json.String dataFormat, + Json.String dataUnitOfMeasure, + TimeStamp dataTimestamp optional + } + type set of SensorData SensorDatas; + + /** + * @desc This type represents a subscription to notifications from the Sensor-sharing Service regarding events related to changes in sensor information + * @param subscriptionType Shall be set to "SensorDiscoveryEventSubscription" + * @param callbackReference URI exposed by the client on which to receive notifications via HTTP + * @param requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @param websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @param _links Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests + * @param sensorInfo Object containing the characteristics of the sensor(s) to be selected for the subscription + * @param geographicalArea The parameters describing the area to subscribe + * @param expiryDeadline The expiration time of the subscription + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.3.1-1: Definition of type SensorDiscoveryEventSubscription + */ + type record SensorDiscoveryEventSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + SensorInfos sensorInfo optional, + AreaInfos geographicalArea optional, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents the characteristics of a sensor + * @param sensorIdentifier Unique identifier of the sensor + * @param sensorCharacteristicList The sensor' characteristics + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.2.4-1: Definition of type SensorCharacteristicInfo + */ + type record SensorCharacteristicInfo { + Json.String sensorIdentifier, + SensorCharacteristics sensorCharacteristicList optional + } + type set of SensorCharacteristicInfo SensorCharacteristicInfos; + + /** + * @desc This type represents a subscription to notifications from the Sensor-sharing Service regarding events related to changes in sensor information + * @param subscriptionType Shall be set to "SensorStatusSubscription" + * @param callbackReference URI exposed by the client on which to receive notifications via HTTP + * @param requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @param websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @param _links Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests + * @param sensorIdentifierList Unique identifiers of the sensors + * @param expiryDeadline The expiration time of the subscription + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.3.2-1: Definition of type SensorStatusSubscription + */ + type record SensorStatusSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + SensorIdentifierList sensorIdentifierList optional, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + type record length (1 .. infinity) of Json.String SensorIdentifierList; + + /** + * @desc This type represents a subscription to notifications from the Sensor-sharing Service regarding events related to changes in sensor information + * @param subscriptionType Shall be set to "SensorDataSubscription" + * @param callbackReference URI exposed by the client on which to receive notifications via HTTP + * @param requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI + * @param websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @param _links Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests + * @param sensorIdentifierList Unique identifiers of the sensors + * @param expiryDeadline The expiration time of the subscription + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.3.3-1: Definition of type SensorDataSubscription + */ + type record SensorDataSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + Json.Bool requestTestNotification optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + SensorIdentifierList sensorIdentifierList optional, + TimeStamp expiryDeadline optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a list of links related to currently existing subscriptions for the MEC application + * @param _links List of hyperlinks related to the resource + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.3.4-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinkList { + LinksSub 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 046 V3.1.1 (2024-04) Table 6.3.4 Type: SubscriptionLinkList + */ + type record LinksSub { + LinkType self_, + Subscriptions subscriptions optional + } with { + variant (self_) "name as 'self'"; + } + + + /** + * @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 + * @member notificationType Shall be set to "TestNotification" + * @member links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table ??? + */ + type record TestNotification { + Json.String notificationType, + Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc Object containing the characteristics of the sensor(s) to be selected for the subscription + * @param type_ Type of the sensor + * @param sensorPropertyList It indicates the list of properties that the sensor can sense + * @param sensorCharacteristicList The sensor' characteristics to be matched + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.3.1-1: Definition of type SensorDiscoveryEventSubscription + */ + type record SensorInfo { + Json.String type_, + SensorPropertyList sensorPropertyList optional, + SensorCharacteristics sensorCharacteristicList optional + } with { + variant (type_) "name as 'type'"; + } + type set of SensorInfo SensorInfos; + + /** + * @desc This type represents a subscription to notifications from the Sensor-sharing Service regarding events related to changes in sensor information + * @param notificationType Shall be set to "SensorDiscoveryEventNotification" + * @param timeStamp Time stamp + * @param sensorDiscoveryEventType The specific event triggering this notification + * @param sensorDiscoveryInfo The information about the sensor(s) that are related to this discovery event notification + * @param _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.4.1-1: Attributes of the SensorDiscoveryEventNotification + */ + type record SensorDiscoveryEventNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + SensorDiscoveryEventType sensorDiscoveryEventType, + SensorDiscoveryInfos sensorDiscoveryInfo, + Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a subscription to notifications from the Sensor-sharing Service regarding events related to changes in sensor information + * @param notificationType Shall be set to "SensorStatusNotification" + * @param timeStamp Time stamp + * @param sensorStatusInfo The data gathered from the sensor(s) and related information + * @param _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.4.2-1: Attributes of the SensorStatusNotification + */ + type record SensorStatusNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + SensorStatusInfos sensorStatusInfo, + Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a subscription to notifications from the Sensor-sharing Service regarding events related to changes in sensor information + * @param notificationType Shall be set to "SensorDataNotification" + * @param timeStamp Time stamp + * @param sensorData The data gathered from the sensor(s) and related information + * @param _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.4.3-1: Attributes of the SensorDataNotification + */ + type record SensorDataNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + SensorDatas sensorData, + Links links + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents a subscription to notifications from the Sensor-sharing Service regarding events related to changes in sensor information + * @param notificationType Shall be set to "ExpiryNotification" + * @param timeStamp Time stamp + * @param _links Object containing hyperlinks related to the resource + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.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 type represents the parameters that describe an area + * @param shape The shape of the area monitored + * @param points Shall include one point if the shape is CIRCLE + * @param radius Shall be present if the shape is CIRCLE + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.5.1-1: Attributes of type AreaInfo + */ + type record AreaInfo { + Shape shape, + Points points, + Json.UInteger radius optional + } + type set of AreaInfo AreaInfos; + + /** + * @desc The shape of the area monitored + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.5.1-1: Attributes of type AreaInfo + */ + type enumerated Shape { + CIRCLE, + POLYGON + } + + /** + * @desc This type represents the geographical location of a point + * @param latitude Location latitude, expressed in the range -90° to +90° + * @param longitude Location longitude, expressed in the range -180° to +180° + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.5.2-1: Attributes of type Point + */ + type record Point { + Json.Number latitude, + Json.Number longitude + } + type record length (1 .. infinity) of Point Points; + + /** + * @desc This type represents a sensor' characteristic which details the type of sensor and its working functionalities, such as the model of the sensor, the sampling frequency, the operating range, the accuracy + * @param characteristicName The name of the characteristic + * @param characteristicValue The value of the characteristic + * @param characteristicValue characteristicUnitOfMeasure The unit of measure of the characteristic + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.5.4-1: Attributes of type SensorCharacteristic + */ + type record SensorCharacteristic { + Json.String characteristicName, + Json.String characteristicValue, + Json.String characteristicUnitOfMeasure optional + } + type set of SensorCharacteristic SensorCharacteristics; + + /** + * @desc This type represents specified event types for sensor discovery report + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.6.2-1: Enumeration SensorDiscoveryEventType + */ + type enumerated SensorDiscoveryEventType { + NEW_SENSOR, + SENSOR_REMOVED, + SENSOR_UPDATE + } + + /** + * @desc The service consumer's subscriptions + * @member href The URI referring to the subscription + * @member subscriptionType Type of the subscription + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.3.4-1: Attributes of the SubscriptionLinkList + */ + type record Subscription { + Json.AnyURI href, + Json.String subscriptionType + } + type set of Subscription Subscriptions; + + /** + * @desc This type represents a type of link + * @member href URI referring to a resource + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.6.1-1: Definition of type LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc Hyperlink related to the resource + * @member subscription URI identifying the subscription for the test notification + * @see ETSI GS MEC 046 V3.1.1 (2024-04) Table 6.4.1-1: Attributes of the TestNotification + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @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 046 V3.1.1 (2024-04) Clause 6.5.2 Type: WebsockNotifConfig + */ + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } + +} with { + encode "JSON" +} // End of module SensorsSharingService_TypesAndValues diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn index c678558f380be9b27c0f26c9050a524438f96f1f..9ab3b542f3ad7575a718a82cb78213a41d947bcb 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Functions.ttcn @@ -36,20 +36,23 @@ module TrafficManagementAPI_Functions { var HttpMessage v_response; p_bw_allocation_id := ""; + f_init_default_headers_list(-, -, v_headers); httpPort.send( m_http_request( - m_http_request_post( - PICS_ROOT_API & PX_ME_BWM_URI, - v_headers, - m_http_message_body_json( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_URI, + v_headers, + m_http_message_body_json( m_body_json_bw_info( m_bw_info( p_app_instance_id, - APPLICATION_SPECIFIC_BW_ALLOCATION, // Request type - "1024", // FixedAllocation - Downlink // AllocationDirection - )))))); + APPLICATION_SPECIFIC_BW_ALLOCATION, + "1024", + Downlink, + PX_APP_NAME, + PX_APP_ALLOCATION_ID + )))))); tc_ac.start; alt { [] httpPort.receive( @@ -59,12 +62,11 @@ module TrafficManagementAPI_Functions { mw_body_json_bw_info( mw_bw_info( p_app_instance_id - )))))) -> value v_response { + )))))) -> value v_response { var charstring_list v_header_location; - tc_ac.stop; - log("f_create_bw_allocation_resource: BwInfo resource created: ", v_response); + var charstring_list v_header_location; f_get_header(valueof(v_response.response.header), "Location", v_header_location); p_bw_allocation_id := regexp( v_header_location[0], @@ -106,6 +108,97 @@ module TrafficManagementAPI_Functions { } // End of 'alt' statement } // End of function f_delete_bw_allocation_resource + function f_create_bw_chg_event_subscription( + out BwChgEventSubscription p_bw_chg_event_subscription, + out charstring p_subscription_id + ) runs on HttpComponent { + + var Headers v_headers; + var HttpMessage v_response; + + f_init_default_headers_list(-, -, v_headers); + + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ROOT_API & PX_ME_BWM_SUB_URI, + v_headers, + m_http_message_body_json( + m_body_json_bw_chg_event_subscription( + m_bw_chg_event_subscription( + PX_BW_SUBSCRIPTION_TYPE, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + {m_filter_criteria(-,-)} + )))))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_201_created( + mw_http_message_body_json( + mw_body_json_bw_chg_event_subscription( + mw_bw_chg_event_subscription( + PX_BW_SUBSCRIPTION_TYPE, + PX_BW_EVENT_SUB_CALLBACK_URI, + -, + -, + { + mw_filter_criteria( + 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_BWM_SUB_URI & "/(?*)", + 0 + ); + p_bw_chg_event_subscription := v_response.response.body.json_body.bwchgeventsubscription; + log("f_create_bw_chg_event_subscription: INFO: IUT successfully responds to the subscription: ", p_bw_chg_event_subscription); + log("f_create_bw_chg_event_subscription: INFO: p_subscription_id: ", p_subscription_id); + } + [] tc_ac.timeout { + log("f_create_bw_chg_event_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_create_bw_chg_event_subscription + + function f_delete_bw_chg_event_subscription( + in charstring p_subscription_id + ) runs on HttpComponent { + var Headers v_headers; + + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + PICS_ROOT_API & PX_ME_BWM_SUB_URI & "/" & p_subscription_id, + v_headers + ))); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_204_no_content + )) { + tc_ac.stop; + } + [] tc_ac.timeout { + log("f_delete_bw_chg_event_subscription: INCONC: Expected message not received"); + } + } // End of 'alt' statement + + } // End of function f_delete_bw_chg_event_subscription + function f_create_mts_session_info_resource( in Json.String p_app_instance_id, out charstring p_mts_session_id, @@ -127,9 +220,11 @@ module TrafficManagementAPI_Functions { PX_APP_INSTANCE_ID, APPLICATION_SPECIFIC_MTS_SESSION, // Request type m_qosd, // QoS - LowCost, // MtsMode - Downlink // TrafficDirection - )))))); + QoS, // MtsMode + Downlink, // TrafficDirection + -, + PX_APP_NAME + )))))); tc_ac.start; alt { [] httpPort.receive( @@ -150,6 +245,8 @@ module TrafficManagementAPI_Functions { p_mts_session_id := v_mts_session_info_id[0]; p_mts_session_info := v_response.response.body.json_body.mtsSessionInfo; } + p_mts_session_info := v_response.response.body.json_body.mtsSessionInfo; + log("f_create_mts_session_info_resource: BwInfo resource created: ", p_mts_session_info); } [] tc_ac.timeout { log("f_create_mts_session_info_resource: Expected message not received"); diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn index 7250495f4187d559de3f0b0f59eb0a9de4bec0a2..db215a190b380f28b43f96ee9ab52922d15b5a0f 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pics.ttcn @@ -5,6 +5,11 @@ module TrafficManagementAPI_Pics { */ modulepar boolean PICS_BWMANAGEMENT_API_SUPPORTED := true; + /** + * @desc Does the IUT support TrafficManagementAPI? + */ + modulepar boolean PICS_BWMANAGEMENT_SUBCRIPTION_API_SUPPORTED := true; + /** * @desc Does the IUT support Multi-access Traffic Steering API? */ diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn index 02851fdecdb13a0274855ef4beccda0731e7b4df..442f5e39c57bb1327dff2c3d11b626f94cd638cb 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Pixits.ttcn @@ -8,16 +8,18 @@ module TrafficManagementAPI_Pixits { // LibMec/TrafficManagementAPI import from TrafficManagementAPI_TypesAndValues all; - // LibMec/LocationAPI - import from LocationAPI_TypesAndValues all; - modulepar Json.String PX_APP_INSTANCE_ID := "appInst01"; + modulepar Json.String PX_APP_INSTANCE_ID := "81c51643-8c6f-4781-ad45-f8a457ca549b"; modulepar Json.String PX_APP_INSTANCE_ID_2 := "appInst02"; - modulepar Json.String PX_APP_ALLOCATION_ID := "appAllocationId01"; + modulepar Json.String PX_APP_ALLOCATION_ID := "1"; modulepar Json.String PX_APP_NAME := "appName01"; + + modulepar Json.String PX_SESSION_IPv4 := "10.10.10.10"; + + modulepar Json.String PX_SESSION_PORT := "1010"; modulepar Json.String PX_UNKNOWN_APP_INSTANCE_ID := "appInst99"; @@ -26,7 +28,17 @@ module TrafficManagementAPI_Pixits { modulepar Json.String PX_UNKNOWN_APP_ALLOCATION_ID := "appAllocationId99"; modulepar Json.String PX_UNKNOWN_BW_ALLOCATION_ID := "bwAllocationId99"; + + modulepar Json.String PX_BW_SUBSCRIPTION_TYPE := "BwChgEventSubscription"; - modulepar ResourceURL PX_RESOURCE_URL := "http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1"; + modulepar Json.String PX_BW_NOTIFICATION_TYPE := "BwChgEventNotification"; + + modulepar Json.String PX_BW_EVENT_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456"; + + modulepar Json.AnyURI PX_BW_SUB_WEB_SOCKET := "ws://clientApp.example.com/location_notifications/123456"; + + modulepar Json.String PX_UNKNOWN_SUBSCRIPTION_ID := "UnknownSubId"; + + modulepar Json.String PX_UNKNOWN_SUBSCRIPTION_TYPE := "UnknownSubType"; } // End of module TrafficManagementAPI_Pixits diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn index 7eb39f08ece78a067f43eb9ea40cd5ec6bd2cb42..4aa25b60d49d321a01404f3a82a06e05e92fc8da 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_Templates.ttcn @@ -14,7 +14,7 @@ module TrafficManagementAPI_Templates { import from TrafficManagementAPI_Pixits all; template (omit) BwInfo m_bw_info( - in AppInsId p_appInsId := PX_APP_INSTANCE_ID, + in AppInsId p_appInsId, in BwRequestType p_requestType, in FixedAllocation p_fixedAllocation, in AllocationDirection p_allocationDirection, @@ -105,13 +105,13 @@ module TrafficManagementAPI_Templates { protocol := p_protocol } // End of template m_session_filter - template SessionFilterItem mw_session_filter( - template (present) SourceIp p_sourceIp := ?, - template (present) SourcePort p_sourcePort := ?, - template DstAddress p_dstAddress := *, - template DstPort p_dstPort := *, - template Protocol p_protocol := * - ) := { + template (present) SessionFilterItem mw_session_filter( + template (present) SourceIp p_sourceIp := ?, + template (present) SourcePort p_sourcePort := ?, + template DstAddress p_dstAddress := *, + template DstPort p_dstPort := *, + template Protocol p_protocol := * + ) := { sourceIp := p_sourceIp, sourcePort := p_sourcePort, dstAddress := p_dstAddress, @@ -119,6 +119,106 @@ module TrafficManagementAPI_Templates { protocol := p_protocol } // End of template mw_session_filter + template (omit) BwChgEventSubscription m_bw_chg_event_subscription( + in Json.String p_subscription_type, + in template (omit) Json.AnyURI p_callbackReference := omit, + in template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + in template (omit) Links p_links := omit, + in template (omit) FilterCriteria p_filtercriteria := omit + ) := { + subscriptionType := p_subscription_type, + callbackReference := p_callbackReference, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filtercriteria + } + + template (present) Links m_links( + template (present) LinkType p_self := ? + ) := { + self_ := p_self + } // End of template m_links + + template (omit) FilterCriteria_ m_filter_criteria( + in AppInsId p_appInsId := PX_APP_INSTANCE_ID, + in template (omit) Json.String p_ueIp := omit + ) := { + appInsId := p_appInsId, + ueIp := p_ueIp + } // End of template m_filter_criteria + + template (present) BwChgEventSubscription mw_bw_chg_event_subscription( + template (present) Json.String p_subscriptionType := ?, + template (present) Json.AnyURI p_callbackReference := ?, + template (omit) WebsockNotifConfig p_websockNotifConfig := omit, + template Links p_links := *, + template (present) FilterCriteria p_filtercriteria := ? + ) := { + subscriptionType := p_subscriptionType, + callbackReference := p_callbackReference, + websockNotifConfig := p_websockNotifConfig, + links := p_links, + filterCriteria := p_filtercriteria + } + + template (present) SubscriptionLinkList mw_subscription_link( + template (present) SubscriptionLink_List p_links := ? + ) := { + links := p_links + } // End of template mw_subscription_link_list + + template (present) SubscriptionLink_List mw_subscription_link_list( + template LinkType p_links := *, + template (present) Subscriptions p_subscription := ? + ) := { + self_ := p_links, + subscriptions := p_subscription + } // End of template mw_subscription_link_list + + template (present) Links mw_links( + template (present) LinkType p_self := ? + ) := { + self_ := p_self + } // End of template mw_links + + template (present) Subscription mw_subscription( + template (present) Json.AnyURI p_href := ?, + template (present) Json.String p_subscriptionType := ? + ) := { + href := p_href, + subscriptionType := p_subscriptionType + } // End of template mw_subscription + + template (present) FilterCriteria_ mw_filter_criteria( + template Json.String p_appInsId := *, + template (omit) Json.String p_ueIp := omit + ) := { + appInsId := p_appInsId, + ueIp := p_ueIp + } // End of template m_flowfilterW + + template (present) BwChgEventNotification mw_bw_chg_event_notification( + template (present) Json.String p_notificationType := ?, + template TimeStamp p_timeStamp := *, + template (present) DataVolDispersion p_dataVolDispersion := ?, + template Links p_links := ? + ) := { + notificationType := p_notificationType, + timeStamp := p_timeStamp, + dataVolDispersion := p_dataVolDispersion, + links := p_links + } // End of template mw_bw_chg_event_notificatipn + + template (present) DataVolDispersion_ mw_data_vol_dispersion( + template (present) UInt32 p_dataVol, + template (present) Json.String p_appInsId, + template Json.String p_ueIp := * + ) := { + dataVol := p_dataVol, + appInsId := p_appInsId, + ueIp := p_ueIp + } // End of template mw_data_vol_dispersion + template (omit) MtsCapabilityInfo m_mts_capability_info( in template (value) MtsAccessInfos p_mtsAccessInfo, in template (value) MtsModes p_mtsMode, @@ -164,7 +264,7 @@ module TrafficManagementAPI_Templates { template MtsSessionInfo mw_mts_session_info( template (present) AppInsId p_appInsId := ?, template (present) MtsRequestType p_requestType := ?, - template (present) QosD p_qosD := ?, + template QosD p_qosD := *, template (present) MtsMode p_mtsMode := ?, template (present) TrafficDirection p_trafficDirection := ?, template SessionId p_sessionId := *, @@ -185,7 +285,7 @@ module TrafficManagementAPI_Templates { template (omit) FlowFilterItem m_flow_filter( in template (value) SourceIp p_sourceIp, - in template (value) SourcePort p_sourcePort, + in template (value) Json.UInteger p_sourcePort, in template (omit) DstAddress p_dstIp := omit, in template (omit) DstPort p_dstPort := omit, in template (omit) Protocol p_protocol := omit, @@ -203,7 +303,7 @@ module TrafficManagementAPI_Templates { template FlowFilterItem mw_flow_filter( template (present) SourceIp p_sourceIp := ?, - template (present) SourcePort p_sourcePort := ?, + template (present) Json.UInteger p_sourcePort := ?, template DstAddress p_dstIp := *, template DstPort p_dstPort := *, template Protocol p_protocol := *, diff --git a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn index f9d5380dba43d2a0efa42f3e636d5bb7e2c6769b..8819943fd46c4dc2500dea54acd1a794e40dd7e8 100644 --- a/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/TrafficManagementAPI/ttcn/TrafficManagementAPI_TypesAndValues.ttcn @@ -3,6 +3,9 @@ module TrafficManagementAPI_TypesAndValues { // JSON import from Json all; + // LibCommon + import from LibCommon_BasicTypesAndValues all; + // LibMec import from LibMec_TypesAndValues all; @@ -16,7 +19,7 @@ module TrafficManagementAPI_TypesAndValues { * @member fixedBWPriority Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document * @member fixedAllocation Size of requested fixed BW allocation in [bps] * @member allocationDirection The direction of the requested BW allocation - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type record BwInfo { AllocationId allocationId optional, @@ -28,7 +31,7 @@ module TrafficManagementAPI_TypesAndValues { FixedBWPriority fixedBWPriority optional, FixedAllocation fixedAllocation, AllocationDirection allocationDirection - } + } type set of BwInfo BwInfoList; /** @@ -40,7 +43,7 @@ module TrafficManagementAPI_TypesAndValues { * @member fixedBWPriority Indicates the allocation priority when dealing with several applications or sessions in parallel * @member fixedAllocation Size of requested fixed BW allocation in [bps] * @member allocationDirection The direction of the requested BW allocation - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.3 Type: BwInfoDeltas + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.3 Type: BwInfoDeltas */ type record BwInfoDeltas { Json.String allocationId, @@ -54,19 +57,19 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Bandwidth allocation instance identifier - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String AllocationId; /** * @desc Application instance identifier - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String AppInsId; /** * @desc Numeric value (0 - 255) corresponding to specific type of consumer - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type enumerated BwRequestType { APPLICATION_SPECIFIC_BW_ALLOCATION (0), @@ -77,7 +80,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Numeric value (0 - 255) corresponding to specific type of consumer - * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type enumerated MtsRequestType { APPLICATION_SPECIFIC_MTS_SESSION (0), @@ -88,7 +91,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type set of SessionFilterItem SessionFilter; /** @@ -98,7 +101,7 @@ module TrafficManagementAPI_TypesAndValues { * @member dstAddress Destination address identity of session (including range) * @member dstPort Destination port identity of session * @member protocol Protocol number - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type record SessionFilterItem { SourceIp sourceIp optional, @@ -110,7 +113,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Indicates the allocation priority when dealing with several applications or sessions in parallel. - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type enumerated FixedBWPriority { reserved @@ -118,27 +121,28 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Size of requested fixed BW allocation in [bps] - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String FixedAllocation; /** * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.UInteger Seconds; /** * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.UInteger NanoSeconds; /** * @desc The direction of the requested BW allocation - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ + type enumerated AllocationDirection { Downlink, Uplink, @@ -147,40 +151,171 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Source address identity of session (including range) - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String SourceIp; /** * @desc Source port identity of session - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ - type Json.UInteger SourcePort; + type Json.String SourcePort; /** * @desc Destination address identity of session (including range) - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String DstAddress; /** * @desc Destination port identity of session - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.UInteger DstPort; /** * @desc Protocol number - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.2 Type: BwInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.2 Type: BwInfo */ type Json.String Protocol; + /** + * @desc This type represents a subscription to the notifications from BWM service about the bandwidth utility or data volume dispersion information. + * @param subscriptionType Shall be set to "BwChgEventSubscription" + * @param callbackReference URI exposed by the client on which to receive notifications via HTTP + * @param websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications + * @param _links Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests + * @param FilterCriteria List of filtering criteria for the BW change event subscription. + * @see ETSI GS MEC 015 V3.1.1 (2024-03) Table 7.3.2: Definition of type BwChgEventSubscription + */ + type record BwChgEventSubscription { + Json.String subscriptionType, + Json.AnyURI callbackReference optional, + WebsockNotifConfig websockNotifConfig optional, + Links links optional, + FilterCriteria filterCriteria optional + } with { + variant (links) "name as '_links'"; + } + + /** + * @desc This type represents configuration for the delivery of subscription notifications over Websockets + * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications + * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.5.3 Type: WebsockNotifConfig + */ + type record WebsockNotifConfig { + Json.AnyURI websocketUri optional, + Json.Bool requestWebsocketUri optional + } + + /** + * @desc Filtering criteria for the BW change event subscription + * @param appInsId Application instance identifier + * @param ueIp Source address identity of session + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Table 7.3.2: Attributes of the BwChgEventSubscription + */ + type record FilterCriteria_ { + AppInsId appInsId optional, + Json.String ueIp optional + } + type set of FilterCriteria_ FilterCriteria + + /** + * @desc List of links related to currently existing subscriptions for the service consumer + * @member links List of hyperlinks related to the resource + * @member subscription + * @see Table 7.3.3-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLinkList { + SubscriptionLink_List links optional // URI of this resource + } 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 + * @member subscription + * @see Table 7.3.3-1: Attributes of the SubscriptionLinkList + */ + type record SubscriptionLink_List { + LinkType self_, + Subscriptions subscriptions optional // List of subscriptions + } with { + variant (self_) "name as 'self'"; + } + + + /** + * @desc Hyperlink related to the resource + * @see ETSI GS MEC 015 V3.1.1 (2024-03) Table 7.3.2: Attributes of the BwChgEventSubscription + */ + type record Links { + LinkType self_ + } with { + variant (self_) "name as 'self'"; + } + + /** + * @desc Type of link + * @member href URI referring to a resource + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.5.3 Type: LinkType + */ + type record LinkType { + Json.AnyURI href + } + + /** + * @desc Attributes of SubscriptionLinkList. + * @field href The URI referring to the subscription (mandatory). + * @field subscriptionType Type of the subscription. + * @see Table 7.3.3-1: Attributes of the SubscriptionLinkList + */ + type record Subscription { + Json.AnyURI href, // The URI referring to the subscription + Json.String subscriptionType // Type of the subscription + } + type set of Subscription Subscriptions + + /** + * @desc This type represents a notification for bandwidth change events. + * @member notificationType Shall be set to "BwChgEventNotification". + * @member timeStamp Date and time of the generation of the notification (optional). + * @member dataVolDispersion List of data volume dispersion information. + * @member links Object containing hyperlinks related to the resource (optional). + * @see Table 7.4.2: Attributes of the BwChgEventNotification + */ + type record BwChgEventNotification { + Json.String notificationType, + TimeStamp timeStamp optional, + DataVolDispersion dataVolDispersion, + Links links optional + } with { + variant (links) "name as '_links'"; + }; + + /** + * @desc This type represents data volume dispersion information. + * @member dataVol Sum of data volume (UL/DL) exchanged per UE per application. + * @member appInsId Application instance identifier. + * @member ueIp Source address identity of session (optional). + */ + type record DataVolDispersion_ { + Json.UInteger dataVol, + Json.String appInsId, + Json.String ueIp optional + }; +type set of DataVolDispersion_ DataVolDispersion + + + /** * @desc The information on access network connection * @member timeStamp Time stamp to indicate when the corresponding information elements are sent * @member mtsAccessInfo The information on access network connection as defined below * @member mtsMode Numeric value corresponding to a specific MTS operation supported by the TMS - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type record MtsCapabilityInfo { TimeStamp timeStamp optional, @@ -190,7 +325,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc The information on access network connection as defined below - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type enumerated MtsMode { LowCost (0), @@ -208,7 +343,7 @@ module TrafficManagementAPI_TypesAndValues { * @member accessId Unique identifier for the access network connection * @member accessType Numeric value (0-255) corresponding to specific type of access network * @member metered Numeric value (0-255) - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type record MtsAccessInfo { AccessId accessId, @@ -219,13 +354,13 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Unique identifier for the access network connection - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type Json.UInteger AccessId; /** * @desc Numeric value (0-255) corresponding to specific type of access network - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type enumerated AccessType { Unknown (0), @@ -246,7 +381,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc Numeric value (0-255) - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.4 Type: MtsCapabilityInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.4 Type: MtsCapabilityInfo */ type enumerated Metered { CxNotMetered (0), @@ -267,7 +402,7 @@ module TrafficManagementAPI_TypesAndValues { * @member qosD QoS requirement description of the MTS session * @member mtsMode Numeric value corresponding to a specific MTS operation * @member trafficDirection The direction of the requested MTS session supported by the TMS - * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type record MtsSessionInfo { SessionId sessionId optional, @@ -275,8 +410,8 @@ module TrafficManagementAPI_TypesAndValues { AppInsId appInsId, Json.String appName optional, MtsRequestType requestType, - FlowFilter flowFilter, - QosD qosD, + FlowFilter flowFilter optional, + QosD qosD optional, MtsMode mtsMode, TrafficDirection trafficDirection } @@ -284,7 +419,7 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc MTS session instance identifier - * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type Json.String SessionId; @@ -297,11 +432,11 @@ module TrafficManagementAPI_TypesAndValues { * @member protocol Protocol number * @member dscp DSCP in the IPv4 header or Traffic Class in the IPv6 header * @member flowlabel Flow Label in the IPv6 header, applicable only if the flow is IPv6 - * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type record FlowFilterItem { SourceIp sourceIp optional, - SourcePort sourcePort optional, + Json.UInteger sourcePort optional, DstAddress dstIp optional, DstPort dstPort optional, Protocol protocol optional, @@ -312,19 +447,19 @@ module TrafficManagementAPI_TypesAndValues { /** * @desc The direction of the requested MTS session supported by the TMS - * @see ETSI GS MEC 015 V2.2.1 (2022-12) 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) 7.2.5 Type: MtsSessionInfo */ type AllocationDirection TrafficDirection; /** * @desc DSCP in the IPv4 header or Traffic Class in the IPv6 header - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.5 Type: MtsSessionInfo */ type Json.UInteger Dscp; /** * @desc Flow Label in the IPv6 header, applicable only if the flow is IPv6 - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.5 Type: MtsSessionInfo */ type Json.UInteger Flowlabel; @@ -335,7 +470,7 @@ module TrafficManagementAPI_TypesAndValues { * @member maxLoss Tolerable packet loss rate in [1/10^x] * @member maxJitter Tolerable jitter in [10 nanoseconds] * @member priority numeric value (0 - 255) corresponding to the traffic priority - * @see ETSI GS MEC 015 V2.2.1 (2022-12) Clause 7.2.5 Type: MtsSessionInfo + * @see ETSI GS MEC 015 V3.1.1 (2024-04) Clause 7.2.5 Type: MtsSessionInfo */ type record QosD { Json.UInteger minTpt optional, diff --git a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Functions.ttcn b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Functions.ttcn index 7b48d6409f38817a2199c558e7ae637871718573..7795a256bba802026cb546bdff9e5d6445ab5b9b 100644 --- a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Functions.ttcn +++ b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Functions.ttcn @@ -39,8 +39,8 @@ module UEidentityAPI_Functions { 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(p_ue_identity_tag, "UTF-8")), - p_headers + 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(p_ue_identity_tag, "UTF-8")), + p_headers ) ) ); @@ -60,7 +60,7 @@ module UEidentityAPI_Functions { for (var integer v_i := 0; v_i < lengthof(v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags); v_i := v_i + 1) { if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].ueIdentityTag == p_ue_identity_tag) { //log("Processing ", v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].ueIdentityTag); - //log("State ", v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state); + log("State ", v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state); if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state == UNREGISTERED) { v_result := 0; } else if (v_response.response.body.json_body.ueIdentityTagInfo.ueIdentityTags[v_i].state == REGISTERED) { diff --git a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn index e7fe2cd791c48b530919269fddac12086de35ecd..d3589d90736eb95c6985439b5950f89e7e5ea8a0 100644 --- a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn @@ -2,7 +2,7 @@ * @author ETSI / STF569 / TTF T027 * @version $URL$ * $Id$ - * @desc Module containing types and values for ETSI GS MEC 014 V3.1.1 (2023-06) + * @desc Module containing types and values for ETSI GS MEC 014 V3.2.1 (2024-02) * @copyright ETSI Copyright Notification * No part may be reproduced except as authorized by written permission. * The copyright and the foregoing restriction extend to reproduction in all media. @@ -16,7 +16,7 @@ module UEidentityAPI_TypesAndValues { /** * @desc Information of UE identity tag used in UE Identity feature * @member ueIdentityTags 1 to N tags presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2024-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record UeIdentityTagInfo { UeIdentityTags ueIdentityTags @@ -24,13 +24,13 @@ module UEidentityAPI_TypesAndValues { /** * @desc Specific tag presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2024-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type Json.String UeIdentityTag; /** * @desc Status of the resource ueIdentityTagInfo - * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2023-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type enumerated State { UNREGISTERED, @@ -42,7 +42,7 @@ module UEidentityAPI_TypesAndValues { * @desc ME Application instance to a ME Platform * @member ueIdentityTag Specific tag presented by a ME Application instance to a ME Platform * @member state Status of the resource ueIdentityTagInfo - * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2024-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type record UeIdentityTagItem { Json.String ueIdentityTag, @@ -51,7 +51,7 @@ module UEidentityAPI_TypesAndValues { /** * @desc 1 to N tags presented by a ME Application instance to a ME Platform - * @see ETSI GS MEC 014 V3.1.1 (2023-06) Table 6.2.2-1: Definition of type UeIdentityTagInfo + * @see ETSI GS MEC 014 V3.2.1 (2024-02) Table 6.2.2-1: Definition of type UeIdentityTagInfo */ type set of UeIdentityTagItem UeIdentityTags; diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn index e58c57590065a85691de6cd7b77467754a791139..8e750f385e6a055527cdf6bce645de672494dad5 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Pixits.ttcn @@ -20,8 +20,6 @@ module V2XInformationServiceAPI_Pixits { modulepar charstring PX_V2X_LATITUDE := "latitude,43.730846,longitude,7.415385"; - modulepar charstring PX_LOC_GRANULARITY := "17"; - modulepar charstring PX_MCC := "1"; modulepar charstring PX_MNC := "1"; @@ -60,6 +58,30 @@ module V2XInformationServiceAPI_Pixits { modulepar Json.String PX_V2X_MSG_DISTRIBUTION_SERVER_IP_ADDRESS := "10.8.0.1"; - modulepar Json.UInt16 PX_V2X_MSG_DISTRIBUTION_SERVER_PORT := 12345; + modulepar Json.UInt16 PX_V2X_MSG_DISTRIBUTION_SERVER_PORT := 12345; + + modulepar charstring PX_LOC_GRANULARITY := "17"; + + modulepar Json.String PX_STREAM_ID_1 := "0"; + + modulepar Json.String PX_STREAM_ID_2 := "0"; + + modulepar Json.String PX_STREAM_ID_3 := "0"; + + modulepar Json.Number PX_QoS_LAT_1 := 43.729416; + + modulepar Json.Number PX_QoS_LON_1 := 7.414853; + + modulepar Json.UInteger PX_QoS_TS_1 := 1653295620; + + modulepar Json.Number PX_QoS_LAT_2 := 43.732456; + + modulepar Json.Number PX_QoS_LON_2 := 7.418417; + + modulepar Json.UInteger PX_QoS_TS_2 := 1653299220; + + modulepar Json.Number PX_QoS_LAT_1_OUT_OF_COVERAGE := 45.729416; + + modulepar Json.Number PX_QoS_LON_1_OUT_OF_COVERAGE := 10.414853; } // End of module V2XInformationServiceAPI_Pixits diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn index dc06b5659b0d8b8ae84513776cd908f2309b0f7f..8cf870816443abe066e2afae3f31ce479dafee6f 100644 --- a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn +++ b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_Templates.ttcn @@ -156,9 +156,9 @@ module V2XInformationServiceAPI_Templates { } // 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) PredictionTarget p_predictionTarget := SINGLE_UE_PREDICTION, in template (value) Json.String p_locationGranularity, - in template (value) Qos p_qos, + in template (omit) Qos p_qos := omit, in template (omit) TimeStamp p_noticePeriod := omit, in template (omit) PredictionArea p_predictionArea := omit, in template (omit) Routes p_routes := omit, @@ -191,6 +191,22 @@ module V2XInformationServiceAPI_Templates { qos := p_qos } // End of template mw_predicted_qos + template (value) PredictionArea m_prediction_area( + in template (value) LocationInfo p_center, + in template (value) Json.String p_radius + ) := { + center := p_center, + radius := p_radius + } // End of teradius m_prediction_area + + template (present) PredictionArea mw_prediction_area( + template (present) LocationInfo p_center := ?, + template (present) Json.String p_radius := ? + ) := { + center := p_center, + radius := p_radius + } // End of teradius mw_prediction_area + template (value) Qos m_qos( in template (value) StreamList p_stream ) := { @@ -204,14 +220,18 @@ module V2XInformationServiceAPI_Templates { } // End of template mw_qos template (value) Stream m_stream( + in Json.String p_stream_id, in template (value) QosKpiList p_qos_kpi ) := { - qosKpi := p_qos_kpi + streamId := p_stream_id, + qosKpi := p_qos_kpi } // End of template m_stream template (present) Stream mw_stream( + template (present) Json.String p_stream_id := ?, template (present) QosKpiList p_qos_kpi := ? ) := { + streamId := p_stream_id, qosKpi := p_qos_kpi } // End of template mw_stream @@ -238,7 +258,7 @@ module V2XInformationServiceAPI_Templates { template (omit) RouteInfo m_route_info( in template (value) LocationInfo p_location, in template (omit) TimeStamp p_time := omit - ) := { + ) := { location := p_location, time := p_time } // End of template m_route_info @@ -252,7 +272,7 @@ module V2XInformationServiceAPI_Templates { } // End of template mw_route_info template (omit) LocationInfo m_location_info( - in template (value) Ecgi p_ecgi, + in template (omit) Ecgi p_ecgi, in template (omit) LocationInfoGeoArea p_geoArea := omit ) := { ecgi := p_ecgi, @@ -260,7 +280,7 @@ module V2XInformationServiceAPI_Templates { } // End of template m_location_info template LocationInfo mw_location_info( - template (present) Ecgi p_ecgi := ?, + template Ecgi p_ecgi := ?, template LocationInfoGeoArea p_geoArea := * ) := { ecgi := p_ecgi, @@ -712,4 +732,48 @@ module V2XInformationServiceAPI_Templates { streamId := p_streamId } // End of template mw_filterCriteria + template (value) SubscriptionLinkList m_subscription_link_list( + in template (value) SubscriptionLinks p_links + ) := { + links := p_links + } // End of template m_subscription_link_list + + template (present) SubscriptionLinkList mw_subscription_link_list( + template (present) SubscriptionLinks p_links := ? + ) := { + links := p_links + } // End of template mw_subscription_link_list + + template (value) SubscriptionLinks m_subscription_links( + in template (value) LinkType p_self_, + in template (value) SubscriptionList p_subscriptions + ) := { + self_ := p_self_, + subscriptions := p_subscriptions + } // End of template m_subscription_links + + template (present) SubscriptionLinks mw_subscription_links( + template (present) LinkType p_self_ := ?, + template (present) SubscriptionList p_subscriptions := ? + ) := { + self_ := p_self_, + subscriptions := p_subscriptions + } // End of template mw_subscription_links + + template (value) 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) 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 V2XInformationServiceAPI_Templates diff --git a/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn b/ttcn/LibMec/V2XInformationServiceAPI/ttcn/V2XInformationServiceAPI_TypesAndValues.ttcn index 450308e5d71d3dbc378848cb050fe95001652dc3..51b83ba8cf6aa0278a477e3fbdceb9db37aded04 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 V3.1.1 (2023-03) + * @desc Types And Values for ETSI GS MEC 030 V3.3.1 (2024-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. @@ -20,7 +20,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.2-1: Attributes of the UuUnicastProvisioningInfo */ type record UuUnicastProvisioningInfo { TimeStamp timeStamp optional, @@ -32,7 +32,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.2-1: Attributes of the UuUnicastProvisioningInfo */ type record ProInfoUuUnicast { LocationInfo locationInfo, @@ -45,7 +45,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.3-1: Attributes of the UuMbmsProvisioningInfo */ type record UuMbmsProvisioningInfo { TimeStamp timeStamp optional, @@ -56,12 +56,12 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.3-1: Attributes of the UuMbmsProvisioningInfo */ type record ProInfoUuMbms { LocationInfo locationInfo, - UuMbmsNeighbourCellInfoList neighbourCellInfo optional, - V2xServerUsd v2xServerUsd + V2xServerUsd v2xServerUsd, + UuMbmsNeighbourCellInfoList neighbourCellInfo optional } type set of ProInfoUuMbms ProInfoUuMbmsList; @@ -69,7 +69,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.4-1: Attributes of the Pc5ProvisioningInfo */ type record Pc5ProvisioningInfo { TimeStamp timeStamp optional, @@ -81,7 +81,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.4-1: Attributes of the Pc5ProvisioningInfo */ type record Pc5ProvisioningInfoProInfoPc5 { LocationInfo locationInfo, @@ -94,7 +94,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.5-1: Attributes of the V2xMsgDistributionServerInfo */ type record V2xMsgDistributionServerInfo { V2xMsgDistributionServers v2xMsgDistributionServer, @@ -110,7 +110,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.6-1: Attributes of the PredictedQos */ type record PredictedQos { PredictionTarget predictionTarget, @@ -119,14 +119,14 @@ module V2XInformationServiceAPI_TypesAndValues { TimeStamp noticePeriod optional, PredictionArea predictionArea optional, Routes routes optional, - Qos qos + Qos qos optional } type enumerated PredictionTarget { SINGLE_UE_PREDICTION (1), E2E_APPLICATION_INSTANCE_PREDICTION (2) - } with { - variant "JSON: as number" + // } with { + // variant "JSON: as number" } /** @@ -135,20 +135,20 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.6-1: Attributes of the PredictedQos */ type record PredictionArea { LocationInfo center, - Json.String radius + Json.String radius } /** * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.6-1: Attributes of the PredictedQos */ type record Route { - RouteInfoList routeinfo + RouteInfoList routeInfo } type set of Route Routes; @@ -156,7 +156,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.6-1: Attributes of the PredictedQos */ type record RouteInfo { LocationInfo location, @@ -167,7 +167,7 @@ module V2XInformationServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.6-1: Attributes of the PredictedQos */ type record Qos { StreamList stream @@ -175,10 +175,12 @@ module V2XInformationServiceAPI_TypesAndValues { /** * @desc Predicted QoS at the related time and vehicular UE location + * @member streamId The identifier of a specific data stream * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.6-1: Attributes of the PredictedQos */ type record Stream { + Json.String streamId, QosKpiList qosKpi } type set of Stream StreamList; @@ -188,7 +190,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.6-1: Attributes of the PredictedQos */ type record QosKpi { Json.String kpiName, @@ -202,7 +204,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.2.7-1: Attributes of the V2xMsgPublication */ type record V2xMsgPublication { V2xMsgPropertiesValues msgPropertiesValues, @@ -219,7 +221,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription */ type record ProvChgUuUniSubscription { Json.String subscriptionType, @@ -241,7 +243,7 @@ module V2XInformationServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription */ type record Links { LinkType self_ @@ -254,7 +256,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 MBMS - * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.3.2-1: Attributes of the ProvChgUuUniSubscription */ type record ProvChgUuUniSubscriptionFilterCriteria { LocationInfo locationInfo, @@ -271,7 +273,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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.3-1: Attributes of the ProvChgUuMbmsSubscription + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.3.3-1: Attributes of the ProvChgUuMbmsSubscription */ type record ProvChgUuMbmsSubscription { Json.String subscriptionType, @@ -290,7 +292,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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.3.3-1: Attributes of the ProvChgUuMbmsSubscription + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.3.3-1: Attributes of the ProvChgUuMbmsSubscription */ type record ProvChgUuMbmsSubscriptionFilterCriteria { LocationInfo locationInfo, @@ -307,7 +309,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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.4-1: Attributes of the ProvChgPc5Subscription + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.3.4-1: Attributes of the ProvChgPc5Subscription */ type record ProvChgPc5Subscription { Json.String subscriptionType, @@ -326,7 +328,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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) Clause 6.3.4 Type: ProvChgPc5Subscription + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Clause 6.3.4 Type: ProvChgPc5Subscription */ type record FilterCriteria { LocationInfo locationInfo, @@ -343,7 +345,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.3.5-1: Attributes of the V2xMsgSubscription */ type record V2xMsgSubscription { Json.String subscriptionType, @@ -366,7 +368,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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.6-1: Attributes of the PredQosSubscription + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.3.6-1: Attributes of the PredQosSubscription */ type record PredQosSubscription { Json.String subscriptionType, @@ -384,7 +386,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.3.7-1: Attributes of the SubscriptionLinkList */ type record SubscriptionLinkList { SubscriptionLinks links @@ -395,12 +397,12 @@ module V2XInformationServiceAPI_TypesAndValues { /** * @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 + * @member subscriptions The service consumer's subscriptions + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.3.7-1: Attributes of the SubscriptionLinkList */ type record SubscriptionLinks { LinkType self_, - SubscriptionList subscription optional + SubscriptionList subscriptions optional } with { variant (self_) "name as 'self'"; } @@ -409,11 +411,11 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.3.7-1: Attributes of the SubscriptionLinkList */ type record Subscription_ { Json.AnyURI href, - Json.String subscriptionType + Json.String subscriptionType } type set of Subscription_ SubscriptionList; @@ -424,7 +426,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.4.2-1: Attributes of the ProvChgUuUniNotification */ type record ProvChgUuUniNotification { Json.String notificationType, @@ -441,7 +443,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.4.3-1: Attributes of the ProvChgUuMbmsNotification */ type record ProvChgUuMbmsNotification { Json.String notificationType, @@ -458,7 +460,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.4.4-1: Attributes of the ProvChgPc5Notification */ type record ProvChgPc5Notification { Json.String notificationType, @@ -476,7 +478,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.4.5-1: Attributes of the V2xMsgNotification */ type record V2xMsgNotification { Json.String notificationType, @@ -492,7 +494,7 @@ module V2XInformationServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.4.5-1: Attributes of the V2xMsgNotification */ type record Links_Notification { LinkType subscription @@ -502,7 +504,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.4.6-1: Attributes of the TestNotification */ type record TestNotification { Json.String notificationType, @@ -515,10 +517,10 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.3-1: Attributes of the LocationInfo */ type record LocationInfo { - Ecgi ecgi, + Ecgi ecgi optional, LocationInfoGeoArea geoArea optional } type set of LocationInfo LocationInfoList; @@ -527,7 +529,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.3-1: Attributes of the LocationInfo */ type record LocationInfoGeoArea { Json.Number latitude, @@ -538,7 +540,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.4-1: Attributes of the Plmn */ type record Plmn { Json.String mcc, @@ -549,7 +551,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @desc E-UTRAN Cell Global Identifier * @member plmn Public Land Mobile Network Identity * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.5-1: Attributes of the Ecgi */ type record Ecgi { Plmn plmn, @@ -570,7 +572,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.6-1: Attributes of the FddInfo */ type record FddInfo { Earfcn ulEarfcn, @@ -605,7 +607,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.7-1: Attributes of the TddInfo */ type record TddInfo { Earfcn earfcn, @@ -617,7 +619,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @desc V2X Application Server address (consisting of IP address and UDP port) for unicast * @member ipAddress * @member udpPort - * @see ETSI GS MEC 030 V3.1.1 (2023-03) Table 6.5.8-1: Attributes of the V2xApplicationServer + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.8-1: Attributes of the V2xApplicationServer */ type record V2xApplicationServer { Json.String ipAddress, @@ -631,7 +633,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.9-1: Attributes of the UuUniNeighbourCellInfo */ type record UuUniNeighbourCellInfo { Plmn plmn, @@ -647,7 +649,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.10-1: Attributes of the V2xServerUsd */ type record V2xServerUsd { Tmgi tmgi, @@ -660,7 +662,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.10-1: Attributes of the V2xServerUsd */ type record Tmgi { Json.String mbmsServiceId, @@ -674,7 +676,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.10-1: Attributes of the V2xServerUsd */ type record SdpInfo { Json.String ipMulticastAddress, @@ -690,7 +692,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Clause 6.5.11 Type: UuMbmsNeighbourCellInfo */ type record UuMbmsNeighbourCellInfo { Plmn plmn, @@ -708,7 +710,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.12-1: Attributes of the Pc5NeighbourCellInfo */ type record Pc5NeighbourCellInfo { Plmn plmn, @@ -722,7 +724,7 @@ module V2XInformationServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.13-1: Attributes of the LinkType */ type record LinkType { Json.AnyURI href @@ -734,7 +736,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.14-1: Attributes of the V2xMsgPropertiesValues */ type record V2xMsgPropertiesValues { StdOrganization stdOrganization, @@ -745,7 +747,7 @@ module V2XInformationServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.14-1: Attributes of the V2xMsgPropertiesValues */ type enumerated StdOrganization { ETSI @@ -753,16 +755,29 @@ module V2XInformationServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.14-1: Attributes of the V2xMsgPropertiesValues */ type enumerated MsgType { - denm (1), - cam (2), - poi (3), - spat (4), - map_ (5), - ivi (6), - ev_rsr(7) + denm (1), + cam (2), + poi (3), + spatem (4), + mapem (5), + ivim (6), + evrsr (7), + tistpgtransaction (8), + srem (9), + ssem (10), + evcsn (11), + saem (12), + rtcmem (13), + cpm (14), + imzm (15), + vam (16), + dsm (17), + mim (18), + mvm (19), + mcm (20) // } with { // variant "JSON: as number" } @@ -774,7 +789,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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.15-1: Attributes of the V2xMsgFilterCriteria + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.15-1: Attributes of the V2xMsgFilterCriteria */ type record V2xMsgFilterCriteria { StdOrganization stdOrganization, @@ -788,7 +803,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ type record V2xMsgDistributionServer { InfoProtocol infoProtocol, @@ -800,7 +815,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ type record InfoProtocol { MsgProtocols msgProtocol, @@ -809,7 +824,7 @@ module V2XInformationServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ type enumerated MsgProtocol { MQTT_v3_1_0 (0), @@ -826,7 +841,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.16-1: Attributes of the V2xMsgDistributionServer */ type record InfoConnection { Json.String ipAddress, @@ -836,7 +851,7 @@ module V2XInformationServiceAPI_TypesAndValues { /** * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.17-1: Attributes of the QosPredFilterCriteria */ type record QosPredFilterCriteria { Json.String streamId optional @@ -846,7 +861,7 @@ module V2XInformationServiceAPI_TypesAndValues { * @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 + * @see ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.5.18-1: Attributes of the WebsockNotifConfig */ type record WebsockNotifConfig { Json.AnyURI websocketUri optional, diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index fee2d654347d9ae207f7681d1c2cdd6f0f0ca542..12f35685b3b60d67a92dd09d965d2e006a41b907 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -1,4 +1,4 @@ -module LibMec_Pixits { +module LibMec_Pixits { // FIXME FSCOM Split this file according to the different ATSs modulepar charstring PX_ME_APP_Q_ZONE_ID_URI := "location/v3/queries/zones"; @@ -23,11 +23,19 @@ module LibMec_Pixits { modulepar charstring PX_RNIS_QUERIES_URI := "rni/v2/queries"; modulepar charstring PX_ME_BWM_URI := "bwm/v1/bw_allocations"; + + modulepar charstring PX_ME_BWM_SUB_URI := "bwm/v1/subscriptions"; modulepar charstring PX_ME_MTS_INFO_URI := "mts/v1/mts_capability_info"; modulepar charstring PX_ME_MTS_SESSIONS_URI := "mts/v1/mts_sessions"; + modulepar charstring PX_DEVICE_APP_LIST_URI := "dev_app/v1/app_list"; + + modulepar charstring PX_DEVICE_APP_CTX_URI := "dev_app/v1/app_contexts"; + + modulepar charstring PX_DEVICE_APP_LOC_URI := "dev_app/v1/obtain_app_loc_availability"; + modulepar charstring PX_ME_WLAN_QUERIES_URI := "wai/v2/queries"; modulepar charstring PX_ME_WLAN_URI := "wai/v2"; @@ -79,6 +87,12 @@ module LibMec_Pixits { modulepar charstring PX_ME_APP_SUPPORT_URI := "mec_app_support/v2/applications"; modulepar charstring PX_ME_APP_REG_APPS_URI := "mec_service_mgmt/v1/applications"; + + modulepar charstring PX_ME_CAPIF_URI := "service-apis/v1/allServiceAPIs"; + + modulepar charstring PX_ME_CAPIF_PUBLISH_API_URI := "published-apis/v1"; + + modulepar charstring PX_ME_CAPIF_SUBSCRIBE_URI := "capif-events/v1"; modulepar charstring PX_MEC_SVC_MGMT_SVC_URI := "mec_service_mgmt/v1/services"; @@ -96,11 +110,13 @@ module LibMec_Pixits { 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_LIST_SYSTEM_INFO := "fed_enablement/v1/fed_resources/systems"; - modulepar charstring PX_FED_API_SUB := "fed_enablement/v1/fed_resources/system_info"; + modulepar charstring PX_FED_API_SYS_INFO := "fed_enablement/v1/fed_resources/systems"; - modulepar charstring PX_FED_API_SUB_WRONG := "fed_enablement/v10/fed_resources/system_info"; // v10 instead of v1 + modulepar charstring PX_FED_API_SYS_INFO_WRONG := "fed_enablement/v10/fed_resources/systems"; // v10 instead of v1 + + modulepar charstring PX_FED_API_SUB := "fed_enablement/v1/fed_resources/subscription"; modulepar charstring PX_IOT_API_LIST_DEVICE_INFO := "iots/v1/registered_devices"; @@ -110,4 +126,24 @@ module LibMec_Pixits { modulepar charstring PX_IOT_API_LIST_PLTF_SUB := "iots/v1/registered_iot_platforms"; + modulepar charstring PX_QOS_API_LIST_SUBS := "qms/v1/subscriptions"; + + modulepar charstring PX_SENS_DISCOVERY := "sens/v1/queries/sensor_discovery"; + + modulepar charstring PX_SENS_DATA := "sens/v1/queries/sensor_data"; + + modulepar charstring PX_SENS_SUBS := "sens/v1/subscriptions"; + + modulepar charstring PX_SENS_LIST_SUBS_DISCOVERY := "sens/v1/subscriptions/sensor_discovery"; + + modulepar charstring PX_SENS_LIST_SUBS_STATUS := "sens/v1/subscriptions/sensor_status"; + + modulepar charstring PX_SENS_LIST_SUBS_DATA := "sens/v1/subscriptions/sensor_data"; + + modulepar charstring PX_SENS_MGMT := "sens/v1/sensor_management"; + + modulepar charstring PX_CSE_TENANTS_INFO := "cse/v1/tenants"; + + modulepar charstring PX_CSE_LIST_SUBS := "/cse/v1/subscriptions"; + } // End of module LibMec_Pixits 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 old mode 100644 new mode 100755 index 38bc8f5b6331b12604ea1adb60293cfc670eb3be..9d93bed724242c495cc0de5e0615d3d6ef89b361 --- 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 @@ -1,28 +1,17 @@ /****************************************************************************** -* Copyright (c) 2000-2019 Ericsson Telecom AB -* All rights reserved. This program and the accompanying materials -* are made available under the terms of the Eclipse Public License v2.0 -* which accompanies this distribution, and is available at -* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html -* -* Contributors: -* Zoltan Bibo - initial implementation and initial documentation -* Gergely Futo -* Oliver Ferenc Czerman -* Balasko Jeno -* Zoltan Bibo -* Eduard Czimbalmos -* Kulcsár Endre -* Gabor Szalai -* Jozsef Gyurusi -* Csöndes Tibor -* Zoltan Jasz -******************************************************************************/ + * Copyright (c) 2000-2025 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html + ******************************************************************************/ // // File: Abstract_Socket.cc // Description: Abstract_Socket implementation file -// Rev: R9B +// Rev: // Prodnr: CNL 113 384 +// Updated: 2012-08-07 +// Contact: http://ttcn.ericsson.se // #include "Abstract_Socket.hh" @@ -254,20 +243,16 @@ bool Abstract_Socket::parameter_set(const char *parameter_name, Free(local_host_name); local_host_name = mcopystr(parameter_value); } else if(strcmp(parameter_name, remote_port_name()) == 0){ - int a; - if (sscanf(parameter_value, "%d", &a)!=1) log_error("Invalid input as port number given: %s", parameter_value); - if (a>65535 || a<0){ log_error("Port number must be between 0 and 65535, %d is given", remote_port_number);} - else {remote_port_number=a;} + if (sscanf(parameter_value, "%d", &remote_port_number)!=1) log_error("Invalid input as port number given: %s", parameter_value); + if (remote_port_number>65535 || remote_port_number<0) log_error("Port number must be between 0 and 65535, %d is given", remote_port_number); } else if(strcmp(parameter_name, ai_family_name()) == 0){ if (strcasecmp(parameter_value,"IPv6")==0 || strcasecmp(parameter_value,"AF_INET6")==0) ai_family = AF_INET6; else if (strcasecmp(parameter_value,"IPv4")==0 || strcasecmp(parameter_value,"AF_INET")==0) ai_family = AF_INET; else if (strcasecmp(parameter_value,"UNSPEC")==0 || strcasecmp(parameter_value,"AF_UNSPEC")==0) ai_family = AF_UNSPEC; else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ai_family_name()); } else if(strcmp(parameter_name, local_port_name()) == 0){ - int a; - if (sscanf(parameter_value, "%d", &a)!=1) log_error("Invalid input as port number given: %s", parameter_value); - if (a>65535 || a<0) {log_error("Port number must be between 0 and 65535, %d is given", local_port_number);} - else {local_port_number=a;} + if (sscanf(parameter_value, "%d", &local_port_number)!=1) log_error("Invalid input as port number given: %s", parameter_value); + if (local_port_number>65535 || local_port_number<0) log_error("Port number must be between 0 and 65535, %d is given", local_port_number); } else if (strcmp(parameter_name, nagling_name()) == 0) { if (strcasecmp(parameter_value,"yes")==0) nagling = true; else if (strcasecmp(parameter_value,"no")==0) nagling = false; @@ -316,14 +301,16 @@ void Abstract_Socket::Handle_Socket_Event(int fd, boolean is_readable, boolean i } else { if(shutdown(fd, SHUT_RD) != 0) { if(errno == ENOTCONN) { + remove_client(fd); + peer_disconnected(fd); errno = 0; - } else { + } else log_error("shutdown(SHUT_RD) system call failed"); - } + } else { + client_data->tcp_state = CLOSE_WAIT; + Remove_Fd_Read_Handler(fd); + peer_half_closed(fd); } - client_data->tcp_state = CLOSE_WAIT; - Remove_Fd_Read_Handler(fd); - peer_half_closed(fd); } } // switch (client_data->reading_state) } else if (messageLength > 0) { @@ -463,11 +450,12 @@ int Abstract_Socket::send_message_on_nonblocking_fd(int client_id, log_debug("entering Abstract_Socket::" "send_message_on_nonblocking_fd(id: %d)", client_id); - as_client_struct * client_data = get_peer(client_id); + as_client_struct * client_data; int sent_len = 0; while(sent_len < length){ int ret; log_debug("Abstract_Socket::send_message_on_nonblocking_fd(id: %d): new iteration", client_id); + client_data = get_peer(client_id); if (client_data->reading_state == STATE_DONT_CLOSE){ goto client_closed_connection; } else ret = send(client_id, send_par + sent_len, length - sent_len, 0); @@ -548,7 +536,7 @@ const PacketHeaderDescr* Abstract_Socket::Get_Header_Descriptor() const return NULL; } -void Abstract_Socket::peer_connected(int /*client_id*/, sockaddr_in& /*remote_addr*/) +void Abstract_Socket::peer_connected(int client_id, sockaddr_in& remote_addr) { } @@ -613,8 +601,8 @@ void Abstract_Socket::map_user() char remotePort[6]; char localPort[6]; - sprintf(localPort, "%u", local_port_number); - sprintf(remotePort, "%u", remote_port_number); + sprintf(localPort, "%d", local_port_number); + sprintf(remotePort, "%d", remote_port_number); if(!use_connection_ASPs) { @@ -796,7 +784,6 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc log_warning("Cannot open socket when trying to open the listen port: %s", strerror(errno)); listen_port_opened(-1); errno = 0; - freeaddrinfo(aip); return -1; } else log_error("Cannot open socket"); @@ -814,7 +801,6 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc log_warning("Setsockopt failed when trying to open the listen port: %s", strerror(errno)); listen_port_opened(-1); errno = 0; - freeaddrinfo(aip); return -1; } else log_error("Setsockopt failed"); @@ -827,10 +813,10 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc log_debug("Bind to port..."); if (bind(listen_fd, res->ai_addr, res->ai_addrlen) == -1) { - error = errno; // save it for the warning message close(listen_fd); listen_fd = -1; log_debug("Cannot bind to port when trying to open the listen port: %s", strerror(errno)); + error = errno; // save it for the warning message errno = 0; continue; } @@ -842,8 +828,8 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc { log_warning("Cannot bind to port when trying to open the listen port: %s", strerror(error)); listen_port_opened(-1); + error = errno; // save it for the warning message error = 0; - freeaddrinfo(aip); return -1; } else log_error("Cannot bind to port"); @@ -857,7 +843,6 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc log_warning("Cannot listen at port when trying to open the listen port: %s", strerror(errno)); listen_port_opened(-1); errno = 0; - freeaddrinfo(aip); return -1; } else log_error("Cannot listen at port"); @@ -876,14 +861,13 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc log_warning("getsockname() system call failed on the server socket when trying to open the listen port: %s", strerror(errno)); listen_port_opened(-1); errno = 0; - freeaddrinfo(aip); return -1; } else log_error("getsockname() system call failed on the server socket"); } char hname[NI_MAXHOST]; char sname[NI_MAXSERV]; -/* error = getnameinfo(res->ai_addr, res->ai_addrlen, + error = getnameinfo(res->ai_addr, res->ai_addrlen, hname, sizeof (hname), sname, sizeof (sname), NI_NUMERICSERV); if (error) { close(listen_fd); @@ -892,14 +876,13 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc { log_warning("getnameinfo() system call failed on the server socket when trying to open the listen port: %s", gai_strerror(error)); listen_port_opened(-1); - freeaddrinfo(aip); return -1; } else log_error("getsockname() system call failed on the server socket"); } else { log_debug("Listening on (name): %s/%s\n", hname, sname); - }*/ + } error = getnameinfo(res->ai_addr, res->ai_addrlen, hname, sizeof (hname), sname, sizeof (sname), NI_NUMERICHOST|NI_NUMERICSERV); if (error) { @@ -909,7 +892,6 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc { log_warning("getnameinfo() system call failed on the server socket when trying to open the listen port: %s", gai_strerror(error)); listen_port_opened(-1); - freeaddrinfo(aip); return -1; } else log_error("getsockname() system call failed on the server socket"); @@ -931,12 +913,11 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc if(use_connection_ASPs) listen_port_opened(listenPort); - freeaddrinfo(aip); return listenPort; #endif } -void Abstract_Socket::listen_port_opened(int /*port_number*/) +void Abstract_Socket::listen_port_opened(int port_number) { // Intentionally blank } @@ -1083,9 +1064,7 @@ int Abstract_Socket::open_client_connection(const struct sockaddr_in & new_remot Add_Fd_Read_Handler(socket_fd); // Done here - as in case of error: remove_client expects the handler as added log_debug("Abstract_Socket::open_client_connection(). Handler set to socket fd %d", socket_fd); client_data->fd_buff = new TTCN_Buffer; -// client_data->clientAddr = *(struct sockaddr_storage*)&new_remote_addr; - memset(&client_data->clientAddr,0,sizeof(client_data->clientAddr)); - memcpy(&client_data->clientAddr,&new_remote_addr,sizeof(new_remote_addr)); + client_data->clientAddr = *(struct sockaddr_storage*)&new_remote_addr; client_data->clientAddrlen = sizeof(new_remote_addr); client_data->tcp_state = ESTABLISHED; client_data->reading_state = STATE_NORMAL; @@ -1258,22 +1237,22 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch ); if(bind(socket_fd, aip2->ai_addr, aip2->ai_addrlen)<0) { -/* if(use_connection_ASPs) // the if else branches are the same - {*/ + if(use_connection_ASPs) + { log_debug("Cannot bind to port when trying to open client connection: %s", strerror(errno)); //client_connection_opened(-1); //freeaddrinfo(localAddrinfo); errno = 0; continue; //aip2 cycle //return -1; -/* } + } else { //freeaddrinfo(localAddrinfo); //log_error("Cannot bind to port."); log_debug("Cannot bind to port when trying to open client connection: %s", strerror(errno)); errno = 0; continue; //aip2 cycle - }*/ + } } log_debug("Bind successful on client."); freeaddrinfo(localAddrinfo); @@ -1357,7 +1336,7 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch } char hname[NI_MAXHOST]; char sname[NI_MAXSERV]; -/* error = getnameinfo(aip->ai_addr, aip->ai_addrlen, + error = getnameinfo(aip->ai_addr, aip->ai_addrlen, hname, sizeof (hname), sname, sizeof (sname), NI_NUMERICSERV); if (error) { close(socket_fd); @@ -1372,19 +1351,18 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch log_debug("Connection established (name): %s/%s -> %s/%s\n", hname, sname, remoteHostname, remoteServicename); - }*/ + } error = getnameinfo(aip->ai_addr, aip->ai_addrlen, hname, sizeof (hname), sname, sizeof (sname), NI_NUMERICHOST|NI_NUMERICSERV); if (error) { -/* close(socket_fd); + close(socket_fd); if(use_connection_ASPs) { log_warning("getnameinfo() system call failed on the client socket when trying to connect to server: %s", gai_strerror(error)); -// client_connection_opened(-1); -// return -1; + client_connection_opened(-1); + return -1; } - else*/ - log_warning("getnameinfo() system call failed on the client socket when trying to connect to server: %s", gai_strerror(error)); + else log_error("getnameinfo() system call failed on the client socket when trying to connect to server: %s", gai_strerror(error)); } else { log_debug("Connection established (addr): %s/%s -> %s/%s\n", hname, sname, @@ -1420,20 +1398,18 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch return -1; } else log_error("Set blocking mode failed."); - } + } as_client_struct * client_data=peer_list_add_peer(socket_fd); Add_Fd_Read_Handler(socket_fd); // Done here - as in case of error: remove_client expects the handler as added log_debug("Abstract_Socket::open_client_connection(). Handler set to socket fd %d", socket_fd); client_data->fd_buff = new TTCN_Buffer; -// client_data->clientAddr = *(struct sockaddr_storage*)aip->ai_addr; - memset(&client_data->clientAddr,0,sizeof(client_data->clientAddr)); - memcpy(&client_data->clientAddr,aip->ai_addr,sizeof(*aip->ai_addr)); + client_data->clientAddr = *(struct sockaddr_storage*)aip->ai_addr; client_data->clientAddrlen = aip->ai_addrlen; client_data->tcp_state = ESTABLISHED; client_data->reading_state = STATE_NORMAL; - freeaddrinfo(res); + freeaddrinfo(res); if (!add_user_data(socket_fd)) { remove_client(socket_fd); @@ -1448,7 +1424,7 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch } -void Abstract_Socket::client_connection_opened(int /*client_id*/) +void Abstract_Socket::client_connection_opened(int client_id) { // Intentionally blank } @@ -1462,7 +1438,7 @@ void Abstract_Socket::unmap_user() log_debug("leaving Abstract_Socket::unmap_user()"); } -void Abstract_Socket::peer_disconnected(int /*fd*/) +void Abstract_Socket::peer_disconnected(int fd) { // virtual peer_disconnected() needs to be overriden in test ports! if(!use_connection_ASPs) { @@ -1546,19 +1522,11 @@ void Abstract_Socket::send_outgoing(const unsigned char* send_par, int length, i nrOfBytesSent = use_non_blocking_socket ? send_message_on_nonblocking_fd(dest_fd, send_par, length) : send_message_on_fd(dest_fd, send_par, length); - if (nrOfBytesSent == -1){ - log_debug("Client %d closed connection. Error: %d %s", client_id, errno, strerror(errno)); - report_unsent(dest_fd,length,nrOfBytesSent,send_par,"Client closed the connection"); - - if(client_data->tcp_state == CLOSE_WAIT){ - log_debug("Client %d waiting for close ASP.", client_id); - } else { - errno = 0; - log_debug("Client %d closed connection", client_id); - client_data->tcp_state = CLOSE_WAIT; - Remove_Fd_Read_Handler(dest_fd); - peer_half_closed(dest_fd); - } + if (nrOfBytesSent == -1 && errno == EPIPE){ // means connection was interrupted by peer + errno = 0; + log_debug("Client %d closed connection", client_id); + remove_client(dest_fd); + peer_disconnected(dest_fd); }else if (nrOfBytesSent != length) { char *error_text=mprintf("Send system call failed: %d bytes were sent instead of %d", nrOfBytesSent, length); report_error(client_id,length,nrOfBytesSent,send_par,error_text); @@ -1569,16 +1537,11 @@ void Abstract_Socket::send_outgoing(const unsigned char* send_par, int length, i log_debug("leaving Abstract_Socket::send_outgoing()"); } -void Abstract_Socket::report_error(int /*client_id*/, int /*msg_length*/, int /*sent_length*/, const unsigned char* /*msg*/, const char* error_text) +void Abstract_Socket::report_error(int client_id, int msg_length, int sent_length, const unsigned char* msg, const char* error_text) { log_error("%s",error_text); } -void Abstract_Socket::report_unsent(int /*client_id*/, int /*msg_length*/, int /*sent_length*/, const unsigned char* /*msg*/, const char* error_text) -{ - log_debug("%s",error_text); -} - void Abstract_Socket::all_mandatory_configparameters_present() { if(!use_connection_ASPs) @@ -1812,6 +1775,7 @@ void Abstract_Socket::peer_list_resize_list(int client_id) { new_length++; // index starts from 0 log_debug("Abstract_Socket::peer_list_resize_list: Resizing to %d", new_length); peer_list_root = (as_client_struct **)Realloc(peer_list_root, new_length*sizeof(as_client_struct *)); + log_debug("Abstract_Socket::peer_list_resize_list: After Resizing: %p", peer_list_root); // initialize new entries for (int i = peer_list_length; i < new_length; i++) @@ -1973,13 +1937,6 @@ SSL_Socket::SSL_Socket() ssl_password=NULL; test_port_type=NULL; test_port_name=NULL; - ssl_ctx = NULL; - ssl_current_ssl = NULL; - SSLv2=true; - SSLv3=true; - TLSv1=true; - TLSv1_1=true; - TLSv1_2=true; } SSL_Socket::SSL_Socket(const char *tp_type, const char *tp_name) @@ -1996,13 +1953,6 @@ SSL_Socket::SSL_Socket(const char *tp_type, const char *tp_name) ssl_password=NULL; test_port_type=tp_type; test_port_name=tp_name; - ssl_ctx = NULL; - ssl_current_ssl = NULL; - SSLv2=true; - SSLv3=true; - TLSv1=true; - TLSv1_1=true; - TLSv1_2=true; } SSL_Socket::~SSL_Socket() @@ -2055,26 +2005,6 @@ bool SSL_Socket::parameter_set(const char *parameter_name, if(strcasecmp(parameter_value, "yes") == 0) ssl_verify_certificate = true; else if(strcasecmp(parameter_value, "no") == 0) ssl_verify_certificate = false; else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ssl_verifycertificate_name()); - } else if(strcasecmp(parameter_name, ssl_disable_SSLv2()) == 0) { - if(strcasecmp(parameter_value, "yes") == 0) SSLv2= false; - else if(strcasecmp(parameter_value, "no") == 0) SSLv2 = true; - else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ssl_disable_SSLv2()); - } else if(strcasecmp(parameter_name, ssl_disable_SSLv3()) == 0) { - if(strcasecmp(parameter_value, "yes") == 0) SSLv2 = false; - else if(strcasecmp(parameter_value, "no") == 0) SSLv2 = true; - else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ssl_disable_SSLv3()); - } else if(strcasecmp(parameter_name, ssl_disable_TLSv1()) == 0) { - if(strcasecmp(parameter_value, "yes") == 0) TLSv1= false; - else if(strcasecmp(parameter_value, "no") == 0) TLSv1 = true; - else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ssl_disable_TLSv1()); - } else if(strcasecmp(parameter_name, ssl_disable_TLSv1_1()) == 0) { - if(strcasecmp(parameter_value, "yes") == 0) TLSv1_1 = false; - else if(strcasecmp(parameter_value, "no") == 0) TLSv1_1 = true; - else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ssl_disable_TLSv1_1()); - } else if(strcasecmp(parameter_name, ssl_disable_TLSv1_2()) == 0) { - if(strcasecmp(parameter_value, "yes") == 0) TLSv1_2 = false; - else if(strcasecmp(parameter_value, "no") == 0) TLSv1_2 = true; - else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ssl_disable_TLSv1_2()); } else { log_debug("leaving SSL_Socket::parameter_set(%s, %s)", parameter_name, parameter_value); return Abstract_Socket::parameter_set(parameter_name, parameter_value); @@ -2101,32 +2031,6 @@ bool SSL_Socket::add_user_data(int client_id) { if (ssl_current_ssl==NULL) log_error("Creation of SSL object failed"); -#ifdef SSL_OP_NO_SSLv2 - if(!SSLv2){ - SSL_set_options(ssl_current_ssl,SSL_OP_NO_SSLv2); - } -#endif -#ifdef SSL_OP_NO_SSLv3 - if(!SSLv3){ - SSL_set_options(ssl_current_ssl,SSL_OP_NO_SSLv3); - } -#endif -#ifdef SSL_OP_NO_TLSv1 - if(!TLSv1){ - SSL_set_options(ssl_current_ssl,SSL_OP_NO_TLSv1); - } -#endif -#ifdef SSL_OP_NO_TLSv1_1 - if(!TLSv1_1){ - SSL_set_options(ssl_current_ssl,SSL_OP_NO_TLSv1_1); - } -#endif -#ifdef SSL_OP_NO_TLSv1_2 - if(!TLSv1_2){ - SSL_set_options(ssl_current_ssl,SSL_OP_NO_TLSv1_2); - } -#endif - set_user_data(client_id, ssl_current_ssl); log_debug("New client added with key '%d'", client_id); log_debug("Binding SSL to the socket"); @@ -2361,10 +2265,9 @@ int SSL_Socket::send_message_on_fd(int client_id, const unsigned char* send_par, log_debug("SSL_ERROR_ZERO_RETURN is received, setting SSL SHUTDOWN mode to QUIET"); ssl_current_client=NULL; log_debug("leaving SSL_Socket::send_message_on_fd()"); - return -1; + return 0; default: - log_debug("SSL error occured"); - return -1; + log_error("SSL error occured"); } } // avoid compiler warnings @@ -2456,8 +2359,7 @@ int SSL_Socket::send_message_on_nonblocking_fd(int client_id, const unsigned cha case SSL_ERROR_ZERO_RETURN: goto client_closed_connection; default: - log_warning("SSL error occured"); - return -1; + log_error("SSL error occured"); } } @@ -2546,11 +2448,6 @@ const char* SSL_Socket::ssl_certificate_file_name() { return "ssl_certific const char* SSL_Socket::ssl_password_name() { return "ssl_private_key_password";} const char* SSL_Socket::ssl_cipher_list_name() { return "ssl_allowed_ciphers_list";} const char* SSL_Socket::ssl_verifycertificate_name() { return "ssl_verify_certificate";} -const char* SSL_Socket::ssl_disable_SSLv2() { return "ssl_disable_SSLv2";} -const char* SSL_Socket::ssl_disable_SSLv3() { return "ssl_disable_SSLv3";} -const char* SSL_Socket::ssl_disable_TLSv1() { return "ssl_disable_TLSv1";} -const char* SSL_Socket::ssl_disable_TLSv1_1() { return "ssl_disable_TLSv1_1";} -const char* SSL_Socket::ssl_disable_TLSv1_2() { return "ssl_disable_TLSv1_2";} void SSL_Socket::ssl_actions_to_seed_PRNG() { @@ -2653,10 +2550,10 @@ void SSL_Socket::ssl_init_SSL() // check the other side's certificates if (ssl_verify_certificate) { - log_debug("Setting verification behaviour: verification required and do not allow to continue on failure.."); + log_debug("Setting verification behaviour: verification required and do not allow to continue on failure"); SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, ssl_verify_callback); } else { - log_debug("Setting verification behaviour: verification not required and do allow to continue on failure.."); + log_debug("Setting verification behaviour: verification not required and do allow to continue on failure"); SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_NONE, ssl_verify_callback); } @@ -2756,7 +2653,7 @@ int SSL_Socket::ssl_getresult(int res) return err; } -int SSL_Socket::ssl_verify_certificates_at_handshake(int /*preverify_ok*/, X509_STORE_CTX */*ssl_ctx*/) { +int SSL_Socket::ssl_verify_certificates_at_handshake(int preverify_ok, X509_STORE_CTX *ssl_ctx) { // don't care by default return -1; } @@ -2764,7 +2661,7 @@ int SSL_Socket::ssl_verify_certificates_at_handshake(int /*preverify_ok*/, X50 // Callback function used by OpenSSL. // Called when a password is needed to decrypt the private key file. // NOTE: not thread safe -int SSL_Socket::ssl_password_cb(char *buf, int num, int /*rwflag*/,void */*userdata*/) { +int SSL_Socket::ssl_password_cb(char *buf, int num, int rwflag,void *userdata) { if (ssl_current_client!=NULL) { char *ssl_client_password; @@ -2794,23 +2691,18 @@ int SSL_Socket::ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ssl_ctx) ctx_pointer = SSL_get_SSL_CTX(ssl_pointer); if (ssl_current_client!=NULL) { - // if ssl_verifiycertificate == "no", then always accept connections - if(((SSL_Socket *)ssl_current_client)->ssl_verify_certificate) { - user_result=((SSL_Socket *)ssl_current_client)->ssl_verify_certificates_at_handshake(preverify_ok, ssl_ctx); - if (user_result>=0) return user_result; - } else { - return 1; - } + user_result=((SSL_Socket *)ssl_current_client)->ssl_verify_certificates_at_handshake(preverify_ok, ssl_ctx); + if (user_result>=0) return user_result; } else { // go on with default authentication fprintf(stderr, "Warning: no current SSL object found but ssl_verify_callback is called, programming error\n"); } // if ssl_verifiycertificate == "no", then always accept connections - if (SSL_CTX_get_verify_mode(ctx_pointer) == SSL_VERIFY_NONE) + if (SSL_CTX_get_verify_mode(ctx_pointer) && SSL_VERIFY_NONE) return 1; // if ssl_verifiycertificate == "yes", then accept connections only if the // certificate is valid - else if (SSL_CTX_get_verify_mode(ctx_pointer) & SSL_VERIFY_PEER) { + else if (SSL_CTX_get_verify_mode(ctx_pointer) && SSL_VERIFY_PEER) { return preverify_ok; } // something went wrong diff --git a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh old mode 100644 new mode 100755 index 7de8446c0bb381b290314e418868e2db3310781f..ad2d65d080adcac91c87d8d26aa468c76a2ebe74 --- a/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh +++ b/ttcn/modules/titan.TestPorts.Common_Components.Abstract_Socket/module/src/Abstract_Socket.hh @@ -1,28 +1,17 @@ /****************************************************************************** -* Copyright (c) 2000-2019 Ericsson Telecom AB -* All rights reserved. This program and the accompanying materials -* are made available under the terms of the Eclipse Public License v2.0 -* which accompanies this distribution, and is available at -* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html -* -* Contributors: -* Zoltan Bibo - initial implementation and initial documentation -* Gergely Futo -* Oliver Ferenc Czerman -* Balasko Jeno -* Zoltan Bibo -* Eduard Czimbalmos -* Kulcsár Endre -* Gabor Szalai -* Jozsef Gyurusi -* Csöndes Tibor -* Zoltan Jasz -******************************************************************************/ + * Copyright (c) 2000-2025 Ericsson Telecom AB + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html + ******************************************************************************/ // // File: Abstract_Socket.hh // Description: Abstract_Socket header file -// Rev: R9B +// Rev: // Prodnr: CNL 113 384 +// Updated: 2010-11-24 +// Contact: http://ttcn.ericsson.se // @@ -120,7 +109,7 @@ protected: // Shall be called from Handle_Fd_Event() void Handle_Socket_Event(int fd, boolean is_readable, boolean is_writable, boolean is_error); // Shall be called from Handle_Timeout() - for possible future development - void Handle_Timeout_Event(double /*time_since_last_call*/) {}; + void Handle_Timeout_Event(double time_since_last_call) {}; // Shall be called from outgoing_send() void send_outgoing(const unsigned char* message_buffer, int length, int client_id = -1); @@ -144,9 +133,9 @@ protected: bool increase_send_buffer(int fd, int &old_size, int& new_size); const char* get_local_host_name(){return local_host_name; }; - unsigned int get_local_port_number(){return local_port_number; }; + const unsigned int get_local_port_number(){return local_port_number; }; const char* get_remote_host_name(){return remote_host_name; }; - unsigned int get_remote_port_number(){return remote_port_number; }; + const unsigned int get_remote_port_number(){return remote_port_number; }; const struct sockaddr_in & get_remote_addr() {return remoteAddr; }; /* FIXME: This function is deprecated and should be removed! */ const struct sockaddr_in & get_local_addr() {return localAddr; }; /* FIXME: This function is deprecated and should be removed! */ const int& get_ai_family() const {return ai_family;} @@ -190,15 +179,13 @@ protected: virtual int send_message_on_nonblocking_fd(int client_id, const unsigned char *message_buffer, int message_length); // Called after a peer is connected virtual void peer_connected(int client_id, sockaddr_in& remote_addr); /* This function should be removed! deprecated by: */ - virtual void peer_connected(int /*client_id*/, const char * /*host*/, const int /*port*/) {}; + virtual void peer_connected(int client_id, const char * host, const int port) {}; // Called after a peer is disconnected virtual void peer_disconnected(int client_id); // Called when a peer shut down its fd for writing virtual void peer_half_closed(int client_id); // Called after a send error virtual void report_error(int client_id, int msg_length, int sent_length, const unsigned char* msg, const char* error_text); - // Called after a unsent message - virtual void report_unsent(int client_id, int msg_length, int sent_length, const unsigned char* msg, const char* error_text); // Test port parameters virtual const char* local_port_name(); @@ -365,11 +352,6 @@ protected: virtual const char* ssl_password_name(); virtual const char* ssl_cipher_list_name(); virtual const char* ssl_verifycertificate_name(); - virtual const char* ssl_disable_SSLv2(); - virtual const char* ssl_disable_SSLv3(); - virtual const char* ssl_disable_TLSv1(); - virtual const char* ssl_disable_TLSv1_1(); - virtual const char* ssl_disable_TLSv1_2(); private: bool ssl_verify_certificate; // verify other part's certificate or not @@ -377,13 +359,6 @@ private: bool ssl_initialized; // whether SSL already initialized or not bool ssl_use_session_resumption; // use SSL sessions or not - bool SSLv2; - bool SSLv3; - bool TLSv1; - bool TLSv1_1; - bool TLSv1_2; - - char *ssl_key_file; // private key file char *ssl_certificate_file; // own certificate file char *ssl_trustedCAlist_file; // trusted CA list file diff --git a/ttcn/patch_abstract_socket/Abstract_Socket.cc.patch b/ttcn/patch_abstract_socket/Abstract_Socket.cc.patch new file mode 100644 index 0000000000000000000000000000000000000000..55f334a33e59cce9da9b4fe7d2155b7821c735c9 --- /dev/null +++ b/ttcn/patch_abstract_socket/Abstract_Socket.cc.patch @@ -0,0 +1,117 @@ +diff --git a/src/Abstract_Socket.cc b/src/Abstract_Socket.cc +index 8b7b753..5e4addf 100644 +--- a/src/Abstract_Socket.cc ++++ b/src/Abstract_Socket.cc +@@ -40,6 +40,7 @@ + # include + #endif + ++#include + + #define AS_TCP_CHUNCK_SIZE 4096 + #define AS_SSL_CHUNCK_SIZE 16384 +@@ -171,6 +172,7 @@ Abstract_Socket::Abstract_Socket() { + remote_host_name = NULL; + remote_port_number = 0; + ai_family = AF_UNSPEC; // default: Auto ++ ip_proto = IPPROTO_TCP; // default + test_port_type=NULL; + test_port_name=NULL; + ttcn_buffer_usercontrol=false; +@@ -199,6 +201,7 @@ Abstract_Socket::Abstract_Socket(const char *tp_type, const char *tp_name) { + remote_host_name = NULL; + remote_port_number = 0; + ai_family = AF_UNSPEC; // default: Auto ++ ip_proto = IPPROTO_TCP; // default + test_port_type=tp_type; + test_port_name=tp_name; + ttcn_buffer_usercontrol=false; +@@ -261,6 +264,10 @@ bool Abstract_Socket::parameter_set(const char *parameter_name, + else if (strcasecmp(parameter_value,"IPv4")==0 || strcasecmp(parameter_value,"AF_INET")==0) ai_family = AF_INET; + else if (strcasecmp(parameter_value,"UNSPEC")==0 || strcasecmp(parameter_value,"AF_UNSPEC")==0) ai_family = AF_UNSPEC; + else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ai_family_name()); ++ } else if(strcmp(parameter_name, ip_proto_name()) == 0){ ++ if (strcasecmp(parameter_value,"IPPROTO_TCP")==0) ip_proto = IPPROTO_TCP; ++ else if (strcasecmp(parameter_value,"IPPROTO_SCTP")==0) ip_proto = IPPROTO_SCTP; ++ else log_error("Parameter value '%s' not recognized for parameter '%s'", parameter_value, ip_proto_name()); + } else if(strcmp(parameter_name, local_port_name()) == 0){ + int a; + if (sscanf(parameter_value, "%d", &a)!=1) log_error("Invalid input as port number given: %s", parameter_value); +@@ -760,6 +767,7 @@ int Abstract_Socket::open_listen_port(const char* localHostname, const char* loc + hints.ai_flags = /*AI_ALL|*/AI_ADDRCONFIG|AI_PASSIVE; + hints.ai_socktype = SOCK_STREAM; + hints.ai_family = ai_family; ++ hints.ai_protocol = ip_proto; + + error = getaddrinfo(localHostname, localServicename, &hints, &aip); + if (error != 0) { +@@ -1143,6 +1151,7 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch + } + hints.ai_socktype = SOCK_STREAM; + hints.ai_family = ai_family; ++ hints.ai_protocol = ip_proto; + + error = getaddrinfo(remoteHostname, remoteServicename, &hints, &res); + if (error != 0) { +@@ -1191,9 +1200,11 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch + } + } + +- log_debug("Using address family for socket %d: %s",socket_fd, ++ log_debug("Using address family for socket %d: %s - %s",socket_fd, + ((aip->ai_family==AF_INET)?"IPv4": +- ((aip->ai_family==AF_INET6)?"IPv6":"unknown")) ++ ((aip->ai_family==AF_INET6)?"IPv6":"unknown")), ++ ((aip->ai_protocol==IPPROTO_TCP)?"IPPROTO_TCP": ++ ((aip->ai_protocol==IPPROTO_SCTP)?"IPPROTO_SCTP":"unknown")) + ); + + +@@ -1225,6 +1236,7 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch + hints.ai_flags = AI_PASSIVE; + hints.ai_socktype = SOCK_STREAM; + hints.ai_family = ai_family;//aip->ai_family; // NOTE: On solaris 10 if is set to aip->ai_family, getaddrinfo will crash for IPv4-mapped addresses! ++ hints.ai_protocol = ip_proto; + + error = getaddrinfo(localHostname, localServicename, &hints, &localAddrinfo); + if (error != 0) { +@@ -1390,10 +1402,13 @@ int Abstract_Socket::open_client_connection(const char* remoteHostname, const ch + } + + log_debug( +- "connected to: host %s service %s via address family %s\n", ++ "connected to: host %s service %s via address family %s with ip_proto %s\n", + remoteHostname, remoteServicename, + ((aip->ai_family==AF_INET)?"IPv4": +- ((aip->ai_family==AF_INET6)?"IPv6":"unknown"))); ++ ((aip->ai_family==AF_INET6)?"IPv6":"unknown")), ++ ((aip->ai_protocol==IPPROTO_TCP)?"IPPROTO_TCP": ++ ((aip->ai_protocol==IPPROTO_SCTP)?"IPPROTO_SCTP":"unknown")) ++ ); + break; + } + if (aip==NULL) { +@@ -1774,18 +1789,19 @@ const char* Abstract_Socket::remote_address_name() { return "destIPAddr + const char* Abstract_Socket::local_address_name() { return "serverIPAddr";} + const char* Abstract_Socket::remote_port_name() { return "destPort";} + const char* Abstract_Socket::ai_family_name() { return "ai_family";} ++const char* Abstract_Socket::ip_proto_name() { return "ip_proto";} + const char* Abstract_Socket::use_connection_ASPs_name() { return "use_connection_ASPs";} + const char* Abstract_Socket::halt_on_connection_reset_name(){ return "halt_on_connection_reset";} +-const char* Abstract_Socket::client_TCP_reconnect_name() { return "client_TCP_reconnect";} ++const char* Abstract_Socket::client_TCP_reconnect_name() { return "client_TCP_reconnect";} + const char* Abstract_Socket::TCP_reconnect_attempts_name() { return "TCP_reconnect_attempts";} +-const char* Abstract_Socket::TCP_reconnect_delay_name() { return "TCP_reconnect_delay";} ++const char* Abstract_Socket::TCP_reconnect_delay_name() { return "TCP_reconnect_delay";} + const char* Abstract_Socket::server_mode_name() { return "server_mode";} + const char* Abstract_Socket::socket_debugging_name() { return "socket_debugging";} + const char* Abstract_Socket::nagling_name() { return "nagling";} + const char* Abstract_Socket::use_non_blocking_socket_name() { return "use_non_blocking_socket";} + const char* Abstract_Socket::server_backlog_name() { return "server_backlog";} +-bool Abstract_Socket::add_user_data(int) {return true;} +-bool Abstract_Socket::remove_user_data(int) {return true;} ++bool Abstract_Socket::add_user_data(int) {return true;} ++bool Abstract_Socket::remove_user_data(int) {return true;} + bool Abstract_Socket::user_all_mandatory_configparameters_present() { return true; } + + diff --git a/ttcn/patch_abstract_socket/Abstract_Socket.hh.patch b/ttcn/patch_abstract_socket/Abstract_Socket.hh.patch new file mode 100644 index 0000000000000000000000000000000000000000..bce5667c9379427f8c787a494a45063e633ca6cb --- /dev/null +++ b/ttcn/patch_abstract_socket/Abstract_Socket.hh.patch @@ -0,0 +1,38 @@ +diff --git a/src/Abstract_Socket.hh b/src/Abstract_Socket.hh +index 6d7bc3d..a068662 100644 +--- a/src/Abstract_Socket.hh ++++ b/src/Abstract_Socket.hh +@@ -134,7 +134,7 @@ protected: + bool get_handle_half_close() const {return handle_half_close;} + int get_socket_fd() const; + int get_listen_fd() const {return listen_fd;} +- ++ + //set non-blocking mode + int set_non_block_mode(int fd, bool enable_nonblock); + +@@ -149,6 +149,8 @@ protected: + const struct sockaddr_in & get_local_addr() {return localAddr; }; /* FIXME: This function is deprecated and should be removed! */ + const int& get_ai_family() const {return ai_family;} + void set_ai_family(int parameter_value) {ai_family=parameter_value;} ++ const int& get_ip_proto() const {return ip_proto;} ++ void set_ip_proto(int parameter_value) {ip_proto=parameter_value;} + bool get_ttcn_buffer_usercontrol() const {return ttcn_buffer_usercontrol; } + void set_nagling(bool parameter_value) {nagling=parameter_value;} + void set_server_mode(bool parameter_value) {server_mode=parameter_value;} +@@ -204,6 +206,7 @@ protected: + virtual const char* local_address_name(); + virtual const char* remote_port_name(); + virtual const char* ai_family_name(); ++ virtual const char* ip_proto_name(); + virtual const char* use_connection_ASPs_name(); + virtual const char* halt_on_connection_reset_name(); + virtual const char* client_TCP_reconnect_name(); +@@ -269,6 +272,7 @@ private: + char* remote_host_name; + unsigned int remote_port_number; + int ai_family; // address family to use ++ int ip_proto; // protocol to use (e.g. IPPROTO_TCP, IPPROTO_SCTP) + // remoteAddr and localAddr is filled when map_user is called + struct sockaddr_in remoteAddr; /* FIXME: not used! should be removed */ + struct sockaddr_in localAddr; /* FIXME: not used! should be removed */ diff --git a/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn b/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn index 7c54ff1b2cdbe61019667089c462de3c05b26da3..eb11aef6902e2e36bf670457b6d30362093def84 100644 --- a/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn +++ b/ttcn/patch_lib_common_titan/ttcn/LibCommon_Sync.ttcn @@ -62,7 +62,7 @@ module LibCommon_Sync { //Common - import from LibCommon_BasicTypesAndValues { type UInt } ; + import from LibCommon_BasicTypesAndValues all; import from LibCommon_AbstractData all; import from LibCommon_VerdictControl all; @@ -148,8 +148,8 @@ module LibCommon_Sync { * @see LibCommon_Sync.ServerSyncComp * @see LibCommon_Sync.ClientSyncComp */ - type port SyncPort message { - inout SyncCmd + type port SyncPort message { + inout SyncCmd } with { extension "internal" } @@ -163,7 +163,7 @@ module LibCommon_Sync { e_testBody, e_postamble } - + } // end compTypeRelated group standardSyncPointNames { @@ -322,7 +322,7 @@ module LibCommon_Sync { * @param p_numClients number of synchronization clients * @param p_syncPointIds list of synchronization point name/ids */ - function f_serverSyncNClientsAndStop ( + function f_serverSyncNClientsAndStop ( in UInt p_numClients, in SyncPointList p_syncPointIds ) runs on ServerSyncComp { @@ -421,7 +421,7 @@ module LibCommon_Sync { f_clientSyncAndVerdictPreamble(p_syncPoint, p_ret); } } - + /** * @desc Calls either self synchronization function if * invoking component is the MTC, otherwise @@ -450,11 +450,11 @@ module LibCommon_Sync { f_clientSyncAndVerdictTestBody(p_syncPoint, p_ret); } } - + /** * @desc Function kept for backward compatibility * @see f_selfOrClientSyncAndVerdictPreamble - * + * */ function f_selfOrClientSyncAndVerdictPR( in charstring p_syncPoint, in FncRetCode p_ret) @@ -618,18 +618,18 @@ module LibCommon_Sync { stop ; } } // end altstep a_dummyShutDown - + /** - * @desc Shutdown alstep in case the sync server is requesting shutdown. - * - * @remark User shall stop the component + * @desc Shutdown alstep in case the sync server is requesting shutdown. + * + * @remark User shall stop the component */ - altstep a_shutdown() - runs on ClientSyncComp { + altstep a_shutdown() + runs on BaseSyncComp { [] syncPort.receive(m_syncServerStop){ tc_sync.stop ; log("**** a_shutdown: Test component received STOP signal from MTC **** "); - } + } } } // end group shutDownAltsteps @@ -663,7 +663,7 @@ module LibCommon_Sync { /** * @desc Implements synchronization of "n" clients from server - * side including intermediate synchronization. + * side including intermediate synchronization. * If a problem occurs, then server sends STOP to * all clients. Waits for PX_TSYNC_TIME_LIMIT to let * clients finish executing their behavior until this @@ -682,7 +682,7 @@ module LibCommon_Sync { runs on ServerSyncComp { f_serverSyncClientsTimedIntermediateSync(p_noOfClients,p_syncId, p_NoOfClientIntermediate, p_syncIdIntermediate, PX_TSYNC_TIME_LIMIT); } - + /** * @desc Handles synchronization of clients from server side. * If problem occurs, then server sends STOP to all clients. @@ -732,7 +732,7 @@ module LibCommon_Sync { } else if ( p_syncId == c_initDone ) { log("**** f_serverSyncClientsTimed: Sync server now starting UPPER TESTER synchronization ... ****") ; } else { - log("**** f_serverSyncClientsTimed: Sync server now starting handling of next synchronization point ... ****") ; + log("**** f_serverSyncClientsTimed: Sync server now starting handling of " & p_syncId & " synchronization point ... ****") ; } tc_sync.start(p_execTimeLimit) ; alt{ @@ -747,6 +747,7 @@ module LibCommon_Sync { repeat; } [] syncPort.receive(m_syncClientReady(p_syncId)) -> sender v_clientRef { + log("**** f_serverSyncClientsTimed: Sync server received READY signal from a client - server will wait for all clients to reach this synchronization point ****"); if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; v_noOfRecvdSyncMsgs := v_noOfRecvdSyncMsgs + 1; @@ -767,7 +768,7 @@ module LibCommon_Sync { log("**** f_serverSyncClientsTimed: Sync server received client sync message with incorrect synchronization point id which is currently not handled - server will stop all clients! ****") ; v_stopClients := true; if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { - v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; + v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; } } [] syncPort.receive(SyncCmd :? ) { @@ -991,7 +992,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! ****") ; @@ -1139,7 +1140,7 @@ module LibCommon_Sync { f_selfSync(p_syncId,p_ret); vc_testcaseStep := e_testBody; } - + /** * @desc This function combines MTC verdict setting with self * synchronization for use after the test body. @@ -1317,29 +1318,29 @@ module LibCommon_Sync { alt { [] syncPort.receive { // clients may still try to send some sync message - } + } [] all component.done { tc_shutDown.stop; log("**** f_serverWaitForAllClientsToShutDown: All components have properly shut down. Sync server will now terminate the test case. ****") ; - } + } [] tc_shutDown.timeout { log("**** f_serverWaitForAllClientsToShutDown: Not all clients have properly shutdown within the shut down time limit. Sync server will now terminate test case! ****") ; - } + } } // end alt // cover case that shut down default is NOT activated setverdict(inconc); - //mtc.stop; - syncPort.send(m_syncServerStop) to self; // this MUST be _server_ for the default to catch! - tc_sync.start(PX_TSYNC_TIME_LIMIT); - alt{ - [] tc_sync.timeout{ - log("**** f_selfSyncStop: Stopping MTC without shutdown - either no shutdown default active or missing syncPort connection ****") ; - setverdict(inconc); - stop ; - } - }//end alt - tc_sync.stop; - stop; // if shutdown default is not activated or if it does not stop + //mtc.stop; + syncPort.send(m_syncServerStop) to self; // this MUST be _server_ for the default to catch! + tc_sync.start(PX_TSYNC_TIME_LIMIT); + alt{ + [] tc_sync.timeout{ + log("**** f_selfSyncStop: Stopping MTC without shutdown - either no shutdown default active or missing syncPort connection ****") ; + setverdict(inconc); + stop ; + } + }//end alt + tc_sync.stop; + stop; // if shutdown default is not activated or if it does not stop } // end function f_serverWaitForAllClientsToShutDown function f_isPresentInArray(in ClientSyncComp p_clientRef, in ClientSyncCompList p_clientRefs) diff --git a/ttcn/patch_lib_http/module.mk b/ttcn/patch_lib_http/module.mk index 77b6b4c66b12aa879b9131649e2d2b273483a392..f1b043fa99ebfc5a652d6beb4197225384cb395e 100644 --- a/ttcn/patch_lib_http/module.mk +++ b/ttcn/patch_lib_http/module.mk @@ -1,3 +1,4 @@ sources := \ ttcn/LibHttp_JsonMessageBodyTypes.ttcn \ ttcn/LibHttp_JsonTemplates.ttcn \ + diff --git a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn index 332f676e4442dc12f2eadcdc46a7d506195a6c24..d7a8e6da67b762880b8b9cafdf440a4fff6feba2 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonMessageBodyTypes.ttcn @@ -30,6 +30,12 @@ module LibHttp_JsonMessageBodyTypes { import from IoTAPI_TypesAndValues all; // LibMec/FixedAccessInformationServiceAPI import from FederationEnablementAPI_TypesAndValues all; + // LibMec/FixedAccessInformationServiceAPI + import from QoSMeasurementAPI_TypesAndValues all; + // LibMec/SensorsSharingService + import from SensorsSharingService_TypesAndValues all; + // LibMec/SelfServiceEnablementAPI + import from SelfServiceEnablementAPI_TypesAndValues all; /** * This file volontary contains a trivial declaration of the type JsonBody. @@ -38,25 +44,25 @@ module LibHttp_JsonMessageBodyTypes { // TODO Add here your custom RFCs import type union JsonBody { - 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 + UserInfo userInfo, // ETSI GS MEC 013 V3.2.1 Clause 6.2.2 Type: UserInfo + UserList userList, // ETSI GS MEC 013 V3.2.1 Clause 6.2.5 Type: UserList + LocationAPI_TypesAndValues.ZoneInfo zoneInfo, // ETSI GS MEC 013 V3.2.1 Clause 6.2.1 Zonal presence data types + AccessPointList accessPointList, // ETSI GS MEC 013 V3.2.1 Clause 6.2.1 Zonal presence data types + AccessPointInfo accessPointInfo, // ETSI GS MEC 013 V3.2.1 Clause 6.2.1 Zonal presence data types + LocationAPI_TypesAndValues.NotificationSubscriptionList notificationSubscriptionList, // ETSI GS MEC 013 V3.2.1 Clause 6.3.3 Type: NotificationSubscriptionList + UserLocationEventSubscription userLocationEventSubscription, // ETSI GS MEC 013 V3.2.1 Clause 6.3.4 Type: UserLocationEventSubscription + UserLocationPeriodicSubscription userLocationPeriodicSubscription, // ETSI GS MEC 013 V3.2.1 Clause 6.3.5 Type: UserLocationPeriodicSubscription + ZoneLocationEventSubscription zoneLocationEventSubscription, // ETSI GS MEC 013 V3.2.1 Clause 6.3.6 Type: ZoneLocationEventSubscription + ZoneStatusSubscription zoneStatusSubscription, // ETSI GS MEC 013 V3.2.1 Clause 6.3.7 Type: ZoneStatusSubscription + UserAreaSubscription userAreaSubscription, // ETSI GS MEC 013 V3.2.1 Clause 6.3.8 Type: UserAreaSubscription + UserDistanceSubscription userDistanceSubscription, // ETSI GS MEC 013 V3.2.1 Clause 6.3.9 Type: UserDistanceSubscription + UserAreaNotification userAreaNotification, // ETSI GS MEC 013 V3.2.1 Clause 6.4.8 Type: UserAreaNotification + UserDistanceNotification userDistanceNotification, // ETSI GS MEC 013 V3.2.1 Clause 6.4.9 Type: UserDistanceNotification + UserLocationEventNotification userLocationEventNotification, // ETSI GS MEC 013 V3.2.1 Clause 6.4.4 Type: UserLocationEventNotification + UserLocationPeriodicNotification userLocationPeriodicNotification, // ETSI GS MEC 013 V3.2.1 Clause 6.4.5 Type: UserLocationPeriodicNotification + ZoneLocationEventNotification zoneLocationEventNotification, // ETSI GS MEC 013 V3.2.1 Clause 6.4.6 Type: ZoneLocationEventNotification + ZoneStatusNotification zoneStatusNotification, // ETSI GS MEC 013 V3.2.1 Clause 6.4.7 Type: ZoneStatusNotification + LocationAPI_TypesAndValues.TestNotification testNotification, // ETSI GS MEC 013 V3.2.1 Clause 6.4.3 Type: TestNotification TerminalDistance terminalDistance, LibMec_TypesAndValues.ProblemDetails problemDetails, UeIdentityTagInfo ueIdentityTagInfo, @@ -77,6 +83,9 @@ module LibHttp_JsonMessageBodyTypes { BwInfoList bwInfoList, BwInfo bwInfo, BwInfoDeltas bwInfoDeltas, + BwChgEventSubscription bwchgeventsubscription, + TrafficManagementAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_bw, + BwChgEventNotification bwChgEventNotification, MtsCapabilityInfo mtsCapabilityInfo, MtsSessionInfo mtsSessionInfo, MtsSessionInfos mtsSessionInfos, @@ -129,12 +138,18 @@ module LibHttp_JsonMessageBodyTypes { AppTerminationConfirmation appTerminationConfirmation, AppReadyConfirmation appReadyConfirmation, ServiceLivenessInfo serviceLivenessInfo, - ServiceLivenessUpdate serviceLivenessUpdate, - DnsRuleList dnsRuleList, + ServiceLivenessUpdate serviceLivenessUpdate, + DnsRuleList dnsRuleList, DnsRule dnsRule, SerAvailabilityNotificationSubscription serAvailabilityNotificationSubscription, TimingCaps timingCaps, CurrentTime currentTime, + DiscoveredAPIs discovered_apis, + ServiceAPIDescription service_api_description, + ServiceAPIDescriptionPatch service_api_description_patch, + EventSubscription capif_event_subscription, + EventSubscriptionPatch capif_event_subscription_patch, + EventNotification capif_event_notification, DeviceApplicationInterfaceAPI_TypesAndValues.ApplicationList applicationList, DeviceApplicationInterfaceAPI_TypesAndValues.AppContext appContext_device_info, ApplicationLocationAvailability applicationLocationAvailability, @@ -164,20 +179,54 @@ 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 + V2xMsgDistributionServerInfo v2xMsgDistributionServerInfo, // ETSI GS MEC 030 V3.3.1 (2024-06) 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 + PredQosSubscription predQosSubscription, // ETSI GS MEC 030 V3.3.1 (2024-06) Table 6.3.6-1: Attributes of the PredQosSubscription ProvChgUuUniNotification provChgUuUniNotification, ProvChgUuMbmsNotification provChgUuMbmsNotification, ProvChgPc5Notification provChgPc5Notification, - 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 + SystemInfo systemInfo, // ETSI GS MEC 040 V3.2.1 (2024-03) Clause 6.2.2 Type: SystemInfo + SystemInfoList systemInfoList, // ETSI GS MEC 040 V3.2.1 (2024-03) Clause 6.2.2 Type: SystemInfo + SystemInfoUpdate systemInfoUpdate, // ETSI GS MEC 040 V3.2.1 (2024-03) Clause 6.2.3 Type: SystemInfoUpdate + SystemUpdateNotificationSubscription systemUpdateNotificationSubscription, // ETSI GS MEC 040 V3.2.1 (2024-03) Clause 6.3.2 Type: SystemUpdateNotificationSubscription + SystemUpdateNotification systemUpdateNotification, // ETSI GS MEC 040 V3.2.1 (2024-03) Clause 6.4.2 Type: SystemUpdateNotification + FederationEnablementAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_fed, 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 + QoSMeasurementAPI_TypesAndValues.NotificationSubscriptionList notification_subscription_list, // ETSI GS MEC 045 V3.1.1 (2024-03) Clause 6.3.1 Type: NotificationSubscriptionList + QoSMeasureSubscription qos_measure_subscription, // ETSI GS MEC 045 V3.1.1 (2024-03) Clause 6.3.2 Type: QoSMeasureSubscription + QoSEventSubscription qos_event_subscription, // ETSI GS MEC 045 V3.1.1 (2024-03) Clause 6.3.3 Type: QoSEventSubscription + QoSMeasureNotification qos_measure_notification, // ETSI GS MEC 045 V3.1.1 (2024-03) Clause 6.4.2 Type: QoSMeasureNotification + QoSEventNotification qos_event_notification, // ETSI GS MEC 045 V3.1.1 (2024-03) Clause 6.4.3 Type: QoSEventNotification + QoSMeasurementAPI_TypesAndValues.TestNotification qos_test_notification, // ETSI GS MEC 045 V3.1.1 (2024-03) Clause 6.4.1 Type: TestNotification + SensorDiscoveryInfos sensor_discovery_infos, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.2.1 Type: SensorDiscoveryInfo + SensorDiscoveryInfo sensor_discovery_info, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.2.1 Type: SensorDiscoveryInfo + SensorsSharingService_TypesAndValues.SubscriptionLinkList subscription_link_list_sss, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.3.4 Type: SubscriptionLinkList + SensorDiscoveryEventSubscription sensor_discovery_event_subscription, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.3.1 Type: SensorDiscoveryEventSubscription + SensorStatusSubscription sensor_status_subscription, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.3.2 Type: SensorStatusSubscription + SensorDataSubscription sensor_data_subscription, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.3.3 Type: SensorDataSubscription + SensorDiscoveryEventNotification sensor_discovery_event_notification, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.4.1 Type: SensorDiscoveryEventNotification + SensorStatusNotification sensor_status_notification, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.4.2 Type: SensorStatusNotification + SensorDataNotification sensor_data_notification, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.4.3 Type: SensorDataNotification + SensorDatas sensor_datas, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.2.3 Type: SensorData + SensorData sensor_data, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.2.3 Type: SensorData + SensorCharacteristics sensor_characteristics, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.5.4 Type: SensorCharacteristic + SensorCharacteristicInfos sensor_characteristic_infos, // ETSI GS MEC 046 V3.1.1 (2024-04) Clause 6.5.4 Type: SensorCharacteristic + SensorsSharingService_TypesAndValues.TestNotification sens_test_notification, + TenantInfo tenantInfo, + TenantInfoList tenantInfoList, + ResourceQuotaInfo resourceQuotaInfo, + SiteResourceQuotaInfo siteResourceQuotaInfo, + SiteResourceQuotaInfoList siteResourceQuotaInfoList, + ResourceUsageSubscription resourceUsageSubscription, + SiteResourceUsageSubscription siteResourceUsageSubscription, + SiteResourceUsageNotification siteResourceUsageNotification, + ResourceUsageNotification resourceUsageNotification, + SelfServiceEnablementAPI_TypesAndValues.ExpiryNotification expiryNotification_cse, + SelfServiceEnablementAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_cse, + // 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 fabd6e5abd4f6898597b6997fd5329ac1eaa0210..9b315703ce106f86ec8713501af494cf5407d0a2 100644 --- a/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/ttcn/LibHttp_JsonTemplates.ttcn @@ -55,6 +55,15 @@ module LibHttp_JsonTemplates { // LibMec/FixedAccessInformationServiceAPI import from FederationEnablementAPI_TypesAndValues all; + // LibMec/QoSMeasurementServiceAPI + import from QoSMeasurementAPI_TypesAndValues all; + + // LibMec/SensorsSharingService + import from SensorsSharingService_TypesAndValues all; + + // LibMec/SelfServiceEnablementAPI + import from SelfServiceEnablementAPI_TypesAndValues all; + template (value) JsonBody m_json_body_raw( in template (value) charstring p_raw ) := { @@ -511,13 +520,13 @@ module LibHttp_JsonTemplates { } // 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 + in template (value) LocationAPI_TypesAndValues.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 := ? + template (present) LocationAPI_TypesAndValues.NotificationSubscriptionList p_notification_subscription_list := ? ) := { notificationSubscriptionList := p_notification_subscription_list } // End of template mw_body_json_notification_subscription_list @@ -619,14 +628,14 @@ module LibHttp_JsonTemplates { } // End of template mw_body_json_user_area_notification template (value) JsonBody m_body_json_user_distance_notification( - in template (value) UserDistanceNotification p_userDistanceNotification - ) := { + 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 := ? - ) := { + template (present) UserDistanceNotification p_userDistanceNotification := ? + ) := { userDistanceNotification := p_userDistanceNotification } // End of template mw_body_json_user_distance_notification @@ -916,6 +925,36 @@ module LibHttp_JsonTemplates { bwInfoList := p_bwInfoList } // End of template mw_body_json_bw_info_list + template (value) JsonBody m_body_json_bw_chg_event_subscription( + in template (value) BwChgEventSubscription p_bwchgeventsubscription + ) := { + bwchgeventsubscription := p_bwchgeventsubscription + } // End + + template (present) JsonBody mw_body_json_bw_chg_event_subscription( + template (present) BwChgEventSubscription p_bwchgeventsubscription := ? + ) := { + bwchgeventsubscription := p_bwchgeventsubscription + } // End + + template (present) JsonBody mw_body_json_bw_subscription_link_list( + template (present) TrafficManagementAPI_TypesAndValues.SubscriptionLinkList p_subscriptionlinklist := ? + ) := { + subscriptionLinkList_bw := p_subscriptionlinklist + } // End + + template (value) JsonBody m_body_json_bw_chg_event_notification( + in template (value) BwChgEventNotification p_bwchgeventnotification + ) := { + bwChgEventNotification := p_bwchgeventnotification + } // End of template m_body_json__bw_chg_event_notification + + template (present) JsonBody mw_body_json_bw_chg_event_notification( + template (present) BwChgEventNotification p_bwchgeventnotification := ? + ) := { + bwChgEventNotification := p_bwchgeventnotification + } // End of template mw_body_json__bw_chg_event_notification + template (value) JsonBody m_body_json_mts_capability_info( in template (value) MtsCapabilityInfo p_mtsCapabilityInfo ) := { @@ -1154,6 +1193,78 @@ module LibHttp_JsonTemplates { appInfo_regapps := p_appInfo_regapps } // End of template mw_body_json_app_info_regapps + template (value) JsonBody m_body_json_discovered_apis( + in template (value) DiscoveredAPIs p_discovered_apis + ) := { + discovered_apis := p_discovered_apis + } // End of template m_body_json_discovered_apis + + template (present) JsonBody mw_body_json_discovered_apis( + template (present) DiscoveredAPIs p_discovered_apis := ? + ) := { + discovered_apis := p_discovered_apis + } // End of template mw_body_json_discovered_apis + + template (value) JsonBody m_body_json_service_api_description( + in template (value) ServiceAPIDescription p_service_api_description + ) := { + service_api_description := p_service_api_description + } // End of template m_body_json_service_api_description + + template (present) JsonBody mw_body_json_service_api_description( + template (present) ServiceAPIDescription p_service_api_description := ? + ) := { + service_api_description := p_service_api_description + } // End of template mw_body_json_service_api_description + + template (value) JsonBody m_body_json_service_api_description_patch( + in template (value) ServiceAPIDescriptionPatch p_service_api_description_patch + ) := { + service_api_description_patch := p_service_api_description_patch + } // End of template m_body_json_service_api_description_patch + + template (present) JsonBody mw_body_json_service_api_description_patch( + template (present) ServiceAPIDescriptionPatch p_service_api_description_patch := ? + ) := { + service_api_description_patch := p_service_api_description_patch + } // End of template mw_body_json_service_api_description_patch + + template (value) JsonBody m_body_json_capif_event_subscription( + in template (value) EventSubscription p_capif_event_subscription + ) := { + capif_event_subscription := p_capif_event_subscription + } // End of template m_body_json_capif_event_subscription + + template (present) JsonBody mw_body_json_capif_event_subscription( + template (present) EventSubscription p_capif_event_subscription := ? + ) := { + capif_event_subscription := p_capif_event_subscription + } // End of template mw_body_json_capif_event_subscription + + template (value) JsonBody m_body_json_capif_event_subscription_patch( + in template (value) EventSubscriptionPatch p_capif_event_subscription_patch + ) := { + capif_event_subscription_patch := p_capif_event_subscription_patch + } // End of template m_body_json_capif_event_subscription_patch + + template (present) JsonBody mw_body_json_capif_event_subscription_patch( + template (present) EventSubscriptionPatch p_capif_event_subscription_patch := ? + ) := { + capif_event_subscription_patch := p_capif_event_subscription_patch + } // End of template mw_body_json_capif_event_subscription_patch + + template (value) JsonBody m_body_json_capif_event_notification( + in template (value) EventNotification p_capif_event_notification + ) := { + capif_event_notification := p_capif_event_notification + } // End of template m_body_json_capif_event_notification + + template (present) JsonBody mw_body_json_capif_event_notification( + template (present) EventNotification p_capif_event_notification := ? + ) := { + capif_event_notification := p_capif_event_notification + } // End of template mw_body_json_capif_event_notification + } // End of group app_enablement_api group ue_app_ctx { @@ -1710,6 +1821,412 @@ module LibHttp_JsonTemplates { systemInfoUpdate := p_systemInfoUpdate } // End of template mw_body_json_fed_system_info_update + template (value) JsonBody m_body_json_system_update_notification_subscription( + in template (value) SystemUpdateNotificationSubscription p_systemUpdateNotificationSubscription + ) := { + systemUpdateNotificationSubscription := p_systemUpdateNotificationSubscription + } // End of template m_body_json_system_update_notification_subscription + + template (present) JsonBody mw_body_json_system_update_notification_subscription( + template (present) SystemUpdateNotificationSubscription p_systemUpdateNotificationSubscription := ? + ) := { + systemUpdateNotificationSubscription := p_systemUpdateNotificationSubscription + } // End of template mw_body_json_system_update_notification_subscription + + template (value) JsonBody m_body_json_system_update_notification( + in template (value) SystemUpdateNotification p_systemUpdateNotification + ) := { + systemUpdateNotification := p_systemUpdateNotification + } // End of template m_body_json_system_update_notification + + template (present) JsonBody mw_body_json_system_update_notification( + template (present) SystemUpdateNotification p_systemUpdateNotification := ? + ) := { + systemUpdateNotification := p_systemUpdateNotification + } // End of template mw_body_json_system_update_notification + + template (value) JsonBody m_body_json_subscription_link_list_fed( + in template (value) FederationEnablementAPI_TypesAndValues.SubscriptionLinkList p_subscription_link_list_fed + ) := { + subscriptionLinkList_fed := p_subscription_link_list_fed + } // End of template m_body_json_subscription_link_list_fed + + template (present) JsonBody mw_body_json_subscription_link_list_fed( + template (present) FederationEnablementAPI_TypesAndValues.SubscriptionLinkList p_subscription_link_list_fed := ? + ) := { + subscriptionLinkList_fed := p_subscription_link_list_fed + } // End of template mw_body_json_subscription_link_list_fed + } // End of group federation + group qos_meas { + + template (value) JsonBody m_body_json_qos_notification_subscription_list( + in template (value) QoSMeasurementAPI_TypesAndValues.NotificationSubscriptionList p_notification_subscription_list + ) := { + notification_subscription_list := p_notification_subscription_list + } // End of template m_body_json_qos_notification_subscription_list + + template (present) JsonBody mw_body_json_qos_notification_subscription_list( + template (present) QoSMeasurementAPI_TypesAndValues.NotificationSubscriptionList p_notification_subscription_list := ? + ) := { + notification_subscription_list := p_notification_subscription_list + } // End of template mw_body_json_qos_notification_subscription_list + + template (value) JsonBody m_body_json_qos_measure_subscription( + in template (value) QoSMeasureSubscription p_qos_measure_subscription + ) := { + qos_measure_subscription := p_qos_measure_subscription + } // End of template m_body_json_qos_measure_subscription + + template (present) JsonBody mw_body_json_qos_measure_subscription( + template (present) QoSMeasureSubscription p_qos_measure_subscription := ? + ) := { + qos_measure_subscription := p_qos_measure_subscription + } // End of template mw_body_json_qos_measure_subscription + + template (value) JsonBody m_body_json_qos_event_subscription( + in template (value) QoSEventSubscription p_qos_event_subscription + ) := { + qos_event_subscription := p_qos_event_subscription + } // End of template m_body_json_qos_event_subscription + + template (present) JsonBody mw_body_json_qos_event_subscription( + template (present) QoSEventSubscription p_qos_event_subscription := ? + ) := { + qos_event_subscription := p_qos_event_subscription + } // End of template mw_body_json_qos_event_subscription + + template (value) JsonBody m_body_json_qos_measure_notification( + in template (value) QoSMeasureNotification p_qos_measure_notification + ) := { + qos_measure_notification := p_qos_measure_notification + } // End of template m_body_json_qos_measure_notification + + template (present) JsonBody mw_body_json_qos_measure_notification( + template (present) QoSMeasureNotification p_qos_measure_notification := ? + ) := { + qos_measure_notification := p_qos_measure_notification + } // End of template mw_body_json_qos_measure_notification + + template (value) JsonBody m_body_json_qos_event_notification( + in template (value) QoSEventNotification p_qos_event_notification + ) := { + qos_event_notification := p_qos_event_notification + } // End of template m_body_json_qos_event_notification + + template (present) JsonBody mw_body_json_qos_event_notification( + template (present) QoSEventNotification p_qos_event_notification := ? + ) := { + qos_event_notification := p_qos_event_notification + } // End of template mw_body_json_qos_event_notification + + template (value) JsonBody m_body_json_qos_test_notification( + in template (value) QoSMeasurementAPI_TypesAndValues.TestNotification p_test_notification + ) := { + qos_test_notification := p_test_notification + } // End of template m_body_json_qos_test_notification + + template (present) JsonBody mw_body_json_qos_test_notification( + template (present) QoSMeasurementAPI_TypesAndValues.TestNotification p_test_notification := ? + ) := { + qos_test_notification := p_test_notification + } // End of template mw_body_json_qos_test_notification + + } // End of group qos_meas + + group sens { + + template (value) JsonBody m_body_json_sensor_discovery_infos( + in template (value) SensorDiscoveryInfos p_sensor_discovery_infos + ) := { + sensor_discovery_infos := p_sensor_discovery_infos + } // End of template m_body_json_sensor_discovery_infos + + template (present) JsonBody mw_body_json_sensor_discovery_infos( + template (present) SensorDiscoveryInfos p_sensor_discovery_infos := ? + ) := { + sensor_discovery_infos := p_sensor_discovery_infos + } // End of template mw_body_json_sensor_discovery_infos + + template (value) JsonBody m_body_json_subscription_link_list_sss( + in template (value) SensorsSharingService_TypesAndValues.SubscriptionLinkList p_subscription_link_list + ) := { + subscription_link_list_sss := p_subscription_link_list + } // End of template m_body_json_subscription_link_list_sss + + template (present) JsonBody mw_body_json_subscription_link_list_sss( + template (present) SensorsSharingService_TypesAndValues.SubscriptionLinkList p_subscription_link_list := ? + ) := { + subscription_link_list_sss := p_subscription_link_list + } // End of template mw_body_json_subscription_link_list_sss + + template (value) JsonBody m_body_json_sensor_discovery_event_subscription( + in template (value) SensorDiscoveryEventSubscription p_sensor_discovery_event_subscription + ) := { + sensor_discovery_event_subscription := p_sensor_discovery_event_subscription + } // End of template m_body_json_sensor_discovery_event_subscription + + template (present) JsonBody mw_body_json_sensor_discovery_event_subscription( + template (present) SensorDiscoveryEventSubscription p_sensor_discovery_event_subscription := ? + ) := { + sensor_discovery_event_subscription := p_sensor_discovery_event_subscription + } // End of template mw_body_json_sensor_discovery_event_subscription + + template (value) JsonBody m_body_json_sensor_status_subscription( + in template (value) SensorStatusSubscription p_sensor_status_subscription + ) := { + sensor_status_subscription := p_sensor_status_subscription + } // End of template m_body_json_sensor_status_subscription + + template (present) JsonBody mw_body_json_sensor_status_subscription( + template (present) SensorStatusSubscription p_sensor_status_subscription := ? + ) := { + sensor_status_subscription := p_sensor_status_subscription + } // End of template mw_body_json_sensor_status_subscription + + template (value) JsonBody m_body_json_sensor_data_subscription( + in template (value) SensorDataSubscription p_sensor_data_subscription + ) := { + sensor_data_subscription := p_sensor_data_subscription + } // End of template m_body_json_sensor_data_subscription + + template (present) JsonBody mw_body_json_sensor_data_subscription( + template (present) SensorDataSubscription p_sensor_data_subscription := ? + ) := { + sensor_data_subscription := p_sensor_data_subscription + } // End of template mw_body_json_sensor_data_subscription + + template (value) JsonBody m_body_json_sensor_discovery_event_notification( + in template (value) SensorDiscoveryEventNotification p_sensor_discovery_event_notification + ) := { + sensor_discovery_event_notification := p_sensor_discovery_event_notification + } // End of template m_body_json_sensor_discovery_event_notification + + template (present) JsonBody mw_body_json_sensor_discovery_event_notification( + template (present) SensorDiscoveryEventNotification p_sensor_discovery_event_notification := ? + ) := { + sensor_discovery_event_notification := p_sensor_discovery_event_notification + } // End of template mw_body_json_sensor_discovery_event_notification + + template (value) JsonBody m_body_json_sensor_status_notification( + in template (value) SensorStatusNotification p_sensor_status_notification + ) := { + sensor_status_notification := p_sensor_status_notification + } // End of template m_body_json_sensor_status_notification + + template (present) JsonBody mw_body_json_sensor_status_notification( + template (present) SensorStatusNotification p_sensor_status_notification := ? + ) := { + sensor_status_notification := p_sensor_status_notification + } // End of template mw_body_json_sensor_status_notification + + template (value) JsonBody m_body_json_sensor_data_notification( + in template (value) SensorDataNotification p_sensor_data_notification + ) := { + sensor_data_notification := p_sensor_data_notification + } // End of template m_body_json_sensor_data_notification + + template (present) JsonBody mw_body_json_sensor_data_notification( + template (present) SensorDataNotification p_sensor_data_notification := ? + ) := { + sensor_data_notification := p_sensor_data_notification + } // End of template mw_body_json_sensor_data_notification + + template (value) JsonBody m_body_json_sensor_datas( + in template (value) SensorDatas p_sensor_datas + ) := { + sensor_datas := p_sensor_datas + } // End of template m_body_json_sensor_datas + + template (present) JsonBody mw_body_json_sensor_datas( + template (present) SensorDatas p_sensor_datas := ? + ) := { + sensor_datas := p_sensor_datas + } // End of template mw_body_json_sensor_datas + + template (value) JsonBody m_body_json_sensor_data( + in template (value) SensorData p_sensor_data + ) := { + sensor_data := p_sensor_data + } // End of template m_body_json_sensor_data + + template (present) JsonBody mw_body_json_sensor_data( + template (present) SensorData p_sensor_data := ? + ) := { + sensor_data := p_sensor_data + } // End of template mw_body_json_sensor_data + + template (value) JsonBody m_body_json_sensor_characteristics( + in template (value) SensorCharacteristics p_sensor_characteristics + ) := { + sensor_characteristics := p_sensor_characteristics + } // End of template m_body_json_sensor_characteristics + + template (present) JsonBody mw_body_json_sensor_characteristics( + template (present) SensorCharacteristics p_sensor_characteristics := ? + ) := { + sensor_characteristics := p_sensor_characteristics + } // End of template mw_body_json_sensor_characteristics + + template (value) JsonBody m_body_json_sensor_characteristic_infos( + in template (value) SensorCharacteristicInfos p_sensor_characteristic_infos + ) := { + sensor_characteristic_infos := p_sensor_characteristic_infos + } // End of template m_body_json_sensor_characteristic_infos + + template (present) JsonBody mw_body_json_sensor_characteristic_infos( + template (present) SensorCharacteristicInfos p_sensor_characteristic_infos := ? + ) := { + sensor_characteristic_infos := p_sensor_characteristic_infos + } // End of template mw_body_json_sensor_characteristic_infos + + template (value) JsonBody m_body_json_sens_test_notification( + in template (value) SensorsSharingService_TypesAndValues.TestNotification p_test_notification + ) := { + sens_test_notification := p_test_notification + } // End of template m_body_json_sens_test_notification + + template (present) JsonBody mw_body_json_sens_test_notification( + template (present) SensorsSharingService_TypesAndValues.TestNotification p_test_notification := ? + ) := { + sens_test_notification := p_test_notification + } // End of template mw_body_json_sens_test_notification + + } // End of group sens + + group cse { + + template (value) JsonBody m_body_json_cse_tenant_info( + in template (value) TenantInfo p_tenantInfo + ) := { + tenantInfo := p_tenantInfo + } // End of template m_body_json_cse_tenant_info + + template (present) JsonBody mw_body_json_cse_tenant_info( + template (present) TenantInfo p_tenantInfo := ? + ) := { + tenantInfo := p_tenantInfo + } // End of template mw_body_json_cse_tenant_info + + template (value) JsonBody m_body_json_cse_tenant_info_list( + in template (value) TenantInfoList p_tenantInfoList + ) := { + tenantInfoList := p_tenantInfoList + } // End of template m_body_json_fed_cse_tenant_info + + template (present) JsonBody mw_body_json_cse_tenant_info_list( + template (present) TenantInfoList p_tenantInfoList := ? + ) := { + tenantInfoList := p_tenantInfoList + } // End of template mw_body_json_cse_tenant_info_list + + template (value) JsonBody m_body_json_cse_resource_quota_info( + in template (value) ResourceQuotaInfo p_resourceQuotaInfo + ) := { + resourceQuotaInfo := p_resourceQuotaInfo + } // End of template m_body_json_cse_resource_quota_info + + template (present) JsonBody mw_body_json_cse_resource_quota_info ( + template (present) ResourceQuotaInfo p_resourceQuotaInfo:= ? + ) := { + resourceQuotaInfo := p_resourceQuotaInfo + } // End of template mw_body_json_cse_resource_quota_info + + template (value) JsonBody m_body_json_cse_site_resource_quota_info ( + in template (value) SiteResourceQuotaInfo p_siteResourceQuotaInfo + ) := { + siteResourceQuotaInfo := p_siteResourceQuotaInfo + } // End of template m_body_json_cse_resource_quota_info + + template (present) JsonBody mw_body_json_cse_site_resource_quota_info ( + template (present) SiteResourceQuotaInfo p_siteResourceQuotaInfo:= ? + ) := { + siteResourceQuotaInfo := p_siteResourceQuotaInfo + } // End of template mw_body_json_cse_resource_quota_info + + template (value) JsonBody m_body_json_cse_site_resource_quota_info_list( + in template (value) SiteResourceQuotaInfoList p_siteResourceQuotaInfoList + ) := { + siteResourceQuotaInfoList := p_siteResourceQuotaInfoList + } // End of template m_body_json_fed_cse_tenant_info + + template (present) JsonBody mw_body_json_cse_site_resource_quota_info_list( + template (present) SiteResourceQuotaInfoList p_siteResourceQuotaInfoList := ? + ) := { + siteResourceQuotaInfoList := p_siteResourceQuotaInfoList + } // End of template mw_body_json_cse_tenant_info_list + + template (value) JsonBody m_body_json_resource_usage_subscription( + in template (value) ResourceUsageSubscription p_resourceUsageSubscription + ) := { + resourceUsageSubscription := p_resourceUsageSubscription + } // End of template m_body_json_resource_usage_subscription + + template (present) JsonBody mw_body_json_resource_usage_subscription( + template (present) ResourceUsageSubscription p_resourceUsageSubscription := ? + ) := { + resourceUsageSubscription := p_resourceUsageSubscription + } // End of template mw_body_json_resource_usage_subscription + + template (value) JsonBody m_body_json_site_resource_usage_subscription( + in template (value) SiteResourceUsageSubscription p_siteResourceUsageSubscription + ) := { + siteResourceUsageSubscription := p_siteResourceUsageSubscription + } // End of template m_body_json_site_resource_usage_subscription + + template (present) JsonBody mw_body_json_site_resource_usage_subscription( + template (present) SiteResourceUsageSubscription p_siteResourceUsageSubscription := ? + ) := { + siteResourceUsageSubscription := p_siteResourceUsageSubscription + } // End of template mw_body_json_site_resource_usage_subscription + + template (value) JsonBody m_body_json_cse_subscription_link_list( + in template (value) SelfServiceEnablementAPI_TypesAndValues.SubscriptionLinkList p_subscriptionLinkList + ) := { + subscriptionLinkList_cse := p_subscriptionLinkList + } // End of template m_body_json_cse_subscription_link_list + + template (present) JsonBody mw_body_json_cse_subscription_link_list( + template (present) SelfServiceEnablementAPI_TypesAndValues.SubscriptionLinkList p_subscriptionLinkList := ? + ) := { + subscriptionLinkList_cse := p_subscriptionLinkList + } // End of template mw_body_json_cse_subscription_link_list + + template (value) JsonBody m_body_json_site_resource_usage_notification( + template (value) SiteResourceUsageNotification p_siteResourceUsageNotification + ) := { + siteResourceUsageNotification := p_siteResourceUsageNotification + } // End of template m_body_json_site_resource_usage_notification + template (present) JsonBody mw_body_json_site_resource_usage_notification( + template (present) SiteResourceUsageNotification p_siteResourceUsageNotification := ? + ) := { + siteResourceUsageNotification := p_siteResourceUsageNotification + } // End of template mw_body_json_site_resource_usage_notification + + template (value) JsonBody m_body_json_resource_usage_notification( + template (value) ResourceUsageNotification p_resourceUsageNotification + ) := { + resourceUsageNotification := p_resourceUsageNotification + } // End of template m_body_json_site_resource_usage_notification + template (present) JsonBody mw_body_json_resource_usage_notification( + template (present) ResourceUsageNotification p_resourceUsageNotification := ? + ) := { + resourceUsageNotification := p_resourceUsageNotification + } // End of template mw_body_json_site_resource_usage_notification + + template (value) JsonBody m_body_json_cse_expiry_notification( + in template (value) SelfServiceEnablementAPI_TypesAndValues.ExpiryNotification p_expiryNotification + ) := { + expiryNotification_cse := p_expiryNotification + } // End of template m_body_json_cse_expiry_notification + + template (present) JsonBody mw_body_json_cse_expiry_notification( + template (present) SelfServiceEnablementAPI_TypesAndValues.ExpiryNotification p_expiryNotification := ? + ) := { + expiryNotification_cse := p_expiryNotification + } // End of template mw_body_json_cse_expiry_notification + + } // End of group cse + } // End of module LibHttp_JsonTemplates diff --git a/virtualization/docker-dev/Dockerfile b/virtualization/docker-dev/Dockerfile index 37c7b15a0f9598b19463ac901121f90626e2aff8..6c31c8af8addea2c1484d24607251627611ccdf1 100644 --- a/virtualization/docker-dev/Dockerfile +++ b/virtualization/docker-dev/Dockerfile @@ -1,12 +1,12 @@ FROM stfubuntu:20.04 -MAINTAINER ETSI TTF T027 +MAINTAINER ETSI TTF T043 -LABEL description="TTF_T027_Mec Docker Image" +LABEL description="TTF_T043_Mec Docker Image" ENV TERM=linux \ HOME=/home/etsi \ - HOSTNAME=docker-titan-TTF_T027 + HOSTNAME=docker-titan-TTF_T043 COPY home /home/etsi diff --git a/virtualization/docker-dev/build.sh b/virtualization/docker-dev/build.sh index 2eb0390ee553abd32f6beb84dc17b278f6c66a30..efb5091a2535994a57275ff1c640d52a10a4a225 100755 --- a/virtualization/docker-dev/build.sh +++ b/virtualization/docker-dev/build.sh @@ -16,10 +16,10 @@ if [ -z `docker images -q stfubuntu` ]; then 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 ) +docker build --no-cache --tag etsiforge/etsi-mec-phase3 --force-rm . || ( echo "Docker build failed: $?"; exit 1 ) docker images -docker inspect mec_devel:latest || ( echo "Docker inspect failed: $?"; exit 1 ) +docker inspect etsiforge/etsi-mec-phase3:latest || ( echo "Docker inspect failed: $?"; exit 1 ) # That's all Floks exit 0 diff --git a/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh b/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh deleted file mode 100755 index ab90df65f87ae0f911e08ded006c8f6c9dc6bf0d..0000000000000000000000000000000000000000 --- a/virtualization/docker-dev/home/etc/init.d/20-eclipse.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -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 -set -vx - -echo -e "*****************************\n* Install eclipse\n*****************************\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/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-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 \ - -destination /home/etsi/frameworks/eclipse \ - -repository 'jar:file:///home/etsi/frameworks/TITAN_Designer_and_Executor_plugin.zip!/' \ - -installIU TITAN_Designer.feature.group,TITAN_Executor.feature.group,TITAN_Log_Viewer.feature.group,Titan_external_dependencies.feature.group,Titanium.feature.group,Titanium_external_dependencies.feature.group - rm -f TITAN_Designer_and_Executor_plugin.zip -fi - -cd ${HOME} diff --git a/virtualization/docker-dev/home/etc/init.d/40-ttf_t027.sh b/virtualization/docker-dev/home/etc/init.d/40-ttf_t043.sh similarity index 65% rename from virtualization/docker-dev/home/etc/init.d/40-ttf_t027.sh rename to virtualization/docker-dev/home/etc/init.d/40-ttf_t043.sh index 7bedfabd205365d1a0806c4d3d8a6584db987adb..282df6c708a996f7b7fbf6930be9e32723735293 100755 --- a/virtualization/docker-dev/home/etc/init.d/40-ttf_t027.sh +++ b/virtualization/docker-dev/home/etc/init.d/40-ttf_t043.sh @@ -6,27 +6,15 @@ 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 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 -git clone https://forge.etsi.org/gitlab/LIBS/LibCommon.git ./LibCommon +git clone --recurse-submodules --branch TTF_T043 https://forge.etsi.org/rep/mec/gs032p3-ttcn-test-suite.git mec_devel || exit 1 +cd ${HOME}/dev/mec_devel/ || exit 1 +./install.sh || exit 1 echo -e "*****************************\n* Set up environment\n*****************************\n" cd ${HOME}/dev/mec_devel/scripts ln -sf ${HOME}/dev/mec_devel/scripts/devenv.bash.ubuntu ${HOME}/devenv.bash . ${HOME}/devenv.bash -echo -e "*****************************\n* Apply patched \n*****************************\n" -cd ${HOME}/dev/mec_devel - -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 export ATS_LIST="AtsMec_Location AtsMec_Rnis AtsMec_TrafficManagement AtsMec_UEidentity AtsMec_WlanInformation AtsMec_V2XInformationService" diff --git a/virtualization/docker-dev/home/etc/init.d/50-doxygen.sh b/virtualization/docker-dev/home/etc/init.d/50-doxygen.sh index 19c952241945924c2d386feb7e97e320db8b3ae8..68c1955e3944e8e6016b0bbf54fec1813ca0930f 100755 --- a/virtualization/docker-dev/home/etc/init.d/50-doxygen.sh +++ b/virtualization/docker-dev/home/etc/init.d/50-doxygen.sh @@ -4,7 +4,7 @@ set -vx echo -e "*****************************\n* Build docs \n*****************************\n" -. /home/etsi/devenv.bash +. ${HOME}/devenv.bash cd ${HOME}/dev/mec_devel/docs || exit 1 doxygen ./o2.cfg || exit 1 diff --git a/virtualization/docker/Dockerfile b/virtualization/docker/Dockerfile index 456149a5cec8a1aa5fd8d14a90acebb201f590d3..74d5b52a976762bf0dd02289de46f90a27792f07 100644 --- a/virtualization/docker/Dockerfile +++ b/virtualization/docker/Dockerfile @@ -2,7 +2,7 @@ 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 bash libedit libedit-dev lksctp-tools lksctp-tools-dev libpcap-dev + apk add --no-cache autoconf automake 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 zlib-dev curl # Create user and sudouser RUN \