Subject: [netmod] YANG WGLC: edit-config clarifications

From: Martin Bjorklund <[email-masked]>
Date: Tue, 22 Dec 2009 08:24:06 +0100 (CET)

Hi,

Triggered by Alan's email on the NETCONF list,
http://www.ietf.org/mail-archive/web/netconf/current/msg05372.html, I
checked the edit-config descriptions in the YANG document, and found
some inconsistencies.  I propose the following editorial changes +
explicit mentioning of the error code returned:

----------------------------------------

Section 7.5.8, edit-config for a container

NEW: (add to the end of the section)

    When a NETCONF server processes an <edit-config> request, the
    elements of procedure for the container node are:
 
       If the operation is "merge" or "replace", the node is created if
       it does not exist.
 
       If the operation is "create" the node is created if it does not
       exist.  If the node already exists, a "data-exists" error is
       returned.
 
       If the operation is "delete" the node is deleted if it exists.  If
       the node does not exist, a "data-missing" error is returned.
 
----------------------------------------

Section 7.6.7, edit-config for leaf:

OLD:

      If the operation is "merge", the node is created if it does not
      exist, and its value is set to the value found in the XML RPC
      data.

      If the operation is "replace", the node is created if it does not
      exist, and its value is set to the value found in the XML RPC
      data.

      If the operation is "create" the node is created if it does not
      exist.

      If the operation is "delete" the node is deleted if it exists.

NEW:

      If the operation is "merge" or "replace", the node is created if
      it does not exist, and its value is set to the value found in the
      XML RPC data.

      If the operation is "create" the node is created if it does not
      exist.  If the node already exists, a "data-exists" error is
      returned.

      If the operation is "delete" the node is deleted if it exists.  If
      the node does not exist, a "data-missing" error is returned.

----------------------------------------

Section 7.7.7, edit-config for leaf-list:

OLD:

      If the operation is "merge" or "replace" the leaf-list entry is
      created if it does not exist.

      If the operation is "create" the leaf-list entry is created if it
      does not exist.

      If the operation is "delete" the entry is deleted from the leaf-
      list if it exists.

NEW:

      If the operation is "merge" or "replace" the leaf-list entry is
      created if it does not exist.

      If the operation is "create" the leaf-list entry is created if it
      does not exist.  If the leaf-list entry already exists, a
      "data-exists" error is returned.

      If the operation is "delete" the entry is deleted from the leaf-
      list if it exists.  If the leaf-list entry does not exist, a
      "data-missing" error is returned.

----------------------------------------

Section 7.8.6, edit-config for lists:

NEW: (add to the end of the section)

    When a NETCONF server processes an <edit-config> request, the
    elements of procedure for a list node are:
 
       If the operation is "merge" or "replace" the list entry is created
       if it does not exist.
 
       If the operation is "create" the list entry is created if it does
       not exist.  If the list entry already exists, a "data-exists"
       error is returned.
 
       If the operation is "delete" the entry is deleted from the list if
       it exists.  If the list entry does not exist, a "data-missing"
       error is returned.

----------------------------------------

Section 7.9.5., paragraph 4:

OLD:

    Since only one of the choice's cases can be valid at any time, the
    creation of a node from one case implicitly deletes all nodes from
    all other cases.  If an <edit-config> operation creates a node, the
    NETCONF server will delete any existing nodes that are defined in
    other cases inside the choice.

NEW:

    Since only one of the choice's cases can be valid at any time, the
    creation of a node from one case implicitly deletes all nodes from
    all other cases.  If an <edit-config> operation creates a node from a
    case, the NETCONF server will delete any existing nodes that are
    defined in other cases inside the choice.

----------------------------------------

Section 7.10.3, edit-config for anyxml:

OLD:

      If the operation is "merge", the node is created if it does not
      exist, and its value is set to the XML content of the anyxml node
      found in the XML RPC data.

      If the operation is "replace", the node is created if it does not
      exist, and its value is set to the XML content of the anyxml node
      found in the XML RPC data.

      If the operation is "create" the node is created if it does not
      exist, and its value is set to the XML content of the anyxml node
      found in the XML RPC data.

      If the operation is "delete" the node is deleted if it exists.

NEW:

      If the operation is "merge" or "replace", the node is created if
      it does not exist, and its value is set to the XML content of the
      anyxml node found in the XML RPC data.

      If the operation is "create" the node is created if it does not
      exist, and its value is set to the XML content of the anyxml node
      found in the XML RPC data.  If the node already exists, a
      "data-exists" error is returned.

      If the operation is "delete" the node is deleted if it exists.  If
      the node does not exist, a "data-missing" error is returned.

/martin