Hi Rob,

Rob Shakir <r...@rob.sh> writes:

> On the first issue here, it strikes me that this is what ietf-routing
> is doing. It is placing a set of models under some root node which
> happens to be /routing. If we don’t need /device, then why do we need
> /routing?

This one is actually easy to explain, exactly as the top-level container
"interfaces" in ietf-interfaces: it is a courtesy to XML encoding.

In both cases, a list is just below the top-level container. If the
top-level container wasn't there we could see interleaved entries of
both lists in XML encoding, for example

<routing-instance>...</routing-instance>
<interface>...</interface>
<routing-instance>...</routing-instance>
<interface>...</interface>
<interface>...</interface>

This was considered problematic, so the top-level containers were added
to avoid this.

Note that this is not an issue in JSON encoding where all entries of a
list are neatly organised in an array:

"interface": [{...}, {...}, {...}]
"routing-instance": [{...}, {...}]

Cheers, Lada

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

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to