On 10/18/2016 09:06 AM, Martin Bjorklund wrote:
> Andy Bierman <[email protected]> wrote:
>> On Mon, Oct 17, 2016 at 2:01 PM, Nadeau Thomas <[email protected]>
>> wrote:
>>
>>>
>>>         Adding Yang Doctors to the thread.
>>>
>>>         —Tom
>>>
>>>
>>>> On Oct 17, 2016:4:42 PM, at 4:42 PM, Robert Varga <[email protected]> wrote:
>>>>
>>>> Hello everyone,
>>>>
>>>> neither RFC6020 nor RFC7950 seem to be explicit about this, so I thought
>>>> I'd ask.
>>>>
>>>> Are recursive, directly or transitively, extensions valid yang?
>>>>
>>>
>>
>>
>> Extensions are not recursive.
>> Your syntax below is valid but not meaningful.

Hello Martin,

> 
> Here's a real (and meaningful) example of a "recursive" extension:
> 
>   extension substatement {
>     argument name {
>       tailf:arg-type {
>         type string;
>       }
>     }
>     tailf:use-in "extension";
>     tailf:occurence "*";
> 
>     tailf:substatement "tailf:occurence";  // <-- reference to self
>     description
>       "Specifies which statements can occur as substatement to the
>       given statement.";
>   }
> 
> This is not different from how the core YANG statements can be used;
> e.g., you can use "container" within "container".

I though it may be useful for a complex set of language extensions,
thanks for confirming.

Regards,
Robert


Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to