blob: b2ec36f43e60b0e05bc71414121491c9890a4b7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
from opendc.models_old.cpu import CPU
from opendc.util.rest import Response
def GET(request):
"""Get a list of the specifications of all CPUs."""
# Get the CPUs
cpus = CPU.query()
# Return the CPUs
return Response(200, 'Successfully retrieved CPUs.', [x.to_JSON() for x in cpus])
|