Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
37acaed1
Commit
37acaed1
authored
Jun 10, 2019
by
YannGarcia
Browse files
Validate first BwManagementAPI test
parent
3fc07e0e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
8 deletions
+33
-8
ccsrc/Protocols/Json/json_codec.cc
ccsrc/Protocols/Json/json_codec.cc
+17
-2
etc/AtsMec/AtsMec.cfg
etc/AtsMec/AtsMec.cfg
+11
-3
ttcn/AtsMec/AtsMec_TestControl.ttcn
ttcn/AtsMec/AtsMec_TestControl.ttcn
+4
-2
ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_TypesAndValues.ttcn
.../BwManagementAPI/ttcn/BwManagementAPI_TypesAndValues.ttcn
+1
-1
No files found.
ccsrc/Protocols/Json/json_codec.cc
View file @
37acaed1
...
...
@@ -79,9 +79,24 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
msg
.
ueIdentityTagInfo
()
=
ue_identity_tag_info
;
}
else
if
(
it
->
second
.
find
(
"
\"
bwInfo
\"
"
)
!=
std
::
string
::
npos
)
{
BwManagementAPI__TypesAndValues
::
BwInfo
bw_info
;
bw_info
.
decode
(
BwManagementAPI__TypesAndValues
::
BwInfo_descr_
,
decoding_buffer
,
TTCN_EncDec
::
CT_JSON
);
// Need to change some enumerated string not supported by TTCN-3 language
if
(
str
.
find
(
"not defined in the present document"
)
!=
std
::
string
::
npos
)
{
str
=
regex_replace
(
str
,
regex
(
"not defined in the present document"
),
"not_defined_in_the_present_document"
);
}
if
(
str
.
find
(
"00 = Downlink (towards the UE)"
)
!=
std
::
string
::
npos
)
{
str
=
regex_replace
(
str
,
regex
(
"00 = Downlink
\\
(towards the UE
\\
)"
),
"Downlink"
);
}
else
if
(
str
.
find
(
"01 = Uplink (towards the application/session)"
)
!=
std
::
string
::
npos
)
{
str
=
regex_replace
(
str
,
regex
(
"01 = Uplink
\\
(towards the application
\\
/session
\\
)"
),
"Uplink"
);
}
else
if
(
str
.
find
(
"10 = Symmetrical"
)
!=
std
::
string
::
npos
)
{
str
=
regex_replace
(
str
,
regex
(
"10 = Symmetrical"
),
"Symmetrical"
);
}
//loggers::get_instance().log("json_codec::decode: ##########; %s", str.c_str());
TTCN_Buffer
decoding_buffer_
(
OCTETSTRING
(
str
.
length
(),
(
const
unsigned
char
*
)
str
.
c_str
()));
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
)
{
}
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
;
...
...
etc/AtsMec/AtsMec.cfg
View file @
37acaed1
...
...
@@ -8,12 +8,20 @@ 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.
1.21
"
LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.
0.5
"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibMec_Pics.PICS_MEC_PLAT := true
LibMec_Pics.PICS_RNIS := true
LibMec_Pics.PICS_RNIS := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED := true
UEidentityAPI_Pics.PICS_UE_IDENTITY_API_SUPPORTED := true
BwManagementAPI_Pics.PICS_BWMANAGEMENT_API_SUPPORTED := true
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
...
...
@@ -31,7 +39,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=192.168.
1.21
,port=8081,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.
0.5
,port=8081,use_ssl=0)"
[DEFINE]
# In this section you can create macro definitions,
...
...
ttcn/AtsMec/AtsMec_TestControl.ttcn
View file @
37acaed1
...
...
@@ -39,8 +39,10 @@ module AtsMec_TestControl {
}
}
if
(
PICS_RNIS_ALL_SUBSCRIPTIONS
)
{
execute
(
TC_MEC025_RNIS_SUBSCRIPTION_005
());
if
(
PICS_RNIS
)
{
if
(
PICS_RNIS_ALL_SUBSCRIPTIONS
)
{
execute
(
TC_MEC025_RNIS_SUBSCRIPTION_005
());
}
}
if
(
PICS_BWMANAGEMENT_API_SUPPORTED
)
{
...
...
ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_TypesAndValues.ttcn
View file @
37acaed1
...
...
@@ -90,7 +90,7 @@ module BwManagementAPI_TypesAndValues {
* @desc Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document
*/
type
enumerated
FixedBWPriority
{
reserved
not_defined_in_the_present_document
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment