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
6bac0478
Commit
6bac0478
authored
Jun 11, 2020
by
Yann Garcia
Browse files
Validate MEC-011 & MEC-013
parent
d9c3507a
Changes
10
Hide whitespace changes
Inline
Side-by-side
ccsrc/Protocols/Json/json_codec.cc
View file @
6bac0478
...
...
@@ -23,7 +23,19 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O
}
else
if
(
msg
.
ischosen
(
LibItsHttp__JsonMessageBodyTypes
::
JsonBody
::
ALT_userTrackingSubscription
))
{
const
LocationAPI__TypesAndValues
::
UserTrackingSubscription
&
user_tracking_subscription
=
msg
.
userTrackingSubscription
();
user_tracking_subscription
.
encode
(
LocationAPI__TypesAndValues
::
UserTrackingSubscription_descr_
,
encoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
data
=
char2oct
(
CHARSTRING
(
"{
\"
userTrackingSubscription
\"
: "
))
+
OCTETSTRING
(
encoding_buffer
.
get_len
(),
encoding_buffer
.
get_data
())
+
char2oct
(
CHARSTRING
(
"}"
));
data
=
/*char2oct(CHARSTRING("{\"userTrackingSubscription\": ")) + */
OCTETSTRING
(
encoding_buffer
.
get_len
(),
encoding_buffer
.
get_data
())
/* + char2oct(CHARSTRING("}"))*/
;
}
else
if
(
msg
.
ischosen
(
LibItsHttp__JsonMessageBodyTypes
::
JsonBody
::
ALT_zonalTrafficSubscription
))
{
const
LocationAPI__TypesAndValues
::
ZonalTrafficSubscription
&
zonal_traffic_subscription
=
msg
.
zonalTrafficSubscription
();
zonal_traffic_subscription
.
encode
(
LocationAPI__TypesAndValues
::
ZonalTrafficSubscription_descr_
,
encoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
data
=
/*char2oct(CHARSTRING("{\"zonalTrafficSubscription\": ")) + */
OCTETSTRING
(
encoding_buffer
.
get_len
(),
encoding_buffer
.
get_data
())
/* + char2oct(CHARSTRING("}"))*/
;
}
else
if
(
msg
.
ischosen
(
LibItsHttp__JsonMessageBodyTypes
::
JsonBody
::
ALT_circleNotificationSubscription
))
{
const
LocationAPI__TypesAndValues
::
CircleNotificationSubscription
&
notif
=
msg
.
circleNotificationSubscription
();
notif
.
encode
(
LocationAPI__TypesAndValues
::
CircleNotificationSubscription_descr_
,
encoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
data
=
/*char2oct(CHARSTRING("{\"circleNotificationSubscription\": ")) + */
OCTETSTRING
(
encoding_buffer
.
get_len
(),
encoding_buffer
.
get_data
())
/* + char2oct(CHARSTRING("}"))*/
;
}
else
if
(
msg
.
ischosen
(
LibItsHttp__JsonMessageBodyTypes
::
JsonBody
::
ALT_distanceNotificationSubscription
))
{
const
LocationAPI__TypesAndValues
::
DistanceNotificationSubscription
&
notif
=
msg
.
distanceNotificationSubscription
();
notif
.
encode
(
LocationAPI__TypesAndValues
::
DistanceNotificationSubscription_descr_
,
encoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
data
=
/*char2oct(CHARSTRING("{\"distanceNotificationSubscription\": ")) + */
OCTETSTRING
(
encoding_buffer
.
get_len
(),
encoding_buffer
.
get_data
())
/* + char2oct(CHARSTRING("}"))*/
;
}
else
if
(
msg
.
ischosen
(
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
);
...
...
@@ -51,7 +63,7 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O
}
else
if
(
msg
.
ischosen
(
LibItsHttp__JsonMessageBodyTypes
::
JsonBody
::
ALT_trafficRule
))
{
const
AppEnablementAPI__TypesAndValues
::
TrafficRule
&
traffic_rule
=
msg
.
trafficRule
();
traffic_rule
.
encode
(
AppEnablementAPI__TypesAndValues
::
TrafficRule_descr_
,
encoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
data
=
/*char2oct(CHARSTRING("{\"
SerAvailabilityNotificationSubscription
\": ")) + */
OCTETSTRING
(
encoding_buffer
.
get_len
(),
encoding_buffer
.
get_data
())
/* + char2oct(CHARSTRING("}"))*/
;
data
=
/*char2oct(CHARSTRING("{\"
TrafficRule
\": ")) + */
OCTETSTRING
(
encoding_buffer
.
get_len
(),
encoding_buffer
.
get_data
())
/* + char2oct(CHARSTRING("}"))*/
;
}
else
{
loggers
::
get_instance
().
error
(
"json_codec::encode: Not supported"
);
}
...
...
@@ -93,8 +105,12 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
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
()));
if
(
it
->
second
.
find
(
"
\"
u
serList
\"
"
)
!=
std
::
string
::
npos
)
{
// Be careful to the order
if
(
it
->
second
.
find
(
"
\"
U
serList
\"
"
)
!=
std
::
string
::
npos
)
{
// Be careful to the order
// TODO To be refined, find("\"userList\"") is not optimal
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
::
UserList
user_list
;
user_list
.
decode
(
LocationAPI__TypesAndValues
::
UserList_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
userList
()
=
user_list
;
...
...
@@ -111,6 +127,14 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
LocationAPI__TypesAndValues
::
UserInfo
user_info
;
user_info
.
decode
(
LocationAPI__TypesAndValues
::
UserInfo_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
userInfo
()
=
user_info
;
}
else
if
(
it
->
second
.
find
(
"
\"
terminalDistance
\"
"
)
!=
std
::
string
::
npos
)
{
LocationAPI__TypesAndValues
::
TerminalDistance
terminal_distance
;
terminal_distance
.
decode
(
LocationAPI__TypesAndValues
::
TerminalDistance_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
terminalDistance
()
=
terminal_distance
;
}
else
if
(
it
->
second
.
find
(
"
\"
distanceNotificationSubscription
\"
"
)
!=
std
::
string
::
npos
)
{
LocationAPI__TypesAndValues
::
DistanceNotificationSubscription
notif
;
notif
.
decode
(
LocationAPI__TypesAndValues
::
DistanceNotificationSubscription_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
distanceNotificationSubscription
()
=
notif
;
}
else
if
(
it
->
second
.
find
(
"
\"
SubscriptionLinkList
\"
"
)
!=
std
::
string
::
npos
)
{
// Be careful to the order
// TODO To be refined, find("\"accessPointList\"") is not optimal
RnisAPI__TypesAndValues
::
SubscriptionLinkList
subscription_link_list
;
...
...
@@ -120,8 +144,8 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
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
(
"
\"
ser
InstanceId
\"
"
)
!=
std
::
string
::
npos
)
{
// Be careful to the order
// TODO To be refined, find("\"accessPointList\"") is not optimal
}
else
if
(
it
->
second
.
find
(
"
\"
ser
Name
\"
"
)
!=
std
::
string
::
npos
)
{
// Be careful to the order
// TODO To be refined, find("\"accessPointList\"") is not optimal
if
(
it
->
second
[
0
]
==
'['
)
{
AppEnablementAPI__TypesAndValues
::
ServiceInfoList
service_info_list
;
service_info_list
.
decode
(
AppEnablementAPI__TypesAndValues
::
ServiceInfoList_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
...
...
@@ -146,6 +170,16 @@ 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
(
"
\"
dnsRuleId
\"
"
)
!=
std
::
string
::
npos
)
{
if
(
it
->
second
[
0
]
==
'['
)
{
AppEnablementAPI__TypesAndValues
::
DnsRuleList
dns_rule_list
;
dns_rule_list
.
decode
(
AppEnablementAPI__TypesAndValues
::
DnsRuleList_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
dnsRuleList
()
=
dns_rule_list
;
}
else
{
AppEnablementAPI__TypesAndValues
::
DnsRule
dns_rule
;
dns_rule
.
decode
(
AppEnablementAPI__TypesAndValues
::
DnsRule_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
dnsRule
()
=
dns_rule
;
}
}
else
if
((
it
->
second
.
find
(
"
\"
appInstanceId
\"
"
)
!=
std
::
string
::
npos
)
&&
(
it
->
second
.
find
(
"
\"
subscriptionType
\"
"
)
!=
std
::
string
::
npos
))
{
AppEnablementAPI__TypesAndValues
::
AppTerminationNotificationSubscription
app_term
;
app_term
.
decode
(
AppEnablementAPI__TypesAndValues
::
AppTerminationNotificationSubscription_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
...
...
etc/AtsMec/AtsMec_Lewis.cf_
View file @
6bac0478
...
...
@@ -17,11 +17,15 @@ LibItsHttp_Pics.PICS_USE_TOKEN_HEADER := true
LibMec_Pics.PICS_ROOT_API := "etsi-013"
# LibMex_Pixits
LibMec_Pixits.PX_ME_APP_Q_ZONE_ID_URI := "/location/v
1
/zones"
LibMec_Pixits.PX_ME_APP_Q_USERS_LIST_URI := "/location/v
1
/users"
LibMec_Pixits.PX_ME_APP_Q_ZONE_ID_URI := "/location/v
2
/zones"
LibMec_Pixits.PX_ME_APP_Q_USERS_LIST_URI := "/location/v
2
/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"
...
...
@@ -34,7 +38,7 @@ 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 :=
0
AppEnablementAPI_Pixits.PX_TTL :=
8
AppEnablementAPI_Pixits.PX_TRAFFIC_RULE_ID := "trafficRuleId01"
# Mec-012 RnisAPI
...
...
@@ -115,28 +119,35 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server
#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.TP_MEC_SRV_RLOCLOOK_001_OK
#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
...
...
@@ -153,7 +164,6 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server
#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
...
...
@@ -163,6 +173,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server
#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
...
...
ttcn/AtsMec/AtsMec_AppEnablementAPI_TestCases.ttcn
View file @
6bac0478
...
...
@@ -1324,9 +1324,10 @@ module AtsMec_AppEnablementAPI_TestCases {
mw_http_response
(
mw_http_response_ok
(
mw_http_message_body_json
(
mw_body_json_dns_rule_list
(
{
*
,
mw_dns_rule
(
PX_DNS_RULE_ID
),
*
}
)))))
{
mw_body_json_dns_rule
(
mw_dns_rule
(
PX_DNS_RULE_ID
))))))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": PASS: IUT successfully responds with a DnsRule ***"
);
...
...
@@ -2388,7 +2389,7 @@ module AtsMec_AppEnablementAPI_TestCases {
httpPort
.
send
(
m_http_request
(
m_http_request_get
(
PX_ME_APP_SUPPORT_TIMING_CAPS_URI
,
"/"
&
PICS_ROOT_API
&
PX_ME_APP_SUPPORT_TIMING_CAPS_URI
,
v_headers
)
)
...
...
@@ -2623,7 +2624,7 @@ module AtsMec_AppEnablementAPI_TestCases {
httpPort
.
send
(
m_http_request
(
m_http_request_get
(
"/"
&
PICS_ROOT_API
&
PX_
SVC_MGMT_APP
_URI
&
"/"
&
oct2char
(
unichar2oct
(
PX_APP_INSTANCE_ID
,
"UTF-8"
))
&
"/traffic_rules/"
&
oct2char
(
unichar2oct
(
PX_TRAFFIC_RULE_ID
,
"UTF-8"
)),
"/"
&
PICS_ROOT_API
&
PX_
ME_APP_SUPPORT
_URI
&
"/"
&
oct2char
(
unichar2oct
(
PX_APP_INSTANCE_ID
,
"UTF-8"
))
&
"/traffic_rules/"
&
oct2char
(
unichar2oct
(
PX_TRAFFIC_RULE_ID
,
"UTF-8"
)),
v_headers
)
)
...
...
@@ -2681,7 +2682,7 @@ module AtsMec_AppEnablementAPI_TestCases {
httpPort
.
send
(
m_http_request
(
m_http_request_post
(
"/"
&
PICS_ROOT_API
&
PX_
SVC_MGMT_APP
_URI
&
"/"
&
oct2char
(
unichar2oct
(
PX_APP_INSTANCE_ID
,
"UTF-8"
))
&
"/traffic_rules/"
&
oct2char
(
unichar2oct
(
PX_TRAFFIC_RULE_ID
,
"UTF-8"
)),
"/"
&
PICS_ROOT_API
&
PX_
ME_APP_SUPPORT
_URI
&
"/"
&
oct2char
(
unichar2oct
(
PX_APP_INSTANCE_ID
,
"UTF-8"
))
&
"/traffic_rules/"
&
oct2char
(
unichar2oct
(
PX_TRAFFIC_RULE_ID
,
"UTF-8"
)),
v_headers
,
m_http_message_body_json
(
m_body_json_traffic_rule
(
...
...
ttcn/AtsMec/AtsMec_RadioNodeLocationAPI_TestCases.ttcn
View file @
6bac0478
...
...
@@ -189,14 +189,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort
.
send
(
m_http_request
(
m_http_request_post
(
"/"
&
PICS_ROOT_API
&
oct2char
(
unichar2oct
(
PX_UE
_AREA_SUB_URI
,
"UTF-8"
)),
"/"
&
PICS_ROOT_API
&
PX_ME_APP_Q
_AREA_SUB_URI
,
v_headers
,
m_http_message_body_json
(
m_body_json_circle_notification_subscription
(
m_circle_notification_subscription
(
PX_CLIENT_ID
,
//clientCorrelator
PX_AREA_SUB_CALLBACK_URI
,
// callbackReference
PX_IP_ADDRESS
// address
{
PX_IP_ADDRESS
}
// address
)
)
)
...
...
@@ -214,10 +214,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
mw_http_message_body_json
(
mw_body_json_circle_notification_subscription
(
mw_circle_notification_subscription
(
PX_CLIENT_ID
,
//clientCorrelator
PX_AREA_SUB_CALLBACK_URI
,
// callbackReference
PX_IP_ADDRESS
// address
))))))
->
value
v_response
{
PX_CLIENT_ID
))))))
->
value
v_response
{
// TODO how to send this when the UE enters the area? The TP has the IUT doing this immediately. Do we want this or will it be discarded as part of the test?
// // MEC 013, clause 7.3.11.3
// the IUT entity sends a vPOST containing,
...
...
@@ -270,16 +267,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort
.
send
(
m_http_request
(
m_http_request_post
(
"/"
&
PICS_ROOT_API
&
oct2char
(
unichar2oct
(
PX_UE
_AREA_SUB_URI
,
"UTF-8"
)),
"/"
&
PICS_ROOT_API
&
PX_ME_APP_Q
_AREA_SUB_URI
,
v_headers
,
m_http_message_body_json
(
m_body_json_circle_notification_subscription
(
m_circle_notification_subscription
(
PX_CLIENT_ID
,
//clientCorrelator
// TODO the TP uses a wrong field name to trigger an error response. Do we create a new data structure just for this or
// change the test to use another trigger (e.g.: invalid IP address)?
PX_CLIENT_ID_UNKNOWN
,
//clientCorrelator
PX_AREA_SUB_CALLBACK_URI
,
// callbackReference
PX_IP_ADDRESS
// address
{
PX_IP_ADDRESS
}
// address
)
)
)
...
...
@@ -334,7 +329,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort
.
send
(
m_http_request
(
m_http_request_delete
(
"/"
&
PICS_ROOT_API
&
oct2char
(
unichar2oct
(
PX_UE
_AREA_SUB_URI
,
"UTF-8"
))
&
oct2char
(
unichar2oct
(
PX_SUBSCRIPTION_ID
,
"UTF-8"
)),
"/"
&
PICS_ROOT_API
&
PX_ME_APP_Q
_AREA_SUB_URI
&
"/"
&
oct2char
(
unichar2oct
(
PX_SUBSCRIPTION_ID
,
"UTF-8"
)),
v_headers
)
)
...
...
@@ -388,7 +383,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort
.
send
(
m_http_request
(
m_http_request_delete
(
"/"
&
PICS_ROOT_API
&
oct2char
(
unichar2oct
(
PX_UE
_AREA_SUB_URI
,
"UTF-8"
))
&
oct2char
(
unichar2oct
(
PX_NON_EXISTENT_SUBSCRIPTION_ID
,
"UTF-8"
)),
"/"
&
PICS_ROOT_API
&
PX_ME_APP_Q
_AREA_SUB_URI
&
"/"
&
oct2char
(
unichar2oct
(
PX_NON_EXISTENT_SUBSCRIPTION_ID
,
"UTF-8"
)),
v_headers
)
)
...
...
@@ -1090,12 +1085,10 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
v_headers
,
m_http_message_body_json
(
m_body_json_circle_notification_subscription
(
m_circle_notification_subscription
(
PX_CLIENT_ID
,
//clientCorrelator
// TODO the TP uses a wrong field name to trigger an error response. Do we create a new data structure just for this or
// change the test to use another trigger?
PX_TRAFFIC_SUB_CALLBACK_URI
,
// callbackReference
PX_ZONE_ID
// zoneId
m_circle_notification_subscription
(
PX_CLIENT_ID_UNKNOWN
,
//clientCorrelator
PX_TRAFFIC_SUB_CALLBACK_URI
,
// callbackReference
{
PX_IP_ADDRESS
}
// address
)
)
)
...
...
ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Pixits.ttcn
View file @
6bac0478
...
...
@@ -25,13 +25,13 @@ module AppEnablementAPI_Pixits {
modulepar
SubscriptionType
PX_NON_EXISTENT_APP_TERM_NOTIF_SUBSCRIPTION
:=
""
;
modulepar
AppTerminationNotificationSubscription_CallbackReference
PX_APP_TERM_NOTIF_CALLBACK_URI
:=
""
;
modulepar
AppTerminationNotificationSubscription_CallbackReference
PX_APP_TERM_NOTIF_CALLBACK_URI
:=
"
http://www.etsi.org
"
;
modulepar
Href
PX_HREF
:=
""
;
modulepar
Href
PX_HREF
:=
"
http://www.etsi.org
"
;
modulepar
Href
PX_SUBSCRIPTION_ID
:=
""
;
modulepar
Href
PX_SUBSCRIPTION_ID
:=
"
subscription123
"
;
modulepar
Href
PX_NON_EXISTENT_SUBSCRIPTION_ID
:=
""
;
modulepar
Href
PX_NON_EXISTENT_SUBSCRIPTION_ID
:=
"
subscription666
"
;
modulepar
DnsRule_Id
PX_DNS_RULE_ID
:=
"route2home"
;
...
...
@@ -45,11 +45,11 @@ module AppEnablementAPI_Pixits {
modulepar
DnsRule_IpAddress
PX_INVALID_IP_ADDRESS
:=
"10.10.0.255"
;
modulepar
Ttl
PX_TTL
:=
0
;
modulepar
Ttl
PX_TTL
:=
8
;
modulepar
DnsRule_State
PX_DNS_INVALID_STATE
:=
UNKNOWN_VALUE
;
modulepar
SerAvailabilityNotificationSubscription_CallbackReference
PX_SRV_AVAIL_NOTIF_CALLBACK_URI
:=
""
;
modulepar
SerAvailabilityNotificationSubscription_CallbackReference
PX_SRV_AVAIL_NOTIF_CALLBACK_URI
:=
"
http://www.etsi.org
"
;
modulepar
TrafficRule_Id
PX_TRAFFIC_RULE_ID
:=
"trafficRuleId01"
;
...
...
ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_TypesAndValues.ttcn
View file @
6bac0478
...
...
@@ -70,7 +70,7 @@ module AppEnablementAPI_TypesAndValues {
type
JSON
.
String
CategoryRef_Id
;
/**
* @desc Name of the category.
SerAvailabilityNotificationSubscription
* @desc Name of the category.
*/
type
JSON
.
String
Name
;
...
...
@@ -125,7 +125,8 @@ module AppEnablementAPI_TypesAndValues {
type
enumerated
InterfaceType
{
TUNNEL
,
MAC
,
IP
IP
,
NONE
}
/**
...
...
@@ -222,12 +223,12 @@ module AppEnablementAPI_TypesAndValues {
/**
* @desc Entry point information of the service as one or more pairs of IP address and port.
*/
type
record
length
(
0
..
infinity
)
of
Address
Address
es
;
type
record
length
(
0
..
infinity
)
of
Address
EndPointInfo_
Address
List
;
/**
* @desc Entry point information of the service in a format defined by an implementation, or in an external specification.
*/
type
record
Alternative
{
type
record
EndPointInfo_
Alternative
{
anytype
alternative
}
...
...
@@ -314,7 +315,7 @@ module AppEnablementAPI_TypesAndValues {
JSON
.
AnyURI
href
,
SubscriptionType
subscriptionType
}
type
record
of
Subscription_
Subscriptions
;
type
record
length
(
0
..
infinity
)
of
Subscription_
Subscriptions
;
/**
* @desc List of supported OAuth 2.0 grant types.
...
...
@@ -370,6 +371,8 @@ module AppEnablementAPI_TypesAndValues {
SerAvailabilityNotificationSubscription_CallbackReference
callbackReference
,
Self
links
optional
,
ServiceInfo
filteringCriteria
optional
}
with
{
variant
(
links
)
"name as '_links'"
;
}
/**
...
...
@@ -720,8 +723,8 @@ module AppEnablementAPI_TypesAndValues {
*/
type
union
TransportInfo_Endpoint
{
EndPointInfo_UriList
uris
,
Address
es
addresses
,
Alternative
alternative
EndPointInfo_
Address
List
addresses
,
EndPointInfo_
Alternative
alternative
}
/**
...
...
ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Pixits.ttcn
View file @
6bac0478
...
...
@@ -11,7 +11,7 @@ module LocationAPI_Pixits {
modulepar
Address
PX_USER
:=
"ue1"
;
modulepar
Address
PX_USER_UNKNOWN
:=
"acr:192.
0.0.200
"
;
modulepar
Address
PX_USER_UNKNOWN
:=
"acr:192.
168.5.1.1
"
;
modulepar
ClientCorrelator
PX_CLIENT_ID
:=
"0123"
;
...
...
@@ -27,7 +27,7 @@ module LocationAPI_Pixits {
modulepar
ZoneId
PX_NON_EXISTENT_ZONE_ID
:=
"zone51"
;
modulepar
ResourceURL
PX_RESOURCE_URL
:=
"http://meep-loc-serv/etsi-013/location/v
1
/users/ue1"
;
modulepar
ResourceURL
PX_RESOURCE_URL
:=
"http://meep-loc-serv/etsi-013/location/v
2
/users/ue1"
;
modulepar
NumberOfAccessPoints
PX_NB_ACCESS_POINTS
:=
3
;
...
...
@@ -37,27 +37,25 @@ module LocationAPI_Pixits {
modulepar
CallbackReference
PX_CALLBACK_REF_URL
:=
{
"http://clientApp.example.com/location_notifications/123456"
};
modulepar
JSON
.
AnyURI
PX_UE_AREA_SUB_URI
:=
""
;
modulepar
CallbackReference
PX_UE_PERIODIC_SUB_CALLBACK_URI
:=
{
""
};
modulepar
Address
PX_IP_ADDRESS
:=
""
;
modulepar
Address
PX_IP_ADDRESS
:=
"
acr:10.0.0.3
"
;
modulepar
CallbackReference
PX_AREA_SUB_CALLBACK_URI
:=
{
""
};
modulepar
CallbackReference
PX_UE_DIST_SUB_CALLBACK_URI
:=
{
""
};
modulepar
Address
PX_UE_MONITORED_IP_ADDRESS
:=
""
;
modulepar
Address
PX_UE_MONITORED_IP_ADDRESS
:=
"
acr:10.0.0.1
"
;
modulepar
Address
PX_ACR_UNKNOWN_IP
:=
""
;
modulepar
Address
PX_ACR_UNKNOWN_IP
:=
"
acr:10.0.0.254
"
;
modulepar
Address
PX_UE_ZONAL_TRAF_SUB_URI
:=
""
;
modulepar
JSON
.
AnyURI
PX_UE_LOC_QRY_URI
:=
""
;
modulepar
JSON
.
AnyURI
PX_UE_LOC_QRY_URI
:=
"
/location/v2/queries
"
;
modulepar
JSON
.
Number
PX_UE_COORD_LAT
:=
0.0
;
modulepar
JSON
.
Number
PX_UE_COORD_LAT
:=
-
80.86302
;
modulepar
JSON
.
Number
PX_UE_COORD_LONG
:=
0.0
;
modulepar
JSON
.
Number
PX_UE_COORD_LONG
:=
41.277306
;
modulepar
JSON
.
AnyURI
PX_UE_LOC_USERS_URI
:=
""
;
...
...
ttcn/LibMec/LocationAPI/ttcn/LocationAPI_Templates.ttcn
View file @
6bac0478
...
...
@@ -205,32 +205,74 @@ module LocationAPI_Templates {
template
(
omit
)
CircleNotificationSubscription
m_circle_notification_subscription
(
in
template
(
omit
)
ClientCorrelator
p_clientCorrelator
:=
omit
,
in
template
(
value
)
CallbackReference
p_callbackReference
,
in
template
(
omit
)
ResourceURL
p_resourceURL
:=
omit
,
in
template
(
omit
)
Address
p_address
:=
omit
)
:=
{
in
template
(
value
)
Addresses
p_address
,
in
template
(
value
)
JSON
.
Number
p_latitude
:=
PX_UE_COORD_LAT
,
in
template
(
value
)
JSON
.
Number
p_longitude
:=
PX_UE_COORD_LONG
,
in
template
(
value
)
JSON
.
Number
p_radius
:=
10.0
,
in
template
(
value
)
JSON
.
Number
p_trackingAccuracy
:=
10.0
,
in
template
(
value
)
EnteringLeavingCriteria
p_enteringLeavingCriteria
:=
Entering
,
in
template
(
value
)
JSON
.
Bool
p_checkImmediate
:=
true
,
in
template
(
value
)
JSON
.
Number
p_frequency
:=
10.0
,
in
template
(
omit
)
ResourceURL
p_resourceURL
:=
omit
)
:=
{
clientCorrelator
:=
p_clientCorrelator
,
resourceURL
:=
p_resourceURL
,
callbackReference
:=
p_callbackReference
link
:=
omit
,
callbackReference
:=
p_callbackReference
,
requester
:=
omit
,
address_
:=
p_address
,
latitude
:=
p_latitude
,
longitude
:=
p_longitude
,
radius
:=
p_radius
,
trackingAccuracy
:=
p_trackingAccuracy
,
enteringLeavingCriteria
:=
p_enteringLeavingCriteria
,
checkImmediate
:=
p_checkImmediate
,
frequency
:=
p_frequency
,
duration
:=
omit
,
count
:=
omit
}
// End of template m_circle_notification_subscription
template
CircleNotificationSubscription
mw_circle_notification_subscription
(
template
ClientCorrelator
p_clientCorrelator
:=
*
,
template
(
present
)
CallbackReference
p_callbackReference
:=
?
,
template
ResourceURL
p_resourceURL
:=
*
,
template
Address
p_address
:=
*
template
(
present
)
Addresses
p_address
:=
?
,
template
(
present
)
JSON
.
Number
p_latitude
:=
?
,
template
(
present
)
JSON
.
Number
p_longitude
:=
?
,
template
(
present
)
JSON
.
Number
p_radius
:=
?
,
template
(
present
)
JSON
.
Number
p_trackingAccuracy
:=
?
,
template
(
present
)
EnteringLeavingCriteria
p_enteringLeavingCriteria
:=
?
,
template
(
present
)
JSON
.
Bool
p_checkImmediate
:=
?
,
template
(
present
)
JSON
.
Number
p_frequency
:=
?
,
template
ResourceURL
p_resourceURL
:=
*
)
:=
{
clientCorrelator
:=
p_clientCorrelator
,
resourceURL
:=
p_resourceURL
,
link
:=
*
,
callbackReference
:=
p_callbackReference
,
address_
:=
p_address
requester
:=
*
,
address_
:=
p_address
,
latitude
:=
p_latitude
,
longitude
:=
p_longitude
,
radius
:=
p_radius
,
trackingAccuracy
:=
p_trackingAccuracy
,
enteringLeavingCriteria
:=
p_enteringLeavingCriteria
,
checkImmediate
:=
p_checkImmediate
,
frequency
:=
p_frequency
,
duration
:=
*
,
count
:=
*
}
// End of template m_wcircle_notification_subscription
template
(
value
)
TerminalDistance
m_terminal_distance
(
in
JSON
.
Number
p_distance
)
:=
{
distance
:=
p_distance
distance
:=
p_distance
,
accuracy
:=
omit
,
timestamp
:=
omit
}
// End of template m_terminal_distance
template
(
present
)
TerminalDistance
mw_terminal_distance
(
template
(
present
)
JSON
.
Number
p_distance
:=
?
)
:=
{
distance
:=
p_distance
distance
:=
p_distance
,
accuracy
:=
*
,
timestamp
:=
*
}
// End of template mw_terminal_distance
template
(
omit
)
DistanceNotificationSubscription
m_distance_notification_subscription
(
...
...
ttcn/LibMec/LocationAPI/ttcn/LocationAPI_TypesAndValues.ttcn
View file @
6bac0478
...
...
@@ -175,6 +175,7 @@ module LocationAPI_TypesAndValues {
* @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI).
*/
type
JSON
.
AnyURI
Address
type
record
of
Address
Addresses
;
/**
* @desc Reserved for future use.
...
...
@@ -447,14 +448,32 @@ REST_NetAPI_Common].
type
record
CircleNotificationSubscription
{
// FIXME Incomplete data structure desciption
ClientCorrelator
clientCorrelator
optional
,
ResourceURL
resourceURL
optional
,
Link
link
optional
,
CallbackReference
callbackReference
,
Address
address_
optional
JSON
.
AnyURI
requester
optional
,
Addresses
address_
,
JSON
.
Number
latitude
,
JSON
.
Number
longitude
,
JSON
.
Number
radius
,
JSON
.
Number
trackingAccuracy
,
EnteringLeavingCriteria
enteringLeavingCriteria
,
JSON
.
Bool
checkImmediate
,
JSON
.
Number
frequency
,
JSON
.
Number
duration
optional
,
JSON
.
Number
count
optional
}
with
{
variant
(
address_
)
"name as 'address'"
;
}
type
enumerated
EnteringLeavingCriteria
{
Entering
,
Leaving
}
type
record
TerminalDistance
{
JSON
.
Number
distance
JSON
.
Number
distance
,
JSON
.
Number
accuracy
optional
,
JSON
.
DateTime
timestamp
optional
}
type
record
DistanceNotificationSubscription
{
// FIXME Incomplete data structure desciption
...
...
ttcn/LibMec/ttcn/LibMec_Pixits.ttcn
View file @
6bac0478
module
LibMec_Pixits
{
modulepar
charstring
PX_ME_APP_Q_ZONE_ID_URI
:=
"/location/v
1
/zones"
;
modulepar
charstring
PX_ME_APP_Q_ZONE_ID_URI
:=
"/location/v
2
/zones"
;
modulepar
charstring
PX_ME_APP_Q_USERS_LIST_URI
:=
"/location/v
1
/users"
;
modulepar
charstring
PX_ME_APP_Q_USERS_LIST_URI
:=
"/location/v
2
/users"
;
modulepar
charstring
PX_ME_APP_Q_DIST_URI
:=
"/location/v
1
/subscriptions/distance"
;
modulepar
charstring
PX_ME_APP_Q_DIST_URI
:=
"/location/v
2
/subscriptions/distance"
;
modulepar
charstring
PX_ME_APP_Q_USERS_LOC_SUB_URI
:=
"/location/v
1
/subscriptions/userTracking"
;
modulepar
charstring
PX_ME_APP_Q_USERS_LOC_SUB_URI
:=
"/location/v
2
/subscriptions/userTracking"
;
modulepar
charstring
PX_ME_APP_Q_USERS_TRACK_SUB_URI
:=
"/location/v
1
/subscriptions/periodic"
;
modulepar
charstring
PX_ME_APP_Q_USERS_TRACK_SUB_URI
:=
"/location/v
2
/subscriptions/periodic"
;
modulepar
charstring
PX_ME_APP_Q_USERS_INF_SUB_URI
:=
"/location/v
1
/subscriptions/zonalTraffic"
;