From 05d846cfc376b5fbb3c8b91ee8060fab9f0ff112 Mon Sep 17 00:00:00 2001 From: Trevor McKay Date: Mon, 3 Feb 2014 12:08:35 -0500 Subject: [PATCH] Remove job_exec_data argument The job_exec_data field was added to handle diverging schemas for job executions. With the addition of "edp." config settings to handle job-type-specific data fields, this argument is no longer needed. Change-Id: I3ec277b6b407aa01784d4303bfa409dafdcbdeeb Partial-implements: blueprint edp-config-parameter-prefix --- savannaclient/api/job_executions.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/savannaclient/api/job_executions.py b/savannaclient/api/job_executions.py index 8fdf43a4..70f43dbc 100644 --- a/savannaclient/api/job_executions.py +++ b/savannaclient/api/job_executions.py @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy from savannaclient.api import base @@ -33,10 +32,12 @@ class JobExecutionsManager(base.ResourceManager): def delete(self, obj_id): self._delete('/job-executions/%s' % obj_id) - def create(self, job_id, cluster_id, input_id, output_id, configs, - job_exec_data={}): + def create(self, job_id, cluster_id, input_id, output_id, configs): url = "/jobs/%s/execute" % job_id - data = copy.copy(job_exec_data) + data = { + "cluster_id": cluster_id, + "job_configs": configs + } # Leave these out if they are null. For Java job types they # are not part of the schema @@ -46,11 +47,4 @@ class JobExecutionsManager(base.ResourceManager): if value is not None: data.update({key: value}) - # These are always required - data.update( - { - "cluster_id": cluster_id, - "job_configs": configs - }) - return self._create(url, data, 'job_execution')