mbj4668/yanger

'node not found' errors

Closed this issue · 3 comments

@jboyd77 (Joey) reports seeing the yanger errors shown below (yanglint and pyang do not show the error).

Joey says:

The change that triggered the error was to restructure the “queues” grouping in bbf-qos-traffic-mngt to split up into multiple groupings (to allow more reuse in some new stuff I added). The overall content of the “queues” grouping is the same as before so I’m guessing that yanger has difficulty with multiple layers of ‘uses’ statements.

This module isn't yet publicly available but we could supply it directly on request, or else we could try to reproduce the problem with simpler yang.

% yanger --strict bbf-qos-shaping.yang
bbf-qos-shaping.yang:211: error: node 'queue-scheduling-cfg-type' in module 'bbf-qos-traffic-mngt' not found
bbf-qos-shaping.yang:211: error: node 'inline' in module 'bbf-qos-traffic-mngt' not found

I need a YANG module so that I can reproduce this problem.

Update: I hadn't realised that there were so few dependencies. Please see the next comment for a simpler way of reproducing the problem.

I've created a https://github.com/BroadbandForum/yang/tree/yanger-issue branch, which contains two modified YANG files (relative to master). These files are:

  • standard/networking/bbf-qos-shaping.yang
  • standard/networking/bbf-qos-traffic-mngt.yang

If you check out YangModels/yang and checkout this new branch in the BBF submodule (at standard/bbf) then this run-yanger script (run at the top level of standard/bbf) shows the problem:

(cd ../..; $HOME/Applications/yanger/bin/yanger \
    --strict \
    --path . \
    --path standard/ietf/RFC \
    --path standard/bbf/standard/common \
    --path standard/bbf/standard/equipment \
    --path standard/bbf/standard/interface \
    --path standard/bbf/standard/networking \
    standard/bbf/standard/networking/bbf-qos-shaping.yang)

In yanger-issue:

% git checkout yanger-issue 
Switched to branch 'yanger-issue'
Your branch is up to date with 'origin/yanger-issue'.
% . run-yanger
standard/bbf/standard/networking/bbf-qos-shaping.yang:211: error: node 'queue-scheduling-cfg-type' in module 'bbf-qos-traffic-mngt' not found
standard/bbf/standard/networking/bbf-qos-shaping.yang:211: error: node 'inline' in module 'bbf-qos-traffic-mngt' not found

In master:

% git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
% . run-yanger
<nothing output>

Thanks.

The attached yanger-issue.zip should contain all you need (plus it needs IETF YANG). Run yanger on bbf-qos-shaping.yang. Thanks.