-
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
[dhcp_server] add show range cli #17262
Merged
yxieca
merged 11 commits into
sonic-net:master
from
Xichen96:dev/xichenlin/dhcp_server_show_ranges
Dec 7, 2023
Merged
[dhcp_server] add show range cli #17262
yxieca
merged 11 commits into
sonic-net:master
from
Xichen96:dev/xichenlin/dhcp_server_show_ranges
Dec 7, 2023
Conversation
This file contains 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
Blueve
reviewed
Nov 22, 2023
Blueve
reviewed
Nov 22, 2023
saiarcot895
reviewed
Nov 22, 2023
yaqiangz
reviewed
Nov 23, 2023
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(",") |
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.
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)
yaqiangz
reviewed
Nov 29, 2023
dockers/docker-dhcp-server/cli-plugin-tests/test_show_dhcp_server.py
Outdated
Show resolved
Hide resolved
yaqiangz
reviewed
Nov 29, 2023
yaqiangz
approved these changes
Dec 4, 2023
Blueve
approved these changes
Dec 5, 2023
@yxieca could you help merge this PR? |
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
Need show range to show dhcp_server range setting.
Work item tracking
How I did it
Add cli
How to verify it
Run unit test
Which release branch to backport (provide reason below if selected)
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)