-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support JSON Marshalling augments to compressed schemas (#572)
* Correctly marshal JSON for augments in compressed containers. * Extend `findSchemaPath` and `findMapPaths` to return a path of module names that correspond with the paths. e.g. "(shadow-)path:config/name|name" -> "(shadow-)module:modA/modB|modA" * Removed a small existing hack whereby error from `InstantiatingModule` was being ignored. * Change `structJSON` to use the corresponding modules when determining whether to prefix node names with corresponding module names. * Added helper `structTagToLibModules` sister to existing `structTagToLibPaths` to extract modules tag. Testing: * Added compressed augment unit test for `findMapPaths` and JSON marshalling. * Added integration test for generating a compressed augment. * Other integration tests updated to test `module` and `shadow-module` generation. Other Testing Changes: * Changed tests for `findSchemaPath` and `findMapPaths` to create `yang.Entry` objects using `Modules.Process` instead of manually creating them. * Populated `.Modules` field for other tests in order to avoid errors due to above-mentioned hack being removed. * Move function to util and refactor structJSON. * Update goyang to v0.2.9
- Loading branch information
Showing
49 changed files
with
121,473 additions
and
120,910 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,9 @@ module openconfig-simple-augment { | |
} | ||
} | ||
} | ||
|
||
augment "/t:native/state" { | ||
leaf b { type string; } | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.