Subject: [netmod] ietf-snmp question

From: Andy Bierman <[email-masked]>
Date: Wed, 21 Jan 2015 12:53:14 -0800

Hi,

I am working on a YANG parser bug related to "augment when".
I am running yangdump-pro and getting this warning for ietf-snmp.yang

Warning: no child nodes found in XPath expr 'snmp:v1 or snmp:v2c'
ietf-snmp-community.yang:220.10: warning(1032): no child node available

  augment /snmp:snmp/snmp:target {
    when "snmp:v1 or snmp:v2c";
    leaf mms {   ... }
  }

I can't find child nodes of /snmp/target named "v1" or "v2c".
I find these nodes:

"v1"
leaf /snmp/engine/version/v1
case /snmp/target-params/params/v1
container /snmp/target-params/params/v1/v1

"v2c"
leaf /snmp/engine/version/v2c
case /snmp/target-params/params/v2c
container /snmp/target-params/params/v2c/v2c

Maybe it's because searching all the submodules is
confusing, but I cannot find the child nodes of 'target'
that would make the when-stmt true.

Is this a bug in the RFC or am I missing something?

Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 21 Jan 2015 22:26:56 +0100 (CET)

Hi,

> ietf-snmp-community.yang:220.10: warning(1032): no child node available

[...]

> Is this a bug in the RFC or am I missing something?

It is a bug :( It used to be correct, but in draft -05 (I think) the
data model was changed.  Unfortunately, pyang doesn't have a XPath
parser so it doesn't detect this.  (I am working on a new compiler
that *should* have detected this, but it turns out it had a bug which
I just fixed, and now it also detects this error.)

/martin

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 22 Jan 2015 10:06:07 +0100

> I just fixed, and now it also detects this error.)

Martin,

can you file an errata?

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>