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

Add support for the 'reference' statement under import. #92

Merged
merged 3 commits into from Mar 14, 2019

Conversation

robshakir
Copy link
Contributor

This change adds support for the YANG 1.1 construct:

import foo {
  prefix "bar";
  reference "bat";
}

to goyang. The test added provides an extensible way to add tests for the contents of opaque Node structures to the goyang pkg.

  * (A) pkg/yang/node_test.go
    - Add a test that can check arbitrary parameters for a particular node.
      This is intended to be extended as we add additional support for new
      statements such as in YANG 1.1.
  * (M) pkg/yang/yang.go
    - Support the 'reference' statement under an 'import'.
@coveralls
Copy link

coveralls commented Feb 25, 2019

Coverage Status

Coverage increased (+0.4%) to 71.918% when pulling c94e960 on import-reference into 824134e on master.

@guilt
Copy link

guilt commented Mar 12, 2019

Thank you for doing this!

We should add a description field as well, and get it in!

@LeonGWang
Copy link
Contributor

LeonGWang commented Mar 13, 2019

Hey Rob, the reference statement addition looks like a duplicate of PR #78. My suggestion is that we merge #78 and this PR just tests for import's reference and description sub-statements using the test framework you have developed.

 * (M) pkg/yang/node_test.yang
  - Add a check for valid returned description statement from import.
 * (M) pkg/yang/yang.go
  - Add support for Description statement in import block.
@robshakir
Copy link
Contributor Author

@guilt @LeonGWang @andaru -- PTAL, and we can go ahead and merge this. Added support for import { description ... }.

@LeonGWang
Copy link
Contributor

Hey Rob, thanks for the quick response. This looks great to me! Let's merge this.

@robshakir robshakir merged commit dd67dc9 into master Mar 14, 2019
@robshakir
Copy link
Contributor Author

Thanks for the reviews.

@robshakir robshakir deleted the import-reference branch March 14, 2019 12:25
@robshakir
Copy link
Contributor Author

Sorry for the duplicate messages -- transaltantic wifi issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants