You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+55-47Lines changed: 55 additions & 47 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ This library covers the gNMI defined `Capabilities`, `Get`, `Set`, and `Subscrib
16
16
It is *highly* recommended that users of the library learn [Google Protocol Buffers](https://developers.google.com/protocol-buffers/) syntax to significantly ease usage. Understanding how to read Protocol Buffers, and reference [`gnmi.proto`](https://github.com/openconfig/gnmi/blob/master/proto/gnmi/gnmi.proto), will be immensely useful for utilizing gNMI and any other gRPC interface.
17
17
18
18
### gnmcli
19
-
Since `v1.0.5` a gNMI CLI is available when this module is installed. `Capabilities`, `Subscribe`, `Get`, and rudimentary `Set` are supported. The CLI may be useful for simply interacting with a Cisco gNMI service, and also serves as a reference for how to use this `cisco_gnmi` library. CLI usage is documented at the bottom of this README in [gnmcli Usage](#gnmcli-usage).
19
+
Since `v1.0.5` a gNMI CLI is available when this module is installed. `Capabilities`, `Get`, rudimentary `Set`, and `Subscribe` are supported. The CLI may be useful for simply interacting with a Cisco gNMI service, and also serves as a reference for how to use this `cisco_gnmi` library. CLI usage is documented at the bottom of this README in [gnmcli Usage](#gnmcli-usage).
20
20
21
21
### ClientBuilder
22
22
Since `v1.0.0` a builder pattern is available with `ClientBuilder`. `ClientBuilder` provides several `set_*` methods which define the intended `Client` connectivity and a `construct` method to construct and return the desired `Client`. There are several major methods involved here:
@@ -186,7 +186,7 @@ If a new `gnmi.proto` definition is released, use `update_protos.sh` to recompil
186
186
```
187
187
188
188
### gnmcli Usage
189
-
The below details the current `gnmcli` usage options.
189
+
The below details the current `gnmcli` usage options. Please note that `Set` operations may be destructive to operations and should be tested in lab conditions.
190
190
191
191
```
192
192
gnmcli --help
@@ -199,6 +199,11 @@ subscribe
199
199
get
200
200
set
201
201
202
+
gnmcli capabilities 127.0.0.1:57500
203
+
gnmcli get 127.0.0.1:57500
204
+
gnmcli set 127.0.0.1:57500 -delete_xpath Cisco-IOS-XR-shellutil-cfg:host-names/host-name
-dump_json Dump as JSON instead of textual protos.
284
289
-os {None,IOS XR,NX-OS,IOS XE}
285
-
OS to use.
290
+
OS wrapper to utilize. Defaults to IOS XR.
286
291
-root_certificates ROOT_CERTIFICATES
287
292
Root certificates for secure connection.
288
293
-private_key PRIVATE_KEY
@@ -292,21 +297,17 @@ optional arguments:
292
297
-ssl_target_override SSL_TARGET_OVERRIDE
293
298
gRPC SSL target override option.
294
299
-auto_ssl_target_override
295
-
Root certificates for secure connection.
296
-
-debug Print debug messages
297
-
```
298
-
299
-
#### Subscribe
300
-
This command will output the `SubscribeResponse` to `stdout` or `-dump_file`. `-xpath` may be specified multiple times to specify multiple `Path`s for the `GetRequest`. Subscribe currently only supports a sampled stream. `ON_CHANGE` is possible but not implemented in the CLI, yet. :)
-interval INTERVAL Sample interval in seconds for Subscription.
327
-
-dump_file DUMP_FILE Filename to dump to. Defaults to stdout.
326
+
-update_json_config UPDATE_JSON_CONFIG
327
+
JSON-modeled config to apply as an update.
328
+
-replace_json_config REPLACE_JSON_CONFIG
329
+
JSON-modeled config to apply as a replace.
330
+
-delete_xpath DELETE_XPATH
331
+
XPaths to delete.
332
+
-no_ietf JSON is not IETF conformant.
328
333
-dump_json Dump as JSON instead of textual protos.
329
-
-sync_stop Stop on sync_response.
330
-
-encoding [{JSON,BYTES,PROTO,ASCII,JSON_IETF}]
331
-
gNMI subscription encoding.
332
334
-os {None,IOS XR,NX-OS,IOS XE}
333
-
OS to use.
335
+
OS wrapper to utilize. Defaults to IOS XR.
334
336
-root_certificates ROOT_CERTIFICATES
335
337
Root certificates for secure connection.
336
338
-private_key PRIVATE_KEY
@@ -340,17 +342,22 @@ optional arguments:
340
342
-ssl_target_override SSL_TARGET_OVERRIDE
341
343
gRPC SSL target override option.
342
344
-auto_ssl_target_override
343
-
Root certificates for secure connection.
344
-
-debug Print debug messages
345
+
Use root_certificates first CN as
346
+
grpc.ssl_target_name_override.
347
+
-debug Print debug messages.
345
348
```
346
349
347
-
#### Set
348
-
This command has not been validated.
350
+
#### Subscribe
351
+
This command will output the `SubscribeResponse` to `stdout` or `-dump_file`. `-xpath` may be specified multiple times to specify multiple `Path`s for the `GetRequest`. Subscribe currently only supports a sampled stream. `ON_CHANGE` is possible but not implemented in the CLI, yet. :)
0 commit comments