Subject: [Netconf] YANG Push: datastore-contents

From: Andy Bierman <[email-masked]>
Date: Wed, 24 May 2017 16:23:43 -0700

Hi,

The "anydata" definitions of <datastore-contents> in the
push-update and push-change-update are under-specified.
I do not see how any interoperability can be achived using
an opaque blob for the updates.

This is demonstrated in the examples on page 9 - 10.

             <datastore-contents>
                <foo>
                   <bar>some_string</bar>
                </foo>
             </datastore-contents>

             <datastore-changes>
               <alpha xmlns="http://example.com/sample-data/1.0" >
                 <beta>1500</beta>
               </alpha>
             </datastore-changes>

             <datastore-changes>
               {
                "ietf-yang-patch:yang-patch": {
                "patch-id": [
                  null
                ],
                "edit": [
                  {
                      "edit-id": "edit1",
                      "operation": "merge",
                      "target": "/alpha/beta",
                      "value": {
                          "beta": 1500
                      }
                  }
                ]
               }
             }
             </datastore-changes>

The JSON encoding is completely unacceptable.
IMO JSON encoding should be removed from this draft.
Encoding the contents of 1 specific <anydata>
as JSON is a real hack.

Note also that there is no specification to encode
a single <yang-patch> element within the <datastore-changes>
anydata container.  The same anydata node is used for a subtree
and a YANG patch.

Andy