Subject: [yang-doctors] must-stmt in case-stmt

From: Andy Bierman <[email-masked]>
Date: Mon, 7 Nov 2016 19:31:24 -0800

Hi,

yangdump-pro is reporting that the must-stmt in this case-stmt
is not allowed.  I cannot find anything in RFC 6020 or 7950
that says it is allowed.  pyang does not complain about it.
I see that when-stmt is allowed, but not must-stmt.

        case b-component {
          leaf bind-b-component-name {
            type l2vpn-instance-name-ref;
            description "Reference to the associated b-component";
          }
          must "/l2vpn" +
               "/l2vpn-instances[name=current()/bind-b-component]" +
               "/type = 'vpls-instance-type'" {
            description "A b-component must be an L2VPN instance " +
                        "of type vpls-instance-type";
          }
        }

Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 08 Nov 2016 08:57:12 +0100 (CET)

> I see that when-stmt is allowed, but not must-stmt.

Clearly a bug in pyang (also in confdc).  Thanks for reporting!  Now
fixed in github.

/martin

---

From: Andy Bierman <[email-masked]>
Date: Tue, 8 Nov 2016 04:10:57 -0800

Hi,

Here is another bug...

In this module, yangdump-pro is crashing on the revision/description
(pyang handles fine).  Also crashing on an empty identityref (no base-stmt).
pyang ignores the missing base-stmt.

Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 08 Nov 2016 13:14:32 +0100 (CET)

> pyang ignores the missing base-stmt.

I fixed this pyang bug last week, and the fix is included in the
latest release 1.7.1.

/martin

---

From: Benoit Claise <[email-masked]>
Date: Wed, 9 Nov 2016 07:17:34 +0100

> Clearly a bug in pyang (also in confdc).  Thanks for reporting!  Now
Found two YANG modules with this problem with the latest cron output:
     [email-masked]
     [email-masked]

Warning the authors now.

Regards, Benoit
> .