Skip to content

Commit

Permalink
Update dhcpv6-relay yang model (sonic-net#14144) (sonic-net#14245)
Browse files Browse the repository at this point in the history
  • Loading branch information
mssonicbld authored Mar 15, 2023
1 parent a3ea2e7 commit 95047bd
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 13 deletions.
19 changes: 18 additions & 1 deletion src/sonic-yang-models/doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Table of Contents
* [Data Plane L3 Interfaces](#data-plane-l3-interfaces)
* [DEFAULT_LOSSLESS_BUFFER_PARAMETER](#DEFAULT_LOSSLESS_BUFFER_PARAMETER)
* [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)
* [FLEX_COUNTER_TABLE](#flex_counter_table)
* [KDUMP](#kdump)
Expand Down Expand Up @@ -832,6 +833,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
```
Expand Down
6 changes: 4 additions & 2 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1534,13 +1534,15 @@
"dhcpv6_servers": [
"2a04:5555:41::11"
],
"rfc6939_support": "true"
"rfc6939_support": "true",
"interface_id": "true"
},
"Vlan777": {
"dhcpv6_servers": [
"2a04:5555:41::11"
],
"rfc6939_support": "true"
"rfc6939_support": "true",
"interface_id": "true"
}
},
"SCHEDULER": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
},
"DHCPV6_SERVER_VALID_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"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,25 @@
"2001:1::2"
],
"rfc6939_support": "true",

"name": "Vlan400",
"interface_id": "true",
"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"
}
]
}
}
}
}
27 changes: 18 additions & 9 deletions src/sonic-yang-models/yang-models/sonic-dhcpv6-relay.yang
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,24 @@ module sonic-dhcpv6-relay {
type string;
}

leaf-list dhcpv6_servers {
description "Configure the dhcp v6 servers";
type inet:ipv6-address;
}

leaf rfc6939_support {
description "Set rfc6939 for the relay";
type boolean;
}
leaf-list dhcpv6_servers {
description "Configure the dhcp v6 servers";
type inet:ipv6-address;
}

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";
}
}
}
/* end of VLAN_LIST */
}
Expand Down

0 comments on commit 95047bd

Please sign in to comment.