summaryrefslogtreecommitdiff
path: root/opendc/api/v2/specifications/storages/endpoint.py
blob: 20b9b7946a697a6207a71d48c895bb9c24b90629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from opendc.models_old.storage import Storage
from opendc.util.rest import Response


def GET(request):
    """Get a list of the specifications of all Storages."""

    # Get the Storages

    storages = Storage.query()

    # Return the Storages

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