1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 Disable_update_jobs_api_method_list = ConfigLoader.to_OrderedOptions({
7 "pipeline_instances.create"=>{},
8 "pipeline_templates.create"=>{},
10 "pipeline_instances.update"=>{},
11 "pipeline_templates.update"=>{},
12 "job_tasks.create"=>{},
13 "job_tasks.update"=>{}
16 Disable_jobs_api_method_list = ConfigLoader.to_OrderedOptions({
18 "pipeline_instances.create"=>{},
19 "pipeline_templates.create"=>{},
21 "pipeline_instances.get"=>{},
22 "pipeline_templates.get"=>{},
24 "pipeline_instances.list"=>{},
25 "pipeline_templates.list"=>{},
27 "pipeline_instances.index"=>{},
28 "pipeline_templates.index"=>{},
30 "pipeline_instances.update"=>{},
31 "pipeline_templates.update"=>{},
33 "jobs.queue_size"=>{},
34 "job_tasks.create"=>{},
37 "job_tasks.index"=>{},
38 "job_tasks.update"=>{},
40 "pipeline_instances.show"=>{},
41 "pipeline_templates.show"=>{},
42 "job_tasks.show"=>{}})
44 def check_enable_legacy_jobs_api
45 # Create/update is permanently disabled (legacy functionality has been removed)
46 Rails.configuration.API.DisabledAPIs.merge! Disable_update_jobs_api_method_list
48 if Rails.configuration.Containers.JobsAPI.Enable == "false" ||
49 (Rails.configuration.Containers.JobsAPI.Enable == "auto" &&
51 Rails.configuration.API.DisabledAPIs.merge! Disable_jobs_api_method_list