Subject: [netmod] issue and question: YANG short-case-stmt in augment-stmt or uses-augment-stmt

From: "Martin Ciglan -X (mciglan - PANTHEON TECHNOLOGIES at Cisco)" <[email-masked]>
Date: Tue, 25 Aug 2015 12:33:17 +0000

Hello

I've come across a yang module which defines a short-case-stmt in augment-stmt or uses-augment-stmt

Something like this:

    grouping grp1 {
      uses grp2 {
        augment mychoice {
          leaf myleaf1 {
            type string;
         }
       }
     }
  }

  grouping grp2 {
    choice mychoice {
      leaf myleaf2 {
        type string;
      }  
    }
  }

Based on my findings in RFC6020 and errata, this is invalid and there should be only full case-stmt in augment/uses-augment. 

Can you confirm please? Many thanks in advance.

    Best Regards

        Martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Tue, 25 Aug 2015 15:06:41 +0200

Hi Martin,

as far as I can tell, these groupings are OK, and pyang also doesn't
complain.

Ahoj, Láďa

"Martin Ciglan -X (mciglan - PANTHEON TECHNOLOGIES at Cisco)"
<[email-masked]> writes:

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

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

---

From: "Martin Ciglan -X (mciglan - PANTHEON TECHNOLOGIES at Cisco)" <[email-masked]>
Date: Thu, 27 Aug 2015 12:45:55 +0000

Hi Ladislav

Thanks for the asnwer.
I've realized that leaf stmt in augment is parsed as data-def-stmt, not short-case-stmt (even though it is augmented to choice), 
so all is valid according to RFC6020.

   Best Regards

      Martin
________________________________________
Od: Ladislav Lhotka [[email-masked]]
Odoslané: 25. augusta 2015 15:06
Do: Martin Ciglan -X (mciglan - PANTHEON TECHNOLOGIES at Cisco); [email-masked]
Predmet: Re: [netmod] issue and question: YANG short-case-stmt in augment-stmt or uses-augment-stmt

Hi Martin,

Ahoj, Láďa