Skip to content

[dhcp_server] Fix config cli plugin missing parameter db #18501

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

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

w1nda
Copy link
Member

@w1nda w1nda commented Mar 29, 2024

Why I did it

  1. The dhcp_server command didn't receive the db passed by @clicommon.pass_db correctly and there is no unit test case covering this.
  2. The feature state checking logic in dhcp_server command won't run when there is no sub-command provided.
Work item tracking
  • Microsoft ADO (number only): 27384157

How I did it

  1. Add the missing parameter and write UT to test it,
  2. Add parameter invoke_without_command=True to make sure the command would check feature state no matter if sub-command provided.
  3. Because I add the invoke_without_command=True, so I need to explicitly print help message and exit when there is no sub-command provided.

How to verify it

Write UT to capture the issue before fixing it.
Write UT to check the feature state checking logic.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@w1nda w1nda requested a review from lguohan as a code owner March 29, 2024 02:21
@w1nda w1nda requested review from yxieca, yaqiangz and Xichen96 and removed request for lguohan March 29, 2024 02:22
@yaqiangz yaqiangz removed the request for review from yxieca March 29, 2024 05:07
@w1nda
Copy link
Member Author

w1nda commented Mar 29, 2024

Hi @yxieca, cloud you help merge this PR? thank you.

@w1nda w1nda requested a review from yxieca March 29, 2024 14:18
@yxieca yxieca merged commit cd09284 into sonic-net:master Apr 1, 2024
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.

3 participants