Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
flame-clmc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
flame
flame-clmc
Commits
7f46e9ea
Commit
7f46e9ea
authored
6 years ago
by
Nikolay Stanchev
Browse files
Options
Downloads
Patches
Plain Diff
Simplifies the URL routing of the CLMC service
parent
5066f12d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/service/clmcservice/__init__.py
+1
-8
1 addition, 8 deletions
src/service/clmcservice/__init__.py
src/service/clmcservice/aggregationapi/views.py
+6
-1
6 additions, 1 deletion
src/service/clmcservice/aggregationapi/views.py
with
7 additions
and
9 deletions
src/service/clmcservice/__init__.py
+
1
−
8
View file @
7f46e9ea
...
...
@@ -41,15 +41,8 @@ def main(global_config, **settings):
config
=
Configurator
(
settings
=
settings
)
config
.
add_route
(
'
aggregator_config
'
,
'
/aggregator/config
'
)
config
.
add_view
(
'
clmcservice.aggregationapi.views.AggregatorConfig
'
,
attr
=
'
get
'
,
request_method
=
'
GET
'
)
config
.
add_view
(
'
clmcservice.aggregationapi.views.AggregatorConfig
'
,
attr
=
'
put
'
,
request_method
=
'
PUT
'
)
config
.
add_route
(
'
aggregator_controller
'
,
'
/aggregator/control
'
)
config
.
add_view
(
'
clmcservice.aggregationapi.views.AggregatorController
'
,
attr
=
'
get
'
,
request_method
=
'
GET
'
)
config
.
add_view
(
'
clmcservice.aggregationapi.views.AggregatorController
'
,
attr
=
'
put
'
,
request_method
=
'
PUT
'
)
config
.
add_route
(
'
round_trip_time_query
'
,
'
/query/round-trip-time
'
)
config
.
add_view
(
'
clmcservice.aggregationapi.views.RoundTripTimeQuery
'
,
attr
=
'
get
'
,
request_method
=
'
GET
'
)
config
.
scan
()
config
.
scan
()
# This method scans the packages and finds any views related to the routes added in the app configuration
return
config
.
make_wsgi_app
()
This diff is collapsed.
Click to expand it.
src/service/clmcservice/aggregationapi/views.py
+
6
−
1
View file @
7f46e9ea
...
...
@@ -22,7 +22,7 @@
// Created for Project : FLAME
"""
from
pyramid.view
import
view_defaults
from
pyramid.view
import
view_defaults
,
view_config
from
pyramid.httpexceptions
import
HTTPBadRequest
,
HTTPInternalServerError
from
influxdb
import
InfluxDBClient
from
urllib.parse
import
urlparse
...
...
@@ -54,6 +54,7 @@ class AggregatorConfig(object):
self
.
request
=
request
@view_config
(
request_method
=
"
GET
"
)
def
get
(
self
):
"""
A GET API call for the configuration of the aggregator.
...
...
@@ -70,6 +71,7 @@ class AggregatorConfig(object):
return
config
@view_config
(
request_method
=
"
PUT
"
)
def
put
(
self
):
"""
A PUT API call for the status of the aggregator.
...
...
@@ -141,6 +143,7 @@ class AggregatorController(object):
self
.
request
=
request
@view_config
(
request_method
=
"
GET
"
)
def
get
(
self
):
"""
A GET API call for the status of the aggregator - running or not.
...
...
@@ -160,6 +163,7 @@ class AggregatorController(object):
return
config
@view_config
(
request_method
=
"
PUT
"
)
def
put
(
self
):
"""
A PUT API call for the status of the aggregator.
...
...
@@ -268,6 +272,7 @@ class RoundTripTimeQuery(object):
self
.
request
=
request
@view_config
(
request_method
=
"
GET
"
)
def
get
(
self
):
"""
A GET API call for the averaged round trip time of a specific media service over a given time range.
...
...
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