Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input/output nodes for an action defined in a grouping have incorrect parents in entry tree #177

Open
midakaloom opened this issue Mar 15, 2021 · 0 comments
Labels

Comments

@midakaloom
Copy link
Contributor

Given the following YANG:

module a {
  namespace "urn:a";
  prefix a;

  grouping g {
    action a {
      input {
        leaf in { type string; }
      }
    }
  }

  container c {
    uses g;
  }
}

The following code will cause a panic:

yang.ToEntry(m.Modules["a"]).Find("c/a/input").InstantiatingModule()

This seems to be because the entry tree for the action input (and output, and any of their children) is rooted at the grouping g instead of at the container c.

It works fine if the call to InstantiatingModule() is on the action itself (Find("c/a")), if the action is not defined in a grouping, or if the grouping defines only nodes inside the input or output (e.g. grouping g { leaf in { type string; } }).

@wenovus wenovus added the bug label Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants