Documentation ¶
Index ¶
- func ExtractJsonIetfVal(tv *gnmi.TypedValue) ([]byte, error)
- func GetEntireConfig(ctx context.Context, client *gnmiclient.Client) ([]byte, error)
- func NewRootCmd() *cobra.Command
- func PostDeviceConfig(ctx context.Context, cfg Config, data []byte) error
- func Run(cfg Config) error
- func Subscribe(ctx context.Context, c gclient.Impl, fn func() error) error
- func Sync(ctx context.Context, cfg Config, client *gnmiclient.Client) error
- type Config
- type SaveConfigRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractJsonIetfVal ¶
func ExtractJsonIetfVal(tv *gnmi.TypedValue) ([]byte, error)
ExtractJsonIetfVal extracts the JSON IETF field of the supplied TypedValue.
func GetEntireConfig ¶
GetEntireConfig requests gNMI GetRequest and returns entire device config as.
func NewRootCmd ¶
func PostDeviceConfig ¶
PostDeviceConfig sends HTTP POST with supplied device config.
Types ¶
type Config ¶
type Config struct { Devel bool Verbose uint8 Addr string `validate:"required"` Username string Password string Device string `validate:"required"` AggregatorURL string `mapstructure:"aggregator-url" validate:"required"` NoTLS bool `mapstructure:"notls"` TLSSkipVerify bool `mapstructure:"skip-verify"` TLSKeyPath string `mapstructure:"tls-key"` TLSCrtPath string `mapstructure:"tls-crt"` TLSCACrtPath string `mapstructure:"tls-ca"` TLSDeviceCACrtPath string `mapstructure:"tls-device-ca"` }
func (*Config) DeviceTLSClientConfig ¶
func (c *Config) DeviceTLSClientConfig() *credentials.TLSClientConfig
func (*Config) TLSClientConfig ¶
func (c *Config) TLSClientConfig() *credentials.TLSClientConfig
type SaveConfigRequest ¶
Click to show internal directories.
Click to hide internal directories.