Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dsx1123/gnmi_go_examples
GO examples of using gNMI to automate NXOS
https://github.com/dsx1123/gnmi_go_examples
Last synced: about 7 hours ago
JSON representation
GO examples of using gNMI to automate NXOS
- Host: GitHub
- URL: https://github.com/dsx1123/gnmi_go_examples
- Owner: dsx1123
- License: other
- Created: 2024-05-12T19:49:34.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-06-08T01:14:16.000Z (5 months ago)
- Last Synced: 2024-06-08T02:27:23.128Z (5 months ago)
- Language: Go
- Size: 7.48 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Golang gNMI examples
A golang application to demostrate how to use gNMI to automate Cisco NX-OS
## Examples of the intput config
```yaml
---
address: 172.31.186.156:50050 # in the format of :
username: shdu
password: password
tls_ca: ca-chain.cert.pem
tls_cert: user_shdu_chain.cert.pem # Must be a certificate chain
tls_key: user_shdu.key.unenc.pem # Must be unencrypted private key
encoding: PROTO
get: /interfaces/interface[name=eth1/1]/state
set:
path: /System
file: ./config/int_desc_update.json
replace:
path: /System/bgp-items
file: ./config/bgp_items.json
subscriptions:
- path: /interfaces/interface/state/oper-status
mode: ON_CHANGE # ON_CHANGE, SAMPLE or TARGET_DEFINED
```## How to run the examples
```shell
A demo application of gNMI:
Demonstrate gNMI CAPABILITES/GET/SET/SUBSCRIBE.Usage:
gnmi_go [command]Available Commands:
cap Get the gNMI capabilites from the target
completion Generate the autocompletion script for the specified shell
delete Delete a conatiner or leaf on the target
eda run EDA demo on target
get Get the configuration or operational state from the target
help Help about any command
merge Merge the candidate configuration wtih the configuration on target
replace Replace the configurations on the target
subscribe run gnmi subscribe on targetFlags:
--config string target config file (default "./config.yaml")
-h, --help help for gnmi_goUse "gnmi_go [command] --help" for more information about a command.
```