"fengchong (C)" <[email protected]> writes: > Hi all, > > I notice an identity named 'interface-type' was defined in RFC > 7223 ( A YANG Data Model for Interface Management). This identity is > an abstract identity, vendors can define their real Identity based > it. But it's lack of a means to identify this identity > 'interface-type' is abstract, so 'interface-type' can be accepted as > valid value of the leaf based this identity.
In fact, the identity that's specified as "base" in an "identityref" type is NOT a valid value, so the base identity is abstract. This wasn't clear in the original RFC 6020 so it was clarified in this erratum: https://www.rfc-editor.org/errata_search.php?rfc=6020&eid=3470 Section 7.18.2 in draft-ietf-netmod-rfc6020bis-07 has this text: The derivation of identities has the following properties: o It is irreflexive, which means that an identity is not derived from itself. … In XPath expressions, it is possible to treat an identity as being abstract or not by using either derived-from() or derived-from-or-self() function. Lada > So I suggest add 'abstract' statement as 'identity's sub statement in > YANG1.1. This statement is optional, default value is false. > If abstract identity is defined, 'abstract true' MUST be defined, and this > identity's name cannot be accepted as valid value of the leaf > based this identity . > For example: > > identity interface-type { > > abstract true; > > description > > "Base identity from which specific interface types are > > derived."; > > } > _______________________________________________ > netmod mailing list > [email protected] > https://www.ietf.org/mailman/listinfo/netmod -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: E74E8C0C _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
