Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TFS
controller
Commits
6123804a
Commit
6123804a
authored
1 month ago
by
Shayan Hajipour
Browse files
Options
Downloads
Patches
Plain Diff
debug: ietf network slice mock debugged
- endpoint paths fixed
parent
6e220c6f
No related branches found
Branches containing commit
No related tags found
1 merge request
!321
Resolve: "(CTTC) CAMARA Demo Integration tests"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tests/tools/mock_ietf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py
+6
-13
6 additions, 13 deletions
...etf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py
with
6 additions
and
13 deletions
src/tests/tools/mock_ietf_network_slice_sdn_ctrl/MockIetfNetworkSliceSdnCtrl.py
+
6
−
13
View file @
6123804a
...
...
@@ -22,8 +22,8 @@
import
functools
,
logging
,
sys
,
time
from
flask
import
Flask
,
jsonify
,
make_response
,
request
from
flask_restful
import
Api
,
Resource
from
flask
import
Flask
,
request
from
flask_restful
import
Api
from
ResourceNetworkSlices
import
NetworkSliceService
,
NetworkSliceServices
from
ResourceConnectionGroups
import
ConnectionGroup
...
...
@@ -56,11 +56,6 @@ def log_request(logger: logging.Logger, response):
return
response
class
Health
(
Resource
):
def
get
(
self
):
return
make_response
(
jsonify
({}),
200
)
def
main
():
LOGGER
.
info
(
"
Starting...
"
)
...
...
@@ -68,17 +63,15 @@ def main():
app
.
after_request
(
functools
.
partial
(
log_request
,
LOGGER
))
api
=
Api
(
app
,
prefix
=
BASE_URL
)
api
.
add_resource
(
Health
,
"
/
"
)
api
.
add_resource
(
NetworkSliceServices
,
BASE_URL
)
api
.
add_resource
(
NetworkSliceService
,
BASE_URL
+
"
/slice-service=<string:slice_id>
"
)
api
.
add_resource
(
NetworkSliceServices
,
""
)
api
.
add_resource
(
NetworkSliceService
,
"
/slice-service=<string:slice_id>
"
)
api
.
add_resource
(
ConnectionGroup
,
BASE_URL
+
"
/slice-service=<string:slice_id>/connection-groups/connection-group=<string:connection_group_id>
"
,
"
/slice-service=<string:slice_id>/connection-groups/connection-group=<string:connection_group_id>
"
,
)
LOGGER
.
info
(
"
Listening on {:s}...
"
.
format
(
str
(
STR_ENDPOINT
)))
app
.
run
(
debug
=
True
,
host
=
BIND_ADDRESS
,
port
=
BIND_PORT
,
ssl_context
=
"
adhoc
"
)
app
.
run
(
debug
=
True
,
host
=
BIND_ADDRESS
,
port
=
BIND_PORT
)
LOGGER
.
info
(
"
Bye
"
)
return
0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment