[Yang model] add Restapi yang file#12287
Merged
prsunny merged 2 commits intosonic-net:masterfrom Oct 11, 2022
Merged
Conversation
ganglyu
reviewed
Oct 6, 2022
| leaf server_crt { | ||
| type string { | ||
| pattern '(/[a-zA-Z0-9_-]+)*/([a-zA-Z0-9_-]+).crt'; | ||
| } |
Contributor
There was a problem hiding this comment.
Do we really need to limit the suffix as crt? Can we use xxx.cer or xxx.cert?
Contributor
Author
There was a problem hiding this comment.
i think for restapi, it is currently fixed to crt. We may not need to provide an extension support
praveen-li
approved these changes
Oct 6, 2022
Member
praveen-li
left a comment
There was a problem hiding this comment.
LGTM, barring minor issues in Tests. Plz fix them.
| { | ||
| "RESTAPI_TABLE_WITH_INCORRECT_CERT": { | ||
| "desc": "TABLE_WITH_INCORRECT_CERT failure.", | ||
| "eStrKey": "Pattern" |
Member
There was a problem hiding this comment.
"eStr": ["server_crt"]
This way, Libyang error will be matched against only server_crt field.
| "eStrKey": "Pattern" | ||
| }, | ||
| "RESTAPI_TABLE_WITH_VALID_CONFIG": { | ||
| "desc": "TABLE WITH VALID CONFIG." |
Member
There was a problem hiding this comment.
"RESTAPI TABLE WITH VALID CONFIG."
Desc is helpful in case of test failures. Thx
ganglyu
approved these changes
Oct 6, 2022
saiarcot895
added a commit
that referenced
this pull request
Oct 12, 2022
This reverts commit e176512.
lguohan
pushed a commit
that referenced
this pull request
Oct 12, 2022
This is causing a build failure for all builds. The PR build was incorrectly marked as passing due to a different build issue.
libyang[0]: Regular expression "(/[a-zA-Z0-9_-.]+)*/([a-zA-Z0-9_-.]+)./[a-z]{3}" is not valid (".]+)*/([a-zA-Z0-9_-.]+)./[a-z]{3})$": range out of order in character class).
libyang[0]: Module "sonic-restapi" parsing failed.
ERROR:YANG-TEST: Exception >Module "sonic-restapi" parsing failed.< in /sonic/src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py:114
ERROR:YANG-TEST: Exception >Module "sonic-restapi" parsing failed.< in /sonic/src/sonic-yang-models/tests/yang_model_test
This reverts commit e176512.
prsunny
added a commit
that referenced
this pull request
Oct 12, 2022
This file contains hidden or 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
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.
Why I did it
Add yang model for Restapi
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)