gext

package
v0.2.19 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorNotReady   = "not ready"
	ErrorNotExists  = "does not exist"
	ErrorNotSuccess = "status"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GEXT

type GEXT struct {
	Action     GEXTAction     `json:"action,omitempty"`
	Name       string         `json:"name,omitempty"`
	Level      int            `json:"level,omitempty"`
	RootPath   *gnmi.Path     `json:"rootPath,omitempty"`
	Status     ResourceStatus `json:"status,omitempty"`
	Exists     bool           `json:"exists,omitempty"`
	HasData    bool           `json:"hasData,omitempty"`
	CacheReady bool           `json:"cacheReady,omitempty"`
}

GEXT identifies an extension to GNMI to indicate the Actions and Parameters of a managed resource

func String2GEXT

func String2GEXT(s string) (*GEXT, error)

func (*GEXT) GetAction

func (gext *GEXT) GetAction() GEXTAction

func (*GEXT) GetCacheReady

func (gext *GEXT) GetCacheReady() bool

func (*GEXT) GetExists

func (gext *GEXT) GetExists() bool

func (*GEXT) GetHasData

func (gext *GEXT) GetHasData() bool

func (*GEXT) GetLevel

func (gext *GEXT) GetLevel() int

func (*GEXT) GetName

func (gext *GEXT) GetName() string

func (*GEXT) GetRootPath

func (gext *GEXT) GetRootPath() *gnmi.Path

func (*GEXT) GetStatus

func (gext *GEXT) GetStatus() ResourceStatus

func (*GEXT) SetAction

func (gext *GEXT) SetAction(s GEXTAction)

func (*GEXT) SetCacheReady

func (gext *GEXT) SetCacheReady(s bool)

func (*GEXT) SetExists

func (gext *GEXT) SetExists(s bool)

func (*GEXT) SetHasData

func (gext *GEXT) SetHasData(s bool)

func (*GEXT) SetLevel

func (gext *GEXT) SetLevel(s int)

func (*GEXT) SetName

func (gext *GEXT) SetName(s string)

func (*GEXT) SetRootPath

func (gext *GEXT) SetRootPath(s *gnmi.Path)

func (*GEXT) SetStatus

func (gext *GEXT) SetStatus(s ResourceStatus)

func (*GEXT) String

func (gext *GEXT) String() (string, error)

type GEXTAction

type GEXTAction string
const (
	GEXTActionGet             GEXTAction = "get"
	GEXTActionDelete          GEXTAction = "delete"
	GEXTActionCreate          GEXTAction = "create"
	GEXTActionUpdate          GEXTAction = "Update"
	GEXTActionGetResourceName GEXTAction = "getresourcename"
)

func (*GEXTAction) String

func (c *GEXTAction) String() string

type ResourceStatus

type ResourceStatus string
const (
	ResourceStatusNone          ResourceStatus = "none"
	ResourceStatusSuccess       ResourceStatus = "success"
	ResourceStatusFailed        ResourceStatus = "failed"
	ResourceStatusCreatePending ResourceStatus = "createpending"
	ResourceStatusUpdatePending ResourceStatus = "updatepending"
	ResourceStatusDeletePending ResourceStatus = "deletepending"
)

func (*ResourceStatus) String

func (c *ResourceStatus) String() string

Jump to

Keyboard shortcuts

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