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
ce629822
Commit
ce629822
authored
May 16, 2019
by
Yann Garcia
Browse files
Add RnisAPI tests
parent
0dd2792e
Changes
9
Hide whitespace changes
Inline
Side-by-side
ccsrc/Protocols/Json/json_codec.cc
View file @
ce629822
...
...
@@ -65,7 +65,7 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
}
else
if
(
it
->
second
.
find
(
"
\"
problemDetails
\"
"
)
!=
std
::
string
::
npos
)
{
UEidentityAPI__TypesAndValues
::
ProblemDetails
problem_details
;
problem_details
.
decode
(
UEidentityAPI__TypesAndValues
::
ProblemDetails_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
msg
.
problemDetails
()
=
problem_details
;
msg
.
problemDetails
__ue__identity
()
=
problem_details
;
}
else
{
loggers
::
get_instance
().
warning
(
"json_codec::decode: Unsupported variant"
);
return
-
1
;
...
...
scripts/mec_generate_makefile.bash
View file @
ce629822
...
...
@@ -52,7 +52,7 @@ find .. -type f -name "*.bak" -exec rm {} \;
find ..
-type
f
-name
"*.log"
-exec
rm
{}
\;
# 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
}
do
# TTCN code
...
...
scripts/update_mec_project.bash
View file @
ce629822
...
...
@@ -146,7 +146,7 @@ do
then
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
elif
[
"
$i
"
==
"LibMec/Rn
s
iAPI"
]
elif
[
"
$i
"
==
"LibMec/Rni
s
API"
]
then
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
...
...
ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn
View file @
ce629822
...
...
@@ -40,7 +40,7 @@ module AtsMec_RnisAPI_TestCases {
* @desc 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_
0
05
()
runs
on
HttpComponent
system
HttpTestAdapter
{
// Local variables
var
HeaderLines
v_headers
;
var
HttpMessage
v_response
;
...
...
@@ -90,9 +90,9 @@ module AtsMec_RnisAPI_TestCases {
// Postamble
f_cf_01_http_down
();
}
// End of testcase TC_MEC025_RNI_SUBSCRIPTION_05
}
// End of testcase TC_MEC025_RNI_SUBSCRIPTION_
0
05
}
// End of group me_app_role
}
// End of group me_app_role
}
// End of module AtsMec_RnisAPI_TestCases
ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Pixits.ttcn
0 → 100644
View file @
ce629822
module
RnisAPI_Pixits
{
modulepar
universal
charstring
PX_SUBSCRIPTION_ID
:=
"7777"
;
}
// End of module RnisAPI_Pixits
ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn
View file @
ce629822
module
RnisAPI_T
ypesAndValu
es
{
module
RnisAPI_T
emplat
es
{
// LibCommon
import
from
LibCommon_BasicTypesAndValues
all
;
// LibMec/RnisAPI
import
from
module
RnisAPI_TypesAndValues
all
;
import
from
RnisAPI_TypesAndValues
all
;
group
subscriptions
{
...
...
@@ -17,7 +17,7 @@ module RnisAPI_TypesAndValues {
in
template
(
omit
)
TimeStamp
p_expiryDeadline
:=
omit
)
:=
{
callbackReference
:=
p_callbackReference
,
_
links
:=
p_links
,
links
:=
p_links
,
filterCriteria
:=
p_filterCriteria
,
expiryDeadline
:=
p_expiryDeadline
}
// End of template m_cell_change_subscription
...
...
@@ -29,7 +29,7 @@ module RnisAPI_TypesAndValues {
template
TimeStamp
p_expiryDeadline
:=
*
)
:=
{
callbackReference
:=
p_callbackReference
,
_
links
:=
p_links
,
links
:=
p_links
,
filterCriteria
:=
p_filterCriteria
,
expiryDeadline
:=
p_expiryDeadline
}
// End of template mw_cell_change_subscription
...
...
@@ -38,4 +38,4 @@ module RnisAPI_TypesAndValues {
}
// End of group subscriptions
}
// End of module RnisAPI_T
ypesAndValu
es
}
// End of module RnisAPI_T
emplat
es
ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn
View file @
ce629822
...
...
@@ -37,8 +37,6 @@ module RnisAPI_TypesAndValues {
Ecgi
ecgi
}
type
unsiversal
charstring
AppInsId
;
/**
* @desc
* @member timeStamp
...
...
@@ -74,7 +72,7 @@ module RnisAPI_TypesAndValues {
type
record
S1UeInfo
{
TempUeId
tempUeId
,
AssociateId
associateId
optional
,
Ecgi
ecgi
,
Ecgi
s
ecgi
,
S1BearerInfoDetailed
s1BearerInfoDetailed
}
...
...
@@ -84,11 +82,12 @@ module RnisAPI_TypesAndValues {
* @member s1EnbInfo
* @member sGwInfo
*/
type
record
S1BearerInfoDetailed
{
type
record
S1BearerInfoDetailed
_
{
ErabId
erabId
,
S1EnbInfo
s1EnbInfo
,
SGwInfo
sGwInfo
}
type
record
of
S1BearerInfoDetailed_
S1BearerInfoDetailed
;
type
UInt32
ErabId
;
...
...
@@ -159,12 +158,13 @@ module RnisAPI_TypesAndValues {
/**
* @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413
* @member ecgi
* @member
ueInfo
* @member
cellId
*/
type
record
Ecgi
{
Plmn
plmn
,
CellId
cellId
}
type
record
of
Ecgi
Ecgis
;
/**
* @desc E-UTRAN CelI Global Identifier as defined in 3GPP TS 36.413
...
...
@@ -186,33 +186,35 @@ module RnisAPI_TypesAndValues {
* @member associateId
* @member erabInfo
*/
type
record
UeInfo
{
record
of
AssociateId
associateId
optional
,
record
of
ErabQosParameters
erabInfo
type
record
UeInfo
_
{
AssociateId
associateId
optional
,
ErabQosParameters
erabInfo
}
type
record
of
UeInfo_
UeInfo
;
/**
* @desc Information on UEs in the specific cell
* @member type Numeric value (0-255) corresponding to specified type of identifier
* @member value Value for the identifier
*/
type
record
AssociateId
{
type
record
AssociateId
_
{
AssociateId_type
type_
,
UInt32
value_
}
with
{
variant
(
type_
)
"name as 'type'"
;
variant
(
value_
)
"name as 'value'"
;
}
type
record
of
AssociateId_
AssociateId
;
/**
* @desc Numeric value (0-255) corresponding to specified type of identifier
*/
type
enumerated
AssociateId_type
{
"
RESERVED
"
,
"
UE_IPV4_ADDRESS
"
,
"
UE_IPV6_ADDRESS
"
,
"
NATED_IP_ADDRESS
"
,
"
GTP_TEID
"
RESERVED
,
UE_IPV4_ADDRESS
,
UE_IPV6_ADDRESS
,
NATED_IP_ADDRESS
,
GTP_TEID
}
/**
...
...
@@ -220,10 +222,16 @@ module RnisAPI_TypesAndValues {
* @member qci QoS Class Identifier as defined in TS 23.401
* @member qci_information
*/
type
record
ErabQosParameter
s
{
type
record
ErabQosParameter
{
UInt32
qci
,
QosInformation
qci_information
}
type
record
of
ErabQosParameter
ErabQosParameters
;
/**
* @desc QoS Class Identifier as defined in TS 23.401
*/
type
UInt32
Qci
;
/**
* @desc
...
...
@@ -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
*/
type
enumerated
QosInformation
{
"
erabGbrDl
"
,
"
erabGbrUl
"
,
"
erabMbrDl
"
,
"
erabMbrUl
"
erabGbrDl
,
erabGbrUl
,
erabMbrDl
,
erabMbrUl
}
/**
* @desc
* @member
_
links
* @member links
* @member subscription
*/
type
record
SubscriptionLinkList
{
Link
_links
,
Subscription
subscription
optional
{
Link
links
,
Subscription
subscription
optional
}
with
{
variant
(
links
)
"name as '_links'"
;
}
/**
...
...
@@ -264,15 +274,17 @@ module RnisAPI_TypesAndValues {
/**
* @desc
* @member callbackReference
* @member
_
links
* @member links
* @member filterCriteria
* @member expiryDeadline
*/
type
record
MeasRepUeSubscription
{
CallbackReference
callbackReference
,
Link
_
links
,
Link
links
,
FilterCriteriaAssocTri
filterCriteria
,
TimeStamp
expiryDeadline
optional
}
with
{
variant
(
links
)
"name as '_links'"
;
}
/**
...
...
@@ -292,61 +304,68 @@ module RnisAPI_TypesAndValues {
/**
* @desc
* @member callbackReference
* @member
_
links
* @member links
* @member s1BearerSubscriptionCriteria
* @member expiryDeadline
*/
type
record
S1BearerSubscription
{
CallbackReference
callbackReference
,
Link
_
links
,
Link
links
,
S1BearerSubscriptionCriteria
s1BearerSubscriptionCriteria
,
TimeStamp
expiryDeadline
optional
}
with
{
variant
(
links
)
"name as '_links'"
;
}
/**
* @desc
* @member callbackReference
* @member
_
links
* @member links
* @member filterCriteria
*/
type
record
RabEstSubscription
{
CallbackReference
callbackReference
,
Link
_
links
,
Link
links
,
FilterCriteriaAssocQci
filterCriteria
}
with
{
variant
(
links
)
"name as '_links'"
;
}
/**
* @desc
* @member callbackReference
* @member
_
links
* @member links
* @member filterCriteria
* @member expiryDeadline
*/
type
record
RabEstSubscriptionPost
{
CallbackReference
callbackReference
,
Link
_
links
,
Link
links
,
FilterCriteriaAssocQci
filterCriteria
,
TimeStamp
expiryDeadline
optional
}
with
{
variant
(
links
)
"name as '_links'"
;
}
/**
* @desc
* @member callbackReference
* @member
_
links
* @member links
* @member filterCriteria
* @member expiryDeadline
*/
type
record
RabModSubscription
{
CallbackReference
callbackReference
,
Link
_
links
,
Link
links
,
FilterCriteriaAssocQci
filterCriteria
,
TimeStamp
expiryDeadline
optional
}
with
{
variant
(
links
)
"name as '_links'"
;
}
/**
* @desc
* @member callbackReference
* @member _links
* @member filterCriteria
* @member expiryDeadline
*/
...
...
@@ -359,15 +378,17 @@ module RnisAPI_TypesAndValues {
/**
* @desc
* @member callbackReference
* @member
_
links
* @member links
* @member filterCriteria
* @member expiryDeadline
*/
type
record
RabRelSubscription
{
CallbackReference
callbackReference
,
Link
_
links
,
Link
links
,
FilterCriteriaAssocQci
filterCriteria
,
TimeStamp
expiryDeadline
optional
}
with
{
variant
(
links
)
"name as '_links'"
;
}
/**
...
...
@@ -385,15 +406,17 @@ module RnisAPI_TypesAndValues {
/**
* @desc
* @member callbackReference
* @member
_
links
* @member links
* @member filterCriteria
* @member expiryDeadline
*/
type
record
CaReConfSubscription
{
CallbackReference
callbackReference
,
Link
_
links
,
Link
links
,
FilterCriteriaAssoc
filterCriteria
,
TimeStamp
expiryDeadline
optional
}
with
{
variant
(
links
)
"name as '_links'"
;
}
/**
...
...
@@ -423,15 +446,17 @@ module RnisAPI_TypesAndValues {
/**
* @desc
* @member callbackReference
* @member
_
links
* @member links
* @member filterCriteria
* @member expiryDeadline
*/
type
record
CellChangeSubscription
{
CallbackReference
callbackReference
,
Link
_
links
,
Link
links
,
FilterCriteriaAssocHo
filterCriteria
,
TimeStamp
expiryDeadline
optional
}
with
{
variant
(
links
)
"name as '_links'"
;
}
/**
...
...
@@ -449,15 +474,17 @@ module RnisAPI_TypesAndValues {
/**
* @desc
* @member callbackReference
* @member
_
links
* @member links
* @member filterCriteria
* @member expiryDeadline
*/
type
record
MeasTaSubscription
{
CallbackReference
callbackReference
,
Link
_
links
,
Link
links
,
FilterCriteriaAssocHo
filterCriteria
,
TimeStamp
expiryDeadline
optional
}
with
{
variant
(
links
)
"name as '_links'"
;
}
/**
...
...
@@ -470,7 +497,7 @@ module RnisAPI_TypesAndValues {
* @member self_ URI referring to a resource
*/
type
record
Link
{
LinkType
self_
,
LinkType
self_
}
with
{
variant
(
self_
)
"name as 'self'"
;
}
...
...
@@ -485,10 +512,11 @@ module RnisAPI_TypesAndValues {
* @member
* @member
*/
type
record
Subscription
{
type
record
Subscription
_
{
LinkType
href
,
SubscriptionType
subscriptionType
}
type
record
of
Subscription_
Subscription
;
/**
* @desc Numeric value corresponding to specified type of subscription
...
...
@@ -500,15 +528,15 @@ module RnisAPI_TypesAndValues {
* @member
*/
type
enumerated
SubscriptionType
{
"
RESERVED
"
,
"
CELL_CHANGE
"
,
"
RAB_ESTABLISHMENT
"
,
"
RAB_MODIFICATION
"
,
"
RAB_RELEASE
"
,
"
MEAS_REPORT_UE
"
,
"
MEAS_TIMING_ADVANCE
"
,
"
CA_RECONF
"
,
"
S1_BEARE
"
RESERVED
,
CELL_CHANGE
,
RAB_ESTABLISHMENT
,
RAB_MODIFICATION
,
RAB_RELEASE
,
MEAS_REPORT_UE
,
MEAS_TIMING_ADVANCE
,
CA_RECONF
,
S1_BEARE
}
/**
...
...
@@ -565,7 +593,7 @@ module RnisAPI_TypesAndValues {
* @member cellId
* @member trigger
*/
type
record
FilterCriteriaAssoc
Ho
{
type
record
FilterCriteriaAssoc
Tri
{
AppInsId
appInsId
,
AssociateId
associateId
,
Plmn
plmn
,
...
...
@@ -583,58 +611,56 @@ module RnisAPI_TypesAndValues {
* @member cellId
* @member trigger
*/
type
record
Filter
Criteria
AssocHo
{
type
record
S1BearerSubscription
Criteria
{
AssociateId
associateId
,
Plmn
plmn
,
CellId
cellId
,
Trigger
trigger_
}
with
{
variant
(
trigger_
)
"name as 'trigger'"
;
ErabId
erabId
}
/**
* @desc Description of the subscribed to event
*/
type
enumerated
HoStatus
{
"
RESERVED
"
,
"
IN_PREPARATION
"
,
"
IN_EXECUTION
"
,
"
COMPLETED
"
,
"
REJECTED
"
,
"
CANCELLED
"
RESERVED
,
IN_PREPARATION
,
IN_EXECUTION
,
COMPLETED
,
REJECTED
,
CANCELLED
}
/**
* @desc Description of the subscribed event
*/
type
enumerated
EventType
{
"
RESERVED
"
,
"
S1_BEARER_ESTABLISH
"
,
"
S1_BEARER_MODIFY
"
,
"
S1_BEARER_RELEASE
"
RESERVED
,
S1_BEARER_ESTABLISH
,
S1_BEARER_MODIFY
,
S1_BEARER_RELEASE
}
/**
* @desc Unique identifier for the mobile edge application instance
*/
type
enumerated
Trigger
{
"
NOT_AVAILABLE
"
,
"
PERIODICAL_REPORT_STRONGEST_CELLS
"
,
"
PERIODICAL_REPORT_STRONGEST_CELLS_FOR_SON
"
,
"
PERIODICAL_REPORT_CGI
"
,
"
EVENT_A1
"
,
"
EVENT_A2
"
,
"
EVENT_A3
"
,
"
EVENT_A4
"
,
"
EVENT_A5
"
,
"
EVENT_A6
"
,
"
EVENT_B1
"
,
"
EVENT_B2
"
,
"
EVENT_C1
"
,
"
EVENT_C2
"
,
"
EVENT_W1
"
,
"
EVENT_W2
"
,
"
EVENT_W3
"
NOT_AVAILABLE
,
PERIODICAL_REPORT_STRONGEST_CELLS
,
PERIODICAL_REPORT_STRONGEST_CELLS_FOR_SON
,
PERIODICAL_REPORT_CGI
,
EVENT_A1
,
EVENT_A2
,
EVENT_A3
,
EVENT_A4
,
EVENT_A5
,
EVENT_A6
,
EVENT_B1
,
EVENT_B2
,
EVENT_C1
,
EVENT_C2
,
EVENT_W1
,
EVENT_W2
,
EVENT_W3
}
}
with
{
...
...
ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn
View file @
ce629822
...
...
@@ -4,7 +4,9 @@ module LibItsHttp_JsonMessageBodyTypes {
import
from
LocationAPI_TypesAndValues
all
;
// LibMec/UEidentityAPI
import
from
UEidentityAPI_TypesAndValues
all
;
// LibMec/RnisAPI
import
from
RnisAPI_TypesAndValues
all
;
/**
* This file volontary contains a trivial declaration of the type JsonBody.
* In accordance with your TTCN-3 module LibItsHttp_JSONTypes, you have to change the JsonBody typing.
...
...
@@ -13,13 +15,14 @@ module LibItsHttp_JsonMessageBodyTypes {
type
union
JsonBody
{
// TODO Add here your custom variants
UserInfo
userInfo
,
UserList
userList
,
ZoneInfo
zoneInfo
,
ProblemDetails
problemDetails
,
UeIdentityTagInfo
ueIdentityTagInfo
,
CellChangeSubscription
cellChangeSubscription
,
universal
charstring
raw
UserInfo
userInfo
,
UserList
userList
,
ZoneInfo
zoneInfo
,
UEidentityAPI_TypesAndValues
.
ProblemDetails
problemDetails_ue_identity
,
UeIdentityTagInfo
ueIdentityTagInfo
,
CellChangeSubscription
cellChangeSubscription
,
RnisAPI_TypesAndValues
.
ProblemDetails
problemDetails_rnis
,
universal
charstring
raw
}
with
{
variant
""
}
...
...
ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn
View file @
ce629822
...
...
@@ -16,6 +16,9 @@ module LibItsHttp_JsonTemplates {
// LibMec/UEidentityAPI
import
from
UEidentityAPI_TypesAndValues
all
;
import
from
UEidentityAPI_Templates
all
;
// LibMec/RnisAPI
import
from
RnisAPI_TypesAndValues
all
;
import
from
RnisAPI_Templates
all
;
// TODO Add here your custom RFCs import
...
...
@@ -90,15 +93,15 @@ module LibItsHttp_JsonTemplates {
}
// End of template mw_body_json_ue_identity_tag_info
template
(
value
)
JsonBody
m_body_json_ue_problem_details
(
in
template
(
value
)
ProblemDetails
p_problemDetails
in
template
(
value
)
UEidentityAPI_TypesAndValues
.
ProblemDetails
p_problemDetails
)
:=
{
problemDetails
:=
p_problemDetails
problemDetails
_ue_identity
:=
p_problemDetails
}
// End of template m_body_json_ue_problem_details
template
(
present
)
JsonBody
mw_body_json_ue_problem_details
(
template
(
present
)
ProblemDetails
p_problemDetails
:=
?
template
(
present
)
UEidentityAPI_TypesAndValues
.
ProblemDetails
p_problemDetails
:=
?
)
:=
{
problemDetails
:=
p_problemDetails
problemDetails
_ue_identity
:=
p_problemDetails
}
// End of template mw_body_json_ue_problem_details
}
// End of group ue_identity_api
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel