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

Re: Second Example in section 7.2 of netconf-proto



McDonald, Ira wrote:
Hi Andy,

Email messages from two years ago aside, this is a pernicious
and foolish definition of 'replace' that collides with the
common semantics of 'replace' in all good quality software.

Silently 'replacing' something that isn't there is just plain
wrong.

Look in the archives for the threads about the create and delete operations.
Remember that NETCONF comes from Junoscript which comes from CLI.
NE CLI has established semantics for merge and replace.
NETCONF preserves those semantics.

For those applications which want pickier semantics
(i.e., create only if doesn't exist and delete only if exists)
we added the create and delete values to the operation attribute.

It is unfortunate that the term 'replace' in the router world doesn't
meet your expectations. In that world, replace the running config
with this other config means "make the new config happen regardless
of what was there before".  NETCONF applies that term to the
individual data elements as well as the entire config, which may be awkward.


Cheers,
- Ira

Andy


Ira McDonald (Musician / Software Architect)
Blue Roof Music / High North Inc
PO Box 221  Grand Marais, MI  49839
phone: +1-906-494-2434
email: imcdonald@sharplabs.com

-----Original Message-----
From: owner-netconf@ops.ietf.org [mailto:owner-netconf@ops.ietf.org]On
Behalf Of Andy Bierman
Sent: Thursday, March 09, 2006 9:40 AM
To: Martin Bjorklund
Cc: schishol@nortel.com; netconf@ops.ietf.org
Subject: 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/>


--
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/>




--
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/>