Allow for merging with json-patch

Bug #1200476 reported by Joshua Harlow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Joshua Harlow

Bug Description

It would be pretty nice to allow for merging using the json patch specification.

https://tools.ietf.org/html/rfc6902 (https://tools.ietf.org/html/rfc6902#page-4)

Said specification provides a common way to add/remove/delete when patching:

'''
   This format is also potentially useful in other cases in which it is
   necessary to make partial updates to a JSON document or to a data
   structure that has similar constraints (i.e., they can be serialized
   as an object or an array using the JSON grammar).
'''

Since cloud-inits cloud-config is yaml (but could just as easily be json), the above seems pretty applicable to the type of updates (merging) that cloud-init performs. To start it might be neat to allow for a new mime-type that #json-patch where these types of merging operations happen.

https://pypi.python.org/pypi/jsonpatch/0.6 exists and seems like its being actively developed and it will likely make applying the specification much easier to do.

Related branches

Joshua Harlow (harlowja)
Changed in cloud-init:
assignee: nobody → Joshua Harlow (harlowja)
Revision history for this message
Scott Moser (smoser) wrote :

This was fixed in trunk at revno 842.

Changed in cloud-init:
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote :

fixed in 0.7.3

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
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.