Skip to content

Commit

Permalink
Expand pattern for dhcp relay discarding interface (#19430)
Browse files Browse the repository at this point in the history
Why I did it
Currently yang pattern is restricting interfaces to those that start with Ethernet however interfaces that discard can start with "eth", "Vlan", "PortChannel", and others as well.

How I did it
Update YANG file and UT

How to verify it
sonic-mgmt test and UT
  • Loading branch information
zbud-msft authored and mssonicbld committed Jul 3, 2024
1 parent e482a56 commit 273cd2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"SONIC_EVENTS_DHCP_RELAY_DHCP_RELAY_DISCARD_INCORRECT_IFNAME": {
"sonic-events-dhcp-relay:sonic-events-dhcp-relay": {
"sonic-events-dhcp-relay:dhcp-relay-discard": {
"ifname": "Eth",
"ifname": "@@@!!!",
"timestamp": "1985-04-12T23:20:50.52Z"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module sonic-events-dhcp-relay {

leaf ifname {
type string {
pattern 'Ethernet[0-9]{1,3}';
pattern '[a-zA-Z0-9]+';
}
description "Name of the i/f discarding";
}
Expand Down

0 comments on commit 273cd2c

Please sign in to comment.