diff --git a/TODO.md b/TODO.md index 5b8e3d6aada4be0fb88016381d2d6ef6c21c7e38..8ff1e43b4586c4f1d62a1fe1e722ec8bca77e527 100644 --- a/TODO.md +++ b/TODO.md @@ -27,6 +27,7 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purpo https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 - TC_MEC_SRV_RNIS_011_OK To be tested +- TC_MEC_SRV_RNIS_012_OK To be tested ### SAQ diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 56d55ffd76d3dba77550d45c0b70181ea7e5850f..d1759cebe25cc1317dd99f9b717de481ef4e741e 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -24,6 +24,10 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O const LocationAPI__TypesAndValues::UserTrackingSubscription& user_tracking_subscription = msg.userTrackingSubscription(); user_tracking_subscription.encode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); data = char2oct(CHARSTRING("{\"userTrackingSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_cellChangeSubscription)) { + const RnisAPI__TypesAndValues::CellChangeSubscription& cell_change_subscription = msg.cellChangeSubscription(); + cell_change_subscription.encode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); + data = char2oct(CHARSTRING("{\"CellChangeSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); } else { loggers::get_instance().error("json_codec::encode: Not supported"); } @@ -94,6 +98,19 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy AppEnablementAPI__TypesAndValues::TrafficRule traffic_rule; traffic_rule.decode(AppEnablementAPI__TypesAndValues::TrafficRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); msg.trafficRule() = traffic_rule; + } else if (it->second.find("\"CellChangeSubscription\"") != std::string::npos) { + RnisAPI__TypesAndValues::CellChangeSubscription cell_change_subscription; + cell_change_subscription.decode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.cellChangeSubscription() = cell_change_subscription; + //TODO Continue with other ChangeSubscription + } else if (it->second.find("\"RabInfo\"") != std::string::npos) { + RnisAPI__TypesAndValues::RabInfo rab_info; + rab_info.decode(RnisAPI__TypesAndValues::RabInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.rabInfo() = rab_info; + } else if (it->second.find("\"PlmnInfo\"") != std::string::npos) { + RnisAPI__TypesAndValues::PlmnInfo plmn_info; + plmn_info.decode(RnisAPI__TypesAndValues::PlmnInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.plmnInfo() = plmn_info; } else if (it->second.find("\"bwInfo\"") != std::string::npos) { BwManagementAPI__TypesAndValues::BwInfo bw_info; @@ -114,9 +131,17 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.bwInfo() = bw_info; } else if (it->second.find("\"problemDetails\"") != std::string::npos) { // TODO To be refined, problemDetails in different modules - UEidentityAPI__TypesAndValues::ProblemDetails problem_details; - problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.problemDetails__ue__identity() = problem_details; + + +// UEidentityAPI__TypesAndValues::ProblemDetails problem_details; +// problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); +// msg.problemDetails__ue__identity() = problem_details; + + RnisAPI__TypesAndValues::ProblemDetails problem_details; + problem_details.decode(RnisAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.problemDetails__rni() = problem_details; + + } else { loggers::get_instance().warning("json_codec::decode: Unsupported variant"); return -1; diff --git a/etc/AtsMec/AtsMec.cfg b/etc/AtsMec/AtsMec.cfg index a1a9ec98bfbf45a3a030366f5b2f81df24e12fc3..72661f999429d9660be7eb07fa7148a66c920270 100644 --- a/etc/AtsMec/AtsMec.cfg +++ b/etc/AtsMec/AtsMec.cfg @@ -16,6 +16,7 @@ LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json" LibMec_Pics.PICS_MEC_PLAT := true LibMec_Pics.PICS_SERVICES := true LibMec_Pics.PICS_RNIS := true +LibMec_Pics.PICS_RNIS_QUERY := true LibMec_Pics.PICS_RNIS_ALL_SUBSCRIPTIONS := true LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := false @@ -99,7 +100,11 @@ system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.1 #AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_OK #AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_NF -AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_011_OK +#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_AppEnablementAPI_TestCases.TC_MEC_SRV_TRANS_001_OK #AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK diff --git a/ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn index d3f398ee499618d76f2c8d88403621ec89da9542..30e65fae717a03708ea05fbe52905ffa5a90345c 100644 --- a/ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn @@ -34,7 +34,7 @@ module AtsMec_RnisAPI_TestCases { import from LibMec_Pics all; import from LibMec_Pixits all; - group rnis { + group all_subscriptions { /** * @desc Check that the RNIS service sends the list of links to the relevant RNIS subscriptions when requested. @@ -53,7 +53,6 @@ module AtsMec_RnisAPI_TestCases { testcase TC_MEC_SRV_RNIS_011_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var HeaderLines v_headers; - var HttpMessage v_response; // Test control if (not(PICS_RNIS) or not(PICS_RNIS_ALL_SUBSCRIPTIONS)) { @@ -72,7 +71,7 @@ module AtsMec_RnisAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & "?subscription_type=" & oct2char(unichar2oct(PX_SUBSCRIPTION_TYPE, "UTF-8")), + "/" & PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & "?subscription_type=" & oct2char(unichar2oct(PX_SUBSCRIPTION_HREF_VALUE, "UTF-8")), v_headers ) ) @@ -89,8 +88,8 @@ module AtsMec_RnisAPI_TestCases { mw_body_json_subscriptions_list( mw_subscriptions_list( PX_LINKS_SELF, - { *, mw_subscription(-, CELL_CHANGE), * } - )))))) -> value v_response { + { *, mw_subscription(-, PX_SUBSCRIPTION_TYPE), * } + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription ***"); @@ -106,7 +105,358 @@ module AtsMec_RnisAPI_TestCases { f_cf_01_http_down(); } // End of testcase TC_MEC_SRV_RNIS_011_OK - } // End of group rnis + /** + * @desc Check that the RNIS service creates a new RNIS subscription. + * Acceptable SUBSCRIPTION_TYPE are the following: + * - CellChangeSubscription + * - RabEstSubscription + * - RabModSubscription + * - RabRelSubscription + * - MeasRepUeSubscription + * - MeasTaSubscription + * - CaReconfSubscription + * - S1BearerSubscription + * - NrMeasRepUeSubscription" + * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + */ + testcase TC_MEC_SRV_RNIS_012_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_RNIS) or not(PICS_RNIS_ALL_SUBSCRIPTIONS)) { + log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_ALL_SUBSCRIPTIONS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + 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_RNIS_SUBSCRITIONS_URI, + v_headers, + m_http_message_body_json( + m_body_json_cell_change_subscription( + m_cell_change_subscription( + PX_CALLBACK_REFERENCE, + PX_LINKS_SELF, + m_filter_criteria( + "01", + { m_associate_id(UE_IPV4_ADDRESS, PX_ASSOCIATE_ID_VALUE) }, + m_plmn("01", "001"), + PX_CELL_ID, + COMPLETED + ), + m_time_stamp(1577836800) + ) + ) + ) + ) + ) + ); + 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_cell_change_subscription( + mw_cell_change_subscription( + PX_CALLBACK_REFERENCE, + PX_LINKS_SELF + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_SRV_RNIS_012_OK + + } // End of group all_subscriptions + + group allSubscription_bo_bi { + + /** + * @desc Check that the RNIS service responds with an error when it receives a request to get all RNIS subscriptions with a wrong subscription type + * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BO_BI.tplan2 + */ + testcase TC_MEC_SRV_RNIS_011_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_RNIS) or not(PICS_RNIS_ALL_SUBSCRIPTIONS)) { + log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_ALL_SUBSCRIPTIONS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + 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_RNIS_SUBSCRITIONS_URI & "?subscription_type=wrongSubscriptionType", + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_rni_problem_details( + mw_problem_details( + -, -, 400 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_SRV_RNIS_011_BR + + /** + * @desc Check that the RNIS service responds with an error when it receives a request to create a new RNIS subscription with a wrong format + * @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2 + */ + testcase TC_MEC_SRV_RNIS_012_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_RNIS) or not(PICS_RNIS_ALL_SUBSCRIPTIONS)) { + log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_ALL_SUBSCRIPTIONS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + 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_RNIS_SUBSCRITIONS_URI, + v_headers, + m_http_message_body_json( + m_body_json_cell_change_subscription( + m_cell_change_subscription_wrong_subscription_type( + PX_CALLBACK_REFERENCE, + PX_LINKS_SELF, + m_filter_criteria( + "01", + { m_associate_id(UE_IPV4_ADDRESS, PX_ASSOCIATE_ID_VALUE) }, + m_plmn("01", "001"), + PX_CELL_ID, + COMPLETED + ), + m_time_stamp(1577836800) + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_rni_problem_details( + mw_problem_details( + -, -, 400 + )))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_SRV_RNIS_012_BR + + } // End of group allSubscription_bo_bi + + group rnis_query { + + /** + * @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_SRV_RNIS_016_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_RNIS) or not(PICS_RNIS_QUERY)) { + log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_QUERY required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + 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_RNIS_QUERIES_URI & "?cell_id=" & oct2char(unichar2oct(PX_CELL_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_rab_info( + mw_rab_info( + mw_time_stamp, + PX_APP_INS_ID, + -, + mw_cell_user_info( + mw_ecgi( + mw_plmn, + PX_CELL_ID + )))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a RAB information ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_SRV_RNIS_016_OK + + /** + * @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_SRV_RNIS_017_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_RNIS) or not(PICS_RNIS_QUERY)) { + log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_QUERY required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + 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_RNIS_QUERIES_URI & "?cell_id=" & oct2char(unichar2oct(PX_CELL_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_plmn_info( + mw_plmn_info( + mw_time_stamp, + PX_APP_INS_ID, + mw_ecgi( + mw_plmn, + PX_CELL_ID + ))))))) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a PLMN information ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_MEC_SRV_RNIS_017_OK + + } // End of group rnis_query } // End of module AtsMec_RnisAPI_TestCases diff --git a/ttcn/AtsMec/AtsMec_TestControl.ttcn b/ttcn/AtsMec/AtsMec_TestControl.ttcn index 568d4d33a62b82cdbe9a568f41ff22f812fbc120..ddbcae6fd567d2d25ca3c47e0018160fa4046b02 100644 --- a/ttcn/AtsMec/AtsMec_TestControl.ttcn +++ b/ttcn/AtsMec/AtsMec_TestControl.ttcn @@ -72,6 +72,13 @@ module AtsMec_TestControl { if (PICS_RNIS) { if (PICS_RNIS_ALL_SUBSCRIPTIONS) { execute(TC_MEC_SRV_RNIS_011_OK()); + execute(TC_MEC_SRV_RNIS_012_OK()); + execute(TC_MEC_SRV_RNIS_011_BR()); + execute(TC_MEC_SRV_RNIS_012_BR()); + } + if (PICS_RNIS_QUERY) { + execute(TC_MEC_SRV_RNIS_016_OK()); + } } diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn index ab4e7985d9b1fdcfe05a029cebf1ef90fe82cd51..f4302fb535bc480f739124dcca4d7c1bc18e4af8 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn @@ -3,13 +3,25 @@ module RnisAPI_Pixits { // JSON import from JSON all; + // LibCommon + import from LibCommon_BasicTypesAndValues all; + // LibMec/Rnis import from RnisAPI_TypesAndValues all; - modulepar JSON.String PX_SUBSCRIPTION_TYPE := "cell_change"; + modulepar JSON.String PX_SUBSCRIPTION_HREF_VALUE := "cell_change"; + modulepar SubscriptionType PX_SUBSCRIPTION_TYPE := CELL_CHANGE; modulepar JSON.String PX_SUBSCRIPTION_ID := "7777"; modulepar Link PX_LINKS_SELF := { self_ := "http://example.com/exampleAPI/rni/v2/subscriptions" }; + + modulepar CallbackReference PX_CALLBACK_REFERENCE := "http://meAppClient.example.com/rni/v2/notifications/cell_change/77777"; + + modulepar UInt32 PX_ASSOCIATE_ID_VALUE := 1; + + modulepar CellId PX_CELL_ID := "0x0800000A"; + + modulepar AppInsId PX_APP_INS_ID := "01"; } // End of module RnisAPI_Pixits diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn index fbbc3e68a6612a1b83482c9fc24a9ee8b2a03adc..8c29fd5e2fb537d75d9ce70f0e13f411b7988081 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn @@ -9,6 +9,34 @@ module RnisAPI_Templates { // LibMec/RnisAPI import from RnisAPI_TypesAndValues all; + template (value) ProblemDetails m_problem_details( + in JSON.String p_type, + in JSON.String p_title, + in UInt32 p_status, + in JSON.String p_detail, + in JSON.String p_instance + ) := { + type_ := p_type, + title := p_title, + status := p_status, + detail := p_detail, + instance := p_instance + } // End of template m_problem_details + + template (present) ProblemDetails mw_problem_details( + template (present) JSON.String p_type := ?, + template (present) JSON.String p_title := ?, + template (present) UInt32 p_status := ?, + template (present) JSON.String p_detail := ?, + template (present) JSON.String p_instance := ? + ) := { + type_ := p_type, + title := p_title, + status := p_status, + detail := p_detail, + instance := p_instance + } // End of template mw_problem_details + group subscriptions { template (omit) SubscriptionLinkList m_subscriptions_list( @@ -44,6 +72,66 @@ module RnisAPI_Templates { subscriptionType := p_subscriptionType } // End of temlate mw_subscription + template (value) RabInfo m_rab_info( + in template (value) TimeStamp p_timeStamp, + in AppInsId p_appInsId, + in RequestId p_requestId, + in template (value) CellUserInfo p_cellUserInfo + ) := { + timeStamp := p_timeStamp, + appInsId := p_appInsId, + requestId := p_requestId, + cellUserInfo := p_cellUserInfo + } // End of temlate m_rab_info + + template (present) RabInfo mw_rab_info( + template (present) TimeStamp p_timeStamp := ?, + template (present) AppInsId p_appInsId := ?, + template (present) RequestId p_requestId := ?, + template (present) CellUserInfo p_cellUserInfo := ? + ) := { + timeStamp := p_timeStamp, + appInsId := p_appInsId, + requestId := p_requestId, + cellUserInfo := p_cellUserInfo + } // End of temlate mw_rab_info + + template (value) PlmnInfo m_plmn_info( + in template (value) TimeStamp p_timeStamp, + in AppInsId p_appInsId, + in template (value) Ecgi p_ecgi + ) := { + timeStamp := p_timeStamp, + appInsId := p_appInsId, + ecgi := p_ecgi + } // End of temlate m_plmn_info + + template (present) PlmnInfo mw_plmn_info( + template (present) TimeStamp p_timeStamp := ?, + template (present) AppInsId p_appInsId := ?, + template (present) Ecgi p_ecgi := ? + ) := { + timeStamp := p_timeStamp, + appInsId := p_appInsId, + ecgi := p_ecgi + } // End of temlate mw_plmn_info + + template (value) TimeStamp m_time_stamp( + in UInt32 p_seconds, + in UInt32 p_nanoSeconds := 0 + ) := { + seconds := p_seconds, + nanoSeconds := p_nanoSeconds + } // End of temlate m_time_stamp + + template (present) TimeStamp mw_time_stamp( + template (present) UInt32 p_seconds := ?, + template (present) UInt32 p_nanoSeconds := ? + ) := { + seconds := p_seconds, + nanoSeconds := p_nanoSeconds + } // End of temlate mw_time_stamp + group cell { template (omit) CellChangeSubscription m_cell_change_subscription( @@ -52,26 +140,130 @@ module RnisAPI_Templates { in template (value) FilterCriteriaAssocHo p_filterCriteria, in template (omit) TimeStamp p_expiryDeadline := omit ) := { + subscriptionType := CELL_CHANGE, callbackReference := p_callbackReference, links := p_links, filterCriteria := p_filterCriteria, expiryDeadline := p_expiryDeadline } // End of template m_cell_change_subscription + template (omit) CellChangeSubscription m_cell_change_subscription_wrong_subscription_type( + in template (value) CallbackReference p_callbackReference, + in template (value) Link p_links, + in template (value) FilterCriteriaAssocHo p_filterCriteria, + in template (omit) TimeStamp p_expiryDeadline := omit + ) modifies m_cell_change_subscription := { + subscriptionType := WRONG_PARAMETER + } // End of template m_cell_change_subscription_wrong_subscription_type + template CellChangeSubscription mw_cell_change_subscription( template (present) CallbackReference p_callbackReference := ?, template (present) Link p_links := ?, template (present) FilterCriteriaAssocHo p_filterCriteria := ?, template TimeStamp p_expiryDeadline := * ) := { + subscriptionType := CELL_CHANGE, callbackReference := p_callbackReference, links := p_links, filterCriteria := p_filterCriteria, expiryDeadline := p_expiryDeadline } // End of template mw_cell_change_subscription + template (value) FilterCriteriaAssocHo m_filter_criteria( + in AppInsId p_appInsId, + in template (value) AssociateId p_associateId, + in template (value) Plmn p_plmn, + in template (value) CellId p_cellId, + in HoStatus p_hoStatus + ) := { + appInsId := p_appInsId, + associateId := p_associateId, + plmn := p_plmn, + cellId := p_cellId, + hoStatus := p_hoStatus + } // End of template m_filter_criteria + + template (present) FilterCriteriaAssocHo mw_filter_criteria( + template (present) AppInsId p_appInsId := ?, + template (present) AssociateId p_associateId := ?, + template (present) Plmn p_plmn := ?, + template (present) CellId p_cellId := ?, + template (present) HoStatus p_hoStatus := ? + ) := { + appInsId := p_appInsId, + associateId := p_associateId, + plmn := p_plmn, + cellId := p_cellId, + hoStatus := p_hoStatus + } // End of template mw_filter_criteria + + template (value) CellUserInfo m_cell_user_info( + in template (value) Ecgi p_ecgi, + in template (value) UeInfo p_ueInfo + ) := { + ecgi := p_ecgi, + ueInfo := p_ueInfo + } // End of template m_cell_user_info + + template (present) CellUserInfo mw_cell_user_info( + template (present) Ecgi p_ecgi := ?, + template (present) UeInfo p_ueInfo := ? + ) := { + ecgi := p_ecgi, + ueInfo := p_ueInfo + } // End of template mw_cell_user_info + + template (value) AssociateId_ m_associate_id( + in AssociateId_type p_type_, + in UInt32 p_value_ + ) := { + type_ := p_type_, + value_ := p_value_ + } // End of template m_associate_id + + template (present) AssociateId_ mw_associate_id( + template (present) AssociateId_type p_type_ := ?, + template (present) UInt32 p_value_ := ? + ) := { + type_ := p_type_, + value_ := p_value_ + } // End of template mw_associate_id + + template (value) Ecgi m_ecgi( + in template (value) Plmn p_plmn, + in template (value) CellId p_cellId + ) := { + plmn := p_plmn, + cellId := p_cellId + } // End of template m_ecgi + + template (present) Ecgi mw_ecgi( + in template (present) Plmn p_plmn := ?, + in template (present) CellId p_cellId := ? + ) := { + plmn := p_plmn, + cellId := p_cellId + } // End of template mw_ecgi + + template (value) Plmn m_plmn( + in JSON.String p_mcc, + in JSON.String p_mnc + ) := { + mcc := p_mcc, + mnc := p_mnc + } // End of template m_plmn + + template (present) Plmn mw_plmn( + template (present) JSON.String p_mcc := ?, + template (present) JSON.String p_mnc := ? + ) := { + mcc := p_mcc, + mnc := p_mnc + } // End of template mw_plmn + } // End of group cell } // End of group subscriptions + } // End of module RnisAPI_Templates diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn index 9be42ff309c53550cef4683337c95f742b64529d..2e0442db2f2122f81a5fc719031c6d35930b476a 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn @@ -183,7 +183,7 @@ module RnisAPI_TypesAndValues { /** * @desc The E-UTRAN Cell Identity as a bit string (size (28)), as defined in 3GPP TS 36.413 */ - type record of octetstring CellId; + type JSON.String CellId; /** * @desc Information on UEs in the specific cell @@ -455,6 +455,7 @@ module RnisAPI_TypesAndValues { * @member expiryDeadline */ type record CellChangeSubscription { + SubscriptionType subscriptionType, CallbackReference callbackReference, Link links, FilterCriteriaAssocHo filterCriteria, @@ -540,7 +541,8 @@ module RnisAPI_TypesAndValues { MEAS_REPORT_UE, MEAS_TIMING_ADVANCE, CA_RECONF, - S1_BEARE + S1_BEARE, + WRONG_PARAMETER } /** diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 887161ffeaf0e04a0bbea07f81a7fa5a20e517ad..c4319a0bcabd0a54db4804dbac584d7f4c9f3171 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -20,6 +20,8 @@ module LibMec_Pixits { modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions"; + modulepar charstring PX_RNIS_QUERIES_URI := "/rni/v2/queries"; + modulepar charstring PX_ME_BWM_URI := "/bwm/v2/bw_allocations"; } // End of module LibMec_Pixits diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn index 08171c9dd1b21cbae1f83599aa3f4bf599941bc8..a12667c6f749c65f2f4066d50e46647310779a03 100644 --- a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn @@ -29,7 +29,9 @@ module LibItsHttp_JsonMessageBodyTypes { UeIdentityTagInfo ueIdentityTagInfo, SubscriptionLinkList subscriptionLinkList, CellChangeSubscription cellChangeSubscription, - RnisAPI_TypesAndValues.ProblemDetails problemDetails_rnis, + RabInfo rabInfo, + PlmnInfo plmnInfo, + RnisAPI_TypesAndValues.ProblemDetails problemDetails_rni, BwInfo bwInfo, BwManagementAPI_TypesAndValues.ProblemDetails problemDetails_bw_management, TransportInfoList transportInfoList, diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn index a50790db39c082007bd8c1e70cedb78dba353131..5fb0efe9bd279d643951f9ab6ef317aca11f75f6 100644 --- a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn @@ -174,6 +174,42 @@ module LibItsHttp_JsonTemplates { cellChangeSubscription := p_cellChangeSubscription } // End of template mw_body_json_cell_change_subscription + template (value) JsonBody m_body_json_rab_info( + in template (value) RabInfo p_rabInfo + ) := { + rabInfo := p_rabInfo + } // End of template m_body_json_rab_info + + template (present) JsonBody mw_body_json_rab_info( + template (present) RabInfo p_rabInfo := ? + ) := { + rabInfo := p_rabInfo + } // End of template mw_body_json_rab_info + + template (value) JsonBody m_body_json_plmn_info( + in template (value) PlmnInfo p_plmnInfo + ) := { + plmnInfo := p_plmnInfo + } // End of template m_body_json_plmn_info + + template (present) JsonBody mw_body_json_plmn_info( + template (present) PlmnInfo p_plmnInfo := ? + ) := { + plmnInfo := p_plmnInfo + } // End of template mw_body_json_plmn_info + + template (value) JsonBody m_body_json_rni_problem_details( + in template (value) RnisAPI_TypesAndValues.ProblemDetails p_problemDetails + ) := { + problemDetails_rni := p_problemDetails + } // End of template m_body_json_rni_problem_details + + template (present) JsonBody mw_body_json_rni_problem_details( + template (present) RnisAPI_TypesAndValues.ProblemDetails p_problemDetails := ? + ) := { + problemDetails_rni := p_problemDetails + } // End of template mw_body_json_rni_problem_details + } // End of group rnis_subscriptions group bw_management_api {