From 263852a88d9b91459a15d4abd5228585ca9d1470 Mon Sep 17 00:00:00 2001 From: jingwenxie Date: Fri, 8 Nov 2024 06:11:25 +0000 Subject: [PATCH] [YANG] Add DPU support in chassis module --- .../tests/files/sample_config_db.json | 3 +++ .../tests_config/chassis_module.json | 13 +++++++++++++ .../yang-models/sonic-chassis-module.yang | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index a9ab004008b6..93283acee587 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -1895,6 +1895,9 @@ }, "FABRIC-CARD1": { "admin_status": "down" + }, + "DPU2": { + "admin_status": "down" } }, "COPP_GROUP": { diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/chassis_module.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/chassis_module.json index a742f91ef54e..b64367bb3cd2 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/chassis_module.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/chassis_module.json @@ -18,6 +18,15 @@ { "name": "FABRIC-CARD1", "admin_status": "up" + }, + { + "name": "DPU0", + "admin_status": "up" + }, + { + "name": "DPU1", + "admin_status": "up" + } ] } @@ -34,6 +43,10 @@ { "name": "FABRIC-CARD1", "admin_status": "down" + }, + { + "name": "DPU2", + "admin_status": "down" } ] } diff --git a/src/sonic-yang-models/yang-models/sonic-chassis-module.yang b/src/sonic-yang-models/yang-models/sonic-chassis-module.yang index e31c252d8a9d..cf7f64c882b5 100644 --- a/src/sonic-yang-models/yang-models/sonic-chassis-module.yang +++ b/src/sonic-yang-models/yang-models/sonic-chassis-module.yang @@ -20,7 +20,7 @@ module sonic-chassis-module { key "name"; leaf name { type string { - pattern "LINE-CARD[0-9]+|FABRIC-CARD[0-9]+"; + pattern "LINE-CARD[0-9]+|FABRIC-CARD[0-9]+|DPU[0-9]+"; } description "Line-card or fabric-card module name"; }