On 5/3/18, 4:23 PM, "Martin Bjorklund" <m...@tail-f.com> wrote:
"Acee Lindem (acee)" <a...@cisco.com> wrote: > > > On 5/3/18, 2:40 PM, "Ladislav Lhotka" <lho...@nic.cz> wrote: > > On Thu, 2018-05-03 at 18:00 +0000, Acee Lindem (acee) wrote: > > Hi Lada, > > > > So you have a base identify of foo-type and subordinates of > > foo-type-1, foo- > > type-2, ... foo-type-9. You have a data leaf that type identityref > > foo-type > > but the actual instantiation is not one of the known foo-types. Should > > a foo- > > type-unknown be defined to return for this case or should one just > > return foo- > > type? > > Hmm, the actual instantiation looks like invalid data. If the leaf is > an > identityref with "foo-type" as its base, then permitted values are > exactly those > "foo-type-[1-9]". > > The whole reason to use identities rather than enums is to allow for > incremental extension. Yes. > With routing protocols, it is possible if not > likely to have an instantiation of a data leaf that is unknown. So, we > absolutely need to handle this case. But the instrumentation code that fills in the value (assuming it is config false) knows what it is, right? No - there are multiple devices in the network and they could have different level of support. For example, OSPF will accept OSPF Link State Advertisement (LSA) TLV types that it doesn't yet understand. The OSPF Link State Database can be retrieved via a YANG model. This seems like a pretty basic use case to me. Then it might be better to have the vendor define a proprietaty identity that is derived from foo-type, and let the instrumentation code use that identity. Or define the foo-type-unknown in the model since this is such a common case. Thanks, Acee /martin > Acee > > If the server supports a particular type, then I would expect it to > implement a > module where the identity corresponding to that type is defined. > > Lada > > > > > > > Thanks, > > Acee > > > > On 5/3/18, 1:49 PM, "netmod on behalf of Ladislav Lhotka" > > <netmod-bounces@iet > > f.org on behalf of lho...@nic.cz> wrote: > > > > Hi Acee, > > > > I am not sure what you mean by unknown identities. In general, the > > identity used > > as the base of an identityref (or in Xpath functions > > derived-from/derived- > > from- > > or-self) should be the most general identity that can match at the > > given > > place. > > > > Do you have any example illustrating your case? > > > > Lada > > > > > > On Thu, 2018-05-03 at 17:30 +0000, Acee Lindem (acee) wrote: > > > Let’s say one define a base identity with a hierarchy of > > > identifyref’s > > using > > > it. This will allow for augmentation in future models. Should one > > > also > > define > > > an identityref for the class of unknown identities? Or, should one > > simply > > > return the lowest parent in the hierarchy matching the value? Many > > times, this > > > would be the base identity. > > > > > > Thanks, > > > Acee > > > _______________________________________________ > > > netmod mailing list > > > netmod@ietf.org > > > https://www.ietf.org/mailman/listinfo/netmod > > -- > > Ladislav Lhotka > > Head, CZ.NIC Labs > > PGP Key ID: 0xB8F92B08A9F76C67 > > > > _______________________________________________ > > netmod mailing list > > netmod@ietf.org > > https://www.ietf.org/mailman/listinfo/netmod > > > > > -- > Ladislav Lhotka > Head, CZ.NIC Labs > PGP Key ID: 0xB8F92B08A9F76C67 > > > _______________________________________________ > netmod mailing list > netmod@ietf.org > https://www.ietf.org/mailman/listinfo/netmod _______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod