Update dhcpv6-relay yang model (#14144)

Why I did it
Add interface-id in dhcpv6-relay yang model

How I did it
Add interface-id option and corresponding UT. Updated configuration.md

How to verify it
kellyyeh@kellyyeh:~/sonic-buildimage/src/sonic-yang-models$ pyang -Vf tree -p /usr/local/share/yang/modules/ietf ./yang-models/sonic-dhcpv6-relay.yang
This commit is contained in:
kellyyeh 2023-03-14 22:01:55 -07:00 committed by mssonicbld
parent 499f57a7f7
commit 6fc71c2f40
5 changed files with 58 additions and 12 deletions

View File

@ -24,7 +24,8 @@ Table of Contents
* [Data Plane L3 Interfaces](#data-plane-l3-interfaces) * [Data Plane L3 Interfaces](#data-plane-l3-interfaces)
* [DEFAULT_LOSSLESS_BUFFER_PARAMETER](#DEFAULT_LOSSLESS_BUFFER_PARAMETER) * [DEFAULT_LOSSLESS_BUFFER_PARAMETER](#DEFAULT_LOSSLESS_BUFFER_PARAMETER)
* [Device Metadata](#device-metadata) * [Device Metadata](#device-metadata)
* [Device neighbor metada](#device-neighbor-metada) * [Device neighbor metada](#device-neighbor-metada)
* [DHCP_RELAY](#dhcp_relay)
* [DSCP_TO_TC_MAP](#dscp_to_tc_map) * [DSCP_TO_TC_MAP](#dscp_to_tc_map)
* [FLEX_COUNTER_TABLE](#flex_counter_table) * [FLEX_COUNTER_TABLE](#flex_counter_table)
* [KDUMP](#kdump) * [KDUMP](#kdump)
@ -865,6 +866,22 @@ instance is supported in SONiC.
``` ```
### DHCP_RELAY
```
{
"DHCP_RELAY": {
"dhcpv6_servers": [
"fc02:2000::1",
"fc02:2000::2",
"fc02:2000::3",
"fc02:2000::4"
],
"rfc6939_support": "true",
"interface_id": "true"
}
```
### DSCP_TO_TC_MAP ### DSCP_TO_TC_MAP
``` ```

View File

@ -1628,13 +1628,15 @@
"dhcpv6_servers": [ "dhcpv6_servers": [
"2a04:5555:41::11" "2a04:5555:41::11"
], ],
"rfc6939_support": "true" "rfc6939_support": "true",
"interface_id": "true"
}, },
"Vlan777": { "Vlan777": {
"dhcpv6_servers": [ "dhcpv6_servers": [
"2a04:5555:41::11" "2a04:5555:41::11"
], ],
"rfc6939_support": "true" "rfc6939_support": "true",
"interface_id": "true"
} }
}, },
"SCHEDULER": { "SCHEDULER": {

View File

@ -5,5 +5,9 @@
}, },
"DHCPV6_SERVER_VALID_FORMAT": { "DHCPV6_SERVER_VALID_FORMAT": {
"desc": "Add dhcpv6_server in correct format." "desc": "Add dhcpv6_server in correct format."
},
"DHCPv6_OPTION_WITH_INVALID_BOOLEAN_TYPE": {
"desc": "Add dhcpv6 option with invalid option boolean types.",
"eStrKey": "Pattern"
} }
} }

View File

@ -76,11 +76,25 @@
"2001:1::2" "2001:1::2"
], ],
"rfc6939_support": "true", "rfc6939_support": "true",
"name": "Vlan400",
"interface_id": "true",
"name": "Vlan400" "name": "Vlan400"
} }
] ]
} }
} }
},
"DHCPv6_OPTION_WITH_INVALID_BOOLEAN_TYPE": {
"sonic-dhcpv6-relay:sonic-dhcpv6-relay": {
"sonic-dhcpv6-relay:DHCP_RELAY": {
"DHCP_RELAY_LIST": [
{
"name": "Vlan500",
"rfc6939_support": "False",
"interface_id": "False"
}
]
}
}
} }
} }

View File

@ -34,15 +34,24 @@ module sonic-dhcpv6-relay {
type string; type string;
} }
leaf-list dhcpv6_servers { leaf-list dhcpv6_servers {
description "Configure the dhcp v6 servers"; description "Configure the dhcp v6 servers";
type inet:ipv6-address; type inet:ipv6-address;
} }
leaf rfc6939_support { leaf rfc6939_support {
description "Set rfc6939 for the relay"; description "Set rfc6939 for the relay";
type boolean; 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 VLAN_LIST */
} }