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

Update dhcpv6 option yang model #16290

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
20 changes: 15 additions & 5 deletions dockers/docker-dhcp-relay/cli-plugin-tests/mock_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"fc02:2000::1",
"fc02:2000::2"
],
"dhcpv6_option|rfc6939_support": "true"
"dhcpv6_option": {
"rfc6939_support": "true"
}
}
}
}
Expand All @@ -25,7 +27,9 @@
"fc02:2000::1",
"fc02:2000::2"
],
"dhcpv6_option|rfc6939_support": "true"
"dhcpv6_option": {
"rfc6939_support": "true"
}
}
}
}
Expand Down Expand Up @@ -99,7 +103,9 @@
"fc02:2000::1",
"fc02:2000::2"
],
"dhcpv6_option|rfc6939_support": "true"
"dhcpv6_option": {
"rfc6939_support": "true"
}
}
}
}
Expand Down Expand Up @@ -136,14 +142,18 @@
"fc02:2000::1",
"fc02:2000::2"
],
"dhcpv6_option|rfc6939_support": "true"
"dhcpv6_option": {
"rfc6939_support": "true"
}
},
"Vlan1001": {
"dhcpv6_servers": [
"fc02:2000::3",
"fc02:2000::4"
],
"dhcpv6_option|rfc6939_support": "true"
"dhcpv6_option": {
"rfc6939_support": "true"
}
}
}
}
Expand Down
12 changes: 8 additions & 4 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1946,15 +1946,19 @@
"dhcpv6_servers": [
"2a04:5555:41::11"
],
"rfc6939_support": "true",
"interface_id": "true"
"dhcpv6_option": {
"rfc6939_support": "true",
"interface_id": "true"
}
},
"Vlan777": {
"dhcpv6_servers": [
"2a04:5555:41::11"
],
"rfc6939_support": "true",
"interface_id": "true"
"dhcpv6_option": {
"rfc6939_support": "true",
"interface_id": "true"
}
}
},
"DHCP_SERVER_IPV4": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@
"dhcpv6_servers": [
"2001:1::2"
],
"rfc6939_support": "true",
"name": "Vlan400",
"interface_id": "true",
"dhcpv6_option": {
"rfc6939_support": "true",
"interface_id": "true"
},
"name": "Vlan400"
}
]
Expand All @@ -91,8 +92,10 @@
"DHCP_RELAY_LIST": [
{
"name": "Vlan500",
"rfc6939_support": "False",
"interface_id": "False"
"dhcpv6_option": {
"rfc6939_support": "False",
"interface_id": "False"
}
}
]
}
Expand Down
23 changes: 12 additions & 11 deletions src/sonic-yang-models/yang-models/sonic-dhcpv6-relay.yang
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,22 @@ module sonic-dhcpv6-relay {
type inet:ipv6-address;
}

leaf rfc6939_support {
description "Set rfc6939 for the relay";
type string {
pattern "false|true";
container dhcpv6_option {
leaf rfc6939_support {
description "Set rfc6939 for the relay";
type string {
pattern "false|true";
}
}
}

leaf interface_id {
description "Enable interface ID insertion in relayed messages";
type string {
pattern "false|true";
leaf interface_id {
description "Enable interface ID insertion in relayed messages";
type string {
pattern "false|true";
}
}
}
}
/* end of VLAN_LIST */
/* end of DHCP_RELAY_LIST */
}
/* end of container DHCP_RELAY */
}
Expand Down
Loading