Skip to content

Commit 3b3ce96

Browse files
authored
Update gNMI sections (sonic-net#67)
* Update gNMI sections * Address comments
1 parent ed00d1f commit 3b3ce96

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

doc/mgmt/Management Framework.md

+20-8
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ GNMI service defines a gRPC-based protocol for the modification and retrieval of
274274
3. A new transl data client is added to process the incoming YANG-based request (either standard or proprietary)
275275
4. The new transl data client relies on Translib infra provided to translate, get, set of the YANG objects.
276276

277-
More details onthe GNMI server, Client and workflow provided later in the document.
277+
More details on the GNMI server, Client and workflow provided later in the document.
278278

279279
### 3.2 SONiC Management Framework Components
280280

@@ -566,12 +566,12 @@ Client applications can use swagger generated client SDK or any other REST clien
566566

567567
##### 3.2.2.3 gNMI Client
568568

569-
SONiC Teleletry service provides the gNMI server, while the client must be provided by the user.
569+
SONiC Telemetry service provides the gNMI server, while the client must be provided by the user. gNMI is typically used as a programmatic interface and therefore it is typically called directly from programming language environments using their respective gRPC libraries (https://github.com/grpc/grpc). For testing and scripting purposes, several CLI programs are provided as well.
570570

571-
GNMI client developed by JipanYANG.(github.com/jipanYANG/gnxi/gnmi_get, github.com/jipanYANG/gnxi/gnmi_set)
572-
is used for testing. gnmi_get and gnmi_set code has been changed to handle module name.
571+
GNMI clients developed by google and modified by JipanYANG.(github.com/jipanYANG/gnxi/gnmi_get, github.com/jipanYANG/gnxi/gnmi_set)
572+
was taken and further modified to support new features. gnmi_cli from openconfig (https://github.com/openconfig/gnmi/tree/master/cmd/gnmi_cli) is also taken for testing subscribe and capabilities operations. Finally, a new client was developed gnoi_client, for test gNOI RPC operations.
573573

574-
Note: Although the GRPC protocol allows for many encodings and models to be used, our usage is restricted to JSON encoding.
574+
Note: Although the gRPC protocol allows for many encodings to be used, our usage is restricted to JSON_IETF encoding.
575575

576576
Supported RPC Operations:
577577
-------------------------
@@ -580,12 +580,13 @@ Supported RPC Operations:
580580
+ Update: List of one or more objects to update
581581
+ Replace: List of one or objects to replace existing objects, any unspecified fields wil be defaulted.
582582
+ Delete: List of one or more object paths to delete
583-
- Capabilities: Return gNMI version and list of supported models
583+
- Capabilities: Return gNMI version and list of supported models and model versions.
584+
+ A gNMI Extension field has been added as well to return the SONiC model "bundle version".
584585
- Subscribe:
585586
+ Subscribe to paths using either streaming or poll, or once based subscription, with either full current state or updated values only.
586587
* Once: Get single subscription message.
587588
* Poll: Get one subscription message for each poll request from the client.
588-
* Stream: Get one subscription message for each object update, or at each sample interval if using sample mode. target_defined uses the values pre-configured for that particular object.
589+
* Stream: Get one subscription message for each object update (called ON_CHANGE mode), or at each sample interval if using sample mode. target_defined uses the values pre-configured for that particular object. Not all paths support ON_CHANGE mode due to performance considerations, while all paths will support sample mode and therefore target defined as well since it will default to sample if ON_CHANGE is not supported.
589590

590591

591592
Example Client Operations:
@@ -609,7 +610,7 @@ Subscribe:
609610
----------
610611
Streaming sample based:
611612
-----------------------
612-
`./gnmi_cli -insecure -logtostderr -address 127.0.0.1:8080 -query_type s -streaming_sample_interval 3000000000 -streaming_type 2 -q /openconfig-acl:acl/ -v 0 -target YANG`
613+
`./gnmi_cli -insecure -logtostderr -address 127.0.0.1:8080 -query_type s -streaming_sample_interval 3 -streaming_type SAMPLE -q /openconfig-acl:acl/ -v 0 -target YANG`
613614

614615
Poll based:
615616
-----------
@@ -619,6 +620,17 @@ Once based:
619620
-----------
620621
`./gnmi_cli -insecure -logtostderr -address 127.0.0.1:8080 -query_type o -q /openconfig-acl:acl/ -v 0 -target YANG`
621622

623+
624+
gNOI:
625+
--------------
626+
gNOI (gRPC Network Operations Interface) extends the gNMI server, adding new custom RPC's to execute management functions on the switch.
627+
628+
gNOI Clear Neighbor:
629+
-------------------
630+
```
631+
gnoi_client -module Sonic -rpc clearNeighbors -jsonin '{"sonic-neighbor:input": {"force": true, "ip": "4.4.4.1"}}' -insecure
632+
```
633+
622634
##### 3.2.2.4 REST Server
623635

624636
The management REST server is a HTTP server implemented in Go language.

0 commit comments

Comments
 (0)