-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Yang model] add Restapi yang file #12287
Conversation
leaf server_crt { | ||
type string { | ||
pattern '(/[a-zA-Z0-9_-]+)*/([a-zA-Z0-9_-]+).crt'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to limit the suffix as crt? Can we use xxx.cer or xxx.cert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think for restapi, it is currently fixed to crt. We may not need to provide an extension support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, barring minor issues in Tests. Plz fix them.
{ | ||
"RESTAPI_TABLE_WITH_INCORRECT_CERT": { | ||
"desc": "TABLE_WITH_INCORRECT_CERT failure.", | ||
"eStrKey": "Pattern" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"RESTAPI TABLE WITH VALID CONFIG."
Desc is helpful in case of test failures. Thx
This reverts commit e176512.
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.
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)