diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-06-26 14:24:07 +0200 |
|---|---|---|
| committer | Georgios Andreadis <info@gandreadis.com> | 2020-06-26 14:24:07 +0200 |
| commit | 40185f6ddc9c4620c62273366a0fb491ecf2cad3 (patch) | |
| tree | 1cf28a26c14ecffae0332dff3723da905905253b /opendc/api/v2/schedulers/endpoint.py | |
| parent | 3ad26793527bf077e296d652d22a0e4234a9b98d (diff) | |
Implement scheduler endpoints
Diffstat (limited to 'opendc/api/v2/schedulers/endpoint.py')
| -rw-r--r-- | opendc/api/v2/schedulers/endpoint.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/opendc/api/v2/schedulers/endpoint.py b/opendc/api/v2/schedulers/endpoint.py index 4f3948a9..0bbc3322 100644 --- a/opendc/api/v2/schedulers/endpoint.py +++ b/opendc/api/v2/schedulers/endpoint.py @@ -1,14 +1,10 @@ -from opendc.models_old.scheduler import Scheduler from opendc.util.rest import Response -def GET(request): - """Get all available Schedulers.""" - - # Get the Schedulers +SCHEDULERS = ['DEFAULT'] - schedulers = Scheduler.query() - # Return the Schedulers +def GET(_): + """Get all available Schedulers.""" - return Response(200, 'Successfully retrieved Schedulers.', [x.to_JSON() for x in schedulers]) + return Response(200, 'Successfully retrieved Schedulers.', [{'name': name} for name in SCHEDULERS]) |
