Plus, "empty keys" were aready allowed in YANG 1.
module empty-key {
namespace "org:example:empty-key";
prefix "ek";
container stuff {
list item {
key "first second";
leaf first {
type string {
length 0;
}
}
leaf second {
type string {
pattern '.{0}';
}
}
}
}
}
Therefore this change removed a redundant (perhaps even broken) rule.
https://www.ietf.org/mail-archive/web/netmod/current/msg16763.html
Jernej
From: netmod [mailto:[email protected]] On Behalf Of Alex Campbell
Sent: Tuesday, February 14, 2017 9:59 PM
To: Martin Ciglan -X (mciglan - PANTHEON TECHNOLOGIES at Cisco)
<[email protected]>
Cc: Igor Foltin -X (ifoltin - PANTHEON TECHNOLOGIES at Cisco)
<[email protected]>; [email protected]
Subject: Re: [netmod] Yang 1.1 change: Allow type "empty" in a key.
Hi,
It means exactly what the summary says. In YANG 1.0 (RFC 6020) we have:
A leaf that is part of the key can be of any built-in or derived
type, except it MUST NOT be the built-in type "empty".
and in YANG 1.1 (RFC 7950) we have:
A leaf that is part of the key can be of any built-in or
derived type.
In YANG 1.1, leaves of type "empty" are not disallowed from being keys.
Note that since leaves of type "empty" only convey information through their
presence or absence, and since
key leaves must always be present, key leaves of type "empty" convey no useful
information.
Alex
_____
From: netmod <[email protected] <mailto:[email protected]> > on
behalf of Martin Ciglan -X (mciglan - PANTHEON TECHNOLOGIES at Cisco)
<[email protected] <mailto:[email protected]> >
Sent: Wednesday, 15 February 2017 2:48 a.m.
To: [email protected] <mailto:[email protected]>
Cc: Igor Foltin -X (ifoltin - PANTHEON TECHNOLOGIES at Cisco)
Subject: [netmod] Yang 1.1 change: Allow type "empty" in a key.
Hi all
Yang 1.1 change: Allow type "empty" in a key.
What is the meaning of this change? We're interested from implementation point
of view.
Thanks
Martin
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod