Subject: [netmod] possible YANG 1.1 issue: node ordering

From: Andy Bierman <[email-masked]>
Date: Wed, 25 Jun 2014 08:54:41 -0700

Hi,

I am wondering if there is any interoperability issues with the lack
of data node ordering for top-level and augment nodes.

RFC 6020, sec. 5.1.2, para 2:

   NETCONF is capable of carrying any XML content as the payload in the
   <config> and <data> elements.  The top-level nodes of YANG modules
   are encoded as child elements, in any order, within these elements.
   This encapsulation guarantees that the corresponding NETCONF messages
   are always well-formed XML documents.

sec. 7.15.2

   When a node is augmented, the augmenting child nodes are encoded as
   subelements to the augmented node, in any order.

Note the "in any order" in both sections.
Of course, system-ordered leaf-list and list nodes can be in any order as
well.
The text in 7.15.2 seems to say the augmenting nodes can be mixed
in with the augmented nodes, even though all examples show them
added at the end.

Do tools that compare configurations or server implementations consuming
a configuration care about the lack of standard canonical ordering?
I don't know if any normative changes are needed in YANG 1.1, but
there should (at least) be some warning against attempting to compare
XML instance documents (even from the same server seconds apart).

Andy

---

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 26 Jun 2014 10:41:26 +0200

> in with the augmented nodes, even though all examples show them

Yes, they can be mixed in.

> XML instance documents (even from the same server seconds apart).

I think it is quite clear from the text that order of siblings is not significant (except few special cases), so any comparison should be done modulo reordering. For JSON it goes without saying.

Lada

>
>
> Andy
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C

---

From: Andy Bierman <[email-masked]>
Date: Thu, 26 Jun 2014 02:46:40 -0700

> Yes, they can be mixed in.

The examples should show them mixed in.

> I think it is quite clear from the text that order of siblings is not
> significant (except few special cases), so any comparison should be done
> modulo reordering. For JSON it goes without saying.
>

OK - just as clear as 6 out of 36822 words can be.
JSON is irrelevant in NETCONF.
I wonder how many tools really handle YANG compare correctly vs. tools that
rely
on a canonical ordering from a given server.

Andy