From: Jürgen Schönwälder <[email protected]>
Sent: 31 August 2023 13:48
On Thu, Aug 31, 2023 at 12:02:59PM +0000, tom petch wrote:
>
> <tp>
> The issue I come across, saw it again today in nrp-yang, is
>
> container interfaces
> list interface
> key interface
> leaf interface
>
> which I find clunky but do not have a good alternative for.
>
Surprising is the leaf interface. I know, we have multiple encodings
today, but back then we had XML and this translates into
<interfaces>
<interface>
<interface>x</interface>
</interface>
<interface>
<interface>y</interface>
</interfaces>
<interfaces>
RFC 8343 has
container interfaces {
list interface {
key "name";
}
leaf name;
}
which in XML becomes
<interfaces>
<interface>
<namex</name>
</interface>
<interface>
<name>y</name>
</interfaces>
<interfaces>
and initially NETCONF only had XML encodings. in JSON you get
something like this:
{
"interfaces": {
"interface": [
{
"name": "x"
},
{
"name": "y"
}
]
}
}
Perhaps what people find clunky is a function of which encoding they
are using. Perhaps it helps if people read 'list interfaces {}' as
"list of interfaces".
<tp>
Yes!
But what I also see is something with a structure along the lines of
container links
list interface
leaf interface
and then my instinct is to say that the list should be plural and the leaf
singular which is fine when the container is another label. My instinct is
that container is a collection of the list and the list is a collection of the
leaf so I want a plural and a plural**2 but I do not have it in English.
So I agree with the original response, (but keep wishing I could do better)
Tom Petch
/js
--
Jürgen Schönwälder Constructor University Bremen gGmbH
Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany
Fax: +49 421 200 3103 <https://constructor.university/>
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod