Subject: Re: [netmod] YANG 1.1 issue: data-specific attributes

From: Ladislav Lhotka <[email-masked]>
Date: Fri, 02 May 2014 10:35:49 +0200

Martin Bjorklund <[email-masked]> writes:

> Andy Bierman <[email-masked]> wrote:
>> On Wed, Apr 30, 2014 at 1:00 AM, Martin Bjorklund <[email-masked]> wrote:
>> 
>> > Ladislav Lhotka <[email-masked]> wrote:
>> > > >> Practically speaking, I can see the need for global attributes but
>> > not for
>> > > >> local ones. What are the use cases that cannot be modelled in YANG
>> > now,
>> > > >> e.g. via changing a leaf to a container?
>> > > >>
>> > > >>
>> > > > The global attribute is not that useful.
>> > > > Associating specific metadata with specific data nodes is more useful.
>> > >
>> > > Metadata associated with specific nodes can be modelled as standard YANG
>> > data
>> > > nodes, perhaps using a grouping.
>> >
>> > But this it what we want to avoid...
>> >
>> > > My serious concern is that people will start using attributes as normal
>> > data
>> > > nodes in YANG
>> >
>> > +1
>> >
>> >
>> I did not mention that these attributes are read-only, so it would be
>> impossible
>> to replace config leafs with attributes.  This abuse you are concerned about
>> is not possible.
>
> This seems like an arbitrary limitation.  The "inactive" attribute is
> an example of a read/write (global) attribute.  Why would data-node
> specific attributes be read only?
>
> For both global and local attributes, it must be possible to define
> their read/write properties.

Yes, what's probably more important than how the (meta)data are represented and serialised is to discuss semantics, i.e. how the protocols are supposed to deal with the attributes compared to normal data nodes.

Lada

> /martin

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C