Commit d8540156 authored by YannGarcia's avatar YannGarcia

Add TC_MEC_SRV_RNIS_011_OK

parent a1188564
......@@ -21,6 +21,13 @@ This file provides the list of the TODOs related to the STF 569.
### RNIS
Draft ETSI GS MEC 012 2.0.4
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
- TC_MEC_SRV_RNIS_011_OK <font color="color:green">To be tested</font>
### SAQ
### SRVSUB
......@@ -29,14 +36,23 @@ This file provides the list of the TODOs related to the STF 569.
### TRAF
### TRANS
Draft ETSI GS MEC 011 V2.0.9 (2018-10)
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/TRAF/PlatTrafficRules.tplan2
- TC_MEC_SRV_TRANS_001_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_TRAF_001_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_TRAF_002_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_TRAF_003_OK <font color="color:green">To be tested</font>
- TC_MEC_SRV_TRAF_001_NF <font color="color:green">To be tested</font>
### TRANS
Draft ETSI GS MEC 011 V2.0.9 (2018-10)
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/remove-401s/Test%20Purposes/SRV/TRANS/PlatTransport.tplan2
- TC_MEC_SRV_TRANS_001_OK <font color="color:green">To be tested</font>
- TP_MEC_SRV_TRAF_001_OK <font color="color:green">To be tested</font>
### UEAREASUB
......
......@@ -58,21 +58,26 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
// ..and create the decoding buffer
TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
if (it->second.find("\"userList\"") != std::string::npos) { // Be carefull to the order
// TODO To be refined, find("\"userList\"") is not optimal
if (it->second.find("\"userList\"") != std::string::npos) { // Be careful to the order
// TODO To be refined, find("\"userList\"") is not optimal
LocationAPI__TypesAndValues::UserList user_list;
user_list.decode(LocationAPI__TypesAndValues::UserList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.userList() = user_list;
} else if (it->second.find("\"accessPointList\"") != std::string::npos) { // Be carefull to the order
// TODO To be refined, find("\"accessPointList\"") is not optimal
} else if (it->second.find("\"accessPointList\"") != std::string::npos) { // Be careful to the order
// TODO To be refined, find("\"accessPointList\"") is not optimal
LocationAPI__TypesAndValues::AccessPointList access_point_list;
access_point_list.decode(LocationAPI__TypesAndValues::AccessPointList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.accessPointList() = access_point_list;
} else if (it->second.find("\"SubscriptionLinkList\"") != std::string::npos) { // Be carefull to the order
// TODO To be refined, find("\"accessPointList\"") is not optimal
} 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;
subscription_link_list.decode(RnisAPI__TypesAndValues::SubscriptionLinkList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.subscriptionLinkList() = subscription_link_list;
} else if (it->second.find("\"transportInfoList\"") != std::string::npos) { // Be careful to the order
// TODO To be refined, find("\"accessPointList\"") is not optimal
AppEnablementAPI__TypesAndValues::TransportInfoList transport_info_list;
transport_info_list.decode(AppEnablementAPI__TypesAndValues::TransportInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.transportInfoList() = transport_info_list;
} else if (it->second.find("\"userTrackingSubscription\"") != std::string::npos) {
LocationAPI__TypesAndValues::UserTrackingSubscription user_tracking_subscription;
user_tracking_subscription.decode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
......@@ -85,6 +90,10 @@ 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("\"trafficRule\"") != std::string::npos) {
AppEnablementAPI__TypesAndValues::TrafficRule traffic_rule;
traffic_rule.decode(AppEnablementAPI__TypesAndValues::TrafficRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.trafficRule() = traffic_rule;
} else if (it->second.find("\"bwInfo\"") != std::string::npos) {
BwManagementAPI__TypesAndValues::BwInfo bw_info;
......
......@@ -7,21 +7,26 @@ LibCommon_Time.PX_TAC := 30.0
LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;
LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87"
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_CONTENT_TYPE := "application/json"
LibMec_Pics.PICS_MEC_PLAT := true
LibMec_Pics.PICS_SERVICES := true
LibMec_Pics.PICS_RNIS := false
LibMec_Pics.PICS_MEC_PLAT := true
LibMec_Pics.PICS_SERVICES := true
LibMec_Pics.PICS_RNIS := true
LibMec_Pics.PICS_RNIS_ALL_SUBSCRIPTIONS := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := false
UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED := true
UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED := false
BwManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := false
AppEnablementAPI_Pics.PICS_ENABLE_APP_API_SUPPORTED := true
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
# you want to log into the file or display on console (standard error).
......@@ -38,7 +43,7 @@ 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=172.28.4.87,port=8081,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.56.1,port=8081,use_ssl=0)"
[DEFINE]
# In this section you can create macro definitions,
......@@ -69,7 +74,7 @@ system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=172.2
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_NF
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_BR
AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_PF
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_PF
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_001_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_001_BR
......@@ -94,6 +99,13 @@ AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_PF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_NF
AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_011_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRANS_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_002_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_NF
[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts.
......
......@@ -7,7 +7,7 @@
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* @see ETSI GS MEC 003, Draft ETSI GS MEC 013 V2.0.3 (2018-10)
* @see ETSI GS MEC 003, Draft ETSI GS MEC 012 V2.0.3 (2018-10)
*/
module AtsMec_RnisAPI_TestCases {
......@@ -34,14 +34,23 @@ module AtsMec_RnisAPI_TestCases {
import from LibMec_Pics all;
import from LibMec_Pixits all;
group me_app_role {
group rnis {
/**
* @desc Check that the RNIS service sends all RNIS subscriptions when requested
* @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/App/Mp1/Rnis/RnisAllSubscriptions_BV.tplan2
* @see
* @desc Check that the RNIS service sends the list of links to the relevant RNIS subscriptions when requested.
* Acceptable SUBSCRIPTION_TYPE are the following:
* - CellChangeSubscription
* - RabEstSubscription
* - RabModSubscription
* - RabRelSubscription
* - MeasRepUeSubscription
* - MeasTaSubscription
* - CaReconfSubscription
* - S1BearerSubscription
* - NrMeasRepUeSubscription"
* @see https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
*/
testcase TC_MEC025_RNIS_SUBSCRIPTION_005() runs on HttpComponent system HttpTestAdapter {
testcase TC_MEC_SRV_RNIS_011_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var HeaderLines v_headers;
var HttpMessage v_response;
......@@ -63,7 +72,7 @@ module AtsMec_RnisAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PX_RNIS_SUBSCRITIONS_URI,
"/" & PICS_ROOT_API & PX_RNIS_SUBSCRITIONS_URI & "?subscription_type=" & oct2char(unichar2oct(PX_SUBSCRIPTION_TYPE, "UTF-8")),
v_headers
)
)
......@@ -80,7 +89,7 @@ module AtsMec_RnisAPI_TestCases {
mw_body_json_subscriptions_list(
mw_subscriptions_list(
PX_LINKS_SELF,
?
{ *, mw_subscription(-, CELL_CHANGE), * }
)))))) -> value v_response {
tc_ac.stop;
......@@ -95,9 +104,9 @@ module AtsMec_RnisAPI_TestCases {
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC025_RNIS_SUBSCRIPTION_005
} // End of testcase TC_MEC_SRV_RNIS_011_OK
} // End of group me_app_role
} // End of group rnis
} // End of module AtsMec_RnisAPI_TestCases
......@@ -20,6 +20,7 @@ module AtsMec_TestControl {
import from AtsMec_RadioNodeLocationAPI_TestCases all;
import from AtsMec_RnisAPI_TestCases all;
import from AtsMec_BwManagementAPI_TestCases all;
import from AtsMec_AppEnablementAPI_TestCases all;
control {
......@@ -61,12 +62,16 @@ module AtsMec_TestControl {
if (PICS_ENABLE_APP_API_SUPPORTED) {
execute(TC_MEC_SRV_TRANS_001_OK());
execute(TC_MEC_SRV_TRAF_001_OK());
execute(TC_MEC_SRV_TRAF_002_OK());
execute(TC_MEC_SRV_TRAF_003_OK());
execute(TC_MEC_SRV_TRAF_001_NF());
}
}
if (PICS_RNIS) {
if (PICS_RNIS_ALL_SUBSCRIPTIONS) {
execute(TC_MEC025_RNIS_SUBSCRIPTION_005());
execute(TC_MEC_SRV_RNIS_011_OK());
}
}
......
......@@ -10,7 +10,7 @@ module AppEnablementAPI_Pixits {
modulepar universal charstring PX_NON_EXISTENT_APP_INSTANCE_ID := "appInst99";
modulepar universal charstring PX_UE_IDENTITY_TAG := "UeTagA";
modulepar universal charstring PX_TRAFFIC_RULE_ID := "trafficRuleId01";
modulepar universal charstring PX_UE_IDENTITY_TAG_INVALID_STATE := "UeTagC";
......
......@@ -67,4 +67,38 @@ module AppEnablementAPI_Templates {
implSpecificInfo := *
} // End of template mw_transport_info
template (value) TrafficRule m_traffic_rule(
in TrafficRule_Id p_trafficRuleId,
in TrafficRule_FilterType p_filterType := FLOW,
in TrafficRule_Priority p_priority := 1,
in TrafficFilterList p_trafficFilter := {},
in TrafficRule_Action p_action_,
in TrafficRule_State p_state := ACTIVE
) := {
trafficRuleId := p_trafficRuleId,
filterType := p_filterType,
priority := p_priority,
trafficFilter := p_trafficFilter,
action_ := p_action_,
dstInterface := omit,
state := p_state
} // End of template m_traffic_rule
template (present) TrafficRule mw_traffic_rule(
template (present) TrafficRule_Id p_trafficRuleId := ?,
template (present) TrafficRule_FilterType p_filterType := ?,
template (present) TrafficRule_Priority p_priority := ?,
template (present) TrafficFilterList p_trafficFilter := ?,
template (present) TrafficRule_Action p_action_ := ?,
template (present) TrafficRule_State p_state := ?
) := {
trafficRuleId := p_trafficRuleId,
filterType := p_filterType,
priority := p_priority,
trafficFilter := p_trafficFilter,
action_ := p_action_,
dstInterface := *,
state := p_state
} // End of template mw_traffic_rule
} // End of module AppEnablementAPI_Templates
......@@ -419,19 +419,6 @@ module AppEnablementAPI_TypesAndValues {
*/
type JSON.String ServiceInfo_Version;
/**
* @desc This type represents the general information of a mobile edge service.
*/
type record Post {
SerInstanceId serInstanceId optional,
SerName serName,
ServiceInfo_Version version,
ServiceInfo_State state,
SerializerTypes serializer,
TransportId transportId optional, // JSON oneOf ???
TransportInfo transportInfo optional // JSON oneOf ???
}
/**
* @desc This type represents the general information of a mobile edge service.
*/
......@@ -676,6 +663,7 @@ module AppEnablementAPI_TypesAndValues {
} with {
variant (action_) "name as 'action'";
}
type record of TrafficRule TrafficRuleList
/**
* @desc Human-readable description of this transport.
......
......@@ -6,8 +6,10 @@ module RnisAPI_Pixits {
// LibMec/Rnis
import from RnisAPI_TypesAndValues all;
modulepar JSON.String PX_SUBSCRIPTION_TYPE := "cell_change";
modulepar JSON.String PX_SUBSCRIPTION_ID := "7777";
modulepar Link PX_LINKS_SELF := { self_ := "http://example.com/exampleAPI/rni/v2/subscriptions/" };
modulepar Link PX_LINKS_SELF := { self_ := "http://example.com/exampleAPI/rni/v2/subscriptions" };
} // End of module RnisAPI_Pixits
......@@ -28,6 +28,22 @@ module RnisAPI_Templates {
subscription := p_subscription
} // End of template mw_subscriptions_list
template (value) Subscription_ m_subscription(
in LinkType p_href,
in SubscriptionType p_subscriptionType
) := {
href := p_href,
subscriptionType := p_subscriptionType
} // End of temlate m_subscription
template (present) Subscription_ mw_subscription(
template (present) LinkType p_href := ?,
template (present) SubscriptionType p_subscriptionType := ?
) := {
href := p_href,
subscriptionType := p_subscriptionType
} // End of temlate mw_subscription
group cell {
template (omit) CellChangeSubscription m_cell_change_subscription(
......
......@@ -14,9 +14,11 @@ module LibMec_Pixits {
modulepar charstring PX_ME_APP_Q_UE_IDENTITY_ID_URI := "/ui/v2/";
modulepar charstring PX_SVC_MGMT_TRANS_URI := "/mec_service_mgmt/v1/transports";
modulepar charstring PX_SVC_MGMT_TRANS_URI := "/mec_app_support/v2/transports";
modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions/";
modulepar charstring PX_SVC_MGMT_APP_URI := "/mec_service_mgmt/v2/application";
modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions";
modulepar charstring PX_ME_BWM_URI := "/bwm/v2/bw_allocations";
......
......@@ -33,6 +33,8 @@ module LibItsHttp_JsonMessageBodyTypes {
BwInfo bwInfo,
BwManagementAPI_TypesAndValues.ProblemDetails problemDetails_bw_management,
TransportInfoList transportInfoList,
TrafficRuleList trafficRuleList,
TrafficRule trafficRule,
AppEnablementAPI_TypesAndValues.ProblemDetails problemDetails_svc_mgmt,
universal charstring raw
} with {
......
......@@ -206,6 +206,42 @@ module LibItsHttp_JsonTemplates {
transportInfoList := p_transportInfoList
} // End of template mw_body_json_transport_info_list
template (value) JsonBody m_body_json_traffic_rule(
in template (value) TrafficRule p_trafficRule
) := {
trafficRule := p_trafficRule
} // End of template m_body_json_traffic_rule
template (present) JsonBody mw_body_json_traffic_rule(
template (present) TrafficRule p_trafficRule := ?
) := {
trafficRule := p_trafficRule
} // End of template mw_body_json_traffic_rule
template (value) JsonBody m_body_json_traffic_rules_list(
in template (value) TrafficRuleList p_trafficRuleList
) := {
trafficRuleList := p_trafficRuleList
} // End of template m_body_json_traffic_rules_list
template (present) JsonBody mw_body_json_traffic_rules_list(
template (present) TrafficRuleList p_trafficRuleList := ?
) := {
trafficRuleList := p_trafficRuleList
} // End of template mw_body_json_traffic_rules_list
template (value) JsonBody m_body_json_app_enablement_problem_details(
in template (value) AppEnablementAPI_TypesAndValues.ProblemDetails p_problemDetails
) := {
problemDetails_svc_mgmt := p_problemDetails
} // End of template m_body_json_app_enablement_problem_details
template (present) JsonBody mw_body_json_app_enablement_problem_details(
template (present) AppEnablementAPI_TypesAndValues.ProblemDetails p_problemDetails := ?
) := {
problemDetails_svc_mgmt := p_problemDetails
} // End of template mw_body_json_app_enablement_problem_details
} // End of group svc_mgmt
} // End of module LibItsHttp_JsonTemplates
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment