Commit ce629822 authored by Yann Garcia's avatar Yann Garcia
Browse files

Add RnisAPI tests

parent 0dd2792e
...@@ -65,7 +65,7 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy ...@@ -65,7 +65,7 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
} else if (it->second.find("\"problemDetails\"") != std::string::npos) { } else if (it->second.find("\"problemDetails\"") != std::string::npos) {
UEidentityAPI__TypesAndValues::ProblemDetails problem_details; UEidentityAPI__TypesAndValues::ProblemDetails problem_details;
problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
msg.problemDetails() = problem_details; msg.problemDetails__ue__identity() = problem_details;
} else { } else {
loggers::get_instance().warning("json_codec::decode: Unsupported variant"); loggers::get_instance().warning("json_codec::decode: Unsupported variant");
return -1; return -1;
......
...@@ -52,7 +52,7 @@ find .. -type f -name "*.bak" -exec rm {} \; ...@@ -52,7 +52,7 @@ find .. -type f -name "*.bak" -exec rm {} \;
find .. -type f -name "*.log" -exec rm {} \; find .. -type f -name "*.log" -exec rm {} \;
# Build JSON files if any and put them in objs directory # Build JSON files if any and put them in objs directory
REFERENCES="LibCommon LibHttp LibMec LibMec/LocationAPI LibMec/UEidentityAPI" REFERENCES="LibCommon LibHttp LibMec LibMec/LocationAPI LibMec/RnisAPI LibMec/UEidentityAPI"
for i in ${REFERENCES} for i in ${REFERENCES}
do do
# TTCN code # TTCN code
......
...@@ -146,7 +146,7 @@ do ...@@ -146,7 +146,7 @@ do
then then
cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json
elif [ "$i" == "LibMec/RnsiAPI" ] elif [ "$i" == "LibMec/RnisAPI" ]
then then
cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn
cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json cp ${TTCN_3_ORG_PATH}/$i/json/*.json ${TTCN_3_DST_PATH}/$i/json
......
...@@ -40,7 +40,7 @@ module AtsMec_RnisAPI_TestCases { ...@@ -40,7 +40,7 @@ module AtsMec_RnisAPI_TestCases {
* @desc Check that the RNIS service sends all RNIS subscriptions when requested * @desc Check that the RNIS service sends all RNIS subscriptions when requested
* @see Check that the RNIS service sends all RNIS subscriptions when requested * @see Check that the RNIS service sends all RNIS subscriptions when requested
*/ */
testcase TC_MEC025_RNI_SUBSCRIPTION_05() runs on HttpComponent system HttpTestAdapter { testcase TC_MEC025_RNI_SUBSCRIPTION_005() runs on HttpComponent system HttpTestAdapter {
// Local variables // Local variables
var HeaderLines v_headers; var HeaderLines v_headers;
var HttpMessage v_response; var HttpMessage v_response;
...@@ -90,9 +90,9 @@ module AtsMec_RnisAPI_TestCases { ...@@ -90,9 +90,9 @@ module AtsMec_RnisAPI_TestCases {
// Postamble // Postamble
f_cf_01_http_down(); f_cf_01_http_down();
} // End of testcase TC_MEC025_RNI_SUBSCRIPTION_05 } // End of testcase TC_MEC025_RNI_SUBSCRIPTION_005
} // End of group me_app_role } // End of group me_app_role
} // End of module AtsMec_RnisAPI_TestCases } // End of module AtsMec_RnisAPI_TestCases
module RnisAPI_Pixits {
modulepar universal charstring PX_SUBSCRIPTION_ID := "7777";
} // End of module RnisAPI_Pixits
module RnisAPI_TypesAndValues { module RnisAPI_Templates {
// LibCommon // LibCommon
import from LibCommon_BasicTypesAndValues all; import from LibCommon_BasicTypesAndValues all;
// LibMec/RnisAPI // LibMec/RnisAPI
import from module RnisAPI_TypesAndValues all; import from RnisAPI_TypesAndValues all;
group subscriptions { group subscriptions {
...@@ -17,7 +17,7 @@ module RnisAPI_TypesAndValues { ...@@ -17,7 +17,7 @@ module RnisAPI_TypesAndValues {
in template (omit) TimeStamp p_expiryDeadline := omit in template (omit) TimeStamp p_expiryDeadline := omit
) := { ) := {
callbackReference := p_callbackReference, callbackReference := p_callbackReference,
_links := p_links, links := p_links,
filterCriteria := p_filterCriteria, filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline expiryDeadline := p_expiryDeadline
} // End of template m_cell_change_subscription } // End of template m_cell_change_subscription
...@@ -29,7 +29,7 @@ module RnisAPI_TypesAndValues { ...@@ -29,7 +29,7 @@ module RnisAPI_TypesAndValues {
template TimeStamp p_expiryDeadline := * template TimeStamp p_expiryDeadline := *
) := { ) := {
callbackReference := p_callbackReference, callbackReference := p_callbackReference,
_links := p_links, links := p_links,
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
...@@ -38,4 +38,4 @@ module RnisAPI_TypesAndValues { ...@@ -38,4 +38,4 @@ module RnisAPI_TypesAndValues {
} // End of group subscriptions } // End of group subscriptions
} // End of module RnisAPI_TypesAndValues } // End of module RnisAPI_Templates
...@@ -37,8 +37,6 @@ module RnisAPI_TypesAndValues { ...@@ -37,8 +37,6 @@ module RnisAPI_TypesAndValues {
Ecgi ecgi Ecgi ecgi
} }
type unsiversal charstring AppInsId;
/** /**
* @desc * @desc
* @member timeStamp * @member timeStamp
...@@ -74,7 +72,7 @@ module RnisAPI_TypesAndValues { ...@@ -74,7 +72,7 @@ module RnisAPI_TypesAndValues {
type record S1UeInfo { type record S1UeInfo {
TempUeId tempUeId, TempUeId tempUeId,
AssociateId associateId optional, AssociateId associateId optional,
Ecgi ecgi, Ecgis ecgi,
S1BearerInfoDetailed s1BearerInfoDetailed S1BearerInfoDetailed s1BearerInfoDetailed
} }
...@@ -84,11 +82,12 @@ module RnisAPI_TypesAndValues { ...@@ -84,11 +82,12 @@ module RnisAPI_TypesAndValues {
* @member s1EnbInfo * @member s1EnbInfo
* @member sGwInfo * @member sGwInfo
*/ */
type record S1BearerInfoDetailed { type record S1BearerInfoDetailed_ {
ErabId erabId, ErabId erabId,
S1EnbInfo s1EnbInfo, S1EnbInfo s1EnbInfo,
SGwInfo sGwInfo SGwInfo sGwInfo
} }
type record of S1BearerInfoDetailed_ S1BearerInfoDetailed;
type UInt32 ErabId; type UInt32 ErabId;
...@@ -159,12 +158,13 @@ module RnisAPI_TypesAndValues { ...@@ -159,12 +158,13 @@ module RnisAPI_TypesAndValues {
/** /**
* @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413
* @member ecgi * @member ecgi
* @member ueInfo * @member cellId
*/ */
type record Ecgi { type record Ecgi {
Plmn plmn, Plmn plmn,
CellId cellId CellId cellId
} }
type record of Ecgi Ecgis;
/** /**
* @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413 * @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413
...@@ -186,33 +186,35 @@ module RnisAPI_TypesAndValues { ...@@ -186,33 +186,35 @@ module RnisAPI_TypesAndValues {
* @member associateId * @member associateId
* @member erabInfo * @member erabInfo
*/ */
type record UeInfo { type record UeInfo_ {
record of AssociateId associateId optional, AssociateId associateId optional,
record of ErabQosParameters erabInfo ErabQosParameters erabInfo
} }
type record of UeInfo_ UeInfo;
/** /**
* @desc Information on UEs in the specific cell * @desc Information on UEs in the specific cell
* @member type Numeric value (0-255) corresponding to specified type of identifier * @member type Numeric value (0-255) corresponding to specified type of identifier
* @member value Value for the identifier * @member value Value for the identifier
*/ */
type record AssociateId { type record AssociateId_ {
AssociateId_type type_, AssociateId_type type_,
UInt32 value_ UInt32 value_
} with { } with {
variant (type_) "name as 'type'"; variant (type_) "name as 'type'";
variant (value_) "name as 'value'"; variant (value_) "name as 'value'";
} }
type record of AssociateId_ AssociateId;
/** /**
* @desc Numeric value (0-255) corresponding to specified type of identifier * @desc Numeric value (0-255) corresponding to specified type of identifier
*/ */
type enumerated AssociateId_type { type enumerated AssociateId_type {
"RESERVED", RESERVED,
"UE_IPV4_ADDRESS", UE_IPV4_ADDRESS,
"UE_IPV6_ADDRESS", UE_IPV6_ADDRESS,
"NATED_IP_ADDRESS", NATED_IP_ADDRESS,
"GTP_TEID" GTP_TEID
} }
/** /**
...@@ -220,10 +222,16 @@ module RnisAPI_TypesAndValues { ...@@ -220,10 +222,16 @@ module RnisAPI_TypesAndValues {
* @member qci QoS Class Identifier as defined in TS 23.401 * @member qci QoS Class Identifier as defined in TS 23.401
* @member qci_information * @member qci_information
*/ */
type record ErabQosParameters { type record ErabQosParameter {
UInt32 qci, UInt32 qci,
QosInformation qci_information QosInformation qci_information
} }
type record of ErabQosParameter ErabQosParameters;
/**
* @desc QoS Class Identifier as defined in TS 23.401
*/
type UInt32 Qci;
/** /**
* @desc * @desc
...@@ -233,20 +241,22 @@ module RnisAPI_TypesAndValues { ...@@ -233,20 +241,22 @@ module RnisAPI_TypesAndValues {
* @member erabMbrUl This IE indicates the guaranteed uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer * @member erabMbrUl This IE indicates the guaranteed uplink E-RAB Bit Rate as defined in TS 23.401 for this bearer
*/ */
type enumerated QosInformation { type enumerated QosInformation {
"erabGbrDl", erabGbrDl,
"erabGbrUl", erabGbrUl,
"erabMbrDl", erabMbrDl,
"erabMbrUl" erabMbrUl
} }
/** /**
* @desc * @desc
* @member _links * @member links
* @member subscription * @member subscription
*/ */
type record SubscriptionLinkList { type record SubscriptionLinkList {
Link _links, Link links,
Subscription subscription optional { Subscription subscription optional
} with {
variant (links) "name as '_links'";
} }
/** /**
...@@ -264,15 +274,17 @@ module RnisAPI_TypesAndValues { ...@@ -264,15 +274,17 @@ module RnisAPI_TypesAndValues {
/** /**
* @desc * @desc
* @member callbackReference * @member callbackReference
* @member _links * @member links
* @member filterCriteria * @member filterCriteria
* @member expiryDeadline * @member expiryDeadline
*/ */
type record MeasRepUeSubscription { type record MeasRepUeSubscription {
CallbackReference callbackReference, CallbackReference callbackReference,
Link _links, Link links,
FilterCriteriaAssocTri filterCriteria, FilterCriteriaAssocTri filterCriteria,
TimeStamp expiryDeadline optional TimeStamp expiryDeadline optional
} with {
variant (links) "name as '_links'";
} }
/** /**
...@@ -292,61 +304,68 @@ module RnisAPI_TypesAndValues { ...@@ -292,61 +304,68 @@ module RnisAPI_TypesAndValues {
/** /**
* @desc * @desc
* @member callbackReference * @member callbackReference
* @member _links * @member links
* @member s1BearerSubscriptionCriteria * @member s1BearerSubscriptionCriteria
* @member expiryDeadline * @member expiryDeadline
*/ */
type record S1BearerSubscription { type record S1BearerSubscription {
CallbackReference callbackReference, CallbackReference callbackReference,
Link _links, Link links,
S1BearerSubscriptionCriteria s1BearerSubscriptionCriteria, S1BearerSubscriptionCriteria s1BearerSubscriptionCriteria,
TimeStamp expiryDeadline optional TimeStamp expiryDeadline optional
} with {
variant (links) "name as '_links'";
} }
/** /**
* @desc * @desc
* @member callbackReference * @member callbackReference
* @member _links * @member links
* @member filterCriteria * @member filterCriteria
*/ */
type record RabEstSubscription { type record RabEstSubscription {
CallbackReference callbackReference, CallbackReference callbackReference,
Link _links, Link links,
FilterCriteriaAssocQci filterCriteria FilterCriteriaAssocQci filterCriteria
} with {
variant (links) "name as '_links'";
} }
/** /**
* @desc * @desc
* @member callbackReference * @member callbackReference
* @member _links * @member links
* @member filterCriteria * @member filterCriteria
* @member expiryDeadline * @member expiryDeadline
*/ */
type record RabEstSubscriptionPost { type record RabEstSubscriptionPost {
CallbackReference callbackReference, CallbackReference callbackReference,
Link _links, Link links,
FilterCriteriaAssocQci filterCriteria, FilterCriteriaAssocQci filterCriteria,
TimeStamp expiryDeadline optional TimeStamp expiryDeadline optional
} with {
variant (links) "name as '_links'";
} }
/** /**
* @desc * @desc
* @member callbackReference * @member callbackReference
* @member _links * @member links
* @member filterCriteria * @member filterCriteria
* @member expiryDeadline * @member expiryDeadline
*/ */
type record RabModSubscription { type record RabModSubscription {
CallbackReference callbackReference, CallbackReference callbackReference,
Link _links, Link links,
FilterCriteriaAssocQci filterCriteria, FilterCriteriaAssocQci filterCriteria,
TimeStamp expiryDeadline optional TimeStamp expiryDeadline optional
} with {
variant (links) "name as '_links'";
} }
/** /**
* @desc * @desc
* @member callbackReference * @member callbackReference
* @member _links
* @member filterCriteria * @member filterCriteria
* @member expiryDeadline * @member expiryDeadline
*/ */
...@@ -359,15 +378,17 @@ module RnisAPI_TypesAndValues { ...@@ -359,15 +378,17 @@ module RnisAPI_TypesAndValues {
/** /**
* @desc * @desc
* @member callbackReference * @member callbackReference
* @member _links * @member links
* @member filterCriteria * @member filterCriteria
* @member expiryDeadline * @member expiryDeadline
*/ */
type record RabRelSubscription { type record RabRelSubscription {
CallbackReference callbackReference, CallbackReference callbackReference,
Link _links, Link links,
FilterCriteriaAssocQci filterCriteria, FilterCriteriaAssocQci filterCriteria,
TimeStamp expiryDeadline optional TimeStamp expiryDeadline optional
} with {
variant (links) "name as '_links'";
} }
/** /**
...@@ -385,15 +406,17 @@ module RnisAPI_TypesAndValues { ...@@ -385,15 +406,17 @@ module RnisAPI_TypesAndValues {
/** /**
* @desc * @desc
* @member callbackReference * @member callbackReference
* @member _links * @member links
* @member filterCriteria * @member filterCriteria
* @member expiryDeadline * @member expiryDeadline
*/ */
type record CaReConfSubscription { type record CaReConfSubscription {
CallbackReference callbackReference, CallbackReference callbackReference,
Link _links, Link links,
FilterCriteriaAssoc filterCriteria, FilterCriteriaAssoc filterCriteria,
TimeStamp expiryDeadline optional TimeStamp expiryDeadline optional
} with {
variant (links) "name as '_links'";
} }
/** /**
...@@ -423,15 +446,17 @@ module RnisAPI_TypesAndValues { ...@@ -423,15 +446,17 @@ module RnisAPI_TypesAndValues {
/** /**
* @desc * @desc
* @member callbackReference * @member callbackReference
* @member _links * @member links
* @member filterCriteria * @member filterCriteria
* @member expiryDeadline * @member expiryDeadline
*/ */
type record CellChangeSubscription { type record CellChangeSubscription {
CallbackReference callbackReference, CallbackReference callbackReference,
Link _links, Link links,
FilterCriteriaAssocHo filterCriteria, FilterCriteriaAssocHo filterCriteria,
TimeStamp expiryDeadline optional TimeStamp expiryDeadline optional
} with {
variant (links) "name as '_links'";
} }
/** /**
...@@ -449,15 +474,17 @@ module RnisAPI_TypesAndValues { ...@@ -449,15 +474,17 @@ module RnisAPI_TypesAndValues {
/** /**
* @desc * @desc
* @member callbackReference * @member callbackReference
* @member _links * @member links
* @member filterCriteria * @member filterCriteria
* @member expiryDeadline * @member expiryDeadline
*/ */
type record MeasTaSubscription { type record MeasTaSubscription {
CallbackReference callbackReference, CallbackReference callbackReference,
Link _links, Link links,
FilterCriteriaAssocHo filterCriteria, FilterCriteriaAssocHo filterCriteria,
TimeStamp expiryDeadline optional TimeStamp expiryDeadline optional
} with {
variant (links) "name as '_links'";
} }
/** /**
...@@ -470,7 +497,7 @@ module RnisAPI_TypesAndValues { ...@@ -470,7 +497,7 @@ module RnisAPI_TypesAndValues {
* @member self_ URI referring to a resource * @member self_ URI referring to a resource
*/ */
type record Link { type record Link {
LinkType self_, LinkType self_
} with { } with {
variant (self_) "name as 'self'"; variant (self_) "name as 'self'";
} }
...@@ -485,10 +512,11 @@ module RnisAPI_TypesAndValues { ...@@ -485,10 +512,11 @@ module RnisAPI_TypesAndValues {
* @member * @member