Commit 8949f887 authored by YannGarcia's avatar YannGarcia

Add RnisQuery_BV tests

parent 145a034c
......@@ -27,6 +27,7 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purpo
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>
- TC_MEC_SRV_RNIS_012_OK <font color="color:green">To be tested</font>
### SAQ
......
......@@ -24,6 +24,10 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O
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("}"));
} 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);
data = char2oct(CHARSTRING("{\"CellChangeSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}"));
} else {
loggers::get_instance().error("json_codec::encode: Not supported");
}
......@@ -94,6 +98,19 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
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("\"CellChangeSubscription\"") != std::string::npos) {
RnisAPI__TypesAndValues::CellChangeSubscription cell_change_subscription;
cell_change_subscription.decode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.cellChangeSubscription() = cell_change_subscription;
//TODO Continue with other ChangeSubscription
} else if (it->second.find("\"RabInfo\"") != std::string::npos) {
RnisAPI__TypesAndValues::RabInfo rab_info;
rab_info.decode(RnisAPI__TypesAndValues::RabInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.rabInfo() = rab_info;
} else if (it->second.find("\"PlmnInfo\"") != std::string::npos) {
RnisAPI__TypesAndValues::PlmnInfo plmn_info;
plmn_info.decode(RnisAPI__TypesAndValues::PlmnInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.plmnInfo() = plmn_info;
} else if (it->second.find("\"bwInfo\"") != std::string::npos) {
BwManagementAPI__TypesAndValues::BwInfo bw_info;
......@@ -114,9 +131,17 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON);
msg.bwInfo() = bw_info;
} else if (it->second.find("\"problemDetails\"") != std::string::npos) { // TODO To be refined, problemDetails in different modules
UEidentityAPI__TypesAndValues::ProblemDetails problem_details;
problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.problemDetails__ue__identity() = problem_details;
// UEidentityAPI__TypesAndValues::ProblemDetails problem_details;
// problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
// msg.problemDetails__ue__identity() = problem_details;
RnisAPI__TypesAndValues::ProblemDetails problem_details;
problem_details.decode(RnisAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.problemDetails__rni() = problem_details;
} else {
loggers::get_instance().warning("json_codec::decode: Unsupported variant");
return -1;
......
......@@ -16,6 +16,7 @@ LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibMec_Pics.PICS_MEC_PLAT := true
LibMec_Pics.PICS_SERVICES := true
LibMec_Pics.PICS_RNIS := true
LibMec_Pics.PICS_RNIS_QUERY := true
LibMec_Pics.PICS_RNIS_ALL_SUBSCRIPTIONS := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := false
......@@ -99,7 +100,11 @@ system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.1
#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_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
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_012_BR
AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_016_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRANS_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK
......
This diff is collapsed.
......@@ -72,6 +72,13 @@ module AtsMec_TestControl {
if (PICS_RNIS) {
if (PICS_RNIS_ALL_SUBSCRIPTIONS) {
execute(TC_MEC_SRV_RNIS_011_OK());
execute(TC_MEC_SRV_RNIS_012_OK());
execute(TC_MEC_SRV_RNIS_011_BR());
execute(TC_MEC_SRV_RNIS_012_BR());
}
if (PICS_RNIS_QUERY) {
execute(TC_MEC_SRV_RNIS_016_OK());
}
}
......
......@@ -3,13 +3,25 @@ module RnisAPI_Pixits {
// JSON
import from JSON all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
// LibMec/Rnis
import from RnisAPI_TypesAndValues all;
modulepar JSON.String PX_SUBSCRIPTION_TYPE := "cell_change";
modulepar JSON.String PX_SUBSCRIPTION_HREF_VALUE := "cell_change";
modulepar SubscriptionType 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 CallbackReference PX_CALLBACK_REFERENCE := "http://meAppClient.example.com/rni/v2/notifications/cell_change/77777";
modulepar UInt32 PX_ASSOCIATE_ID_VALUE := 1;
modulepar CellId PX_CELL_ID := "0x0800000A";
modulepar AppInsId PX_APP_INS_ID := "01";
} // End of module RnisAPI_Pixits
......@@ -183,7 +183,7 @@ module RnisAPI_TypesAndValues {
/**
* @desc The E-UTRAN Cell Identity as a bit string (size (28)), as defined in 3GPP TS 36.413
*/
type record of octetstring CellId;
type JSON.String CellId;
/**
* @desc Information on UEs in the specific cell
......@@ -455,6 +455,7 @@ module RnisAPI_TypesAndValues {
* @member expiryDeadline
*/
type record CellChangeSubscription {
SubscriptionType subscriptionType,
CallbackReference callbackReference,
Link links,
FilterCriteriaAssocHo filterCriteria,
......@@ -540,7 +541,8 @@ module RnisAPI_TypesAndValues {
MEAS_REPORT_UE,
MEAS_TIMING_ADVANCE,
CA_RECONF,
S1_BEARE
S1_BEARE,
WRONG_PARAMETER
}
/**
......
......@@ -20,6 +20,8 @@ module LibMec_Pixits {
modulepar charstring PX_RNIS_SUBSCRITIONS_URI := "/rni/v2/subscriptions";
modulepar charstring PX_RNIS_QUERIES_URI := "/rni/v2/queries";
modulepar charstring PX_ME_BWM_URI := "/bwm/v2/bw_allocations";
} // End of module LibMec_Pixits
......@@ -29,7 +29,9 @@ module LibItsHttp_JsonMessageBodyTypes {
UeIdentityTagInfo ueIdentityTagInfo,
SubscriptionLinkList subscriptionLinkList,
CellChangeSubscription cellChangeSubscription,
RnisAPI_TypesAndValues.ProblemDetails problemDetails_rnis,
RabInfo rabInfo,
PlmnInfo plmnInfo,
RnisAPI_TypesAndValues.ProblemDetails problemDetails_rni,
BwInfo bwInfo,
BwManagementAPI_TypesAndValues.ProblemDetails problemDetails_bw_management,
TransportInfoList transportInfoList,
......
......@@ -174,6 +174,42 @@ module LibItsHttp_JsonTemplates {
cellChangeSubscription := p_cellChangeSubscription
} // End of template mw_body_json_cell_change_subscription
template (value) JsonBody m_body_json_rab_info(
in template (value) RabInfo p_rabInfo
) := {
rabInfo := p_rabInfo
} // End of template m_body_json_rab_info
template (present) JsonBody mw_body_json_rab_info(
template (present) RabInfo p_rabInfo := ?
) := {
rabInfo := p_rabInfo
} // End of template mw_body_json_rab_info
template (value) JsonBody m_body_json_plmn_info(
in template (value) PlmnInfo p_plmnInfo
) := {
plmnInfo := p_plmnInfo
} // End of template m_body_json_plmn_info
template (present) JsonBody mw_body_json_plmn_info(
template (present) PlmnInfo p_plmnInfo := ?
) := {
plmnInfo := p_plmnInfo
} // End of template mw_body_json_plmn_info
template (value) JsonBody m_body_json_rni_problem_details(
in template (value) RnisAPI_TypesAndValues.ProblemDetails p_problemDetails
) := {
problemDetails_rni := p_problemDetails
} // End of template m_body_json_rni_problem_details
template (present) JsonBody mw_body_json_rni_problem_details(
template (present) RnisAPI_TypesAndValues.ProblemDetails p_problemDetails := ?
) := {
problemDetails_rni := p_problemDetails
} // End of template mw_body_json_rni_problem_details
} // End of group rnis_subscriptions
group bw_management_api {
......
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