diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2014-05-16 13:41:17 +0200 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2014-05-16 13:41:17 +0200 |
commit | 2a04b705b57d488de26e7fb48f11bb00835efbd5 (patch) | |
tree | 994e2e071e0b7b570003fa3ab8f630beb8c0ced4 /app/handlers/boot.py | |
parent | bbcd67f9dc26930c197c04e318d74e36b2fc9ead (diff) |
Use more predefined keys.
Diffstat (limited to 'app/handlers/boot.py')
-rw-r--r-- | app/handlers/boot.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/app/handlers/boot.py b/app/handlers/boot.py index 7c8fc1e..f4c1152 100644 --- a/app/handlers/boot.py +++ b/app/handlers/boot.py @@ -16,7 +16,16 @@ """The RequestHandler for /boot URLs.""" from handlers.base import BaseHandler - +from models import ( + CREATED_KEY, + DEFCONFIG_KEY, + JOB_ID_KEY, + JOB_KEY, + KERNEL_KEY, + STATUS_KEY, + TIME_KEY, + WARNINGS_KEY, +) from models.boot import BOOT_COLLECTION from taskqueue.tasks import import_boot @@ -33,10 +42,10 @@ class BootHandler(BaseHandler): def _valid_keys(self, method): valid_keys = { - 'POST': ['job', 'kernel'], + 'POST': [JOB_KEY, KERNEL_KEY], 'GET': [ - 'job', 'kernel', 'defconfig', 'time', 'status', 'created_on', - 'warnings', 'job_id', 'fail_log', + CREATED_KEY, WARNINGS_KEY, JOB_ID_KEY, + JOB_KEY, KERNEL_KEY, DEFCONFIG_KEY, TIME_KEY, STATUS_KEY, ] } |