From b31615dd371625817a47f1210fd080d3ffda26bc Mon Sep 17 00:00:00 2001 From: jingwenxie Date: Wed, 20 Dec 2023 07:29:22 +0000 Subject: [PATCH] comment --- doc/mgmt/SONiC_YANG_Model_Guidelines.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/mgmt/SONiC_YANG_Model_Guidelines.md b/doc/mgmt/SONiC_YANG_Model_Guidelines.md index 7b5304cb46..3f6bca366f 100644 --- a/doc/mgmt/SONiC_YANG_Model_Guidelines.md +++ b/doc/mgmt/SONiC_YANG_Model_Guidelines.md @@ -500,7 +500,7 @@ container PORTCHANNEL_INTERFACE { ### 18. In some cases it may be required to split an ABNF table into multiple YANG lists based on the data stored in the ABNF table. In this case it is crucial to ensure that the List keys are non-overlapping, unique, and unambiguous. -**Strategies for Ensuring Unique and Unambiguous Keys**: Utilize composite keys that have a different number of key elements to distinguish lists. +**Strategies for Ensuring Unique and Unambiguous Keys**: Utilize composite keys that have a different number of key elements to distinguish lists. Need to mention that different key names do not count as unambiguous model. #### ABNF ``` @@ -551,7 +551,7 @@ container INTERFACE { } ...... ``` -***In the example above if the config DB contains an INTERFACE table with single key element then it will be associted with the INTERFACE_LIST and if contains 2 key elements then it will be associated with INTERFACE_IPADDR_LIST*** +In the example above if the config DB contains an INTERFACE table with single key element then it will be associted with the INTERFACE_LIST and if contains 2 key elements then it will be associated with INTERFACE_IPADDR_LIST #### Example 2: Keys with same number of elements of same type (NOT Allowed case 1) @@ -577,7 +577,7 @@ container NOT_SUPPORTED_INTERFACE { ...... ``` -***In the example above if the config DB contains an NOT_SUPPORTED_INTERFACE table with key Ethernet1 then it would match with both the list, this is an overlapping scenario*** +In the example above if the config DB contains an NOT_SUPPORTED_INTERFACE table with key Ethernet1 then it would match with both the list, this is an overlapping scenario #### Example 3: Keys with same number of elements of same type (NOT Allowed case 2) @@ -623,11 +623,11 @@ container NOT_SUPPORTED_TELEMETRY_CLIENT { } ...... ``` -***In the example above if the config DB contains an NOT_SUPPORTED_TELEMETRY_CLIENT table with key "DestinationGroup|HS", then it would correspond to the NOT_SUPPORTED_TELEMETRY_CLIENT_DS_LIST and NOT_SUPPORTED_TELEMETRY_CLIENT_SUB_LIST, this is an overlapping scenario*** +In the example above if the config DB contains an NOT_SUPPORTED_TELEMETRY_CLIENT table with key "DestinationGroup|HS", then it would correspond to the NOT_SUPPORTED_TELEMETRY_CLIENT_DS_LIST and NOT_SUPPORTED_TELEMETRY_CLIENT_SUB_LIST, this is an overlapping scenario -#### Example 4: keys with same number of elements and different type(NOT Allowed case 1) +#### Example 4: keys with same number of elements and different type(NOT Allowed case 3) -***In the given example, if the configuration database has an NOT_SUPPORTED_TELEMETRY_CLIENT table with the key "1234", it would correspond to the NOT_SUPPORTED_TELEMETRY_CLIENT_DS_LIST and NOT_SUPPORTED_TELEMETRY_CLIENT_SUB_LIST, this is an overlapping scenario*** +In the given example, if the configuration database has an NOT_SUPPORTED_TELEMETRY_CLIENT table with the key "1234", it would correspond to the NOT_SUPPORTED_TELEMETRY_CLIENT_DS_LIST and NOT_SUPPORTED_TELEMETRY_CLIENT_SUB_LIST, this is an overlapping scenario ```yang ...... @@ -647,9 +647,9 @@ container NOT_SUPPORTED_TELEMETRY_CLIENT { } list NOT_SUPPORTED_TELEMETRY_CLIENT_SUB_LIST { // Negative case - key "prefix"; + key "id"; - leaf prefix { + leaf id { type int32; } @@ -662,9 +662,9 @@ container NOT_SUPPORTED_TELEMETRY_CLIENT { ...... ``` -#### Example 5: keys with same number of elements and different type(NOT Allowed case 2) +#### Example 5: keys with same number of elements and different type(NOT Allowed case 4) -***In the given example, if the configuration database has an NOT_SUPPORTED_TELEMETRY_CLIENT table with the key "1234|1234", it would correspond to the NOT_SUPPORTED_TELEMETRY_CLIENT_DS_LIST and NOT_SUPPORTED_TELEMETRY_CLIENT_SUB_LIST, this is an overlapping scenario*** +In the given example, if the configuration database has an NOT_SUPPORTED_TELEMETRY_CLIENT table with the key "1234|1234", it would correspond to the NOT_SUPPORTED_TELEMETRY_CLIENT_DS_LIST and NOT_SUPPORTED_TELEMETRY_CLIENT_SUB_LIST, this is an overlapping scenario ```yang ...... @@ -686,9 +686,9 @@ container NOT_SUPPORTED_TELEMETRY_CLIENT { } list NOT_SUPPORTED_TELEMETRY_CLIENT_SUB_LIST { // Negative case - key "prefix name"; + key "id name"; - leaf prefix { + leaf id { type int32; }