Skip to content

Commit

Permalink
[yang][dhcp_server] Make gateway in dhcp_server to be an un-mandatory…
Browse files Browse the repository at this point in the history
… config (#21475)

Why I did it
DHCP default route shoule be an optional config to DHCP client

Work item tracking
Microsoft ADO (number only): 30877295

How I did it
Make the configuration to be optional in yang model

How to verify it
UTs
  • Loading branch information
yaqiangz authored Jan 27, 2025
1 parent f833e86 commit 6415e4d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@
"desc": "Configure both ip and ranges in DHCP_SERVER_IPV4_RANGE_RANGES",
"eStr": ["Statement of 'ips' and 'ranges' cannot both exist"]
},
"DHCP_SERVER_IPV4_GATEWAY_ABSENT": {
"desc": "Missing gateway in DHCP_SERVER_IPV4",
"eStrKey" : "Mandatory"
},
"DHCP_SERVER_IPV4_LEASE_TIME_ABSENT": {
"desc": "Missing lease_time in DHCP_SERVER_IPV4",
"eStrKey" : "Mandatory"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,88 +481,6 @@
}
}
},
"DHCP_SERVER_IPV4_GATEWAY_ABSENT": {
"sonic-portchannel:sonic-portchannel": {
"sonic-portchannel:PORTCHANNEL": {
"PORTCHANNEL_LIST": [
{
"name": "PortChannel1"
}
]
}
},
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "etp1",
"description": "Ethernet0",
"mtu": 9000,
"lanes": "1",
"name": "Ethernet0",
"speed": 25000,
"mode" : "trunk"
}
]
}
},
"sonic-dhcp-server-ipv4:sonic-dhcp-server-ipv4": {
"sonic-dhcp-server-ipv4:DHCP_SERVER_IPV4": {
"DHCP_SERVER_IPV4_LIST": [
{
"name": "Vlan1000",
"lease_time": 3600,
"mode": "PORT",
"netmask": "255.255.255.0",
"customized_options": [
"option60"
],
"state": "enabled"
}
]
},
"sonic-dhcp-server-ipv4:DHCP_SERVER_IPV4_CUSTOMIZED_OPTIONS": {
"DHCP_SERVER_IPV4_CUSTOMIZED_OPTIONS_LIST": [
{
"name": "option60",
"id": 60,
"type": "string",
"value": "dummy_value"
}
]
},
"sonic-dhcp-server-ipv4:DHCP_SERVER_IPV4_RANGE": {
"DHCP_SERVER_IPV4_RANGE_LIST": [
{
"name": "range1",
"range": [
"192.168.0.2",
"192.168.0.3"
]
}
]
},
"sonic-dhcp-server-ipv4:DHCP_SERVER_IPV4_PORT": {
"DHCP_SERVER_IPV4_PORT_LIST": [
{
"name": "Vlan1000",
"port": "Ethernet0",
"ranges": [
"range1"
]
},
{
"name": "Vlan1000",
"port": "PortChannel1",
"ips": [
"192.168.0.4"
]
}
]
}
}
},
"DHCP_SERVER_IPV4_LEASE_TIME_ABSENT": {
"sonic-portchannel:sonic-portchannel": {
"sonic-portchannel:PORTCHANNEL": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ module sonic-dhcp-server-ipv4 {

leaf gateway {
description "Gateway IP for DHCP server";
mandatory true;
type inet:ipv4-address;
}

Expand Down

0 comments on commit 6415e4d

Please sign in to comment.