From bd54e2cb0469581c46903d961438d1df2c33f605 Mon Sep 17 00:00:00 2001 From: Kanji Nakano Date: Mon, 2 Oct 2023 18:43:56 +0000 Subject: [PATCH 1/2] nexthop group cli support Signed-off-by: Kanji Nakano --- models/yang/sonic/import.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/models/yang/sonic/import.mk b/models/yang/sonic/import.mk index e52ff765f..b4d06ed80 100644 --- a/models/yang/sonic/import.mk +++ b/models/yang/sonic/import.mk @@ -5,4 +5,6 @@ # or glob patterns of basenames (like sonic-telemetry*.yang) can be specified. # Other sonic yangs referred by these will also be copied. # -SONICYANG_IMPORTS += sonic-sflow.yang \ No newline at end of file +SONICYANG_IMPORTS += sonic-sflow.yang +SONICYANG_IMPORTS += sonic-feature.yang + From 38ca8afbac10266c2b982b85c1242d08bc9910e8 Mon Sep 17 00:00:00 2001 From: Kanji Nakano Date: Thu, 9 Nov 2023 20:08:55 +0000 Subject: [PATCH 2/2] update sonic-device_metadata yang Signed-off-by: Kanji Nakano --- cvl/jsondata_test.go | 3 ++- cvl/testdata/schema/sonic-device-metadata.yang | 8 ++++++++ models/yang/sonic/import.mk | 3 +-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cvl/jsondata_test.go b/cvl/jsondata_test.go index b0a7d3092..d99f16e89 100644 --- a/cvl/jsondata_test.go +++ b/cvl/jsondata_test.go @@ -55,7 +55,8 @@ var json_validate_config_data = []string{`{ "mac": "4c:76:25:f4:70:82", "default_pfcwd_status": "disable", "deployment_id": "1", - "type": "ToRRouter" + "type": "ToRRouter", + "nexthop_group": "disabled" } } }`, diff --git a/cvl/testdata/schema/sonic-device-metadata.yang b/cvl/testdata/schema/sonic-device-metadata.yang index 0f5109552..9aeecc1fe 100644 --- a/cvl/testdata/schema/sonic-device-metadata.yang +++ b/cvl/testdata/schema/sonic-device-metadata.yang @@ -100,6 +100,14 @@ module sonic-device-metadata { enum LeafRouter; } } + + leaf nexthop_group { + type enumeration { + enum enabled; + enum disabled; + } + default disabled; + } } } } diff --git a/models/yang/sonic/import.mk b/models/yang/sonic/import.mk index b4d06ed80..cc3496360 100644 --- a/models/yang/sonic/import.mk +++ b/models/yang/sonic/import.mk @@ -6,5 +6,4 @@ # Other sonic yangs referred by these will also be copied. # SONICYANG_IMPORTS += sonic-sflow.yang -SONICYANG_IMPORTS += sonic-feature.yang - +SONICYANG_IMPORTS += sonic-device_metadata.yang