gnmic-set

modify configuration on gNMI devices

TLDR

Set configuration value
$ gnmic set -a [router:57400] --update-path [/system/name] --update-value "[router1]"
Delete configuration
$ gnmic set -a [router:57400] --delete [/interfaces/interface[name=eth1]]
Set from file
$ gnmic set -a [router:57400] --update-path [/] --update-file [config.json]
Replace configuration
$ gnmic set -a [router:57400] --replace-path [/interfaces] --replace-file [interfaces.json]
Combine path, type, and value in one flag
$ gnmic set -a [router:57400] --update [/system/name:::string:::router1]
Preview a set without sending it
$ gnmic set -a [router:57400] --update-path [/system/name] --update-value "[router1]" --dry-run

SYNOPSIS

gnmic set [options]

DESCRIPTION

gnmic set modifies configuration on gNMI-enabled devices. It supports update (merge), replace, and delete operations on configuration data.The command can set individual values or apply entire configuration files. It is used for network automation and configuration management via the gNMI protocol.

PARAMETERS

-a, --address ADDRESS

Target address(es), as a global gnmic flag.
--prefix PATH
Common prefix applied to all paths in the request.
--update-path PATH
Path to update; pairs with --update-value or --update-file.
--update-value VALUE
Value to set at --update-path.
--update-file FILE
Read the update value from a JSON or YAML file.
--update PATH:::TYPE:::VALUE
Define a full update in one flag, using the `:::` delimiter (customizable via --delimiter).
--replace-path PATH
Path to replace; pairs with --replace-value or --replace-file.
--replace-value VALUE
Value to set at --replace-path.
--replace-file FILE
Read the replace value from a JSON or YAML file.
--replace PATH:::TYPE:::VALUE
Define a full replace in one flag, using the `:::` delimiter.
--delete PATH
Path to delete.
--dry-run
Build and print the SetRequest without sending it to the target.
--help
Display help information.

INSTALL

brew install gnmic
nix profile install nixpkgs#gnmic

CAVEATS

Changes may require commit on some devices. Invalid config may be rejected. Test in lab first.

HISTORY

gnmic set is a subcommand of gnmic, the gNMI client created by Nokia.

SEE ALSO

gnmic(1), gnmic-get(1), gnmic-subscribe(1)

RESOURCES

Documentation · Source code