Skip to content

Commit

Permalink
[YANG] Add valid v6 address to sonic-dhcp-sever.yang (#18690)
Browse files Browse the repository at this point in the history
#### Why I did it
The PR is to allow v6 address in DHCP_SERVER table which was generated from PROD minigraph. This is to pass the YANG validation.

#### How I did it
Replace ipv4-address with ip-address which is a union of ipv4-address nad ipv6-address
#### How to verify it
Unit test
  • Loading branch information
wen587 authored May 8, 2024
1 parent 50b4fb6 commit d07a83e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
},
"DHCP_SERVER": {
"192.0.0.8": {},
"192.0.0.8": {}
"192.0.0.8": {},
"2603:10e1:0:6f4::1": {}
},
"DNS_NAMESERVER": {
"1.1.1.1": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
},
{
"ip": "10.1.9.2"
},
{
"ip": "2603:10e1:0:6f4::1"
},
{
"ip": "2603:10e1:0:6f5::1"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-yang-models/yang-models/sonic-dhcp-server.yang
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module sonic-dhcp-server {

leaf ip {
description "IP as DHCP_SERVER";
type inet:ipv4-address;
type inet:ip-address;
}

} /* end of list IPS_LIST */
Expand Down

0 comments on commit d07a83e

Please sign in to comment.