Subject: [Netconf] Questions regarding <edit-config> with default-operation "none"

From: "Garke Thilo" <[email-masked]>
Date: Tue, 6 Oct 2009 16:12:50 +0200

Hi *

I'm new to NETCONF and have two questions regarding <edit-config> in case
<default-operation> is set to "none".

1.) Does any operation given in a parent element apply to all its children
elements?

2.) If so, are nested operations valid such that the inner operation
overrides the outer one?

3.) Would this imply that any operations inside of a merge operation are not
valid?

Thanks in advance for any helpful reply.

Best regards,

Thilo Garke
Development Engineer
MS/E (LTE OAM)
Lorenzstraße 10
Building 5/2/67
70430 Stuttgart
Email: [email-masked]
Phone: ++49 (0)711 821 30334

Alcatel-Lucent Deutschland AG
Sitz der Gesellschaft: Stuttgart · Amtsgericht Stuttgart HRB 4026
Vorsitzender des Aufsichtsrates: Michael Oppenhoff
Vorstand:  Alf Henryk Wulf (Vorsitzender) · Hans-Jörg Daub · Dr. 
Rainer Fechner · Peter Kury

---

From: Andy Bierman <[email-masked]>
Date: Tue, 06 Oct 2009 08:42:47 -0700

Garke Thilo wrote:
> Hi *
> 
> I'm new to NETCONF and have two questions regarding <edit-config> in
> case <default-operation> is set to "none".
> 
> 1.) Does any operation given in a parent element apply to all its
> children elements?
> 

yes

> 2.) If so, are nested operations valid such that the inner operation

Yes -- the operation changes.
Some combinations do not make sense,
and must be flagged as errors
e.g., create inside delete, delete inside create.

Some combinations may make sense, depending on
your interpretation (the NETCONF RFC is silent
on this entire issue).  E.g., merge or replace
inside delete.

> 3.) Would this imply that any operations inside of a merge operation are
> not valid?

no.

Any operation can work inside merge, providing that
the data model requirements are met (for create or delete).

IMO, the server needs to handle an arbitrary mix of nc:operation
attributes.  I've heard that some implementations do
not handle nc:operation very well at all (like
allowing just 1 instance of the nc:operation attribute
in the entire <config> element.)

The yang:insert operation complicates matters a bit,
but you may not be implementing YANG, and don't need to
worry about it :-)

> Thanks in advance for any helpful reply.

Andy