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
9708268f
Commit
9708268f
authored
Aug 06, 2019
by
Yann Garcia
Browse files
Add TC_MEC_SRV_RNIS_011_OK
parent
a84df257
Changes
2
Hide whitespace changes
Inline
Side-by-side
simu/mec_database.py
View file @
9708268f
...
...
@@ -209,7 +209,8 @@ class mec_database:
# End of method getAccessPointList
def
getSubscriptionLinkList
(
self
,
p_uri
):
return
"{
\"
SubscriptionLinkList
\"
: {
\"
_links
\"
: {
\"
self
\"
:
\"
http://example.com"
+
p_uri
+
"
\"
},
\"
subscription
\"
: [{
\"
href
\"
:
\"
http://meAppClient.example.com/rni/v1/notifications/cell_change/77777
\"
,
\"
subscriptionType
\"
:
\"
CELL_CHANGE
\"
},{
\"
href
\"
:
\"
http://meAppClient.example.com/rni/v1/notifications/MeasTa/77777
\"
,
\"
subscriptionType
\"
:
\"
MEAS_TIMING_ADVANCE
\"
}]}}"
s
=
p_uri
.
split
(
'?'
)
return
"{
\"
SubscriptionLinkList
\"
: {
\"
_links
\"
: {
\"
self
\"
:
\"
http://example.com"
+
s
[
0
]
+
"
\"
},
\"
subscription
\"
: [{
\"
href
\"
:
\"
http://meAppClient.example.com/rni/v1/notifications/cell_change/77777
\"
,
\"
subscriptionType
\"
:
\"
CELL_CHANGE
\"
},{
\"
href
\"
:
\"
http://meAppClient.example.com/rni/v1/notifications/MeasTa/77777
\"
,
\"
subscriptionType
\"
:
\"
MEAS_TIMING_ADVANCE
\"
}]}}"
# End of method getSubscriptionLinkList
def
getMp1TransportInfoList
(
self
):
...
...
simu/mec_http_server.py
View file @
9708268f
...
...
@@ -391,7 +391,22 @@ class myHandler(http.server.BaseHTTPRequestHandler):
resp
=
None
content_type
=
'application/json'
if
p_split
[
4
].
startswith
(
'subscriptions'
):
if
p_split
.
__len__
()
==
6
:
if
p_split
.
__len__
()
==
5
:
s
=
p_split
[
4
].
split
(
'?'
)
if
s
.
__len__
()
==
1
:
resp
=
self
.
__db__
.
getSubscriptionLinkList
(
self
.
path
)
elif
s
[
0
]
!=
'subscriptions'
:
resp
=
"{
\"
problemDetails
\"
: {
\t\"
type
\"
:
\"
Bad Request
\"
,
\t\"
title
\"
:
\"
RnisAPI
\"
,
\t\"
status
\"
: 400,
\t\"
detail
\"
:
\"
Wrong parameters
\"
,
\t\"
instance
\"
:
\"
string
\"
}}"
content_type
=
'application/problem+json'
else
:
s
=
s
[
1
].
split
(
'='
)
print
(
'__process__rnis__api__: '
,
s
)
if
s
[
0
]
!=
'subscription_type'
:
resp
=
"{
\"
problemDetails
\"
: {
\t\"
type
\"
:
\"
Bad Request
\"
,
\t\"
title
\"
:
\"
RnisAPI
\"
,
\t\"
status
\"
: 400,
\t\"
detail
\"
:
\"
Wrong parameters
\"
,
\t\"
instance
\"
:
\"
string
\"
}}"
content_type
=
'application/problem+json'
else
:
resp
=
self
.
__db__
.
getSubscriptionLinkList
(
self
.
path
)
elif
p_split
.
__len__
()
==
6
:
if
p_split
[
5
]
==
''
:
resp
=
self
.
__db__
.
getSubscriptionLinkList
(
self
.
path
)
if
(
resp
==
None
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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