diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2015-01-19 15:59:48 +0100 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2015-01-19 15:59:48 +0100 |
commit | 71bfbd5e2506b15c4c8c31dd2f267a35c00a2760 (patch) | |
tree | bcabb77c8bfa8b777d7fd07a2e2ebcb330da7278 | |
parent | b14a3b7c70d30db14457b98cfe8fddb00e7482bd (diff) |
Remove email trigger from job api.
Change-Id: Ib962ccc5415841ce8f9ce42eb2bb64e4170ab0be
-rw-r--r-- | app/handlers/common.py | 7 | ||||
-rw-r--r-- | app/handlers/job.py | 11 | ||||
-rw-r--r-- | doc/collection-job.rst | 13 | ||||
-rw-r--r-- | doc/schema-job.rst | 22 |
4 files changed, 4 insertions, 49 deletions
diff --git a/app/handlers/common.py b/app/handlers/common.py index 691ce27..eea4fbf 100644 --- a/app/handlers/common.py +++ b/app/handlers/common.py @@ -236,13 +236,8 @@ SUBSCRIPTION_VALID_KEYS = { JOB_VALID_KEYS = { 'POST': [ - models.BOOT_REPORT_SEND_TO_KEY, - models.BUILD_REPORT_SEND_TO_KEY, models.JOB_KEY, - models.KERNEL_KEY, - models.REPORT_SEND_TO_KEY, - models.SEND_BOOT_REPORT_KEY, - models.SEND_BUILD_REPORT_KEY + models.KERNEL_KEY ], 'GET': [ models.CREATED_KEY, diff --git a/app/handlers/job.py b/app/handlers/job.py index b773653..b772f8f 100644 --- a/app/handlers/job.py +++ b/app/handlers/job.py @@ -42,15 +42,8 @@ class JobHandler(hbase.BaseHandler): response.reason = "Request accepted and being imported" response.result = None - json_obj = kwargs["json_obj"] - db_options = kwargs["db_options"] - mail_options = self.settings["mailoptions"] - countdown = self.settings["senddelay"] - - taskq.import_job.apply_async([json_obj, db_options]) - # TODO: remove email scheduling once deployed and job updated. - taskq.schedule_boot_report.apply_async( - [json_obj, db_options, mail_options, countdown]) + taskq.import_job.apply_async( + [kwargs["json_obj"], kwargs["db_options"]]) return response diff --git a/doc/collection-job.rst b/doc/collection-job.rst index 4a46b7d..dc208f3 100644 --- a/doc/collection-job.rst +++ b/doc/collection-job.rst @@ -148,11 +148,6 @@ POST :reqjson string job: The name of the job. :reqjson string kernel: The name of the kernel. - :reqjson boolean boot_report: If the boot report should be created and sent. Default to 0 (false). - :reqjson boolean build_report: If the build report should be created and sent. Default to 0 (false). - :reqjson send_to: A string or an array of strings of email addresses where to send the reports. - :reqjson boot_send_to: A string or an array of strings of email addresses where to send only the boot report. - :reqjson build_send_to: A string or an array of strings of email addresses where to send only the build report. :reqheader Authorization: The token necessary to authorize the request. :reqheader Content-Type: Content type of the transmitted data, must be ``application/json``. @@ -166,10 +161,6 @@ POST :status 415: Wrong content type. :status 422: No real JSON data provided. - .. warning:: - - Triggering email report through the job resources will be depracated. - **Example Requests** .. sourcecode:: http @@ -182,9 +173,7 @@ POST { "job": "next", - "kernel": "next-20140801", - "boot_report": 1, - "send_to": ["list@example.net"] + "kernel": "next-20140801" } DELETE diff --git a/doc/schema-job.rst b/doc/schema-job.rst index 64135f9..a8843db 100644 --- a/doc/schema-job.rst +++ b/doc/schema-job.rst @@ -107,28 +107,6 @@ data sent to the server. "kernel": { "type": "string", "description": "The kernel associated with this object" - }, - "boot_report": { - "type": "boolean", - "description": "If the boot report should be created and sent", - "default": 0 - }, - "build_report": { - "type": "boolean", - "description": "If the build report should be created and sent", - "default": 0 - }, - "boot_send_to": { - "type": ["array", "string"], - "description": "A single email address or a list of addresses where to send the boot report" - }, - "build_send_to": { - "type": ["array", "string"], - "description": "A single email address or a list of addresses where to send the build report" - }, - "send_to": { - "type": ["array", "string"], - "description": "A single email address or a list of addresses where to send the reports" } }, "required": ["job", "kernel"] |