diff options
-rw-r--r-- | releasenotes/notes/job-job-template-apiv2-change-93ffbf2b1360cddc.yaml | 4 | ||||
-rw-r--r-- | saharaclient/api/v2/job_templates.py | 4 | ||||
-rw-r--r-- | saharaclient/api/v2/jobs.py | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/releasenotes/notes/job-job-template-apiv2-change-93ffbf2b1360cddc.yaml b/releasenotes/notes/job-job-template-apiv2-change-93ffbf2b1360cddc.yaml new file mode 100644 index 0000000..76d89ca --- /dev/null +++ b/releasenotes/notes/job-job-template-apiv2-change-93ffbf2b1360cddc.yaml @@ -0,0 +1,4 @@ +other: + - When using APIv2, the viewing (GET) of specific job templates and jobs and + the creation (POST) of job templates and jobs now only supports the API + behavior of Sahara 9.0.0.0b3 or later. diff --git a/saharaclient/api/v2/job_templates.py b/saharaclient/api/v2/job_templates.py index 0236829..3fb2be0 100644 --- a/saharaclient/api/v2/job_templates.py +++ b/saharaclient/api/v2/job_templates.py @@ -36,7 +36,7 @@ class JobTemplatesManagerV2(base.ResourceManager): libs=libs, interface=interface, is_public=is_public, is_protected=is_protected) - return self._create('/%s' % 'job-templates', data, 'job') + return self._create('/%s' % 'job-templates', data, 'job_template') def list(self, search_opts=None, limit=None, marker=None, sort_by=None, reverse=None): @@ -49,7 +49,7 @@ class JobTemplatesManagerV2(base.ResourceManager): def get(self, job_id): """Get information about a Job Template.""" - return self._get('/%s/%s' % ('job-templates', job_id), 'job') + return self._get('/%s/%s' % ('job-templates', job_id), 'job_template') def get_configs(self, job_type): """Get config hints for a specified Job Template type.""" diff --git a/saharaclient/api/v2/jobs.py b/saharaclient/api/v2/jobs.py index fa50894..63ed701 100644 --- a/saharaclient/api/v2/jobs.py +++ b/saharaclient/api/v2/jobs.py @@ -34,7 +34,7 @@ class JobsManagerV2(base.ResourceManager): def get(self, obj_id): """Get information about a Job.""" - return self._get('/jobs/%s' % obj_id, 'job_execution') + return self._get('/jobs/%s' % obj_id, 'job') def delete(self, obj_id): """Delete a Job.""" @@ -54,7 +54,7 @@ class JobsManagerV2(base.ResourceManager): job_configs=configs, interface=interface, is_public=is_public, is_protected=is_protected) - return self._create('/jobs', data, 'job_execution') + return self._create('/jobs', data, 'job') def refresh_status(self, obj_id): """Refresh Job Status.""" |