summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-api/opendc/api/v2/schedulers/endpoint.py
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-web/opendc-web-api/opendc/api/v2/schedulers/endpoint.py')
-rw-r--r--opendc-web/opendc-web-api/opendc/api/v2/schedulers/endpoint.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/opendc-web/opendc-web-api/opendc/api/v2/schedulers/endpoint.py b/opendc-web/opendc-web-api/opendc/api/v2/schedulers/endpoint.py
new file mode 100644
index 00000000..f33159bf
--- /dev/null
+++ b/opendc-web/opendc-web-api/opendc/api/v2/schedulers/endpoint.py
@@ -0,0 +1,19 @@
+from opendc.util.rest import Response
+
+SCHEDULERS = [
+ 'mem',
+ 'mem-inv',
+ 'core-mem',
+ 'core-mem-inv',
+ 'active-servers',
+ 'active-servers-inv',
+ 'provisioned-cores',
+ 'provisioned-cores-inv',
+ 'random'
+]
+
+
+def GET(_):
+ """Get all available Schedulers."""
+
+ return Response(200, 'Successfully retrieved Schedulers.', [{'name': name} for name in SCHEDULERS])