summaryrefslogtreecommitdiff
path: root/opendc/api/v2/specifications/storages/endpoint.py
blob: 28f331771f52db711b7312e1f22ade0b6f834f79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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]
    )