Subject: Re: [netmod] Augment issue

From: Ladislav Lhotka <[email-masked]>
Date: Tue, 1 Mar 2016 10:42:30 +0100

> On 01 Mar 2016, at 10:38, Anton Tkáčik <[email-masked]> wrote:
> 
> Hi,
> Noticed other issue with example set,
> In https://github.com/mbj4668/pyang/issues/194 Lada stated that in YANG 1.0 submodule can not augment nodes
> defined in parent model.
> 
> Is that correct that submodule can not augment definition defined in parent module?

This isn't possible in YANG 1.0 but will be possible in 1.1. However, in the present case the definition being augmented from the submodule is arguably in a different module.

Lada

> Is such definition also augmentation.
> 
> 
> 
> ________________________________________
> Od: Ladislav Lhotka <[email-masked]>
> Odoslané: 29. februára 2016 17:36
> Komu: Peter Verthez
> Kópia: [email-masked]
> Predmet: Re: [netmod] Augment issue
> 
> Hi Peter,
> 
> I agree it should be OK. I tried to reproduce the situation and test it with pyang and it led to a Python exception. So I filed an issue:
> 
> https://github.com/mbj4668/pyang/issues/206
> 
> Lada
> 
>> On 29 Feb 2016, at 10:09, Peter Verthez <[email-masked]> wrote:
>> 
>> Hi all,
>> 
>> A few weeks ago I reported a bug on the OpenDaylight YANG parser, regarding a error that was generated on a particular augment construction.   The bug report is the following:
>> https://bugs.opendaylight.org/show_bug.cgi?id=5335
>> 
>> We are disagreeing on the interpretation of the YANG RFC regarding to this bug, so could we get the opinion of the people on this mailing list on it?
>> 
>> The problem originated from a proposed Broadband Forum model, but there's a dummy model that reproduces the problem attached to that bug report.
>> 
>> Thanks,
>> Peter.
>> 
>> _______________________________________________
>> netmod mailing list
>> [email-masked]
>> https://www.ietf.org/mailman/listinfo/netmod
> 
> --
> Ladislav Lhotka, CZ.NIC Labs
> PGP Key ID: E74E8C0C
> 
> 
> 
> 
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod
> AntonTkáčik
> Chief Software Architect
> 
> Mlynské Nivy 56 / 821 05 Bratislava / Slovakia
> +421 911 309 249 / [email-masked]
> reception: +421 2 206 65 111 / www.pantheon.sk
> [logo]

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

---

From: Anton Tkáčik <[email-masked]>
Date: Tue, 1 Mar 2016 09:38:49 +0000

Hi,

Hi Peter,

Lada

---

From: Jernej Tuljak <[email-masked]>
Date: Tue, 1 Mar 2016 11:21:27 +0100

> This isn't possible in YANG 1.0 but will be possible in 1.1. However, in the present case the definition being augmented from the submodule is arguably in a different module.

I disagree. Submodules do not see "/jbox:jukebox/jboxcd:cdcapable" in 
1.0, since "jbox:cdcapable" is a name defined in the main module. An 
explicit include of another submodule doing the augmentation is needed 
to make their test case valid YANG. Any other case would mean breaking 
out of submodule containment, much like when we discussed XPath 
expressions breaking out of module containment.

Jernej

---

From: Ladislav Lhotka <[email-masked]>
Date: Tue, 1 Mar 2016 11:33:28 +0100

> On 01 Mar 2016, at 11:21, Jernej Tuljak <[email-masked]> wrote:
> 
> I disagree. Submodules do not see "/jbox:jukebox/jboxcd:cdcapable" in 1.0, since "jbox:cdcapable" is a name defined in the main module. An explicit include of another submodule doing the augmentation is needed to make their test case valid YANG. Any other case

Isn't it what I wrote? This has changed in 1.1, no includes are needed in submodules in order to "see" definitions in the main module?

Lada

>  would mean breaking out of submodule containment, much like when we discussed XPath expressions breaking out of module containment.
> 
> Jernej
> 
>> 
>> Lada
>>

---

From: Jernej Tuljak <[email-masked]>
Date: Tue, 1 Mar 2016 12:14:41 +0100

> Isn't it what I wrote? This has changed in 1.1, no includes are needed in submodules in order to "see" definitions in the main module?

Perhaps I misunderstood. You seemed to be saying their example is still 
valid 1.0, since "the definition being augmented from the submodule is 
arguably in a different module".

Jernej

---

From: Ladislav Lhotka <[email-masked]>
Date: Tue, 1 Mar 2016 12:50:26 +0100

> On 01 Mar 2016, at 12:14, Jernej Tuljak <[email-masked]> wrote:
> 
> Perhaps I misunderstood. You seemed to be saying their example is still valid 1.0, since "the definition being augmented from the submodule is arguably in a different module".

I understood that Anton was asking about a submodule augmenting "native" target nodes defined in the main module. I agree that the outcome for augmenting an augment is not clear in 1.0. In any case, in 1.1 this issue should be gone.

Lada