Commit 6bac0478 authored by Yann Garcia's avatar Yann Garcia
Browse files

Validate MEC-011 & MEC-013

parent d9c3507a
...@@ -23,7 +23,19 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O ...@@ -23,7 +23,19 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O
} else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_userTrackingSubscription)) { } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_userTrackingSubscription)) {
const LocationAPI__TypesAndValues::UserTrackingSubscription& user_tracking_subscription = msg.userTrackingSubscription(); const LocationAPI__TypesAndValues::UserTrackingSubscription& user_tracking_subscription = msg.userTrackingSubscription();
user_tracking_subscription.encode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); 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)) { } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_cellChangeSubscription)) {
const RnisAPI__TypesAndValues::CellChangeSubscription& cell_change_subscription = msg.cellChangeSubscription(); const RnisAPI__TypesAndValues::CellChangeSubscription& cell_change_subscription = msg.cellChangeSubscription();
cell_change_subscription.encode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); 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 ...@@ -51,7 +63,7 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O
} else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_trafficRule)) { } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_trafficRule)) {
const AppEnablementAPI__TypesAndValues::TrafficRule& traffic_rule = msg.trafficRule(); const AppEnablementAPI__TypesAndValues::TrafficRule& traffic_rule = msg.trafficRule();
traffic_rule.encode(AppEnablementAPI__TypesAndValues::TrafficRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); 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 { } else {
loggers::get_instance().error("json_codec::encode: Not supported"); loggers::get_instance().error("json_codec::encode: Not supported");
} }
...@@ -93,8 +105,12 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy ...@@ -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()); loggers::get_instance().log("json_codec::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str());
TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
if (it->second.find("\"userList\"") != std::string::npos) { // Be careful to the order if (it->second.find("\"UserList\"") != std::string::npos) { // Be careful to the order
// TODO To be refined, find("\"userList\"") is not optimal // 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; LocationAPI__TypesAndValues::UserList user_list;
user_list.decode(LocationAPI__TypesAndValues::UserList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); user_list.decode(LocationAPI__TypesAndValues::UserList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.userList() = user_list; msg.userList() = user_list;
...@@ -111,6 +127,14 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy ...@@ -111,6 +127,14 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
LocationAPI__TypesAndValues::UserInfo user_info; LocationAPI__TypesAndValues::UserInfo user_info;
user_info.decode(LocationAPI__TypesAndValues::UserInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); user_info.decode(LocationAPI__TypesAndValues::UserInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.userInfo() = user_info; 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 } else if (it->second.find("\"SubscriptionLinkList\"") != std::string::npos) { // Be careful to the order
// TODO To be refined, find("\"accessPointList\"") is not optimal // TODO To be refined, find("\"accessPointList\"") is not optimal
RnisAPI__TypesAndValues::SubscriptionLinkList subscription_link_list; RnisAPI__TypesAndValues::SubscriptionLinkList subscription_link_list;
...@@ -120,8 +144,8 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy ...@@ -120,8 +144,8 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
UEidentityAPI__TypesAndValues::UeIdentityTagInfo ue_identity_tag_info; UEidentityAPI__TypesAndValues::UeIdentityTagInfo ue_identity_tag_info;
ue_identity_tag_info.decode(UEidentityAPI__TypesAndValues::UeIdentityTagInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); ue_identity_tag_info.decode(UEidentityAPI__TypesAndValues::UeIdentityTagInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.ueIdentityTagInfo() = ue_identity_tag_info; msg.ueIdentityTagInfo() = ue_identity_tag_info;
} else if (it->second.find("\"serInstanceId\"") != std::string::npos) { // Be careful to the order } else if (it->second.find("\"serName\"") != std::string::npos) { // Be careful to the order
// TODO To be refined, find("\"accessPointList\"") is not optimal // TODO To be refined, find("\"accessPointList\"") is not optimal
if (it->second[0] == '[') { if (it->second[0] == '[') {
AppEnablementAPI__TypesAndValues::ServiceInfoList service_info_list; AppEnablementAPI__TypesAndValues::ServiceInfoList service_info_list;
service_info_list.decode(AppEnablementAPI__TypesAndValues::ServiceInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); 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 ...@@ -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); 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("\"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)) { } else if ((it->second.find("\"appInstanceId\"") != std::string::npos) && (it->second.find("\"subscriptionType\"") != std::string::npos)) {
AppEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription app_term; AppEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription app_term;
app_term.decode(AppEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); app_term.decode(AppEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
......
...@@ -17,11 +17,15 @@ LibItsHttp_Pics.PICS_USE_TOKEN_HEADER := true ...@@ -17,11 +17,15 @@ LibItsHttp_Pics.PICS_USE_TOKEN_HEADER := true
LibMec_Pics.PICS_ROOT_API := "etsi-013" LibMec_Pics.PICS_ROOT_API := "etsi-013"
# LibMex_Pixits # LibMex_Pixits
LibMec_Pixits.PX_ME_APP_Q_ZONE_ID_URI := "/location/v1/zones" LibMec_Pixits.PX_ME_APP_Q_ZONE_ID_URI := "/location/v2/zones"
LibMec_Pixits.PX_ME_APP_Q_USERS_LIST_URI := "/location/v1/users" LibMec_Pixits.PX_ME_APP_Q_USERS_LIST_URI := "/location/v2/users"
LibMec_Pixits.PX_RNIS_SUBSCRITIONS_URI := "/rni/v1/subscriptions" LibMec_Pixits.PX_RNIS_SUBSCRITIONS_URI := "/rni/v1/subscriptions"
LibMec_Pixits.PX_RNIS_QUERIES_URI := "/rni/v1/queries" 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_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 # Mec-011 AppEnblementAPI
AppEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "appInst01" AppEnablementAPI_Pixits.PX_APP_INSTANCE_ID := "appInst01"
...@@ -34,7 +38,7 @@ AppEnablementAPI_Pixits.PX_SUBSCRIPTION_ID := "7777" ...@@ -34,7 +38,7 @@ AppEnablementAPI_Pixits.PX_SUBSCRIPTION_ID := "7777"
AppEnablementAPI_Pixits.PX_DNS_RULE_ID := "route2home" AppEnablementAPI_Pixits.PX_DNS_RULE_ID := "route2home"
AppEnablementAPI_Pixits.PX_DOMAIN_NAME := "etsi.org" AppEnablementAPI_Pixits.PX_DOMAIN_NAME := "etsi.org"
AppEnablementAPI_Pixits.PX_IP_ADDRESS := "10.10.0.2" 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" AppEnablementAPI_Pixits.PX_TRAFFIC_RULE_ID := "trafficRuleId01"
# Mec-012 RnisAPI # Mec-012 RnisAPI
...@@ -115,28 +119,35 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server ...@@ -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_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_BR #AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_BR
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCLOOK_001_NF #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_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_001_BR #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_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UELOCSUB_002_NF #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_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_001_BR #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_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UETRACKSUB_002_NF #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_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFLOOK_001_BR #AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFLOOK_001_BR
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFLOOK_001_NF #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_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_001_BR #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_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_NF #AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_NF
#AtsMec_RadioNodeLocationAPI_TestCases.TC_MEC_SRV_RLOCLOOK_001_OK
#AtsMec_RadioNodeLocationAPI_TestCases.TP_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_011_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_012_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_011_BR
...@@ -153,7 +164,6 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server ...@@ -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_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_RnisAPI_TestCases.TC_MEC_SRV_RNIS_001_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_002_OK #AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_002_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_003_OK #AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_003_OK
...@@ -163,6 +173,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server ...@@ -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_007_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_008_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_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_001_BR #AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_001_BR
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_002_OK #AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_APPSAQ_002_OK
......
...@@ -1324,9 +1324,10 @@ module AtsMec_AppEnablementAPI_TestCases { ...@@ -1324,9 +1324,10 @@ module AtsMec_AppEnablementAPI_TestCases {
mw_http_response( mw_http_response(
mw_http_response_ok( mw_http_response_ok(
mw_http_message_body_json( mw_http_message_body_json(
mw_body_json_dns_rule_list( mw_body_json_dns_rule(
{ *, mw_dns_rule(PX_DNS_RULE_ID), * } mw_dns_rule(
))))) { PX_DNS_RULE_ID
)))))) {
tc_ac.stop; tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a DnsRule ***"); log("*** " & testcasename() & ": PASS: IUT successfully responds with a DnsRule ***");
...@@ -2388,7 +2389,7 @@ module AtsMec_AppEnablementAPI_TestCases { ...@@ -2388,7 +2389,7 @@ module AtsMec_AppEnablementAPI_TestCases {
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( m_http_request_get(
PX_ME_APP_SUPPORT_TIMING_CAPS_URI, "/" & PICS_ROOT_API & PX_ME_APP_SUPPORT_TIMING_CAPS_URI,
v_headers v_headers
) )
) )
...@@ -2623,7 +2624,7 @@ module AtsMec_AppEnablementAPI_TestCases { ...@@ -2623,7 +2624,7 @@ module AtsMec_AppEnablementAPI_TestCases {
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_get( 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 v_headers
) )
) )
...@@ -2681,7 +2682,7 @@ module AtsMec_AppEnablementAPI_TestCases { ...@@ -2681,7 +2682,7 @@ module AtsMec_AppEnablementAPI_TestCases {
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_post( 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, v_headers,
m_http_message_body_json( m_http_message_body_json(
m_body_json_traffic_rule( m_body_json_traffic_rule(
......
...@@ -189,14 +189,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases { ...@@ -189,14 +189,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_post( 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, v_headers,
m_http_message_body_json( m_http_message_body_json(
m_body_json_circle_notification_subscription( m_body_json_circle_notification_subscription(
m_circle_notification_subscription( m_circle_notification_subscription(
PX_CLIENT_ID, //clientCorrelator PX_CLIENT_ID, //clientCorrelator
PX_AREA_SUB_CALLBACK_URI, // callbackReference PX_AREA_SUB_CALLBACK_URI, // callbackReference
PX_IP_ADDRESS // address { PX_IP_ADDRESS } // address
) )
) )
) )
...@@ -214,10 +214,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases { ...@@ -214,10 +214,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
mw_http_message_body_json( mw_http_message_body_json(
mw_body_json_circle_notification_subscription( mw_body_json_circle_notification_subscription(
mw_circle_notification_subscription( mw_circle_notification_subscription(
PX_CLIENT_ID, //clientCorrelator PX_CLIENT_ID )))))) -> value v_response {
PX_AREA_SUB_CALLBACK_URI, // callbackReference
PX_IP_ADDRESS // address
)))))) -> 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? // 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 // // MEC 013, clause 7.3.11.3
// the IUT entity sends a vPOST containing, // the IUT entity sends a vPOST containing,
...@@ -270,16 +267,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases { ...@@ -270,16 +267,14 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_post( 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, v_headers,
m_http_message_body_json( m_http_message_body_json(
m_body_json_circle_notification_subscription( m_body_json_circle_notification_subscription(
m_circle_notification_subscription( m_circle_notification_subscription(
PX_CLIENT_ID, //clientCorrelator PX_CLIENT_ID_UNKNOWN, //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_AREA_SUB_CALLBACK_URI, // callbackReference PX_AREA_SUB_CALLBACK_URI, // callbackReference
PX_IP_ADDRESS // address { PX_IP_ADDRESS } // address
) )
) )
) )
...@@ -334,7 +329,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases { ...@@ -334,7 +329,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_delete( 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 v_headers
) )
) )
...@@ -388,7 +383,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases { ...@@ -388,7 +383,7 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
httpPort.send( httpPort.send(
m_http_request( m_http_request(
m_http_request_delete( 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 v_headers
) )
) )
...@@ -1090,12 +1085,10 @@ module AtsMec_RadioNodeLocationAPI_TestCases { ...@@ -1090,12 +1085,10 @@ module AtsMec_RadioNodeLocationAPI_TestCases {
v_headers, v_headers,
m_http_message_body_json( m_http_message_body_json(
m_body_json_circle_notification_subscription( m_body_json_circle_notification_subscription(
m_circle_notification_subscription( m_circle_notification_subscription(
PX_CLIENT_ID, //clientCorrelator PX_CLIENT_ID_UNKNOWN, //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 PX_TRAFFIC_SUB_CALLBACK_URI, // callbackReference
// change the test to use another trigger? { PX_IP_ADDRESS } // address
PX_TRAFFIC_SUB_CALLBACK_URI, // callbackReference
PX_ZONE_ID // zoneId
) )
) )
) )
......
...@@ -25,13 +25,13 @@ module AppEnablementAPI_Pixits { ...@@ -25,13 +25,13 @@ module AppEnablementAPI_Pixits {
modulepar SubscriptionType PX_NON_EXISTENT_APP_TERM_NOTIF_SUBSCRIPTION := ""; 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"; modulepar DnsRule_Id PX_DNS_RULE_ID := "route2home";
...@@ -45,11 +45,11 @@ module AppEnablementAPI_Pixits { ...@@ -45,11 +45,11 @@ module AppEnablementAPI_Pixits {
modulepar DnsRule_IpAddress PX_INVALID_IP_ADDRESS := "10.10.0.255"; 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 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"; modulepar TrafficRule_Id PX_TRAFFIC_RULE_ID := "trafficRuleId01";
......
...@@ -70,7 +70,7 @@ module AppEnablementAPI_TypesAndValues { ...@@ -70,7 +70,7 @@ module AppEnablementAPI_TypesAndValues {
type JSON.String CategoryRef_Id; type JSON.String CategoryRef_Id;
/** /**
* @desc Name of the category. SerAvailabilityNotificationSubscription * @desc Name of the category.
*/ */
type JSON.String Name; type JSON.String Name;
...@@ -125,7 +125,8 @@ module AppEnablementAPI_TypesAndValues { ...@@ -125,7 +125,8 @@ module AppEnablementAPI_TypesAndValues {
type enumerated InterfaceType { type enumerated InterfaceType {
TUNNEL, TUNNEL,
MAC, MAC,
IP IP,
NONE
} }
/** /**
...@@ -222,12 +223,12 @@ module AppEnablementAPI_TypesAndValues { ...@@ -222,12 +223,12 @@ module AppEnablementAPI_TypesAndValues {
/** /**
* @desc Entry point information of the service as one or more pairs of IP address and port. * @desc Entry point information of the service as one or more pairs of IP address and port.
*/ */
type record length(0..infinity) of Address Addresses; type record length(0..infinity) of Address EndPointInfo_AddressList;
/** /**
* @desc Entry point information of the service in a format defined by an implementation, or in an external specification. * @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 anytype alternative
} }
...@@ -314,7 +315,7 @@ module AppEnablementAPI_TypesAndValues { ...@@ -314,7 +315,7 @@ module AppEnablementAPI_TypesAndValues {
JSON.AnyURI href, JSON.AnyURI href,
SubscriptionType subscriptionType SubscriptionType subscriptionType
} }
type record of Subscription_ Subscriptions; type record length(0..infinity) of Subscription_ Subscriptions;
/** /**
* @desc List of supported OAuth 2.0 grant types. * @desc List of supported OAuth 2.0 grant types.
...@@ -370,6 +371,8 @@ module AppEnablementAPI_TypesAndValues { ...@@ -370,6 +371,8 @@ module AppEnablementAPI_TypesAndValues {
SerAvailabilityNotificationSubscription_CallbackReference callbackReference, SerAvailabilityNotificationSubscription_CallbackReference callbackReference,
Self links optional, Self links optional,
ServiceInfo filteringCriteria optional ServiceInfo filteringCriteria optional
} with {
variant (links) "name as '_links'";
} }
/** /**
...@@ -720,8 +723,8 @@ module AppEnablementAPI_TypesAndValues { ...@@ -720,8 +723,8 @@ module AppEnablementAPI_TypesAndValues {
*/ */
type union TransportInfo_Endpoint { type union TransportInfo_Endpoint {
EndPointInfo_UriList uris, EndPointInfo_UriList uris,
Addresses addresses, EndPointInfo_AddressList addresses,
Alternative alternative EndPointInfo_Alternative alternative
} }
/** /**
......
...@@ -11,7 +11,7 @@ module LocationAPI_Pixits { ...@@ -11,7 +11,7 @@ module LocationAPI_Pixits {
modulepar Address PX_USER := "ue1"; 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"; modulepar ClientCorrelator PX_CLIENT_ID := "0123";
...@@ -27,7 +27,7 @@ module LocationAPI_Pixits { ...@@ -27,7 +27,7 @@ module LocationAPI_Pixits {
modulepar ZoneId PX_NON_EXISTENT_ZONE_ID := "zone51"; modulepar ZoneId PX_NON_EXISTENT_ZONE_ID := "zone51";
modulepar ResourceURL PX_RESOURCE_URL := "http://meep-loc-serv/etsi-013/location/v1/users/ue1"; modulepar ResourceURL PX_RESOURCE_URL := "http://meep-loc-serv/etsi-013/location/v2/users/ue1";
modulepar NumberOfAccessPoints PX_NB_ACCESS_POINTS := 3; modulepar NumberOfAccessPoints PX_NB_ACCESS_POINTS := 3;
...@@ -37,27 +37,25 @@ module LocationAPI_Pixits { ...@@ -37,27 +37,25 @@ module LocationAPI_Pixits {
modulepar CallbackReference PX_CALLBACK_REF_URL := { "http://clientApp.example.com/location_notifications/123456" }; modulepar CallbackReference PX_CALLBACK_REF_URL := { "http://clientApp.example.com/location_notifications/123456" };
modulepar JSON.AnyURI PX_UE_AREA_SUB_URI := "";