Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
MEC - Multi-access Edge Computing
MEC TTCN-3 Test Suite
Commits
493d2b37
Commit
493d2b37
authored
Aug 20, 2019
by
YannGarcia
Browse files
Add RnisNotifications support
parent
97948a1e
Changes
11
Hide whitespace changes
Inline
Side-by-side
ccsrc/Protocols/Json/json_codec.cc
View file @
493d2b37
...
@@ -99,123 +99,123 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
...
@@ -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
);
traffic_rule
.
decode
(
AppEnablementAPI__TypesAndValues
::
TrafficRule_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
trafficRule
()
=
traffic_rule
;
msg
.
trafficRule
()
=
traffic_rule
;
}
else
if
(
it
->
second
.
find
(
"
\"
CellChangeSubscription
\"
"
)
!=
std
::
string
::
npos
)
{
}
else
if
(
it
->
second
.
find
(
"
\"
CellChangeSubscription
\"
"
)
!=
std
::
string
::
npos
)
{
// Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
//
// Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
// TODO Create a method instead of copy/past
//
// TODO Create a method instead of copy/past
//loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
//
//loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
std
::
size_t
it_start
=
str
.
find
(
"
\"
type
\"
"
);
//
std::size_t it_start = str.find("\"type\"");
loggers
::
get_instance
().
log
(
"json_codec::decode: id_start=%d"
,
it_start
);
//
loggers::get_instance().log("json_codec::decode: id_start=%d", it_start);
if
(
it_start
!=
std
::
string
::
npos
)
{
//
if (it_start != std::string::npos) {
std
::
size_t
it_stop
=
str
.
find
(
","
,
it_start
);
//
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: id_stop=%d", it_stop);
//loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str());
//
//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
);
//
std::size_t it = str.find("1", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
//
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
//
if ((it != std::string::npos) && (it < it_stop)) {
str
=
str
.
substr
(
0
,
it
)
+
"UE_IPV4_ADDRESS"
+
str
.
substr
(
it
+
1
);
//
str = str.substr(0, it) + "UE_IPV4_ADDRESS" + str.substr(it + 1);
}
else
{
//
} else {
it
=
str
.
find
(
"2"
,
it_start
,
1
);
//
it = str.find("2", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
//
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
//
if ((it != std::string::npos) && (it < it_stop)) {
str
=
str
.
substr
(
0
,
it
)
+
"UE_IPV6_ADDRESS"
+
str
.
substr
(
it
+
1
);
//
str = str.substr(0, it) + "UE_IPV6_ADDRESS" + str.substr(it + 1);
}
else
{
//
} else {
it
=
str
.
find
(
"3"
,
it_start
,
1
);
//
it = str.find("3", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
//
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
//
if ((it != std::string::npos) && (it < it_stop)) {
str
=
str
.
substr
(
0
,
it
)
+
"NATED_IP_ADDRESS"
+
str
.
substr
(
it
+
1
);
//
str = str.substr(0, it) + "NATED_IP_ADDRESS" + str.substr(it + 1);
}
else
{
//
} else {
it
=
str
.
find
(
"4"
,
it_start
,
1
);
//
it = str.find("4", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
//
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
//
if ((it != std::string::npos) && (it < it_stop)) {
str
=
str
.
substr
(
0
,
it
)
+
"GTP_TEID"
+
str
.
substr
(
it
+
1
);
//
str = str.substr(0, it) + "GTP_TEID" + str.substr(it + 1);
}
//
}
}
//
}
}
//
}
}
//
}
}
//
}
//loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
//
//loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
decoding_buffer
.
clear
();
//
decoding_buffer.clear();
decoding_buffer
.
put_os
(
OCTETSTRING
(
str
.
length
(),
(
const
unsigned
char
*
)
str
.
c_str
()));
//
decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
RnisAPI__TypesAndValues
::
CellChangeSubscription
cell_change_subscription
;
RnisAPI__TypesAndValues
::
CellChangeSubscription
cell_change_subscription
;
cell_change_subscription
.
decode
(
RnisAPI__TypesAndValues
::
CellChangeSubscription_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
cell_change_subscription
.
decode
(
RnisAPI__TypesAndValues
::
CellChangeSubscription_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
cellChangeSubscription
()
=
cell_change_subscription
;
msg
.
cellChangeSubscription
()
=
cell_change_subscription
;
//TODO Continue with other ChangeSubscription
//TODO Continue with other ChangeSubscription
}
else
if
(
it
->
second
.
find
(
"
\"
RabInfo
\"
"
)
!=
std
::
string
::
npos
)
{
}
else
if
(
it
->
second
.
find
(
"
\"
RabInfo
\"
"
)
!=
std
::
string
::
npos
)
{
// Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
//
// Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
// TODO Create a method instead of copy/past
//
// TODO Create a method instead of copy/past
// loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
//
// loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
std
::
size_t
it_start
=
str
.
find
(
"
\"
type
\"
"
);
//
std::size_t it_start = str.find("\"type\"");
loggers
::
get_instance
().
log
(
"json_codec::decode: id_start=%d"
,
it_start
);
//
loggers::get_instance().log("json_codec::decode: id_start=%d", it_start);
if
(
it_start
!=
std
::
string
::
npos
)
{
//
if (it_start != std::string::npos) {
std
::
size_t
it_stop
=
str
.
find
(
","
,
it_start
);
//
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: id_stop=%d", it_stop);
//loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str());
//
//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
);
//
std::size_t it = str.find("1", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
//
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
//
if ((it != std::string::npos) && (it < it_stop)) {
str
=
str
.
substr
(
0
,
it
)
+
"UE_IPV4_ADDRESS"
+
str
.
substr
(
it
+
1
);
//
str = str.substr(0, it) + "UE_IPV4_ADDRESS" + str.substr(it + 1);
}
else
{
//
} else {
it
=
str
.
find
(
"2"
,
it_start
,
1
);
//
it = str.find("2", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
//
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
//
if ((it != std::string::npos) && (it < it_stop)) {
str
=
str
.
substr
(
0
,
it
)
+
"UE_IPV6_ADDRESS"
+
str
.
substr
(
it
+
1
);
//
str = str.substr(0, it) + "UE_IPV6_ADDRESS" + str.substr(it + 1);
}
else
{
//
} else {
it
=
str
.
find
(
"3"
,
it_start
,
1
);
//
it = str.find("3", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
//
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
//
if ((it != std::string::npos) && (it < it_stop)) {
str
=
str
.
substr
(
0
,
it
)
+
"NATED_IP_ADDRESS"
+
str
.
substr
(
it
+
1
);
//
str = str.substr(0, it) + "NATED_IP_ADDRESS" + str.substr(it + 1);
}
else
{
//
} else {
it
=
str
.
find
(
"4"
,
it_start
,
1
);
//
it = str.find("4", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
//
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
//
if ((it != std::string::npos) && (it < it_stop)) {
str
=
str
.
substr
(
0
,
it
)
+
"GTP_TEID"
+
str
.
substr
(
it
+
1
);
//
str = str.substr(0, it) + "GTP_TEID" + str.substr(it + 1);
}
//
}
}
//
}
}
//
}
}
//
}
}
//
}
//loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
//
//loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
decoding_buffer
.
clear
();
//
decoding_buffer.clear();
decoding_buffer
.
put_os
(
OCTETSTRING
(
str
.
length
(),
(
const
unsigned
char
*
)
str
.
c_str
()));
//
decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
RnisAPI__TypesAndValues
::
RabInfo
rab_info
;
RnisAPI__TypesAndValues
::
RabInfo
rab_info
;
rab_info
.
decode
(
RnisAPI__TypesAndValues
::
RabInfo_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
rab_info
.
decode
(
RnisAPI__TypesAndValues
::
RabInfo_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
rabInfo
()
=
rab_info
;
msg
.
rabInfo
()
=
rab_info
;
}
else
if
(
it
->
second
.
find
(
"
\"
S1BearerInfo
\"
"
)
!=
std
::
string
::
npos
)
{
}
else
if
(
it
->
second
.
find
(
"
\"
S1BearerInfo
\"
"
)
!=
std
::
string
::
npos
)
{
// Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
//
// Replace "type": "1" by type": "EU_IPV4_ADDRESS", "type": "2"...
// TODO Create a method instead of copy/past
//
// TODO Create a method instead of copy/past
// loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
//
// loggers::get_instance().log("json_codec::decode: Before, str=%s", str.c_str());
std
::
size_t
it_start
=
str
.
find
(
"
\"
type
\"
"
);
//
std::size_t it_start = str.find("\"type\"");
loggers
::
get_instance
().
log
(
"json_codec::decode: id_start=%d"
,
it_start
);
//
loggers::get_instance().log("json_codec::decode: id_start=%d", it_start);
if
(
it_start
!=
std
::
string
::
npos
)
{
//
if (it_start != std::string::npos) {
std
::
size_t
it_stop
=
str
.
find
(
","
,
it_start
);
//
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: id_stop=%d", it_stop);
//loggers::get_instance().log("json_codec::decode: segment=%s", str.substr(it_start, it_stop - it_start).c_str());
//
//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
);
//
std::size_t it = str.find("1", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
//
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
//
if ((it != std::string::npos) && (it < it_stop)) {
str
=
str
.
substr
(
0
,
it
)
+
"UE_IPV4_ADDRESS"
+
str
.
substr
(
it
+
1
);
//
str = str.substr(0, it) + "UE_IPV4_ADDRESS" + str.substr(it + 1);
}
else
{
//
} else {
it
=
str
.
find
(
"2"
,
it_start
,
1
);
//
it = str.find("2", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
//
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
//
if ((it != std::string::npos) && (it < it_stop)) {
str
=
str
.
substr
(
0
,
it
)
+
"UE_IPV6_ADDRESS"
+
str
.
substr
(
it
+
1
);
//
str = str.substr(0, it) + "UE_IPV6_ADDRESS" + str.substr(it + 1);
}
else
{
//
} else {
it
=
str
.
find
(
"3"
,
it_start
,
1
);
//
it = str.find("3", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
//
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
//
if ((it != std::string::npos) && (it < it_stop)) {
str
=
str
.
substr
(
0
,
it
)
+
"NATED_IP_ADDRESS"
+
str
.
substr
(
it
+
1
);
//
str = str.substr(0, it) + "NATED_IP_ADDRESS" + str.substr(it + 1);
}
else
{
//
} else {
it
=
str
.
find
(
"4"
,
it_start
,
1
);
//
it = str.find("4", it_start, 1);
//loggers::get_instance().log("json_codec::decode: it=%d", it);
//
//loggers::get_instance().log("json_codec::decode: it=%d", it);
if
((
it
!=
std
::
string
::
npos
)
&&
(
it
<
it_stop
))
{
//
if ((it != std::string::npos) && (it < it_stop)) {
str
=
str
.
substr
(
0
,
it
)
+
"GTP_TEID"
+
str
.
substr
(
it
+
1
);
//
str = str.substr(0, it) + "GTP_TEID" + str.substr(it + 1);
}
//
}
}
//
}
}
//
}
}
//
}
}
//
}
//loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
//
//loggers::get_instance().log("json_codec::decode: After, str=%s", str.c_str());
decoding_buffer
.
clear
();
//
decoding_buffer.clear();
decoding_buffer
.
put_os
(
OCTETSTRING
(
str
.
length
(),
(
const
unsigned
char
*
)
str
.
c_str
()));
//
decoding_buffer.put_os(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
RnisAPI__TypesAndValues
::
S1BearerInfo
s1_nearer_info
;
RnisAPI__TypesAndValues
::
S1BearerInfo
s1_nearer_info
;
s1_nearer_info
.
decode
(
RnisAPI__TypesAndValues
::
S1BearerInfo_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
s1_nearer_info
.
decode
(
RnisAPI__TypesAndValues
::
S1BearerInfo_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
s1BearerInfo
()
=
s1_nearer_info
;
msg
.
s1BearerInfo
()
=
s1_nearer_info
;
...
...
ccsrc/Protocols/Tcp/tcp_layer.cc
View file @
493d2b37
...
@@ -77,10 +77,10 @@ tcp_layer::tcp_layer(const std::string & p_type, const std::string & param) : la
...
@@ -77,10 +77,10 @@ tcp_layer::tcp_layer(const std::string & p_type, const std::string & param) : la
map_user
();
map_user
();
if
(
!
_reconnect_on_send
)
{
if
(
!
_reconnect_on_send
&&
!
server_mode
)
{
open_client_connection
(
_params
[
params
::
server
].
c_str
(),
_params
[
params
::
port
].
c_str
(),
NULL
,
NULL
);
open_client_connection
(
_params
[
params
::
server
].
c_str
(),
_params
[
params
::
port
].
c_str
(),
NULL
,
NULL
);
}
}
}
}
tcp_layer
::~
tcp_layer
()
{
tcp_layer
::~
tcp_layer
()
{
loggers
::
get_instance
().
log
(
">>> tcp_layer::~tcp_layer: %d"
,
_client_id
);
loggers
::
get_instance
().
log
(
">>> tcp_layer::~tcp_layer: %d"
,
_client_id
);
...
...
etc/AtsMec/AtsMec.cfg
View file @
493d2b37
...
@@ -4,12 +4,13 @@
...
@@ -4,12 +4,13 @@
# IUT roles
# IUT roles
LibCommon_Time.PX_TAC := 30.0
LibCommon_Time.PX_TAC := 30.0
#LibCommon_Time.PX_TWAIT := 30.0
LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_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 := "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"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
...
@@ -18,6 +19,7 @@ LibMec_Pics.PICS_SERVICES := true
...
@@ -18,6 +19,7 @@ LibMec_Pics.PICS_SERVICES := true
LibMec_Pics.PICS_RNIS := true
LibMec_Pics.PICS_RNIS := true
LibMec_Pics.PICS_RNIS_QUERY := true
LibMec_Pics.PICS_RNIS_QUERY := true
LibMec_Pics.PICS_RNIS_ALL_SUBSCRIPTIONS := true
LibMec_Pics.PICS_RNIS_ALL_SUBSCRIPTIONS := true
LibMec_Pics.PICS_RNIS_NOTIFICATIONS := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := false
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := false
...
@@ -44,7 +46,8 @@ LogEventTypes:= Yes
...
@@ -44,7 +46,8 @@ LogEventTypes:= Yes
[TESTPORT_PARAMETERS]
[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
# 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]
[DEFINE]
# In this section you can create macro definitions,
# 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
...
@@ -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_017_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_018_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_019_OK
AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_016_BR
#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_016_NF
AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_017_BR
#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_017_NF
AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_018_BR
#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_018_NF
AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_019_BR
#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_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_TRANS_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK
...
...
ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn
View file @
493d2b37
...
@@ -503,7 +503,7 @@ module AtsMec_RnisAPI_TestCases {
...
@@ -503,7 +503,7 @@ module AtsMec_RnisAPI_TestCases {
{
{
mw_s1_ue_info
(
mw_s1_ue_info
(
{
mw_temp_ue_id
},
{
mw_temp_ue_id
},
{
mw_associate_id
},
-
,
// TODO use superset instead of
{ mw_associate_id },
{
*
,
mw_ecgi
(
mw_plmn
,
PX_CELL_ID
),
*
},
{
*
,
mw_ecgi
(
mw_plmn
,
PX_CELL_ID
),
*
},
{
{
mw_s1_bearer_info_detailed
mw_s1_bearer_info_detailed
...
@@ -1025,5 +1025,68 @@ module AtsMec_RnisAPI_TestCases {
...
@@ -1025,5 +1025,68 @@ module AtsMec_RnisAPI_TestCases {
}
// End of group rnis_query_bi_bo
}
// 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
}
// End of module AtsMec_RnisAPI_TestCases
ttcn/AtsMec/AtsMec_TestControl.ttcn
View file @
493d2b37
...
@@ -90,6 +90,9 @@ module AtsMec_TestControl {
...
@@ -90,6 +90,9 @@ module AtsMec_TestControl {
execute
(
TC_MEC_SRV_RNIS_019_BR
());
execute
(
TC_MEC_SRV_RNIS_019_BR
());
execute
(
TC_MEC_SRV_RNIS_019_NF
());
execute
(
TC_MEC_SRV_RNIS_019_NF
());
}
}
if
(
PICS_RNIS_NOTIFICATIONS
)
{
execute
(
TC_MEC_SRV_RNIS_001_OK
());
}
}
}
if
(
PICS_BWMANAGEMENT_API_SUPPORTED
)
{
if
(
PICS_BWMANAGEMENT_API_SUPPORTED
)
{
...
...
ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn
View file @
493d2b37
...
@@ -106,9 +106,23 @@ module RnisAPI_Templates {
...
@@ -106,9 +106,23 @@ module RnisAPI_Templates {
filterCriteria
:=
p_filterCriteria
,
filterCriteria
:=
p_filterCriteria
,
expiryDeadline
:=
p_expiryDeadline
expiryDeadline
:=
p_expiryDeadline
}
// End of template mw_cell_change_subscription
}
// End of template mw_cell_change_subscription
}
// End of group subscriptions
}
// 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
{
group
info_request
{
template
(
value
)
RabInfo
m_rab_info
(
template
(
value
)
RabInfo
m_rab_info
(
...
@@ -325,22 +339,22 @@ module RnisAPI_Templates {
...
@@ -325,22 +339,22 @@ module RnisAPI_Templates {
template
(
value
)
S1BearerInfoDetailed_
m_s1_bearer_info_detailed
(
template
(
value
)
S1BearerInfoDetailed_
m_s1_bearer_info_detailed
(
in
ErabId
p_erabId
,
in
ErabId
p_erabId
,
in
template
(
value
)
S1EnbInfo
p_
e
nbInfo
,
in
template
(
value
)
S1EnbInfo
p_
s1E
nbInfo
,
in
template
(
value
)
SGwInfo
p_sGwInfo
in
template
(
value
)
SGwInfo
p_sGwInfo
)
:=
{
)
:=
{
erabId
:=
p_erabId
,
erabId
:=
p_erabId
,
e
nbInfo
:=
p_
e
nbInfo
,
s1E
nbInfo
:=
p_
s1E
nbInfo
,
sGwInfo
:=
p_sGwInfo
sGwInfo
:=
p_sGwInfo
}
// End of template m_s1_bearer_info_detailed
}
// End of template m_s1_bearer_info_detailed
template
(
present
)
S1BearerInfoDetailed_
mw_s1_bearer_info_detailed
(
template
(
present
)
S1BearerInfoDetailed_
mw_s1_bearer_info_detailed
(
template
(
present
)
ErabId
p_erabId
:=
?
,
template
(
present
)
ErabId
p_erabId
:=
?
,
template
(
present
)
S1EnbInfo
p_
e
nbInfo
:=
?
,
template
(
present
)
S1EnbInfo
p_
s1E
nbInfo
:=
?
,
template
(
present
)
SGwInfo
p_sGwInfo
:=
?
template
(
present
)
SGwInfo
p_sGwInfo
:=
?
)
:=
{
)
:=
{
erabId
:=
p_erabId
,
erabId
:=
p_erabId
,
e
nbInfo
:=
p_
e
nbInfo
,
s1E
nbInfo
:=
p_
s1E
nbInfo
,
sGwInfo
:=
p_sGwInfo
sGwInfo
:=
p_sGwInfo
}
// End of template mw_s1_bearer_info_detailed
}
// End of template mw_s1_bearer_info_detailed
}
// End of group sub_types
}
// End of group sub_types
...
...
ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn
View file @
493d2b37
...
@@ -89,7 +89,7 @@ module RnisAPI_TypesAndValues {
...
@@ -89,7 +89,7 @@ module RnisAPI_TypesAndValues {
*/
*/
type
record
S1BearerInfoDetailed_
{
type
record
S1BearerInfoDetailed_
{
ErabId
erabId
,
ErabId
erabId
,
S1EnbInfo
e
nbInfo
,
S1EnbInfo
s1E
nbInfo
,
SGwInfo
sGwInfo
SGwInfo
sGwInfo
}
}
type
record
of
S1BearerInfoDetailed_
S1BearerInfoDetailed
;
type
record
of
S1BearerInfoDetailed_
S1BearerInfoDetailed
;
...
...
ttcn/LibMec/ttcn/LibMec_Functions.ttcn
View file @
493d2b37
...
@@ -38,6 +38,23 @@ module LibMec_Functions {
...
@@ -38,6 +38,23 @@ module LibMec_Functions {
}
// End of function f_cf_01_http_up
}
// 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
}
// End of group preambles
group
postambles
{
group
postambles
{
...
@@ -56,6 +73,20 @@ module LibMec_Functions {
...
@@ -56,6 +73,20 @@ module LibMec_Functions {
deactivate
;
deactivate
;
}
// End of function f_cf_01_http_down
}
// 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.
* @desc Default handling cf01 de-initialisation.
*/
*/
...
@@ -67,6 +98,17 @@ module LibMec_Functions {
...
@@ -67,6 +98,17 @@ module LibMec_Functions {
}
}
}
// End of altstep a_cf_01_http_down
}
// 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
}
// End of group postambles
group
helpers
{
group
helpers
{
...
@@ -135,7 +177,12 @@ module LibMec_Functions {
...
@@ -135,7 +177,12 @@ module LibMec_Functions {
altstep
a_default_requests
()
runs
on
HttpComponent
{
altstep
a_default_requests
()
runs
on
HttpComponent
{
[]
httpPort
.
receive
(
mw_http_request
)
{
[]
httpPort
.
receive
(
mw_http_request
)
{
tc_ac
.
stop
;
tc_ac
.
stop
;