Subject: Re: [netmod] empty leaf as key

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 11 Sep 2008 21:46:30 +0200

Phil Shafer píše v Čt 11. 09. 2008 v 15:06 -0400:
> Ladislav Lhotka writes:
> >I cannot imagine how a poor user could ever come up with the idea of
> >using empty type for a key leaf. Why could he assume that it could be
> >useful in any way? It can be only because it's forbidden in the draft
> >that he might be tempted to test it. Otherwise, the empty key can IMO
> >only appear in test suites and urban legends.
> 
> If it only appears in test suites and urban legends, why not forbid
> it?  If no one could assume it to be useful, why have it?  If it's
> not important, why burn time on it?

IMO the situation is exactly reverse: Why burn time on specifying (and
explaining) exceptions that are not needed and just aimed at helping the
modeller to avoid something that he would never intend to do in the
first place. And if he does, it is completely benign - the data model
will just allow no more than one list item, as the modeller must have
expected.

Lada
 
> Thanks,
>  Phil
-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C

_______________________________________________
netmod mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/netmod

---

From: Andy Bierman <[email-masked]>
Date: Thu, 11 Sep 2008 13:19:44 -0700

> will just allow no more than one list item, as the modeller must have

It doesn't work that way in a standard.
If the standard says all types are valid as keys,
then all implementations will be expected to support
all types as keys.

An empty or keyref is not allowed in a union, for various reasons.
A key must be present on config list, but is optional on
a non-config list. Key leafs are encoded first in XML,
regardless of their position in the YANG list definition.

YANG has all kinds of rules intended to simplify implementations
and maximize user features.

IMO we are moving in the wrong direction when we start
maximizing implementation complexity with no increase
in user features.  It is not a burden on implementers
to read the details.  It is not a burden on modelers
to use 'type string;' instead of 'type empty;' for key
placeholders (whatever feature that is).

>>  Phil

Andy