Skip to content
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

[sonic-cli-gen] fix failure "Error: digits_class" when field "digit_c… #2054

Merged

Conversation

stepanblyschak
Copy link
Contributor

…lass" does not exist in DB

Signed-off-by: Stepan Blyschak [email protected]

What I did

Fix an issue when trying to set a field which is not in CONFIG DB using auto generated CLI:

E.g:

admin@sonic:~$ sudo config passwh policies digits-class true
 "Error: digits_class"

How I did it

Use .get on dict instead of [].

How to verify it

Run UT, run generated CLI and configure a field that does not exist in CONFIG DB.

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

…lass" does not exist in DB

here

Signed-off-by: Stepan Blyschak <[email protected]>
@liat-grozovik
Copy link
Collaborator

@praveen-li could you please help to review ?

@liat-grozovik
Copy link
Collaborator

/azp run Azure.sonic-utilities

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik liat-grozovik merged commit 8389c81 into sonic-net:master Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants