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
+48-2Lines changed: 48 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -27,9 +27,10 @@ This library wraps gNMI functionality to ease usage with Cisco implementations i
27
27
-[Output](#output-1)
28
28
-[Set](#set)
29
29
-[Usage](#usage-3)
30
+
-[Output](#output-2)
30
31
-[Subscribe](#subscribe)
31
32
-[Usage](#usage-4)
32
-
-[Output](#output-2)
33
+
-[Output](#output-3)
33
34
-[Licensing](#licensing)
34
35
-[Issues](#issues)
35
36
-[Related Projects](#related-projects)
@@ -376,7 +377,7 @@ INFO:root:notification {
376
377
```
377
378
378
379
### Set
379
-
This command has not been validated. Please note that `Set` operations may be destructive to operations and should be tested in lab conditions.
380
+
Please note that `Set` operations may be destructive to operations and should be tested in lab conditions. Behavior is not fully validated.
380
381
381
382
#### Usage
382
383
```
@@ -422,6 +423,51 @@ optional arguments:
422
423
-debug Print debug messages.
423
424
```
424
425
426
+
#### Output
427
+
Let's create a harmless loopback interface based from [`openconfig-interfaces.yang`](https://github.com/openconfig/public/blob/master/release/models/interfaces/openconfig-interfaces.yang).
428
+
429
+
`config.json`
430
+
```json
431
+
{
432
+
"openconfig-interfaces:interfaces": {
433
+
"interface": [
434
+
{
435
+
"name": "Loopback9339"
436
+
}
437
+
]
438
+
}
439
+
}
440
+
```
441
+
442
+
```
443
+
[cisco-gnmi-python] cisco-gnmi set redacted:57500 -os "IOS XR" -auto_ssl_target_override -update_json_config config.json
444
+
Username: admin
445
+
Password:
446
+
WARNING:root:Overriding SSL option from certificate could increase MITM susceptibility!
447
+
INFO:root:response {
448
+
path {
449
+
origin: "openconfig-interfaces"
450
+
elem {
451
+
name: "interfaces"
452
+
}
453
+
}
454
+
message {
455
+
}
456
+
op: UPDATE
457
+
}
458
+
message {
459
+
}
460
+
timestamp: 1585715036783451369
461
+
```
462
+
463
+
And on IOS XR...a loopback interface!
464
+
```
465
+
...
466
+
interface Loopback9339
467
+
!
468
+
...
469
+
```
470
+
425
471
### Subscribe
426
472
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