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

[dhcp_server] add show range cli #17262

Merged

Conversation

Xichen96
Copy link
Contributor

Why I did it

Need show range to show dhcp_server range setting.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Add cli

How to verify it

Run unit test

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)

master image from #17051

Description for the changelog

Add show range to dhcp_server cli

Link to config_db schema for YANG module changes

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

dbconn = db.db
for key in dbconn.keys("CONFIG_DB", "DHCP_SERVER_IPV4_RANGE|" + range_name):
entry = dbconn.get_all("CONFIG_DB", key)
start, end = entry["range"].split(",")
Copy link
Contributor

@yaqiangz yaqiangz Nov 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need check to make sure length of valid range list is 1 or 2. If range only contain 1 ip, treat it as a valid range with same start and end
(closed)

@Blueve
Copy link
Contributor

Blueve commented Dec 7, 2023

@yxieca could you help merge this PR?

@yxieca yxieca merged commit 5992765 into sonic-net:master Dec 7, 2023
19 checks passed
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.

5 participants