PATCH semantics do not meet RFC standards

Bug #1406403 reported by Amit Gandhi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Poppy
Fix Released
Critical
Obulapathi

Bug Description

Currently the PATCH semantics do not meet the standards for PATCH as used by Glance Images, and described below in the Openstack ML thread:

http://openstack.10931.n7.nabble.com/api-Usage-of-the-PATCH-verb-td60101.html

We want to conform to the following recommendations:
[1] https://tools.ietf.org/html/rfc5789
[2] http://tools.ietf.org/html/rfc6902
[3] http://williamdurand.fr/2014/02/14/please-do-not-patch-like-an-idiot/

2.1. A Simple PATCH Example

   PATCH /file.txt HTTP/1.1
   Host: www.example.com
   Content-Type: application/example
   If-Match: "e0023aa4e"
   Content-Length: 100

[
{ "op": "test", "path": "/a/b/c", "value": "foo" },
{ "op": "remove", "path": "/a/b/c" },
{ "op": "add", "path": "/a/b/c", "value": [ "foo", "bar" ] },
{ "op": "replace", "path": "/a/b/c", "value": 42 },
{ "op": "move", "from": "/a/b/c", "path": "/a/b/d" },
{ "op": "copy", "from": "/a/b/d", "path": "/a/b/e" }
]

This can be implemented using JSONPatch in python.

Obulapathi (obulpathi)
Changed in poppy:
assignee: nobody → Obulapathi (obulpathi)
Revision history for this message
Amit Gandhi (amit-gandhi) wrote :
Changed in poppy:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to poppy (master)

Reviewed: https://review.openstack.org/144993
Committed: https://git.openstack.org/cgit/stackforge/poppy/commit/?id=e2a630235c1f3f3812491957231d8ff43191d153
Submitter: Jenkins
Branch: master

commit e2a630235c1f3f3812491957231d8ff43191d153
Author: Obulpathi <email address hidden>
Date: Mon Jan 5 09:36:25 2015 -0500

    Implements PATCH using RFC semantics

    Change-Id: If77b5240317e484a6082e3a60036bd5fb2f6a458
    Closes-Bug: 1406403
    Closes-Bug: 1407287

Changed in poppy:
status: In Progress → Fix Committed
Changed in poppy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.