Skip to content

Commit 95ee3d9

Browse files
zbud-msftmssonicbld
authored andcommitted
Expand pattern for dhcp relay discarding interface (#19430)
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
1 parent 5db7693 commit 95ee3d9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/sonic-yang-models/tests/yang_model_tests/tests_config/sonic-events-dhcp-relay.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"SONIC_EVENTS_DHCP_RELAY_DHCP_RELAY_DISCARD_INCORRECT_IFNAME": {
33
"sonic-events-dhcp-relay:sonic-events-dhcp-relay": {
44
"sonic-events-dhcp-relay:dhcp-relay-discard": {
5-
"ifname": "Eth",
5+
"ifname": "@@@!!!",
66
"timestamp": "1985-04-12T23:20:50.52Z"
77
}
88
}

src/sonic-yang-models/yang-models/sonic-events-dhcp-relay.yang

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module sonic-events-dhcp-relay {
4141

4242
leaf ifname {
4343
type string {
44-
pattern 'Ethernet[0-9]{1,3}';
44+
pattern '[a-zA-Z0-9]+';
4545
}
4646
description "Name of the i/f discarding";
4747
}

0 commit comments

Comments
 (0)