From 9e589f1a942b966b7afefd581e90721e68390633 Mon Sep 17 00:00:00 2001 From: Brad House Date: Thu, 5 Dec 2024 19:32:24 -0500 Subject: [PATCH] add test case for upper-case mac address as requested --- .../yang_model_tests/tests/interface.json | 3 ++ .../tests_config/interface.json | 29 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/interface.json b/src/sonic-yang-models/tests/yang_model_tests/tests/interface.json index a5af525aa9cf..697ca3e6112c 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/interface.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/interface.json @@ -33,6 +33,9 @@ "INTERFACE_MAC_ADDR": { "desc": "Set administrator-provided interface mac address." }, + "INTERFACE_UPPER_MAC_ADDR": { + "desc": "Set UPPERCASE administrator-provided interface mac address." + }, "INTERFACE_INVALID_MAC_ADDR": { "desc": "Set invalid interface mac address.", "eStr": "Value \"badaddr\" does not satisfy the constraint \"[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}\" (range, length, or pattern)." diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/interface.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/interface.json index 943a639fec51..48ec268d6249 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/interface.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/interface.json @@ -304,6 +304,35 @@ } } }, + "INTERFACE_UPPER_MAC_ADDR": { + "sonic-interface:sonic-interface": { + "sonic-interface:INTERFACE": { + "INTERFACE_LIST": [ + { + "name": "Ethernet8", + "mac_addr": "02:AB:CD:EF:12:34" + } + ] + } + }, + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "admin_status": "up", + "alias": "eth8", + "description": "Ethernet8", + "fec": "rs", + "lanes": "65", + "mtu": 9000, + "name": "Ethernet8", + "speed": 25000, + "mode":"trunk" + } + ] + } + } + }, "INTERFACE_INVALID_MAC_ADDR": { "sonic-interface:sonic-interface": { "sonic-interface:INTERFACE": {