Subject: Re: [netmod] general permission on metadata

From: Randy Presuhn <[email-masked]>
Date: Wed, 4 Nov 2015 09:53:14 -0800 (GMT-08:00)

Hi -

>From: Juergen Schoenwaelder <[email-masked]>
>Sent: Nov 3, 2015 9:50 PM
>To: Ladislav Lhotka <[email-masked]>
>Cc: NETMOD WG <[email-masked]>
>Subject: Re: [netmod] general permission on metadata
>
>Lada,
>
>I do not think this belongs into the YANG specification. NC has been
>designed to support arbitrary XML so any NC compliant implementation
>will not screw up on XML attributes. The JSON encoding could say that
>names with @ may be used for special purposes and must be supported
>and that implementations must be expected to handle full I-JSON and
>not the subset used by YANG.
>
>I guess I am not even sure yet that there is a problem that requires
>fixing. But if it requires fixing, than its an encoding or protocol
>issue, not a data modeling language issue.
...

I disagree.  A data modeling framework by its very nature makes
demands on whatever protocols are used to encode the information.
When those demands are less than obvious, it's best to be explicit
about them.  We've already seen the pain with JSON, where an
encoding didn't quite live up to some of the modeling framework's
assumptions about encodings.

Consequently, I believe that *if* this requirement is agreed, it
should then be explicit, rather than assumed as a bit of folklore,
particularly if there is any expectation that other encodings will
be developed in the future.  Consider, for example, what it would
take to meet this requirement if some recidivist were to use BER
to carry the information.  Doable, but not pretty and certainly not
the "obvious" grammar. :-)

Randy

---

From: Andy Bierman <[email-masked]>
Date: Wed, 4 Nov 2015 10:19:36 -0800

> assumptions about encodings.

Agreed.  There are a handful of XML attributes a NETCONF server
must support.  Our server will return an 'unknown-attribute' error
for XML attributes it does not understand.  We have a YANG extension
called 'metadata' that allows attributes to be defined, but discourage
its use for management data.

http://www.netconfcentral.org/modules/yuma-ncx/2013-09-23#metadata.518

We plan to support the standard YANG extension for this purpose.

I think the annotation was a real statement in YANG 1.1 then it
would solve all problems.  A YANG 1.1 server MUST accept and support
any attribute defined in a module it claims to implement.
The annotation could have an if-feature-stmt if it is optional.

> the "obvious" grammar. :-)
The CoMI work in the CORE WG may need CBOR encoding of
attributes.  I hope it requires way less buffering and saved state
than the JSON version.

> Randy
Andy

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

---

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 05 Nov 2015 15:45:57 +0900

> The annotation could have an if-feature-stmt if it is optional.

Well, yes, most of the conformance issues are due to the fact that
annotations are defined via an extension. But I'm afraid it is now too
late to add it to YANG 1.1, this could mean another significant delay.

> attributes.  I hope it requires way less buffering and saved state

But this is true for JSON in general and not because we have chosen a
bad method for attribute encoding, right?

Lada

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