Commit 493d2b37 authored by YannGarcia's avatar YannGarcia
Browse files

Add RnisNotifications support

parent 97948a1e
......@@ -99,123 +99,123 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
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) {
// Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
// TODO Create a method instead of copy/past
//loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
std::size_t it_start = str.find("\"type\"");
loggers::get_instance().log("json_codec::decode: id_start=%d", it_start);
if (it_start != std::string::npos) {
std::size_t it_stop = str.find(",", it_start);
//loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop);
//loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str());
std::size_t it = str.find("1", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if ((it != std::string::npos) && (it < it_stop)) {
str = str.substr(0, it) + "UE_IPV4_ADDRESS" + str.substr(it + 1);
} else {
it = str.find("2", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if ((it != std::string::npos) && (it < it_stop)) {
str = str.substr(0, it) + "UE_IPV6_ADDRESS" + str.substr(it + 1);
} else {
it = str.find("3", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if ((it != std::string::npos) && (it < it_stop)) {
str = str.substr(0, it) + "NATED_IP_ADDRESS" + str.substr(it + 1);
} else {
it = str.find("4", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if ((it != std::string::npos) && (it < it_stop)) {
str = str.substr(0, it) + "GTP_TEID" + str.substr(it + 1);
}
}
}
}
}
//loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
decoding_buffer.clear();
decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
// // Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
// // TODO Create a method instead of copy/past
// //loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
// std::size_t it_start = str.find("\"type\"");
// loggers::get_instance().log("json_codec::decode: id_start=%d", it_start);
// if (it_start != std::string::npos) {
// std::size_t it_stop = str.find(",", it_start);
// //loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop);
// //loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str());
// std::size_t it = str.find("1", it_start, 1);
// //loggers::get_instance().log("json_codec::decode: it=%d", it);
// if ((it != std::string::npos) && (it < it_stop)) {
// str = str.substr(0, it) + "UE_IPV4_ADDRESS" + str.substr(it + 1);
// } else {
// it = str.find("2", it_start, 1);
// //loggers::get_instance().log("json_codec::decode: it=%d", it);
// if ((it != std::string::npos) && (it < it_stop)) {
// str = str.substr(0, it) + "UE_IPV6_ADDRESS" + str.substr(it + 1);
// } else {
// it = str.find("3", it_start, 1);
// //loggers::get_instance().log("json_codec::decode: it=%d", it);
// if ((it != std::string::npos) && (it < it_stop)) {
// str = str.substr(0, it) + "NATED_IP_ADDRESS" + str.substr(it + 1);
// } else {
// it = str.find("4", it_start, 1);
// //loggers::get_instance().log("json_codec::decode: it=%d", it);
// if ((it != std::string::npos) && (it < it_stop)) {
// str = str.substr(0, it) + "GTP_TEID" + str.substr(it + 1);
// }
// }
// }
// }
// }
// //loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
// decoding_buffer.clear();
// decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
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) {
// Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
// TODO Create a method instead of copy/past
// loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
std::size_t it_start = str.find("\"type\"");
loggers::get_instance().log("json_codec::decode: id_start=%d", it_start);
if (it_start != std::string::npos) {
std::size_t it_stop = str.find(",", it_start);
//loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop);
//loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str());
std::size_t it = str.find("1", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if ((it != std::string::npos) && (it < it_stop)) {
str = str.substr(0, it) + "UE_IPV4_ADDRESS" + str.substr(it + 1);
} else {
it = str.find("2", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if ((it != std::string::npos) && (it < it_stop)) {
str = str.substr(0, it) + "UE_IPV6_ADDRESS" + str.substr(it + 1);
} else {
it = str.find("3", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if ((it != std::string::npos) && (it < it_stop)) {
str = str.substr(0, it) + "NATED_IP_ADDRESS" + str.substr(it + 1);
} else {
it = str.find("4", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if ((it != std::string::npos) && (it < it_stop)) {
str = str.substr(0, it) + "GTP_TEID" + str.substr(it + 1);
}
}
}
}
}
//loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
decoding_buffer.clear();
decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
// // Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
// // TODO Create a method instead of copy/past
// // loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
// std::size_t it_start = str.find("\"type\"");
// loggers::get_instance().log("json_codec::decode: id_start=%d", it_start);
// if (it_start != std::string::npos) {
// std::size_t it_stop = str.find(",", it_start);
// //loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop);
// //loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str());
// std::size_t it = str.find("1", it_start, 1);
// //loggers::get_instance().log("json_codec::decode: it=%d", it);
// if ((it != std::string::npos) && (it < it_stop)) {
// str = str.substr(0, it) + "UE_IPV4_ADDRESS" + str.substr(it + 1);
// } else {
// it = str.find("2", it_start, 1);
// //loggers::get_instance().log("json_codec::decode: it=%d", it);
// if ((it != std::string::npos) && (it < it_stop)) {
// str = str.substr(0, it) + "UE_IPV6_ADDRESS" + str.substr(it + 1);
// } else {
// it = str.find("3", it_start, 1);
// //loggers::get_instance().log("json_codec::decode: it=%d", it);
// if ((it != std::string::npos) && (it < it_stop)) {
// str = str.substr(0, it) + "NATED_IP_ADDRESS" + str.substr(it + 1);
// } else {
// it = str.find("4", it_start, 1);
// //loggers::get_instance().log("json_codec::decode: it=%d", it);
// if ((it != std::string::npos) && (it < it_stop)) {
// str = str.substr(0, it) + "GTP_TEID" + str.substr(it + 1);
// }
// }
// }
// }
// }
// //loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
// decoding_buffer.clear();
// decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
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) {
// Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
// TODO Create a method instead of copy/past
// loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
std::size_t it_start = str.find("\"type\"");
loggers::get_instance().log("json_codec::decode: id_start=%d", it_start);
if (it_start != std::string::npos) {
std::size_t it_stop = str.find(",", it_start);
//loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop);
//loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str());
std::size_t it = str.find("1", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if ((it != std::string::npos) && (it < it_stop)) {
str = str.substr(0, it) + "UE_IPV4_ADDRESS" + str.substr(it + 1);
} else {
it = str.find("2", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if ((it != std::string::npos) && (it < it_stop)) {
str = str.substr(0, it) + "UE_IPV6_ADDRESS" + str.substr(it + 1);
} else {
it = str.find("3", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if ((it != std::string::npos) && (it < it_stop)) {
str = str.substr(0, it) + "NATED_IP_ADDRESS" + str.substr(it + 1);
} else {
it = str.find("4", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if ((it != std::string::npos) && (it < it_stop)) {
str = str.substr(0, it) + "GTP_TEID" + str.substr(it + 1);
}
}
}
}
}
//loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
decoding_buffer.clear();
decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
// // Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
// // TODO Create a method instead of copy/past
// // loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
// std::size_t it_start = str.find("\"type\"");
// loggers::get_instance().log("json_codec::decode: id_start=%d", it_start);
// if (it_start != std::string::npos) {
// std::size_t it_stop = str.find(",", it_start);
// //loggers::get_instance().log("json_codec::decode: id_stop=%d", it_stop);
// //loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str());
// std::size_t it = str.find("1", it_start, 1);
// //loggers::get_instance().log("json_codec::decode: it=%d", it);
// if ((it != std::string::npos) && (it < it_stop)) {
// str = str.substr(0, it) + "UE_IPV4_ADDRESS" + str.substr(it + 1);
// } else {
// it = str.find("2", it_start, 1);
// //loggers::get_instance().log("json_codec::decode: it=%d", it);
// if ((it != std::string::npos) && (it < it_stop)) {
// str = str.substr(0, it) + "UE_IPV6_ADDRESS" + str.substr(it + 1);
// } else {
// it = str.find("3", it_start, 1);
// //loggers::get_instance().log("json_codec::decode: it=%d", it);
// if ((it != std::string::npos) && (it < it_stop)) {
// str = str.substr(0, it) + "NATED_IP_ADDRESS" + str.substr(it + 1);
// } else {
// it = str.find("4", it_start, 1);
// //loggers::get_instance().log("json_codec::decode: it=%d", it);
// if ((it != std::string::npos) && (it < it_stop)) {
// str = str.substr(0, it) + "GTP_TEID" + str.substr(it + 1);
// }
// }
// }
// }
// }
// //loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
// decoding_buffer.clear();
// decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
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;
......
......@@ -77,10 +77,10 @@ tcp_layer::tcp_layer(const std::string & p_type, const std::string & param) : la
map_user();
if (!_reconnect_on_send) {
open_client_connection(_params[params::server].c_str(), _params[params::port].c_str(), NULL, NULL);
if (!_reconnect_on_send && !server_mode) {
open_client_connection(_params[params::server].c_str(), _params[params::port].c_str(), NULL, NULL);
}
}
}
tcp_layer::~tcp_layer() {
loggers::get_instance().log(">>> tcp_layer::~tcp_layer: %d", _client_id);
......
......@@ -4,12 +4,13 @@
# 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;
LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.56.1"
#LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.56.1"
#LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87"
#LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.0.17"
LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.1.34"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
......@@ -18,6 +19,7 @@ LibMec_Pics.PICS_SERVICES := true
LibMec_Pics.PICS_RNIS := true
LibMec_Pics.PICS_RNIS_QUERY := true
LibMec_Pics.PICS_RNIS_ALL_SUBSCRIPTIONS := true
LibMec_Pics.PICS_RNIS_NOTIFICATIONS := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := false
......@@ -44,7 +46,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=192.168.56.1,port=8081,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.34,port=8081,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,
......@@ -108,14 +111,17 @@ system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.1
#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_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_AppEnablementAPI_TestCases.TC_MEC_SRV_TRANS_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK
......
......@@ -503,7 +503,7 @@ module AtsMec_RnisAPI_TestCases {
{
mw_s1_ue_info(
{ mw_temp_ue_id },
{ mw_associate_id },
-, // TODO use superset instead of { mw_associate_id },
{ *, mw_ecgi(mw_plmn, PX_CELL_ID), * },
{
mw_s1_bearer_info_detailed
......@@ -1025,5 +1025,68 @@ module AtsMec_RnisAPI_TestCases {
} // End of group rnis_query_bi_bo
group rnis_notifications {
/**
* @desc Check that the RNIS service sends an RNIS notification about cell change if the RNIS service has an associated subscription and the event is generated
.
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisQuery_BV.tplan2
*/
testcase TC_MEC_SRV_RNIS_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
// Test control
if (not(PICS_RNIS) or not(PICS_RNIS_NOTIFICATIONS)) {
log("*** " & testcasename() & ": PICS_RNIS and PICS_RNIS_NOTIFICATIONS required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_notif_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
action("Trigger a cell change event");
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_wait.start;
alt {
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-,
-,
mw_http_message_body_json(
mw_body_json_cell_change_subscription(
mw_cell_change_subscription(
PX_CALLBACK_REFERENCE
)))))) {
tc_wait.stop;
log("*** " & testcasename() & ": INFO: IUT successfully sends cell-change notification ***");
// Send 204 No Content
httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers)));
log("*** " & testcasename() & ": PASS: IUT successfully sends cell-change notification ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_notif_down();
} // End of testcase TC_MEC_SRV_RNIS_001_OK
} // End of group rnis_notifications
} // End of module AtsMec_RnisAPI_TestCases
......@@ -90,6 +90,9 @@ module AtsMec_TestControl {
execute(TC_MEC_SRV_RNIS_019_BR());
execute(TC_MEC_SRV_RNIS_019_NF());
}
if (PICS_RNIS_NOTIFICATIONS) {
execute(TC_MEC_SRV_RNIS_001_OK());
}
}
if (PICS_BWMANAGEMENT_API_SUPPORTED) {
......
......@@ -106,9 +106,23 @@ module RnisAPI_Templates {
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template mw_cell_change_subscription
} // End of group subscriptions
group notifications {
template CellChangeSubscriptionPost mw_cell_change_subscription_post(
template (present) CallbackReference p_callbackReference := ?,
template (present) FilterCriteriaAssocHo p_filterCriteria := ?,
template TimeStamp p_expiryDeadline := *
) := {
callbackReference := p_callbackReference,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template mw_cell_change_subscription_post
} // End of group notifications
group info_request {
template (value) RabInfo m_rab_info(
......@@ -325,22 +339,22 @@ module RnisAPI_Templates {
template (value) S1BearerInfoDetailed_ m_s1_bearer_info_detailed(
in ErabId p_erabId,
in template (value) S1EnbInfo p_enbInfo,
in template (value) S1EnbInfo p_s1EnbInfo,
in template (value) SGwInfo p_sGwInfo
) := {
erabId := p_erabId,
enbInfo := p_enbInfo,
sGwInfo := p_sGwInfo
erabId := p_erabId,
s1EnbInfo := p_s1EnbInfo,
sGwInfo := p_sGwInfo
} // End of template m_s1_bearer_info_detailed
template (present) S1BearerInfoDetailed_ mw_s1_bearer_info_detailed(
template (present) ErabId p_erabId := ?,
template (present) S1EnbInfo p_enbInfo := ?,
template (present) S1EnbInfo p_s1EnbInfo := ?,
template (present) SGwInfo p_sGwInfo := ?
) := {
erabId := p_erabId,
enbInfo := p_enbInfo,
sGwInfo := p_sGwInfo
erabId := p_erabId,
s1EnbInfo := p_s1EnbInfo,
sGwInfo := p_sGwInfo
} // End of template mw_s1_bearer_info_detailed
} // End of group sub_types
......
......@@ -89,7 +89,7 @@ module RnisAPI_TypesAndValues {
*/
type record S1BearerInfoDetailed_ {
ErabId erabId,
S1EnbInfo enbInfo,
S1EnbInfo s1EnbInfo,
SGwInfo sGwInfo
}
type record of S1BearerInfoDetailed_ S1BearerInfoDetailed;
......
......@@ -38,6 +38,23 @@ module LibMec_Functions {
} // End of function f_cf_01_http_up
/**
* @desc Setup HTTP pprotocol port
*/
function f_cf_01_http_notif_up() runs on HttpComponent {
// Map ports
map(self:httpPort_notif, system:httpPort_notif);
// Connect
f_connect4SelfOrClientSync();
activate(a_cf_01_http_notif_down());
activate(a_default_requests());
activate(a_default_responses());
} // End of function f_cf_01_http_notif_up
} // End of group preambles
group postambles {
......@@ -56,6 +73,20 @@ module LibMec_Functions {
deactivate;
} // End of function f_cf_01_http_down
/**
* @desc Shutdown HTTP pprotocol port
*/
function f_cf_01_http_notif_down() runs on HttpComponent {
// Unmap ports
unmap(self:httpPort_notif, system:httpPort_notif);
// Disconnect ports
f_disconnect4SelfOrClientSync();
deactivate;
} // End of function f_cf_01_http_notif_down
/**
* @desc Default handling cf01 de-initialisation.
*/
......@@ -67,6 +98,17 @@ module LibMec_Functions {
}
} // End of altstep a_cf_01_http_down
/**
* @desc Default handling cf01 de-initialisation.
*/
altstep a_cf_01_http_notif_down() runs on HttpComponent {
[] a_shutdown() {
f_cf_01_http_notif_down();
log("*** a_cf_01_http_notif_down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***");
stop;
}
} // End of altstep a_cf_01_http_notif_down
} // End of group postambles
group helpers {
......@@ -135,7 +177,12 @@ module LibMec_Functions {
altstep a_default_requests() runs on HttpComponent {
[] httpPort.receive(mw_http_request) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Server error: Receive request istead of response ***");
log("*** " & testcasename() & ": FAIL: Server error: Receive request instead of response on httpPort ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
[] httpPort_notif.receive(mw_http_request) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Server error: Receive unsollicited request on httpPort_notif ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
} // End of altstep a_default_requests
......@@ -183,6 +230,21 @@ module LibMec_Functions {
log("*** " & testcasename() & ": FAIL: Server error: " & int2str(v_response.response.statuscode) & "/" & v_response.response.statustext & " ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
[] httpPort.receive {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Server error: Receive unsollicited message on httpPort ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
[] httpPort_notif.receive(mw_http_response) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Server error: " & int2str(v_response.response.statuscode) & "/" & v_response.response.statustext & " on httpPort_notif ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
[] httpPort_notif.receive {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Server error: Receive unsollicited message on httpPort_notif ***");
f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
}
} // End of altstep a_default_responses
} // end of group altsteps
......
......@@ -31,6 +31,7 @@ module LibItsHttp_JsonMessageBodyTypes {
UeIdentityTagInfo ueIdentityTagInfo,
SubscriptionLinkList subscriptionLinkList,
CellChangeSubscription cellChangeSubscription,
CellChangeSubscriptionPost cellChangeSubscriptionPost,
RabInfo rabInfo,
PlmnInfo plmnInfo,
S1BearerInfo s1BearerInfo,
......
......@@ -282,6 +282,10 @@ group ams_api {
} // End of group rnis_subscriptions
group rnis_notifications {
} // End of group rnis_notifications
group bw_management_api {
template (value) JsonBody m_body_json_bw_info(
......
......@@ -24,12 +24,16 @@ module LibItsHttp_TestSystem {
type component HttpComponent extends SelfSyncComp { // FIXME To be rename into HttpTest
port HttpPort httpPort;
port HttpPort httpPort_notif;
timer tc_ac := PX_TAC;
timer tc_noac := PX_TNOAC;
timer tc_wait := PX_TWAIT;
} // End of component HttpComponent
type component HttpTestAdapter { // FIXME To be rename into HttpTestSystem
port HttpPort httpPort;
port HttpPort httpPort_notif;
} // End of component TestAdapter