-
Notifications
You must be signed in to change notification settings - Fork 14
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 yang source for embedded directories #48
Merged
Merged
Conversation
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
Very cool! I've been meaning to check embedded dirs out. Anyway you can write a unit test for this? |
I pushed a couple of simple test cases. |
sebastien-guay
added a commit
to nokia/freeconf-yang
that referenced
this pull request
Sep 5, 2023
* freeconf#42 - default values come in as strs to ensure enum that start w/nums are supported * freeconf#43, freeconf#44 - support parsing default and mandatory on choice * re-enable tests that were left uncommented * issue freeconf#46 - uses were not uniquely identified between modules * issue freeconf#47 - floats in ranges were not parse correctly * fix where contraint when there is err in value coersion * Add yang source for embedded directories (freeconf#48) * Add yang source for embedded directories * Add testcased for embedded source reader * issue freeconf#49 - improper quote trimming on strings in parser * issue freeconf#50 - submodules were clobbering some of main modules data * issue freeconf#50 - organize imports by their prefix for proper lookup * forgot missing test file * issue freeconf#50 - allow submods to find typedefs and groupings in any other submod * Allow declaring yang field-names by using the usual json tag name * Allow using types derived from string/float64 in string lists * Add testcase for MetaNameToFieldExt * Cleanup toString(List) and add more testcases * Give MetaNameToFieldNameExt a proper name and explain the purpose and working of the function * Move security checks after the custom handlers as before * Add comment to explaint that fieldelem might be invalid * Rename tag for nodeutil.reflect struct name handling to 'yang' * restore optimized []string conv from most common types * issue freeconf#56 - identity base is ident or string, do not expect ident only * forgot missing test file * issue freeconf#55 - refactor how augment works to align w/rfc * allow anydata to have multiple statements * support list retaingin unique in AST * issue freeconf#58 - leaf-list default always an array to match rfc * issue freeconf#63 - complain on illegal yang. fix tests too * issue freeconf#65 - test for invalid leafref paths * issue freeconf#64 - allow augment to choice case * Allow to create a new value based on a list of unions as long as they contain the same type * Move Unionlist conversion into a function of its own * issue freeconf#60 - add unit tests for union and union list * issue freeconf#69 - protect against npe on bad import * issue freeconf#68 - fix parser for bad comment * issue freeconf#70 - support multiple identity base types * issue freeconf#71 - imports now reusing existing modules if they were already imported. fix identity ref base being incorrect * issue freeconf#73 - duplicate yang defs is err, not panic * issue freeconf#67 - add test case for PUT, struct tags to non-pointer struct tags * issue freeconf#78 - fix eating error on dup leafs in augments and add more dup checking * issue freeconf#74 - module did not support config bool * issue freeconf#75 - support config on choice * issue freeconf#81 - frac digits in typedef * forgot missing test files * issue freeconf#79 - handle err on dup case items * issue freeconf#80 - union types do not set default on leafs as there would likely be conflicts * issue freeconf#83 - choice case proxy config of parent * issue freeconf#83 - fix choice cases in augments w/config setting issue freeconf#84 - fix bits from typedefs * reenable parser tests. add module to tests that represents useful coverage * Use reflect api type conversion to assign value in nodeutil * Add proper decision tree for type conversion of writing leaf values * Add testcase for leaf-list conversion * fix unit test from where * WIP on supporting other languages * add bits type, allow union to comply w/interface, dump fix * add trace, to replace dump * fixes to get python node_test to pass * trace improvements * make selection a pointer to simplify API and allow tracking a single instance for supporting lang * more api fixes, trace work * make default val a string so we at least know what it is * full path on notify events * small improvements to fc-yang.yang * add Node.Release as a way to unlock/free underlying objects * add trace for context and release * ensure key is set on seleaction before context call * release selection when created as part of editing * fix unit test * use embed fs for yang * forgot files * forgot files * git actions * forgot file * fc-yang to list revs * add a new node implementaton to replace reflect * minor improvement * add read/write val hook on new reflect node * fix compile and tests after rebase from master * update nodeutil.Node docs * implement reflection support on actions * issue freeconf#85 - allow choice case to pass thru config state of choice * issue freeconf#85 - inherit config properly * fix build * reflect hook to create instances, list funcs to return nodes * Fix merge error * Fix merge error * Fix merge error * Fix merge error * Fix merge error * Fix merge error --------- Co-authored-by: Douglas Hubler <douglas@hubler.us> Co-authored-by: Henning Rogge <henning.rogge@fkie.fraunhofer.de> Co-authored-by: Douglas Hubler <dhubler@aresprism.com> Co-authored-by: guay <sebastien.guay@nokia.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Go allows to embed whole directories into the executable. The new yang source allows these embedded directories to be used for loading the Yang schema definitions.