gnmi

package
v0.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSON_IETF       = "json_ietf"
	TARGET          = "sonic"
	DEFAULT_ADDRESS = "127.0.0.1:8080"
	PASSWORD_FILE   = "agent-passwd"
	AGENT_USER      = "hhagent"
)
View Source
const (
	PASSWD_LOWER   = "abcdefghijklmnopqrstuvwxyz"
	PASSWD_UPPER   = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	PASSWD_DIGITS  = "0123456789"
	PASSWD_SYMBOLS = "~!@#$%^&*()_+`-={}|[]\\:\"<>?,./"
	PASSWD_LENGTH  = 32
)

Variables

View Source
var (
	DEFAULT_USERS     = []string{"admin"}
	DEFAULT_PASSWORDS = []string{"YourPaSsWoRd"}
)

Functions

func Marshal

func Marshal(value ygot.ValidatedGoStruct) (map[string]any, error)

func RandomPassword

func RandomPassword() (string, error)

func Unmarshal

func Unmarshal(data []byte, dest ygot.ValidatedGoStruct) error

func UnmarshalWithOpts

func UnmarshalWithOpts(data []byte, dest ygot.ValidatedGoStruct, opts ...ytypes.UnmarshalOpt) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, address, username, password string) (*Client, error)

func NewInSONiC

func NewInSONiC(ctx context.Context, basedir string, skipAgentUserCreation bool) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Get

func (c *Client) Get(ctx context.Context, path string, dest ygot.ValidatedGoStruct, options ...api.GNMIOption) error

func (*Client) GetWithOpts

func (c *Client) GetWithOpts(ctx context.Context, path string, dest ygot.ValidatedGoStruct, extract bool, options ...api.GNMIOption) error

func (*Client) Set

func (c *Client) Set(ctx context.Context, req *gnmi.SetRequest) error

type ExtractOpt

type ExtractOpt struct{}

func (ExtractOpt) IsUnmarshalOpt

func (ExtractOpt) IsUnmarshalOpt()

Directories

Path Synopsis
Package oc is a generated package which contains definitions of structs which represent a YANG schema.
Package oc is a generated package which contains definitions of structs which represent a YANG schema.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL