summaryrefslogtreecommitdiff
path: root/opendc/api/v2/schedulers/endpoint.py
blob: 4f3948a9b416ef1517446e76fc9154619655b811 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from opendc.models_old.scheduler import Scheduler
from opendc.util.rest import Response


def GET(request):
    """Get all available Schedulers."""

    # Get the Schedulers

    schedulers = Scheduler.query()

    # Return the Schedulers

    return Response(200, 'Successfully retrieved Schedulers.', [x.to_JSON() for x in schedulers])