[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Second Example in section 7.2 of netconf-proto



Martin Bjorklund wrote:
"Sharon Chisholm" <schishol@nortel.com> wrote:
hi

In section 7.2, the second example indicates it will add an interface,
but uses the operator of replace. The definition of replace does not
actually say that if the entry does not exist, it is created.

If it doesn't exist and you try to 'replace', it's an error. This is
not clearly defined in 7.2, but in the description of the error
'data-missing' it says:

   Tag:         data-missing
   Error-type:  application
   Severity:    error
   Error-info:  none
   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 which does not exist.


'create' creates an non-existing; it's an error if it exists.
'replace' replaces an existing; it's an error if it doesn't exist.
'merge' creates if it doesn't exist, and modifies if it exists.
'delete' deletes an existing; it's an error if it doesn't exist.

So the example text is a bit unclear.

This error text is wrong.
Replace does not cause an error if the data does not exist.
That was the reason we added create.
Merge and replace do not care about existing data.

Create on data that already exists is an error.

Delete on data that does not exist is an error.

Replace foo with nothing is not an error.

Merge foo with nothing is not an error.

Replace nothing with foo is not an error.

Merge nothing with foo is not an error.




/martin

Andy


--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>