diff --git a/doc/mgmt/gnmi/SONiC_GNMI_Server_Interface_Design.md b/doc/mgmt/gnmi/SONiC_GNMI_Server_Interface_Design.md index d97234ba3ad..dfabdfd3159 100644 --- a/doc/mgmt/gnmi/SONiC_GNMI_Server_Interface_Design.md +++ b/doc/mgmt/gnmi/SONiC_GNMI_Server_Interface_Design.md @@ -456,25 +456,24 @@ The full configuration request will be overwritten by subsequent full configurat #### 1.2.1.12 Backward Compatibility -SONiC telemetry is using prefix target to identify target database, and we will add a new target to support mixed schema. - - enum Target { - option allow_alias = true; - APPL_DB = 0; - ASIC_DB = 1; - COUNTERS_DB = 2; - LOGLEVEL_DB = 3; - CONFIG_DB = 4; - // PFC_WD_DB shares the the same db number with FLEX_COUNTER_DB - PFC_WD_DB = 5; - FLEX_COUNTER_DB = 5; - STATE_DB = 6; - // For none-DB data - OTHERS = 100; - // For mixed schema - MIXED_SCHEMA = 101; - } +GNMI native will support original telemetry schema for backward compatiblity, and we will use origin field to support new schema. + +#### 1.2.1.13 Improvement + +overwritten-config + +Current telemetry read has some limitations: +* It cannot read the entire database. +* It requires one GNMI path element per table key. + * telemetry needs to read database to identify table key and table field, that's impossible for write operation. + * telemetry does not support more than 2 table keys, but CONFIG_DB has table with 3 or 4 table keys. +GNMI native will provide below improvements: +* It can read the entire database. +* It can support multiple ASIC device and smartswitch device in the second GNMI path element. +* It put all table key with separator in the third GNMI path element. + * GNMI native can use the same schema for read operation and write operation. + * GNMI native can support more than 2 table keys. ### 1.2.2 Container diff --git a/doc/mgmt/gnmi/images/imp_tree.svg b/doc/mgmt/gnmi/images/imp_tree.svg new file mode 100644 index 00000000000..18c3883d0c0 --- /dev/null +++ b/doc/mgmt/gnmi/images/imp_tree.svg @@ -0,0 +1,275 @@ + + +G + +GNMI get decision tree + +cluster_other + +other + + +cluster_telemetry + +Telemetry read + + +cluster_gnmi_native + +GNMI native read + + +cluster_translib + +Translib read + + + +Check target + + + + + +Check target + + + +Read non database object + +Read non database object + + + +Check target->Read non database object + + +Target is other + + + +Telemetry read + + + + + +Check GNMI element + + + +Check target->Telemetry read + + +Target is SONiC database: +CONFIG_DB, APPL_DB, COUNTERS_DB, ... + + + +Check origin + + + + + +Check origin + + + +Check target->Check origin + + +Target is empty + + + +1 element + +Table name + + + +Telemetry read->1 element + + +1 element + + + +2 element + +Table name + table key +Or table name + table field + + + +Telemetry read->2 element + + +2 elements + + + +3 element + +Table name + first table key + second table key +Or table name + table key + table field + + + +Telemetry read->3 element + + +3 elements + + + +4 element + +Table name + first table key + second table key + table field + + + +Telemetry read->4 element + + +4 elements + + + +5 element + +Not supported + + + +Telemetry read->5 element + + +more than 4 elements + + + +GNMI native read + + + + + +Check GNMI element + + + +Check origin->GNMI native read + + +Origin is sonic-db + + + +Invoke translib + +Invoke translib + + + +Check origin->Invoke translib + + +Origin is empty + + + +GNMI 1 element + +Not supported + + + +GNMI native read->GNMI 1 element + + +less than 2 elements + + + +GNMI 2 elements + +Database name + device name +Read the whole database + + + +GNMI native read->GNMI 2 elements + + +2 elements + + + +GNMI 3 element + +Database name + device name + table name + + + +GNMI native read->GNMI 3 element + + +3 elements + + + +GNMI 4 element + +Database name + device name + table name + table key + + + +GNMI native read->GNMI 4 element + + +4 elements + + + +GNMI 5 element + +Database name + device name + table name + table key + table field + + + +GNMI native read->GNMI 5 element + + +5 elements + + + +GNMI 6 element + +Database name + device name + table name + table key + table field + list index + + + +GNMI native read->GNMI 6 element + + +6 elements + + + +GNMI 7 element + +Not supported + + + +GNMI native read->GNMI 7 element + + +more than 6 elements + + + \ No newline at end of file