Skip to content

Commit 5d007b7

Browse files
authored
Corrected NTP_KEY list name in SONiC Yang (#23401)
sonic-buildimage : #23401 sonic-mgmt-framework - sonic-net/sonic-mgmt-framework#150 sonic-mgmt-common - sonic-net/sonic-mgmt-common#182 Why I did it To support openconfig system module in sonic as per HLD : sonic-net/SONiC#1790 Some sonic yang changes are required, which is done under this PR sonic-mgmt-common PR # sonic-net/sonic-mgmt-common#179 Work item tracking NA How I did it In sonic-ntp.yang, list name was not as per ABNF rule, which was causing cvl errors, fixed the same /ntp:sonic-ntp/ntp:NTP_KEY/ntp:NTP_KEYS_LIST to /ntp:sonic-ntp/ntp:NTP_KEY/ntp:NTP_KEY_LIST How to verify it Ran all test cases in sonic-utilities and sonic-mgmt-common to ensure changes work fine
1 parent 8859b5e commit 5d007b7

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

src/sonic-yang-models/tests/yang_model_tests/tests_config/ntp.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
]
2929
},
3030
"sonic-ntp:NTP_KEY": {
31-
"NTP_KEYS_LIST": [
31+
"NTP_KEY_LIST": [
3232
{
3333
"id": 10,
3434
"value": "bHVtb3M="
@@ -422,7 +422,7 @@
422422
"NTP_KEY_VALID": {
423423
"sonic-ntp:sonic-ntp": {
424424
"sonic-ntp:NTP_KEY": {
425-
"NTP_KEYS_LIST": [
425+
"NTP_KEY_LIST": [
426426
{
427427
"id": 20,
428428
"type": "md5",
@@ -448,7 +448,7 @@
448448
"NTP_KEY_ID_INVALID": {
449449
"sonic-ntp:sonic-ntp": {
450450
"sonic-ntp:NTP_KEY": {
451-
"NTP_KEYS_LIST": [
451+
"NTP_KEY_LIST": [
452452
{
453453
"id": 100000
454454
}
@@ -459,7 +459,7 @@
459459
"NTP_KEY_TRUSTED_INVALID": {
460460
"sonic-ntp:sonic-ntp": {
461461
"sonic-ntp:NTP_KEY": {
462-
"NTP_KEYS_LIST": [
462+
"NTP_KEY_LIST": [
463463
{
464464
"id": 20,
465465
"trusted": "nope"
@@ -471,7 +471,7 @@
471471
"NTP_KEY_TYPE_INVALID": {
472472
"sonic-ntp:sonic-ntp": {
473473
"sonic-ntp:NTP_KEY": {
474-
"NTP_KEYS_LIST": [
474+
"NTP_KEY_LIST": [
475475
{
476476
"id": 20,
477477
"type": "md6"
@@ -483,7 +483,7 @@
483483
"NTP_KEY_VALUE_INVALID": {
484484
"sonic-ntp:sonic-ntp": {
485485
"sonic-ntp:NTP_KEY": {
486-
"NTP_KEYS_LIST": [
486+
"NTP_KEY_LIST": [
487487
{
488488
"id": 20,
489489
"value": ""

src/sonic-yang-models/yang-models/sonic-ntp.yang

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ module sonic-ntp {
5050
"Add extended configuration options";
5151
}
5252

53+
revision 2025-07-21 {
54+
description
55+
"Corrected NTP_KEY_LIST list name";
56+
}
57+
5358
typedef association-type {
5459
description "NTP server association type";
5560
type enumeration {
@@ -192,7 +197,7 @@ module sonic-ntp {
192197
leaf key {
193198
description "NTP server key ID";
194199
type leafref {
195-
path /ntp:sonic-ntp/ntp:NTP_KEY/ntp:NTP_KEYS_LIST/ntp:id;
200+
path /ntp:sonic-ntp/ntp:NTP_KEY/ntp:NTP_KEY_LIST/ntp:id;
196201
}
197202
}
198203

@@ -234,7 +239,7 @@ module sonic-ntp {
234239

235240
description "NTP authentication keys inventory";
236241

237-
list NTP_KEYS_LIST {
242+
list NTP_KEY_LIST {
238243
description "NTP authentication keys inventory";
239244
key "id";
240245

@@ -261,7 +266,7 @@ module sonic-ntp {
261266
default md5;
262267
description "NTP authentication key type";
263268
}
264-
} /* end of list NTP_KEYS_LIST */
269+
} /* end of list NTP_KEY_LIST */
265270

266271
} /* end of container NTP_KEY */
267272

0 commit comments

Comments
 (0)