summaryrefslogtreecommitdiff
path: root/opendc/api/v2/specifications/storages/endpoint.py
blob: 945b89b274ca6260ff46fbd41356f434c8882937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from opendc.models.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])