Hi Robert,

> On 13 Oct 2015, at 17:26, Robert Varga <[email protected]> wrote:
> 
> On 10/07/2015 07:37 PM, Kent Watsen wrote:
>> 
>> This is a notice to start a NETMOD WG last call for the document:
>> 
>> Defining and Using Metadata with YANG
>> http://tools.ietf.org/html/draft-ietf-netmod-yang-metadata-02
>> 
> 
> I have read the document, and coming in without the previous discussions, 
> md:annotation instances feel like aspects (from aspect-oriented programming) 
> being attached to pre-defined models to address a cross-cutting concern. 
> Unfortunately it seems it lacks an equivalent of pointcut specification, e.g. 
> a machine-readable definition where/when a particular annotation is valid.
> 
> This makes annotations disconnected from the YANG metamodel, which is not 
> desirable for systems strictly based on the metamodel, as each instance of an 
> annotation will require hand-written code.
> 
> My question is whether it would make sense to define some sort of (optional) 
> pointcut specification to be carried within the md:annotation statement (such 
> as an explicit list of data nodes, or a 'when' statement or similar)?

The easiest way would be to define "annotation" as a first-class data node. 
However:

- YANG was deliberately designed to avoid using XML attributes in the same way 
as XML schema languages,

- IMO this can't be done through an extension.

With must or when it would be difficult to determine the context node.

Lada

> 
> That would allow us to bind some/most md:annotation instances automagically 
> to the metamodel, reducing the need to hand-code their semantics.
> 
> Thanks,
> Robert
> _______________________________________________
> 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

Reply via email to