Subject: [Netconf] delete and remove operations

From: Andy Bierman <[email-masked]>
Date: Sun, 06 Jun 2010 09:59:38 -0700

Hi,

The WG needs to decide what to do about the delete operation.
It is too picky (or is it? -- see below)

CURRENT TEXT:

         create:  The configuration data identified by the element
            containing this attribute is added to the configuration if
            and only if the configuration data does not already exist in
            the configuration datastore.  If the configuration data
            exists, an <rpc-error> element is returned with an
            <error-tag> value of data-exists.

         delete:  The configuration data identified by the element
            containing this attribute is deleted in the configuration
            datastore identified by the target parameter.

Unlike the 'create' operation, there is no error specified for delete.
I can't find any text about a data-missing error related to the
delete operation.  The data-missing error-tag does not specify which
operations need to use this error-tag.

According to RFC 4741 (and 4741bis), there is no requirement whatsoever
to reject a delete operation if the data is missing.  This is simply
folklore, based on the intent of the WG (at that time).

>>> DECISION (applies to 4741bis servers only):

   ** Option A:  Clarify that the delete operation is required to
                 return a data-missing error-tag if the delete target
                 node does not exist.

   ** Option B:  Clarify that the delete operation is not required to
                 return a data-missing error-tag if the delete target
                 node does not exist.

   ** Option C:  Option A + add a new 'remove' operation:

       NEW:  (7.2, operation attribute).

       remove:  The configuration data identified by the element
                containing this attribute is removed from the configuration
                datastore identified by the target parameter, if it exists.

thanks,
Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Mon, 07 Jun 2010 22:17:57 +0200 (CEST)

Hi,

> operations need to use this error-tag.

Actually, it says:

   Description: Request could not be completed because the relevant
                data model content does not exist.  For example,
                a 'replace' or 'delete' operation was attempted on
                data that does not exist.

The 'replace' part is a bug.

> folklore, based on the intent of the WG (at that time).

Hmm.  Interesting.  However, this is more strict in the YANG document:

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

I wish we found this out earlier :(

>                  return a data-missing error-tag if the delete target

I think this is what current servers do.

>    ** Option C:  Option A + add a new 'remove' operation:

Yes!

>                 datastore identified by the target parameter, if it exists.

/martin

---

From: Andy Bierman <[email-masked]>
Date: Mon, 07 Jun 2010 13:34:07 -0700

> The 'replace' part is a bug.

IMO, the 'For example' part makes it non-normative as well.
The 'delete' text above needs to call out the error similar to
the 'create' text.

> I wish we found this out earlier :(

oops!
It should have error details like what happens when 'insert'
is within the context of a delete?  Is that an error or a NO-OP?

> I think this is what current servers do.

yes

>>    ** Option C:  Option A + add a new 'remove' operation:

+1

This is the most backward-compatible.

Andy

---

From: Phil Shafer <[email-masked]>
Date: Mon, 7 Jun 2010 23:00:24 -0400

>This is the most backward-compatible.

This will be great in adverts:

    NETCONF 1.1:  Now with two ways to delete stuff!

Thanks,
 Phil

---

From: Andy Bierman <[email-masked]>
Date: Mon, 07 Jun 2010 22:09:16 -0700

>     NETCONF 1.1:  Now with two ways to delete stuff!

At least 2 ways to commit, discard changes, save changes
to NV-store, and 3 ways to define a default.  So what's
your point?  Create has a corresponding 'merge',
but 'delete' has no corresponding operation that works
even if defaults are ignored in the operation.

Andy