forked from sonic-net/sonic-mgmt-common
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Sync from azure master #10
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
1) Fixed pyang search paths in cvl schema makefiles to include top models/yang/common directory. Without this pyang may not locate ietf yangs during cvl schema builds, especially while building outside sonic slave docker. 2) Updated go.mode and go.sum files to include new dependencies added during recent cvl enhancemnts
Enhanced the unmarshaling method to update the existing list entries instead of replacing it, and by providing this as one more option in the method. Optimized the EmitJson method to improve the performance of the Marshaling of object into json data Fixed the issue in finding the type, if the type is defined as typedf which got included as part of Include statement. Added the support to synchronize the access of the pathToSchema, ChildSchema, regexp maps Fixed the issue in MergeStruct method by comparing with src. object and updating the content of the dest. object properly Added the lint:ignore statment to avoid static check on the methods getNodeName, getObjectFieldName Fixed the issue to only skip the validation for sonic yang model, since the validation is handled in the CVL.
Optimize transformer for GET performance For any request URI and its children, table-name & db-key are queried for the first time and cached internally by the transformer infra. This cache block will be subsequently referred by the infra to avoid redundant callback invocations while the yang model tree is being traversed for GET operation. The cache block is local & valid for a single transaction. Data from Redis DB is queried only once for a table & cached in the infra for further reference. This cache is local & valid for a single transaction On-change, sample based subscription support for gNMI On receipt of subscription request uri, the transformer infra translates it to corresponding Redis Db-table and key, using YANG extensions and provides this info along with other subscription parameters to the translib, which takes care of sending notifications on-change of table/key. YANG extensions introduced : "subscribe-preference", "subscribe-on-change", "subscribe-min-interval". rpc callback support RPC statements defined in both OpenConfig and SONiC yang can be annotated with YANG extension “rpc-callback” to invoke the callback to take an action for the given rpc node YANG default value support Infra has been enhanced to fill the oc yang defaults by referring internal yang-metadata for terminal nodes, if it is not present in the request payload. These defaults will be pushed along with other payload data when a resource is created. RFC compliance support - resource check etc. Parent resource is checked for CRUD and GET requests for the incoming URI, before processing the request. If the parent resource is not available in DB, the transaction is rejected with 404 / "Resource not found" error. Cascade delete to de-configure all related nodes Cascade delete enables dependent config clean up for a DELETE request, based on SONiC yang table dependency. YANG extension "cascade-delete" can be annotated to a node that can be deleted along with all dependent nodes. value xfmr callback The value-xfmr callback supports data conversion before writing into the DB for CRUD request and after reading from DB for GET request. Value-xfmr annotated for a leaf will also be invoked, for all other leaves having a leaf-ref to it. The value-xfmr callback is valid only for the SONIC yang. Operation and tables ordering, dependent tables watch list For a set of DB table/instances, grouped by operation, resulting from processing a request URI, infra supports the following : CRUD Operation ordering, sequencing tables before operating based on sonic-yang/Redis dependencies providing translib, with a list of Redis-tables to watch for changes, when performing operations on dependent tables. Yang model capability Provide yang module name, organization and version information to translib in order to serve model capability request. Miscellaneous bug fixes
Co-authored-by: Carl Keene <[email protected]>
…or leafref, when, must expression evaluation (#33) Clean up CVL code YIN schema reading using libyang API Integrate with xpath custom engine for leafref, when, must expression evaluation Add delete constraint check Add max-element constraint Add CVL trace log to /tmp/cvl.log based on config file
…d new test cases addition (#39) Adding Custom Validation Infrastructure Unit Test files reorganization Adding Test YANG Schemas Adding Unit Test for new CVL APIs Adding Unit Test for leafref, when, must expression evaluation
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.
Sync from azure master.