mirror of https://github.com/CrimsonTome/tldr.git
gnmic: add page and subpages (#8367)
* gnmic - add * Change file extension * Fix newlines * update gnmic pages and add gnmic sub alias * fix link * add period * fix missing punctuation * fix ip:port formatting * Implemented @adrienthebo suggestions * missing period * @EmilySeville7cfg suggestions * remove --insecure and write out subpull/1/head
parent
e6713a2ffb
commit
ec300f80fa
|
@ -0,0 +1,20 @@
|
|||
# gnmic get
|
||||
|
||||
> Get a snapshot of a gnmi network device operation data.
|
||||
> More information: <https://gnmic.kmrd.dev/cmd/get>.
|
||||
|
||||
- Get a snapshot of the device state at a specific path:
|
||||
|
||||
`gnmic --address {{ip:port}} get --path {{path}}`
|
||||
|
||||
- Query the device state at multiple paths:
|
||||
|
||||
`gnmic -a {{ip:port}} get --path {{path1}} --path {{path2}}`
|
||||
|
||||
- Query the device state at multiple paths with a common prefix:
|
||||
|
||||
`gnmic -a {{ip:port}} get --prefix {{prefix}} --path {{path1}} --path {{path2}}`
|
||||
|
||||
- Query the device state and specify reponse encoding (json_ietf):
|
||||
|
||||
`gnmic -a {{ip:port}} get --path {{path}} --encoding json_ietf`
|
|
@ -0,0 +1,20 @@
|
|||
# gnmic set
|
||||
|
||||
> Modify gnmi network device configuration.
|
||||
> More information: <https://gnmic.kmrd.dev/cmd/set>.
|
||||
|
||||
- Update the value of a path:
|
||||
|
||||
`gnmic --address {{ip:port}} set --update-path {{path}} --update-value {{value}}`
|
||||
|
||||
- Update the value of a path to match the contents of a json file:
|
||||
|
||||
`gnmic -a {{ip:port}} set --update-path {{path}} --update-file {{filepath}}`
|
||||
|
||||
- Replace the value of a path to match the contents of a json file:
|
||||
|
||||
`gnmic -a {{ip:port}} set --replace-path {{path}} --replace-file {{filepath}}`
|
||||
|
||||
- Delete the node at a given path:
|
||||
|
||||
`gnmic -a {{ip:port}} set --delete {{path}}`
|
|
@ -0,0 +1,8 @@
|
|||
# gnmic sub
|
||||
|
||||
> This command is an alias of `gnmic subscribe`.
|
||||
> More information: <https://gnmic.kmrd.dev/cmd/subscribe>.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr gnmic subscribe`
|
|
@ -0,0 +1,24 @@
|
|||
# gnmic subscribe
|
||||
|
||||
> Subscribe to a gnmic network device state updates.
|
||||
> More information: <https://gnmic.kmrd.dev/cmd/subscribe>.
|
||||
|
||||
- Subscribe to target state updates under the subtree of a specific path:
|
||||
|
||||
`gnmic --address {{ip:port}} subscribe --path {{path}}`
|
||||
|
||||
- Subscribe to a target with a sample interval of 30s (default is 10s):
|
||||
|
||||
`gnmic -a {{ip:port}} subscribe --path {{path}} --sample-interval 30s`
|
||||
|
||||
- Subscribe to a target with sample interval and updates only on change:
|
||||
|
||||
`gnmic -a {{ip:port}} subscribe --path {{path}} --stream-mode on-change --heartbeat-interval 1m`
|
||||
|
||||
- Subscribe to a target for only one update:
|
||||
|
||||
`gnmic -a {{ip:port}} subscribe --path {{path}} --mode once`
|
||||
|
||||
- Subscribe to a target and specify reponse encoding (json_ietf):
|
||||
|
||||
`gnmic -a {{ip:port}} subscribe --path {{path}} --encoding json_ietf`
|
|
@ -0,0 +1,25 @@
|
|||
# gnmic
|
||||
|
||||
> A gNMI command-line client.
|
||||
> Manage gNMI network device configuration and view operational data.
|
||||
> More information: <https://gnmic.kmrd.dev>.
|
||||
|
||||
- Request device capabilities:
|
||||
|
||||
`gnmic --address {{ip:port}} capabilities`
|
||||
|
||||
- Provide a username and password to fetch device capabilities:
|
||||
|
||||
`gnmic --address {{ip:port}} --username {{username}} --password {{password}} capabilities`
|
||||
|
||||
- Get a snapshot of the device state at a specific path:
|
||||
|
||||
`gnmic -a {{ip:port}} get --path {{path}}`
|
||||
|
||||
- Update device state at a specific path:
|
||||
|
||||
`gnmic -a {{ip:port}} set --update-path {{path}} --update-value {{value}}`
|
||||
|
||||
- Subscribe to target state updates under the subtree at a specific path:
|
||||
|
||||
`gnmic -a {{ip:port}} subscribe --path {{path}}`
|
Loading…
Reference in New Issue