[APIv2] Convert update methods to use PATCH

all update operations should synchronize around using PATCH
instead of PUT for partial resource updates.

Partial-Implements: bp v2-api-experimental-impl

Change-Id: I079965a4efad24dd08b60a555ba3897cb18bd6df
This commit is contained in:
Marianne Linhares Monteiro 2017-03-27 20:09:52 -03:00
parent 04a454b824
commit cd890b86e3
4 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ def cluster_templates_get(cluster_template_id):
return u.to_wrapped_dict(api.get_cluster_template, cluster_template_id)
@rest.put('/cluster-templates/<cluster_template_id>')
@rest.patch('/cluster-templates/<cluster_template_id>')
@acl.enforce("data-processing:cluster-templates:modify")
@v.check_exists(api.get_cluster_template, 'cluster_template_id')
@v.validate(ct_schema.CLUSTER_TEMPLATE_UPDATE_SCHEMA,

View File

@ -56,7 +56,7 @@ def data_source_delete(data_source_id):
return u.render()
@rest.put('/data-sources/<data_source_id>')
@rest.patch('/data-sources/<data_source_id>')
@acl.enforce("data-processing:data-sources:modify")
@v.check_exists(api.get_data_source, 'data_source_id')
@v.validate(v_d_s_schema.DATA_SOURCE_UPDATE_SCHEMA)

View File

@ -68,7 +68,7 @@ def job_binary_data(job_binary_id):
return data
@rest.put('/job-binaries/<job_binary_id>')
@rest.patch('/job-binaries/<job_binary_id>')
@acl.enforce("data-processing:job-binaries:modify")
@v.validate(v_j_b_schema.JOB_BINARY_UPDATE_SCHEMA, v_j_b.check_job_binary)
def job_binary_update(job_binary_id, data):

View File

@ -51,7 +51,7 @@ def node_group_templates_get(node_group_template_id):
api.get_node_group_template, node_group_template_id)
@rest.put('/node-group-templates/<node_group_template_id>')
@rest.patch('/node-group-templates/<node_group_template_id>')
@acl.enforce("data-processing:node-group-templates:modify")
@v.check_exists(api.get_node_group_template, 'node_group_template_id')
@v.validate(ngt_schema.NODE_GROUP_TEMPLATE_UPDATE_SCHEMA,