diff --git a/doc/mgmt/gnmi/README.md b/doc/mgmt/gnmi/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/doc/mgmt/gnmi/SONiC_GNMI_Server_Interface_Design.md b/doc/mgmt/gnmi/SONiC_GNMI_Server_Interface_Design.md new file mode 100644 index 0000000000..d97234ba3a --- /dev/null +++ b/doc/mgmt/gnmi/SONiC_GNMI_Server_Interface_Design.md @@ -0,0 +1,568 @@ +# SONiC GNMI Server Interface Design + +# High Level Design Document + +#### Rev 0.1 + +# Table of Contents +- [Table of Contents](#table-of-contents) +- [List of Tables](#list-of-tables) +- [Revision](#revision) +- [About this Document](#about-this-document) +- [Scope](#scope) +- [Definition/Abbreviation](#definitionabbreviation) +- [1 Feature Overview](#1-feature-overview) + * [1.1 Requirements](#11-requirements) + * [1.2 Design Overview](#12-design-overview) +- [2 Error Handling](#2-error-handling) +- [3 Serviceability and Debug](#3-serviceability-and-debug) +- [4 Unit Tests](#4-unit-tests) + * [4.1 Unit Tests for Capabilities RPC](#41-unit-tests-for-capabilities-rpc) + * [4.2 Unit Tests for Get RPC](#42-unit-tests-for-get-rpc) + * [4.3 Unit Tests for Set RPC](#43-unit-tests-for-set-rpc) + +# List of Tables +[Table 1: Abbreviations](#table-1-abbreviations) + +[Table 2: Mapping Operations](#table-2-mapping-operations) + +[Table 3: Translate Example](#table-3-translate-example) + +# Revision + +| Rev | Date | Author | Change Description | +|:---:|:-----------:|:------------------:|---------------------| +| 0.1 | 05/05/2022 | Gang Lv | Initial version | + +# About this Document +This document provides a detailed description on the strategy to implement the SONiC GNMI Server Interface. + +# Scope +This document describes the high level design of SONiC GNMI Server Interface. + +This document provides minor implementation details about the proposed solutions. + +# Definition/Abbreviation + +### Table 1: Abbreviations +| **Term** | **Meaning** | +| -------- | -------------------------- | +| gRPC | A modern open-source high performance Remote Procedure Call (RPC) framework that can run in any environment | +| gNMI | gRPC Network Management Interface, used to retrieve or manipulate the state of a device via telemetry or configuration data | +| gNOI | gRPC Network Operations Interface | +| JSON | JavaScript Object Notation | +| Yang | Yet Another Next Generation, it is a modular language representing data structures in an XML tree format | +| Generic Config Updater | SONiC configuration generic update and rollback feature | +| ConfigDB | Configuration Database | +| ApplDB | Application Database | + +# 1 Feature Overview + +SONiC should provide a gNMI/gNOI server interface where the client can communicate with SONiC (server) through the interface using their respective gRPC libraries based on ConfigDB/ApplDB/StateDB/CountersDB schema or SONiC Yang schema. + +To understand the requirements, we need to go over current SONiC management components: + +* SONIC CLI commands + +cli + +1. Users could use SONiC CLI command "show runningconfig all" to read current configuration. + - The blue arrow indicates this process. +2. User could use SONiC CLI command "config apply-patch" to incrementally update configurations systematically and validate target configuration using SONiC Yang models. With generic_config_updater, all operations in a 'config apply-patch' command are processed in a single transaction that will either succeed or fail as a whole. + - "config apply-patch" supports ConfigDB, and Yang models. + - The green arrow indicates this process, and dotted arrow indicates Yang validation. +3. SONiC CLI commands can use "config reload" to erase original and fully reload configurations from a file and validate target configuration using SONiC Yang models. + - "config reload" already support input in ConfigDB schema or in yang models schema. + - The yellow arrow indicates this process, and dotted arrow indicates Yang validation. + +And we have the possibility to improve generic_config_updater performance. + +* SONIC Restapi + +restapi + +sonic-restapi is a docker container running in SONiC, which exposes HTTPS endpoints to perform dynamic configuration including config VNET routes. +One challenge of sonic-restapi is to provide a general config schema. Currently its API is designed case by case. + +sonic-restapi will be replaced by gNMI interface in the future. + +* SONiC system telemetry services + +telemetry + +sonic-telemetry provides gNMI/gNOI server interface. And sonic-telemetry provides only telemetry via gRPC, and the gap is configuration. + +We will update sonic-telemetry to support configuration. + +## 1.1 Requirements + +### 1.1.1 Phase 1 Requirements +* Set and get RPCs must be supported. Customer will use get RPC to retrieve configurations including FRR and VNET route, and use set RPC to apply new configurations. +* SetRequest message must support to incrementally update configuration and fully update configurations. +* Data models can be SONiC Yang models or CONFIG_DB schema. +* Ability to read different DBs - ApplDB, ConfigDB, StateDB, CountersDB etc. +* Ability to write different DBs - ApplDB, ConfigDB. +* Configurations must be verified using YANG models even it is in CONFIG_DB schema. +* Need to configure huge VNET route entries to ApplDB, with high speed. +* Configurations for ConfigDB must be persisted after a device restart. +* Need to support multi-ASIC platform. +* Ability to support bulk set-get operations. +* Must follow gnmi-specification. + * All changes to the state of the target that are included in an individual SetRequest message are considered part of a transaction. + * Within an individual transaction (SetRequest) the order of operations is 'delete', 'replace', 'update'. + * If a single path is in multiple operations in one SetRequest (i.e., within 'update' or 'replace'), then the state of the target MUST reflect the application of all the operations in order, even if they overwrite each other. + * The session between the client and server MUST be encrypted using TLS. + * New connections are mutually authenticated. + +### 1.1.2 Phase 2 Requirements +* Support authentication and authorization with TACACS+ server. +* Upgrade operation will be provided with GNOI. + +## 1.2 Design Overview + +gnmi-server + +We will update sonic-telemetry to support configuration in the same container. + +And there will be a config files for disable/enable telemetry/new-gnmi feature. + +### 1.2.1 Basic Approach + +#### 1.2.1.1 Transaction + +* Rollback + +Generic_config_updater provides rollback mechanism, and we can use it to implement transaction for CONIFG_DB. + +Currently we do not support rollback for ApplDB, therefore VNET route will be an exception for rollback. Client could make decision based on SetResponse and use more SetRequest(s) to achieve rollback behavior. + +* Set + +Since a single SetRequest will be treated as a transaction, gNMI server does not support parallel write operations. We will put the SetRequests in a queue and serve them with a single worker. + +set + +* Get + +Every set RPC will create a checkpoint of running configuration before any modification and remove this checkpoint after all the modifications. + +Get RPC during write period should use checkpoint, and normally Get RPC will directly fetch ConfigDB. + +get + +#### 1.2.1.2 Yang Validation + +For ConfigDB, and input is SONiC Yang models schema, sonic-config-engine and generic_config_updater will run Yang validation. + +For ConfigDB, and input is ConfigDB schema, generic_config_updater will run Yang validation. And sonic-config-engine does not run Yang validation today if input is in config_db schema, and it will run Yang validation in future release. + +For ApplDB, we will create Yang models based on requirement. Today we only need to config VNET routes in ApplDB. We will leverage Yang validation or implement specialized validation logic for optimal performance. + +#### 1.2.1.3 Data Schema + +The ultimate goal is to use SONiC Yang models for configuration, and we also need to support ConfigDB schema and ApplDB schema: + +* We will follow OpenConfig specification to use origin field to support mixed schema. + +* And we use the first element to specify the target database. + +A single request cannot have both SONiC YANG paths and ConfigDB/ApplDB schema paths. + +message-example + +1. Stage 1: SONiC DB Schema + +At stage 1, we will only support SONiC DB schema. + +- If origin is ‘sonic_db’ or NULL, and target is ‘CONFIG_DB’, SetRequest and GetRequest will use CONFIG_DB schema, and sonic_config_engine or generic_config_engine will be invoked. +- If origin is ‘sonic_db’ or NULL, and target is ‘APPL_DB’, and table name is "VNET_ROUTE_TABLE", SetRequest and GetRequest will be used to access VNET route entry, and special_config_updater will be invoked. + +2. Stage 2: SONiC Yang Schema + +At stage 2, we will support SONiC Yang schema. + +* If origin is ‘sonic_yang’ and target is ‘APPL_DB’, request will use SONiC Yang models schema, and special_config_updater will be invoked. +* If origin is ‘sonic_yang’ and target is 'CONFIG_DB' or NULL, request will use SONiC Yang models schema, and sonic_config_engine or generic_config_engine will be invoked. + +set-flow + +get-flow + +Assume running-config to be: + + { + "DEVICE_NEIGHBOR": { + "Ethernet8": { + "name": "Servers1", + "port": "eth0" + }, + "Ethernet96": { + "name": "Servers23", + "port": "eth0" + }, + }, + } + +And then perform the actions below: +* replace port under Ethernet8 with eth1 +* remove Ethernet96 + +The steps would be: +1. Get the running configuration + +With CONFIG_DB schema: + + ++++++++ Sending get request: ++++++++ + path { + elem {name: "CONFIG_DB"} elem {name: "DEVICE_NEIGHBOR"} + } + encoding: JSON_IETF + ++++++++ Recevied get response: ++++++++ + notification { + update { + path { + origin: "sonic_db" + elem {name: "CONFIG_DB"} elem {name: "DEVICE_NEIGHBOR"} elem {name: "Ethernet8"} + } + val { + json_ietf_val: "{\"name\": \"Servers1\",\"port\": \"eth0\"}" + } + } + update { + path { + origin: "sonic_db" + elem {name: "CONFIG_DB"} elem {name: "DEVICE_NEIGHBOR"} elem {name: "Ethernet96"} + } + val { + json_ietf_val: "{\"name\": \"Servers23\",\"port\": \"eth0\"}" + } + } + } + +With CONFIG_YANG schema: + + ++++++++ Sending get request: ++++++++ + path { + origin: "sonic_yang" + elem {name: "CONFIG_DB"} elem {name: "sonic-device_neighbor:sonic-device_neighbor"} + } + encoding: JSON_IETF + ++++++++ Recevied get response: ++++++++ + notification { + update { + path { + origin: "sonic_yang" + elem {name: "CONFIG_DB"} elem {name: "sonic-device_neighbor:sonic-device_neighbor"} elem {name: "sonic-device_neighbor:DEVICE_NEIGHBOR"} elem {name: "DEVICE_NEIGHBOR_LIST" key {key: "name" value: "Ethernet8"}} + } + val { + json_ietf_val: "{\"name\": \"Servers1\",\"port\": \"eth0\"}" + } + } + update { + path { + origin: "sonic_yang" + elem {name: "CONFIG_DB"} elem {name: "sonic-device_neighbor:sonic-device_neighbor"} elem {name: "sonic-device_neighbor:DEVICE_NEIGHBOR"} elem {name: "DEVICE_NEIGHBOR_LIST" key {key: "name" value: "Ethernet96"}} + } + val { + json_ietf_val: "{\"name\": \"Servers23\",\"port\": \"eth0\"}" + } + } + } + +2. Apply the new configuration + +With CONFIG_DB schema: + + ++++++++ Sending set request: ++++++++ + replace { + path { + origin: "sonic_db" + elem {name: "CONFIG_DB"} elem {name: "DEVICE_NEIGHBOR"} elem {name: "Ethernet96"} + } + } + replace { + path { + origin: "sonic_db" + elem {name: "CONFIG_DB"} elem {name: "DEVICE_NEIGHBOR"} elem {name: "Ethernet8"} elem {name: "port"} + } + val { + json_ietf_val: "eth1" + } + } + ++++++++ Recevied set response: ++++++++ + response { + path { + origin: "sonic_db" + elem {name: "CONFIG_DB"} elem {name: "DEVICE_NEIGHBOR"} elem {name: "Ethernet96"} + } + op: REPLACE + } + response { + path { + origin: "sonic_db" + elem {name: "CONFIG_DB"} elem {name: "DEVICE_NEIGHBOR"} elem {name: "Ethernet8"} elem {name: "port"} + } + op: REPLACE + } + +With CONFIG_YANG schema: + + ++++++++ Sending set request: ++++++++ + replace { + path { + origin: "sonic_yang" + elem {name: "CONFIG_DB"} elem {name: "sonic-device_neighbor:sonic-device_neighbor"} elem {name: "sonic-device_neighbor:DEVICE_NEIGHBOR"} elem {name: "DEVICE_NEIGHBOR_LIST" key {key: "name" value: "Ethernet96"}} + } + } + replace { + path { + origin: "sonic_yang" + elem {name: "CONFIG_DB"} elem {name: "sonic-device_neighbor:sonic-device_neighbor"} elem {name: "sonic-device_neighbor:DEVICE_NEIGHBOR"} elem {name: "DEVICE_NEIGHBOR_LIST" key {key: "name" value: "Ethernet8"}} elem {name: "port"} + } + val { + json_ietf_val: "eth1" + } + } + ++++++++ Recevied set response: ++++++++ + response { + path { + origin: "sonic_yang" + elem {name: "CONFIG_DB"} elem {name: "sonic-device_neighbor:sonic-device_neighbor"} elem {name: "sonic-device_neighbor:DEVICE_NEIGHBOR"} elem {name: "DEVICE_NEIGHBOR_LIST" key {key: "name" value: "Ethernet96"}} + } + op: REPLACE + } + response { + path { + origin: "sonic_yang" + elem {name: "CONFIG_DB"} elem {name: "sonic-device_neighbor:sonic-device_neighbor"} elem {name: "sonic-device_neighbor:DEVICE_NEIGHBOR"} elem {name: "DEVICE_NEIGHBOR_LIST" key {key: "name" value: "Ethernet8"}} elem {name: "port"} + } + op: REPLACE + } + +#### 1.2.1.4 Incremental Configurations + +For incremental configurations, SetRequest can use all kinds of operations, for example, 'replace' operations, 'update' operations and 'delete' operations. And generic_config_updater can guarantee the outcome is correct. + +Generic_config_updater is used for incrementally update configurations, and it has two related API: +1. replace, input format is ConfigDB schema. +2. apply-patch, input format is JsonPatch. + +SetRequest syntax is not the same as JsonPatch. For example, 'replace' operation can be used to delete a node and update a node, please refer to gnmi specification. + +We can translate most of the SetRequest operations directly: + +### Table 2: Mapping Operations +| SetRequest Operation | Description | JsonPatch Operation | +| ---- | ---- | ---- | +| Delete | Where a path is contained within the delete field of the SetRequest message, it should be removed from the target's data tree. | Remove | +| Update | If a particular path-value is specified in the client-supplied data, it is replaced with the client-specified value.
If the path specified does not exist, the target MUST create the data tree element and populate it with the data in the Update message. | Add | +| Replace (delete) | If a particular path-value is NOT specified in the client-supplied data and the path does not have a specified default value in the corresponding schema, it should be deleted. | Remove | +| Replace (update) | If a particular path-value is specified in the client-supplied data, it is replaced with the client-specified value.
If the path specified does not exist, the target MUST create the data tree element and populate it with the data in the Update message. | Add | + +Below table provides an example to translate from SetRequest to JsonPatch. + +### Table 3: Translate Example +| SetRequest Format | JsonPatch Format | +| ---- | ---- | +| replace {
 path {
  elem {name: "CONFIG_DB"} elem {name: "DEVICE_NEIGHBOR"} elem {name: "Ethernet96"}
 }
}
replace {
 path {
  elem {name: "CONFIG_DB"} elem {name: "DEVICE_NEIGHBOR"} elem {name: "Ethernet8"} elem {name: "port"}
 }
 val { json_ietf_val: "eth1" }
} | [
 {
  "op": "remove", "path": "/DEVICE_NEIGHBOR/Ethernet96"},
  { "op": "add", "path": "/DEVICE_NEIGHBOR/Ethernet8/port", "value": "eth1"}
] | + +#### 1.2.1.5 Full Configurations + +For full configurations, SetRequest will use one 'delete' operation and one 'update' operation with the root node, and sonic-config-engine is used for fully update configurations. + +SetRequest message will be: + + ++++++++ Sending set request: ++++++++ + delete { + path { origin: "sonic_db" } + } + update { + path { origin: "sonic_db" } + val { + json_ietf_val: "{\"DEVICE_NEIGHBOR/Ethernet8/name\":\"Servers1\", \"DEVICE_NEIGHBOR/Ethernet8/port\":\"eth0\", \"DEVICE_NEIGHBOR/Ethernet96/name\":\"Servers23\", \"DEVICE_NEIGHBOR/Ethernet96/port\":\"eth0\", ...}" + } + } + ++++++++ Recevied set response: ++++++++ + response { + path { origin: "sonic_db" } + op: DELETE + } + response { + path { origin: "sonic_db" } + op: UPDATE + } + +#### 1.2.1.6 Configuration Persistence + +All successful changes for ConfigDB made through the gNMI SET RPC will be saved to /etc/sonic/config_db.json. + +If the target database is not ConfigDB, we can't guarantee persisitence. + +#### 1.2.1.7 Heartbeat and Reprogram + +For full system reboot, client has to reprogram ApplDB. If the gnmi container restarts, client doesn't need to reprogram. + +We propose to use Capabilities RPC as heartbeat to detect reboot, and we will expose reset status. + +After reboot, client should check reset status to decide if needs to reprogram. + +heartbeat + +#### 1.2.1.8 Authentication +sonic-telemetry provides three authentication mechanisms, and we will keep the same mechanism: +* Password: Like HTTP Basic auth, you pass the username and password in the gRPC metadata +* JWT: JSON Web Tokens standard. First you authenticate with username/password and then receive a JWT token. After you send the token in the gRPC metadata. +* User Certificate: Use a valid client certificate with the username embedded in the CN field. The certificate is for authentication, the username is for authorization. + +sonic-restapi uses one authentication mechanism: +* In the authentication of client certificate, after the certificate chain is validated by TLS, it will further check if the common name of the end-entity certificate is in the trusted common name list of the server config. + +#### 1.2.1.9 ACL +The new GNMI server interface will use CONFIG_DB schema and SONiC Yang Models for ACL configuration. + +#### 1.2.1.10 Data Protection + +For ApplDB, gNMI clients can write table directly. We need to specify which table can be changed, which one can not. + +We will create new Yang models for ApplDB, if gNMI set request modifies a table without Yang models, this set request should be rejected. And we can also use "config false" tag, please refer to [link](https://datatracker.ietf.org/doc/html/rfc7950#section-4.2.3). + +#### 1.2.1.11 Docker to Host communication +'config apply-patch' and 'config reload' are designed to run on host, and it's difficult to support them in container: +1. These commands will update redis database and restart container, when they restart gnmi, bgp, syncd and swss, the ongoing gnmi operation will be broken. +2. 'config reload' will stop service at first, run some other operations, and then restart service. If we run this command in container, it will be broken at the stop service step. +3. These commands will execute some host scripts and use systemctl to restart service, it will be dangerous to support these operations in container. +The solution is to add host services for 'config apply-patch' and 'config reload' on host, and gNMI server uses dbus method to invoke these services to update configuration + +##### 1.2.1.11.1 Incremental Configurations + +For incremental configuration, 'config apply-patch' should not restart gNMI, bgp, synd and swss. + +incremental + +##### 1.2.1.11.2 Full Configurations + +For full configuration, there’re 2 possible solutions: +* gNMI server needs to send response at first, and then invoke 'config reload'. + +full-gnmi + +* Use gNMI request and gNOI request together to implement full configuration update. + +full-gnmi-gnoi + +The full configuration request will be overwritten by subsequent full configuration request or incremental configuration request. + +overwritten-config + +#### 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; + } + + +### 1.2.2 Container + +All the introduced features will be part of the sonic-telemetry package installed in sonic-telemetry container. + +# 2 Error Handling +supervisord will autorestart gnmi service if it exits after it has successfully started up. + +# 3 Serviceability and Debug +All requests logs are stored in syslog. + +# 4 Unit Tests + +## 4.1 Unit Tests for Capabilities RPC + +| Test Case | Description | +| ---- | ---- | +| 1 | Get capability. | + +## 4.2 Unit Tests for Get RPC + +| Test Case | Description | +| ---- | ---- | +| 1 | Get from CONFIG_DB with SONiC DB schema. | +| 2 | Get from APPL_DB with SONiC DB schema. | +| 3 | Get from CONFIG_DB with SONiC Yang schema. | +| 4 | Get from APPL_DB with SONiC Yang schema. | + +## 4.3 Unit Tests for Set RPC + +| Test Case | Description | +| ---- | ---- | +| 1 | Delete operation with SONiC DB schema to remove table in CONFIG_DB. | +| 2 | Delete operation with SONiC DB schema to remove table in APPL_DB. | +| 3 | Update operation with SONiC DB schema to create table in CONFIG_DB. | +| 4 | Update operation with SONiC DB schema to create table in APPL_DB. | +| 5 | Update operation with SONiC DB schema to update table in CONFIG_DB. | +| 6 | Update operation with SONiC DB schema to update table in APPL_DB. | +| 7 | Replace operation with SONiC DB schema to remove table in CONFIG_DB. | +| 8 | Replace operation with SONiC DB schema to remove table in APPL_DB. | +| 9 | Replace operation with SONiC DB schema to create table in CONFIG_DB. | +| 10 | Replace operation with SONiC DB schema to create table in APPL_DB. | +| 11 | Replace operation with SONiC DB schema to update table in CONFIG_DB. | +| 12 | Replace operation with SONiC DB schema to update table in APPL_DB. | +| 13 | Verify invalid path with SONiC DB schema in CONFIG_DB. | +| 14 | Verify invalid path with SONiC DB schema in APPL_DB. | +| 15 | Verify full configuration update with SONIC DB schema. | +| 16 | Delete operation with SONiC Yang schema to remove table in CONFIG_DB. | +| 17 | Delete operation with SONiC Yang schema to remove table in APPL_DB. | +| 18 | Update operation with SONiC Yang schema to create table in CONFIG_DB. | +| 19 | Update operation with SONiC Yang schema to create table in APPL_DB. | +| 20 | Update operation with SONiC Yang schema to update table in CONFIG_DB. | +| 21 | Update operation with SONiC Yang schema to update table in APPL_DB. | +| 22 | Replace operation with SONiC Yang schema to remove table in CONFIG_DB. | +| 23 | Replace operation with SONiC Yang schema to remove table in APPL_DB. | +| 24 | Replace operation with SONiC Yang schema to create table in CONFIG_DB. | +| 25 | Replace operation with SONiC Yang schema to create table in APPL_DB. | +| 26 | Replace operation with SONiC Yang schema to update table in CONFIG_DB. | +| 27 | Replace operation with SONiC Yang schema to update table in APPL_DB. | +| 28 | Verify invalid path with SONiC Yang schema in CONFIG_DB. | +| 29 | Verify invalid path with SONiC Yang schema in APPL_DB. | +| 30 | Verify full configuration update with SONIC Yang schema. | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/mgmt/gnmi/images/cli.svg b/doc/mgmt/gnmi/images/cli.svg new file mode 100644 index 0000000000..e017036ef4 --- /dev/null +++ b/doc/mgmt/gnmi/images/cli.svg @@ -0,0 +1,506 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + + + + + Process + + + + + + + + + + + + + + + + + + + Sheet.31 + SONiC utilities + + + + SONiC utilities + + Process.35 + User + + + + + + + + + + + + + + + + + + + User + + Process.32 + show + + + + + + + + + + + + + + + + + + + show + + Process.34 + generic_config_updater + + + + + + + + + + + + + + + + + + + generic_config_updater + + 1-D single + + + + + + + Dynamic connector + + + + Sheet.73 + show runningconfig all + + + + show runningconfig all + + Sheet.74 + config apply-patch + + + + config apply-patch + + Document + Sonic Yang models + + + + + + + + + + + + + + + + + + + Sonic Yang models + + Sheet.86 + + Side brace + + + + + + + + + + + + + + + + Sheet.85 + + Sheet.78 + + Datastore + SONiC Redis DB + + + + + + + + + + + + + + + + + + + + + + SONiC Redis DB + + Dynamic connector.77 + + + + + Sheet.79 + + Datastore + SONiC Redis DB + + + + + + + + + + + + + + + + + + + + + + SONiC Redis DB + + Dynamic connector.77 + + + + + Sheet.82 + + Datastore + SONiC Redis DB + + + + + + + + + + + + + + + + + + + + + + SONiC Redis DB + + Dynamic connector.77 + + + + + + + Dynamic connector.87 + + + + Dynamic connector.89 + + + + Process.90 + config + + + + + + + + + + + + + + + + + + + config + + 1-D single.91 + + + + + + + Sheet.92 + config reload + + + + config reload + + Dynamic connector.93 + + + + Dynamic connector.94 + + + + 1-D single.95 + + + + + + + diff --git a/doc/mgmt/gnmi/images/data_flow.svg b/doc/mgmt/gnmi/images/data_flow.svg new file mode 100644 index 0000000000..bb2d59b9cc --- /dev/null +++ b/doc/mgmt/gnmi/images/data_flow.svg @@ -0,0 +1,1442 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CFF Container + + Sheet.21 + + + + + + + + + + + + + + Sheet.22 + SetRequest Flow chart + + + + + + + + + + + + + + + + + + + + + + SetRequest Flow chart + + + Swimlane List + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Swimlane (vertical) + + Sheet.18 + + + + + + + + + + + + + + Sheet.19 + gNMI server + + + + + + + + + + + + + + + + + + + + + + gNMI server + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Swimlane (vertical).28 + + Sheet.29 + + + + + + + + + + + + + + Sheet.30 + Sonic_config_engine + + + + + + + + + + + + + + + + + + + + + + Sonic_config_engine + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Swimlane (vertical).31 + + Sheet.32 + + + + + + + + + + + + + + Sheet.33 + Generic_config_updater + + + + + + + + + + + + + + + + + + + + + + Generic_config_updater + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Swimlane (vertical).34 + + Sheet.35 + + + + + + + + + + + + + + Sheet.36 + Special_config_updater + + + + + + + + + + + + + + + + + + + + + + Special_config_updater + + + Phase List + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Separator (vertical) + + Sheet.26 + + + + + + + + Sheet.27 + + + + + + + + + + + + + + + + + + + + Start/End + Start + + + + + + + + + + + + + + + + + + + + + + + + Start + + Dynamic connector + + + + + + + Process.234 + Iterate request paths + + + + + + + + + + + + + + + + + + + + + + + + Iterate request paths + + Dynamic connector.235 + + + + + + + Decision.236 + Different origin? + + + + + + + + + + + + + + + + + + + + + + + + Different origin? + + Dynamic connector.237 + No + + + + + + + + No + + Start/End.254 + Invalid request + + + + + + + + + + + + + + + + + + + + + + + + Invalid request + + Dynamic connector.255 + Yes + + + + + + + + Yes + + Decision.256 + Origin is sonic_db + + + + + + + + + + + + + + + + + + + + + + + + Origin is sonic_db + + Dynamic connector.257 + No + + + + + + + + No + + Process.258 + Run Yang validation and write to ConfigDB + + + + + + + + + + + + + + + + + + + + + + + + Run Yang validation and write to ConfigDB + + Dynamic connector.259 + Yes + + + + + + + + Yes + + Decision.260 + Incremental configurations? + + + + + + + + + + + + + + + + + + + + + + + + Incremental configurations? + + Dynamic connector.261 + Yes + + + + + + + + Yes + + Process.262 + Run Yang validation and write to ConfigDB + + + + + + + + + + + + + + + + + + + + + + + + Run Yang validation and write to ConfigDB + + Dynamic connector.263 + No + + + + + + + + No + + Process.266 + Run Yang validation and write to APPlDB + + + + + + + + + + + + + + + + + + + + + + + + Run Yang validation and write to APPlDB + + Dynamic connector.267 + No + + + + + + + + No + + Decision.268 + Origin is sonic_yang + + + + + + + + + + + + + + + + + + + + + + + + Origin is sonic_yang + + Dynamic connector.269 + No + + + + + + + + No + + Decision.270 + target is CONFIG_DB? + + + + + + + + + + + + + + + + + + + + + + + + target is CONFIG_DB? + + Dynamic connector.271 + Yes + + + + + + + + Yes + + Decision.272 + Incremental configurations? + + + + + + + + + + + + + + + + + + + + + + + + Incremental configurations? + + Dynamic connector.273 + Yes + + + + + + + + Yes + + Process.274 + Run Yang validation and write to ConfigDB + + + + + + + + + + + + + + + + + + + + + + + + Run Yang validation and write to ConfigDB + + Dynamic connector.275 + Yes + + + + + + + + Yes + + Process.276 + Run Yang validation and write to ConfigDB + + + + + + + + + + + + + + + + + + + + + + + + Run Yang validation and write to ConfigDB + + Dynamic connector.277 + No + + + + + + + + No + + Dynamic connector.279 + No + + + + + + + + No + + Process.280 + Run Yang validation and write to APPlDB + + + + + + + + + + + + + + + + + + + + + + + + Run Yang validation and write to APPlDB + + Decision.1000 + target is CONFIG_DB + + + + + + + + + + + + + + + + + + + + + + + + target is CONFIG_DB + + Dynamic connector.1001 + Yes + + + + + + + + Yes + + Start/End.1002 + Invalid request + + + + + + + + + + + + + + + + + + + + + + + + Invalid request + + diff --git a/doc/mgmt/gnmi/images/data_flow_get.svg b/doc/mgmt/gnmi/images/data_flow_get.svg new file mode 100644 index 0000000000..26fcf7a86b --- /dev/null +++ b/doc/mgmt/gnmi/images/data_flow_get.svg @@ -0,0 +1,659 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + + Start/End + Start + + + + + + + + + + + + + + + + + + + + + + + Start + + Dynamic connector + + + + + + + Process.234 + Iterate request paths + + + + + + + + + + + + + + + + + + + + + + + Iterate request paths + + Dynamic connector.235 + + + + + + + Decision.236 + Different origin? + + + + + + + + + + + + + + + + + + + + + + + Different origin? + + Dynamic connector.237 + No + + + + + + + + No + + Start/End.254 + Invalid request + + + + + + + + + + + + + + + + + + + + + + + Invalid request + + Dynamic connector.255 + Yes + + + + + + + + Yes + + Decision.256 + Origin is sonic_db + + + + + + + + + + + + + + + + + + + + + + + Origin is sonic_db + + Dynamic connector.257 + No + + + + + + + + No + + Decision.268 + Origin is sonic_yang + + + + + + + + + + + + + + + + + + + + + + + Origin is sonic_yang + + Dynamic connector.269 + No + + + + + + + + No + + Decision.270 + target is CONFIG_DB? + + + + + + + + + + + + + + + + + + + + + + + target is CONFIG_DB? + + Dynamic connector.271 + Yes + + + + + + + + Yes + + Dynamic connector.273 + Yes + + + + + + + + Yes + + Dynamic connector.279 + No + + + + + + + + No + + Start/End.288 + Invalid request + + + + + + + + + + + + + + + + + + + + + + + Invalid request + + Process.44 + Read from ConfigDB + + + + + + + + + + + + + + + + + + + + + + + Read from ConfigDB + + Dynamic connector.45 + Yes + + + + + + + + Yes + + Process.46 + Read from ApplDB + + + + + + + + + + + + + + + + + + + + + + + Read from ApplDB + + Dynamic connector.47 + No + + + + + + + + No + + Process.48 + Read from ConfigDB and translate to Yang models + + + + + + + + + + + + + + + + + + + + + + + Read from ConfigDB and translate to Yang models + + Process.49 + Read from ApplDB and translate to Yang models + + + + + + + + + + + + + + + + + + + + + + + Read from ApplDB and translate to Yang models + + Decision.1000 + target is CONFIG_DB? + + + + + + + + + + + + + + + + + + + + + + + target is CONFIG_DB? + + Dynamic connector.1001 + Yes + + + + + + + + Yes + + diff --git a/doc/mgmt/gnmi/images/full_rpc.svg b/doc/mgmt/gnmi/images/full_rpc.svg new file mode 100644 index 0000000000..db99731921 --- /dev/null +++ b/doc/mgmt/gnmi/images/full_rpc.svg @@ -0,0 +1,438 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + + + + + + + Object lifeline + GNMI client + + Sheet.2 + + + + Sheet.3 + + + + Sheet.4 + + + Sheet.5 + + + + + + + GNMI client + + + + + + + + Object lifeline.6 + GNMI server + + Sheet.7 + + + + Sheet.8 + + + + Sheet.9 + + + Sheet.10 + + + + + + + GNMI server + + + Activation + + + + + + + Message + SetRequest + + + + + + + + + + + SetRequest + + Return Message + SetResponse + + + + + + + + + + + SetResponse + + + + + + + + User + + Sheet.17 + + Sheet.18 + + + + Sheet.19 + + + + + + + + + + + + Script + + Sheet.21 + + + + Sheet.22 + + + + Sheet.23 + + + + Sheet.24 + + + + Sheet.25 + + + + Sheet.26 + + + + Sheet.27 + + + + Sheet.28 + + + + Sheet.29 + + + + + + + + + + Object lifeline.30 + Host service + + Sheet.31 + + + + Sheet.32 + + + + Sheet.33 + + + Sheet.34 + + + + + + + Host service + + + + + + + + + Script.35 + + Sheet.36 + + + + Sheet.37 + + + + Sheet.38 + + + + Sheet.39 + + + + Sheet.40 + + + + Sheet.41 + + + + Sheet.42 + + + + Sheet.43 + + + + Sheet.44 + + + + + Activation.45 + + + + + + + Message.46 + + + + + + + + + + Sheet.49 + Config reload + + + + Config reload + + Self Message.50 + + + + + + + + + + Sheet.51 + Config load or run yang validation + + + + Config load or run yang validation + + Self Message.52 + + + + + + + + + + Activation.55 + + + + + + + Self Message.56 + + + + + + + + + + Sheet.57 + Config reload + + + + Config reload + + Sheet.53 + + Sheet.54 + + + + + diff --git a/doc/mgmt/gnmi/images/full_rpc_gnoi.svg b/doc/mgmt/gnmi/images/full_rpc_gnoi.svg new file mode 100644 index 0000000000..568efa538a --- /dev/null +++ b/doc/mgmt/gnmi/images/full_rpc_gnoi.svg @@ -0,0 +1,472 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + + + + + + + Object lifeline + GNMI/GNOI client + + Sheet.2 + + + + Sheet.3 + + + + Sheet.4 + + + Sheet.5 + + + + + + + GNMI/GNOI client + + + + + + + + Object lifeline.6 + GNMI/GNOI server + + Sheet.7 + + + + Sheet.8 + + + + Sheet.9 + + + Sheet.10 + + + + + + + GNMI/GNOI server + + + Activation + + + + + + + Message + GNMI SetRequest + + + + + + + + + + + GNMI SetRequest + + Return Message + GNMI SetResponse + + + + + + + + + + + GNMI SetResponse + + + + + + + + User + + Sheet.17 + + Sheet.18 + + + + Sheet.19 + + + + + + + + + + + + Script + + Sheet.21 + + + + Sheet.22 + + + + Sheet.23 + + + + Sheet.24 + + + + Sheet.25 + + + + Sheet.26 + + + + Sheet.27 + + + + Sheet.28 + + + + Sheet.29 + + + + + + + + + + Object lifeline.30 + Host service + + Sheet.31 + + + + Sheet.32 + + + + Sheet.33 + + + Sheet.34 + + + + + + + Host service + + + + + + + + + Script.35 + + Sheet.36 + + + + Sheet.37 + + + + Sheet.38 + + + + Sheet.39 + + + + Sheet.40 + + + + Sheet.41 + + + + Sheet.42 + + + + Sheet.43 + + + + Sheet.44 + + + + + Activation.45 + + + + + + + Message.46 + + + + + + + + + + Sheet.49 + Config reload with previous configuration + + + + Config reload with previous configuration + + Self Message.50 + + + + + + + + + + Sheet.51 + Run yang validation and store the configuration + + + + Run yang validation and store the configuration + + Self Message.52 + + + + + + + + + + Message.53 + GNOI RebootRequest + + + + + + + + + + + GNOI RebootRequest + + Return Message.54 + GNOI RebootResponse + + + + + + + + + + + GNOI RebootResponse + + Message.55 + GNOI RebootStatusRequest + + + + + + + + + + + GNOI RebootStatusRequest + + Return Message.56 + GNOI RebootStatusResponse + + + + + + + + + + + GNOI RebootStatusResponse + + Activation.57 + + + + + + + diff --git a/doc/mgmt/gnmi/images/get_lock.svg b/doc/mgmt/gnmi/images/get_lock.svg new file mode 100644 index 0000000000..1bf062a598 --- /dev/null +++ b/doc/mgmt/gnmi/images/get_lock.svg @@ -0,0 +1,808 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + + + + + + + Object lifeline + GNMI client + + Sheet.2 + + + + Sheet.3 + + + + Sheet.4 + + + Sheet.5 + + + + + + + GNMI client + + + + + + + + Object lifeline.6 + GNMI write thread + + Sheet.7 + + + + Sheet.8 + + + + Sheet.9 + + + Sheet.10 + + + + + + + GNMI write thread + + + Activation + + + + + + + Message + SetRequest + + + + + + + + + + + SetRequest + + Return Message + SetResponse + + + + + + + + + + + SetResponse + + + + + + + + User + + Sheet.17 + + Sheet.18 + + + + Sheet.19 + + + + + + + + + + + + Script + + Sheet.21 + + + + Sheet.22 + + + + Sheet.23 + + + + Sheet.24 + + + + Sheet.25 + + + + Sheet.26 + + + + Sheet.27 + + + + Sheet.28 + + + + Sheet.29 + + + + + + + + + + Object lifeline.30 + GNMI read thread + + Sheet.31 + + + + Sheet.32 + + + + Sheet.33 + + + Sheet.34 + + + + + + + GNMI read thread + + + + + + + + + Script.35 + + Sheet.36 + + + + Sheet.37 + + + + Sheet.38 + + + + Sheet.39 + + + + Sheet.40 + + + + Sheet.41 + + + + Sheet.42 + + + + Sheet.43 + + + + Sheet.44 + + + + + + + + + + Object lifeline.51 + checkpoint + + Sheet.52 + + + + Sheet.53 + + + + Sheet.54 + + + Sheet.55 + + + + + + + checkpoint + + + + + + + + Object lifeline.76 + Database + + Sheet.77 + + + + Sheet.78 + + + + Sheet.79 + + + Sheet.80 + + + + + + + Database + + + + + + + + + Database + + Sheet.98 + + Sheet.99 + + + + Sheet.100 + + + + Sheet.101 + + + + Sheet.102 + + + + + + Message.162 + Write Database + + + + + + + + + + + Write Database + + Activation.165 + + + + + + + Return Message.166 + + + + + + + + + + + + + + + + Document + + Sheet.174 + + + + Sheet.175 + + + + Sheet.176 + + + + Sheet.177 + + + + Sheet.178 + + + + Sheet.179 + + + + + Message.180 + Remove checkpoint + + + + + + + + + + + Remove checkpoint + + Activation.183 + + + + + + + Activation.185 + + + + + + + Message.186 + GetRequest + + + + + + + + + + + GetRequest + + Activation.187 + + + + + + + Message.188 + Read from database + + + + + + + + + + + Read from database + + Return Message.189 + + + + + + + + + + Return Message.190 + + + + + + + + + + Activation.191 + + + + + + + Message.192 + SetRequest + + + + + + + + + + + SetRequest + + Activation.193 + + + + + + + Message.194 + Write Database + + + + + + + + + + + Write Database + + Return Message.195 + + + + + + + + + + Activation.201 + + + + + + + Message.202 + + + + + + + + + + Sheet.203 + GetRequest + + + + GetRequest + + Sheet.204 + GetResponse + + + + GetResponse + + Activation.206 + + + + + + + Message.207 + Read from checkpoint + + + + + + + + + + + Read from checkpoint + + Return Message.208 + + + + + + + + + + Return Message.209 + GetResponse + + + + + + + + + + + GetResponse + + Return Message.210 + SetResponse + + + + + + + + + + + SetResponse + + Message.211 + Create checkpoint + + + + + + + + + + + Create checkpoint + + Activation.212 + + + + + + + Message.213 + Create checkpoint + + + + + + + + + + + Create checkpoint + + Activation.214 + + + + + + + Message.215 + Remove checkpoint + + + + + + + + + + + Remove checkpoint + + Activation.216 + + + + + + + diff --git a/doc/mgmt/gnmi/images/gnmi.svg b/doc/mgmt/gnmi/images/gnmi.svg new file mode 100644 index 0000000000..9a2f5aab90 --- /dev/null +++ b/doc/mgmt/gnmi/images/gnmi.svg @@ -0,0 +1,1089 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + + + + + Process + + + + + + + + + + + + + + + + + + + Sheet.31 + SONiC Gnmi Server + + + + SONiC Gnmi Server + + Process.35 + GNMI client + + + + + + + + + + + + + + + + + + + GNMI client + + Process.34 + generic_config_updater + + + + + + + + + + + + + + + + + + + generic_config_updater + + Side brace + + + + + + + + + + + + + + + + Sheet.73 + Get + + + + Get + + Process.75 + GNMI server + + + + + + + + + + + + + + + + + + + GNMI server + + Document + SONiC Yang Models + + + + + + + + + + + + + + + + + + + SONiC Yang Models + + 1-D single.81 + + + + + + + Sheet.82 + Set + + + + Set + + Sheet.84 + + + + Process.91 + Sonic-config-engine + + + + + + + + + + + + + + + + + + + Sonic-config-engine + + Dynamic connector.92 + + + + Dynamic connector.97 + + + + Sheet.100 + + Datastore + ApplDB + + + + + + + + + + + + + + + + + + + + + + ApplDB + + Dynamic connector.41 + + + + + Sheet.101 + + Datastore + StateDB + + + + + + + + + + + + + + + + + + + + + + StateDB + + Dynamic connector.41 + + + + + Sheet.104 + + Datastore + CountersDB + + + + + + + + + + + + + + + + + + + + + + CountersDB + + Dynamic connector.41 + + + + + Sheet.110 + + Datastore + ConfigDB + + + + + + + + + + + + + + + + + + + + + + ConfigDB + + Dynamic connector.41 + + + + + Sheet.114 + + Datastore + ... + + + + + + + + + + + + + + + + + + + + + + ... + + Dynamic connector.41 + + + + + Cloud.34 + + + + + + + Process.139 + special_config_updater + + + + + + + + + + + + + + + + + + + special_config_updater + + 1-D single.140 + + + + + + + Dynamic connector + + + + Decision.1000 + Target Database? + + + + + + + + + + + + + + + + + + + Target Database? + + Dynamic connector.1001 + ApplDB + + + + + ApplDB + + Decision.1002 + Incremental or full config? + + + + + + + + + + + + + + + + + + + Incremental or full config? + + Dynamic connector.1003 + + + + Sheet.1004 + ConfigDB + + + + ConfigDB + + Dynamic connector.1005 + + + + Dynamic connector.1006 + + + + Sheet.1007 + Incremental + + + + Incremental + + Sheet.1008 + Full + + + + Full + + Process.1009 + System Telemetry Data collectors + + + + + + + + + + + + + + + + + + + System Telemetry Data collectors + + 1-D single.1010 + + + + + + + Sheet.1011 + Get + + + + Get + + 1-D single.1012 + + + + + + + Sheet.1013 + Subscribe + + + + Subscribe + + Process.1014 + GNMI diaout client + + + + + + + + + + + + + + + + + + + GNMI diaout client + + 1-D single.1015 + + + + + + + Sheet.1016 + Publish + + + + Publish + + Dynamic connector.1017 + + + + Cloud.1018 + + + + + + + Decision.1019 + Target is DB? + + + + + + + + + + + + + + + + + + + Target is DB? + + Process.1020 + DB client + + + + + + + + + + + + + + + + + + + DB client + + Process.1021 + Non-DB client + + + + + + + + + + + + + + + + + + + Non-DB client + + Dynamic connector.1022 + Yes + + + + + Yes + + Dynamic connector.1023 + No + + + + + No + + Dynamic connector.1024 + + + + Dynamic connector.1025 + + + + Dynamic connector.1026 + + + + Document.1027 + Platform data + + + + + + + + + + + + + + + + + + + Platform data + + Document.1028 + Proc data + + + + + + + + + + + + + + + + + + + Proc data + + Document.1029 + ASIC data + + + + + + + + + + + + + + + + + + + ASIC data + + Dynamic connector.1030 + + + + Dynamic connector.1031 + + + + Dynamic connector.1032 + + + + diff --git a/doc/mgmt/gnmi/images/heartbeat.svg b/doc/mgmt/gnmi/images/heartbeat.svg new file mode 100644 index 0000000000..aee2106107 --- /dev/null +++ b/doc/mgmt/gnmi/images/heartbeat.svg @@ -0,0 +1,608 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + + + + + + + Object lifeline + GNMI client + + Sheet.2 + + + + Sheet.3 + + + + Sheet.4 + + + Sheet.5 + + + + + + + GNMI client + + + + + + + + Object lifeline.6 + GNMI server + + Sheet.7 + + + + Sheet.8 + + + + Sheet.9 + + + Sheet.10 + + + + + + + GNMI server + + + Activation + + + + + + + Message + SetRequest + + + + + + + + + + + SetRequest + + Return Message + SetResponse + + + + + + + + + + + SetResponse + + Self Message + + + + + + + + + + Sheet.15 + Full system reload or gnmi container reload + + + + Full system reload or gnmi container reload + + + + + + + + User + + Sheet.17 + + Sheet.18 + + + + Sheet.19 + + + + + + + + + + + + Script + + Sheet.21 + + + + Sheet.22 + + + + Sheet.23 + + + + Sheet.24 + + + + Sheet.25 + + + + Sheet.26 + + + + Sheet.27 + + + + Sheet.28 + + + + Sheet.29 + + + + + Sheet.36 + + Message.30 + CapabilitiesRequest + + + + + + + + + + + CapabilitiesRequest + + Activation.31 + + + + + + + Return Message.32 + CapabilitiesResponse + + + + + + + + + + + CapabilitiesResponse + + + Sheet.41 + + Message.30 + CapabilitiesRequest + + + + + + + + + + + CapabilitiesRequest + + Activation.31 + + + + + + + Return Message.32 + CapabilitiesResponse + + + + + + + + + + + CapabilitiesResponse + + + Sheet.45 + + Message.30 + CapabilitiesRequest + + + + + + + + + + + CapabilitiesRequest + + Activation.31 + + + + + + + Return Message.32 + CapabilitiesResponse + + + + + + + + + + + CapabilitiesResponse + + + Activation.31 + + + + + + + Sheet.62 + + Message.30 + CapabilitiesRequest + + + + + + + + + + + CapabilitiesRequest + + Return Message.32 + CapabilitiesResponse + + + + + + + + + + + CapabilitiesResponse + + Sheet.60 + + Sheet.61 + + + + + + Sheet.63 + + Message.30 + CapabilitiesRequest + + + + + + + + + + + CapabilitiesRequest + + Return Message.32 + CapabilitiesResponse + + + + + + + + + + + CapabilitiesResponse + + Sheet.66 + + Sheet.67 + + + + + + Sheet.68 + + Message.30 + CapabilitiesRequest + + + + + + + + + + + CapabilitiesRequest + + Return Message.32 + CapabilitiesResponse + + + + + + + + + + + CapabilitiesResponse + + Sheet.71 + + Sheet.72 + + + + + + Activation.73 + + + + + + + Activation.74 + + + + + + + Message.75 + GetRequest + + + + + + + + + + + GetRequest + + Return Message.76 + GetResponse + + + + + + + + + + + GetResponse + + Self Message.77 + + + + + + + + + + Sheet.78 + Compare ApplDB Configuration + + + + Compare ApplDB Configuration + + diff --git a/doc/mgmt/gnmi/images/incremental_rpc.svg b/doc/mgmt/gnmi/images/incremental_rpc.svg new file mode 100644 index 0000000000..0de42da0fd --- /dev/null +++ b/doc/mgmt/gnmi/images/incremental_rpc.svg @@ -0,0 +1,397 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + + + + + + + Object lifeline + GNMI client + + Sheet.2 + + + + Sheet.3 + + + + Sheet.4 + + + Sheet.5 + + + + + + + GNMI client + + + + + + + + Object lifeline.6 + GNMI server + + Sheet.7 + + + + Sheet.8 + + + + Sheet.9 + + + Sheet.10 + + + + + + + GNMI server + + + Activation + + + + + + + Message + SetRequest + + + + + + + + + + + SetRequest + + Return Message + SetResponse + + + + + + + + + + + SetResponse + + + + + + + + User + + Sheet.17 + + Sheet.18 + + + + Sheet.19 + + + + + + + + + + + + Script + + Sheet.21 + + + + Sheet.22 + + + + Sheet.23 + + + + Sheet.24 + + + + Sheet.25 + + + + Sheet.26 + + + + Sheet.27 + + + + Sheet.28 + + + + Sheet.29 + + + + + + + + + + Object lifeline.30 + Host service + + Sheet.31 + + + + Sheet.32 + + + + Sheet.33 + + + Sheet.34 + + + + + + + Host service + + + + + + + + + Script.35 + + Sheet.36 + + + + Sheet.37 + + + + Sheet.38 + + + + Sheet.39 + + + + Sheet.40 + + + + Sheet.41 + + + + Sheet.42 + + + + Sheet.43 + + + + Sheet.44 + + + + + Activation.45 + + + + + + + Message.46 + + + + + + + + + + Return Message.47 + + + + + + + + + + Sheet.49 + Config apply-patch + + + + Config apply-patch + + Self Message.50 + + + + + + + + + + diff --git a/doc/mgmt/gnmi/images/message_example.svg b/doc/mgmt/gnmi/images/message_example.svg new file mode 100644 index 0000000000..36ad96e9c8 --- /dev/null +++ b/doc/mgmt/gnmi/images/message_example.svg @@ -0,0 +1,1686 @@ + + + + + + + + + + + + + + Page-1 + + + + Sheet.1 + + + + + + + + + + + + + + + + + + + + + + + + + SetRequest Message + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + delete { + + + + + + + + + + + + + + + + + + path { + + + + + + + + + + + + + + + + + + origin: " + + + + + + sonic_db + + + + + + " + + + + + + + + + + + + + + + + + + elem {name: “ + + + + + + CONFIG_DB + + + + + + ”} + + + + + + elem {name: + + + + + + + + + + + + DEVICE_NEIGHBOR + + + + + + + + + + + + } elem {name: + + + + + + + + + + + + Ethernet95 + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + replace { + + + + + + + + + + + + + + + + + + path { + + + + + + + + + + + + + + + + + + origin: " + + + + + + sonic + + + + + + _db" + + + + + + + + + + + + + + + + + + elem {name: “ + + + + + + CONFIG_DB + + + + + + ”} + + + + + + elem {name: + + + + + + + + + + + + DEVICE_NEIGHBOR + + + + + + + + + + + + } + + + + + + elem {name: + + + + + + + + + + + + Ethernet96 + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + } + + + + + + + + + + + + replace { + + + + + + + + + + + + + + + + + + path { + + + + + + + + + + + + + + + + + + origin: + + + + + + “sonic + + + + + + _db" + + + + + + + + + + + + + + + + + + elem {name: “ + + + + + + CONFIG_DB + + + + + + ”} + + + + + + elem {name: + + + + + + + + + + + + DEVICE_NEIGHBOR + + + + + + + + + + + + } + + + + + + elem {name: + + + + + + + + + + + + Ethernet8 + + + + + + + + + + + + } elem {name: + + + + + + + + + + + + port + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + val { + + + + + + + + + + + + + + + + + + json_ietf_val: + + + + + + “e + + + + + + th1 + + + + + + + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + update + + + + + + + + + + + + { + + + + + + + + + + + + + + + + + + path { + + + + + + + + + + + + + + + + + + origin: " + + + + + + sonic_db + + + + + + " + + + + + + + + + + + + + + + + + + elem {name: “ + + + + + + CONFIG_DB + + + + + + ”} + + + + + + elem {name: + + + + + + + + + + + + DEVICE_NEIGHBOR + + + + + + + + + + + + } + + + + + + + + + + + + elem {name: + + + + + + + + + + + + Ethernet + + + + + + 9 + + + + + + + + + + + + } elem {name: + + + + + + + + + + + + port + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + val { + + + + + + + + + + + + + + + + + + json_ietf_val: + + + + + + + + + + + + eth + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + } + + + + + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/mgmt/gnmi/images/mixed requests.svg b/doc/mgmt/gnmi/images/mixed requests.svg new file mode 100644 index 0000000000..75336ca8f0 --- /dev/null +++ b/doc/mgmt/gnmi/images/mixed requests.svg @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + + Process.1000 + GNMI Set Request Full Configuration + + + + + + + + + + + + + + + + + + + GNMI Set RequestFull Configuration + + Process.1001 + GNMI Set Request Full Configuration/ Incremental Configuration + + + + + + + + + + + + + + + + + + + GNMI Set RequestFull Configuration/Incremental Configuration + + Process.1002 + GNOI Reboot Request + + + + + + + + + + + + + + + + + + + GNOI Reboot Request + + Dynamic connector.1003 + + + + Dynamic connector.1004 + + + + Sheet.1005 + + Sheet.1006 + + + + + diff --git a/doc/mgmt/gnmi/images/restapi.svg b/doc/mgmt/gnmi/images/restapi.svg new file mode 100644 index 0000000000..ed8cecd1a0 --- /dev/null +++ b/doc/mgmt/gnmi/images/restapi.svg @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + + + + + Process + + + + + + + + + + + + + + + + + + + Sheet.31 + SONiC restapi + + + + SONiC restapi + + Process.35 + Http client + + + + + + + + + + + + + + + + + + + Http client + + Process.34 + Http server + + + + + + + + + + + + + + + + + + + Http server + + Side brace + + + + + + + + + + + + + + + + Sheet.48 + + Datastore + SONiC Redis DB + + + + + + + + + + + + + + + + + + + + + + SONiC Redis DB + + Dynamic connector + + + + + Sheet.49 + + Datastore + SONiC Redis DB + + + + + + + + + + + + + + + + + + + + + + SONiC Redis DB + + Dynamic connector + + + + + Sheet.59 + + Datastore + SONiC Redis DB + + + + + + + + + + + + + + + + + + + + + + SONiC Redis DB + + Dynamic connector + + + + + Sheet.62 + + Datastore + SONiC Redis DB + + + + + + + + + + + + + + + + + + + + + + SONiC Redis DB + + Dynamic connector + + + + + 1-D double.22 + + + + + + + Dynamic connector.72 + + + + Sheet.74 + post patch get delete + + + + postpatchgetdelete + + diff --git a/doc/mgmt/gnmi/images/set_lock.svg b/doc/mgmt/gnmi/images/set_lock.svg new file mode 100644 index 0000000000..862d507d4a --- /dev/null +++ b/doc/mgmt/gnmi/images/set_lock.svg @@ -0,0 +1,744 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page-1 + + + + + + + + + + Object lifeline + GNMI client + + Sheet.2 + + + + Sheet.3 + + + + Sheet.4 + + + Sheet.5 + + + + + + + GNMI client + + + + + + + + Object lifeline.6 + GNMI Server + + Sheet.7 + + + + Sheet.8 + + + + Sheet.9 + + + Sheet.10 + + + + + + + GNMI Server + + + Activation + + + + + + + Message + SetRequest 1 + + + + + + + + + + + SetRequest 1 + + + + + + + + User + + Sheet.17 + + Sheet.18 + + + + Sheet.19 + + + + + + + + + + + + Script + + Sheet.21 + + + + Sheet.22 + + + + Sheet.23 + + + + Sheet.24 + + + + Sheet.25 + + + + Sheet.26 + + + + Sheet.27 + + + + Sheet.28 + + + + Sheet.29 + + + + + + + + + + Object lifeline.76 + Database + + Sheet.77 + + + + Sheet.78 + + + + Sheet.79 + + + Sheet.80 + + + + + + + Database + + + + + + + + + Database + + Sheet.98 + + Sheet.99 + + + + Sheet.100 + + + + Sheet.101 + + + + Sheet.102 + + + + + + + + + + + Object lifeline.169 + GNMI Write Thread + + Sheet.170 + + + + Sheet.171 + + + + Sheet.172 + + + Sheet.173 + + + + + + + GNMI Write Thread + + + + + + + + + Script.174 + + Sheet.175 + + + + Sheet.176 + + + + Sheet.177 + + + + Sheet.178 + + + + Sheet.179 + + + + Sheet.180 + + + + Sheet.181 + + + + Sheet.182 + + + + Sheet.183 + + + + + Message.184 + Enqueue + + + + + + + + + + + Enqueue + + Activation.195 + + + + + + + Message.196 + SetRequest 2 + + + + + + + + + + + SetRequest 2 + + Message.197 + Enqueue + + + + + + + + + + + Enqueue + + Activation.198 + + + + + + + Message.199 + SetRequest 3 + + + + + + + + + + + SetRequest 3 + + Message.200 + Enqueue + + + + + + + + + + + Enqueue + + Activation.147 + + + + + + + Message.192 + Write database + + + + + + + + + + + Write database + + Return Message.202 + SetResponse 1 + + + + + + + + + + + SetResponse 1 + + + + + + + Object lifeline.225 + GNMI Write Qeue + + Sheet.226 + + + + Sheet.227 + + + + Sheet.228 + + + Sheet.229 + + + + + + + GNMI Write Qeue + + + + + + + + + Script.230 + + Sheet.231 + + + + Sheet.232 + + + + Sheet.233 + + + + Sheet.234 + + + + Sheet.235 + + + + Sheet.236 + + + + Sheet.237 + + + + Sheet.238 + + + + Sheet.239 + + + + + Message.240 + Deque + + + + + + + + + + + Deque + + Return Message.241 + + + + + + + + + + Activation.242 + + + + + + + Message.243 + Deque + + + + + + + + + + + Deque + + Return Message.244 + + + + + + + + + + Message.245 + Write database + + + + + + + + + + + Write database + + Return Message.246 + SetResponse 2 + + + + + + + + + + + SetResponse 2 + + Activation.247 + + + + + + + Message.248 + Deque + + + + + + + + + + + Deque + + Return Message.249 + + + + + + + + + + Message.250 + Write database + + + + + + + + + + + Write database + + Return Message.251 + SetResponse 3 + + + + + + + + + + + SetResponse 3 + + diff --git a/doc/mgmt/gnmi/images/telemetry.png b/doc/mgmt/gnmi/images/telemetry.png new file mode 100644 index 0000000000..8148cf72e9 Binary files /dev/null and b/doc/mgmt/gnmi/images/telemetry.png differ