-
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 config dhcp server option #18013
[dhcp_server] add config dhcp server option #18013
Conversation
@clicommon.pass_db | ||
def dhcp_server_ipv4_option_add(db, option_name, option_id, type_, value): | ||
ctx = click.get_current_context() | ||
if not validate_str_type("uint32", option_id): |
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.
option id is uint8 rather than uint32. And currently we only support customizing unassigned options, which refer to https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-dhcp-utilities/dhcp_utilities/dhcpservd/dhcp_option.csv
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.
#Closed
if not validate_str_type("uint32", option_id): | ||
ctx.fail("option_id must be uint32") | ||
if type_ != "string": | ||
ctx.fail("Currently only string type is supported") |
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.
Supported type:
SUPPORT_TYPE = ["binary", "boolean", "ipv4-address", "string", "uint8", "uint16", "uint32"] |
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.
#Closed
/azpw run |
/AzurePipelines run |
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list. |
/azpw run |
/AzurePipelines run |
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list. |
@yxieca Hi Ying, please help take a look |
* add dhcp server option cli
* add dhcp server option cli
Add config dhcp_server option cli.
Why I did it
Add config dhcp_server option cli.
Work item tracking
How I did it
Add function to config plugin
How to verify it
Run unittests
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Add config dhcp_server option cli
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)