configmodel

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigModel

type ConfigModel interface {
	// Info returns the config model info
	Info() ModelInfo

	// Data returns the config model data
	Data() []*gnmi.ModelData

	// Schema returns the config model schema
	Schema() (map[string]*yang.Entry, error)

	// GetStateMode returns the get state mode
	GetStateMode() GetStateMode

	// Unmarshaler returns the config model unmarshaler function
	Unmarshaler() Unmarshaler

	// Validator returns the config model validator function
	Validator() Validator
}

ConfigModel is a configuration model data

type FileInfo added in v0.2.0

type FileInfo struct {
	Path string `json:"path"`
	Data []byte `json:"data"`
}

FileInfo is a config file info

type GetStateMode

type GetStateMode string

GetStateMode defines the Getstate handling

const (
	// GetStateNone - device type does not support Operational State at all
	GetStateNone GetStateMode = "GetStateNone"
	// GetStateOpState - device returns all its op state attributes by querying
	// GetRequest_STATE and GetRequest_OPERATIONAL
	GetStateOpState GetStateMode = "GetStateOpState"
	// GetStateExplicitRoPaths - device returns all its op state attributes by querying
	// exactly what the ReadOnly paths from YANG - wildcards are handled by device
	GetStateExplicitRoPaths GetStateMode = "GetStateExplicitRoPaths"
	// GetStateExplicitRoPathsExpandWildcards - where there are wildcards in the
	// ReadOnly paths 2 calls have to be made - 1) to expand the wildcards in to
	// real paths (since the device doesn't do it) and 2) to query those expanded
	// wildcard paths - this is the Stratum 1.0.0 method
	GetStateExplicitRoPathsExpandWildcards GetStateMode = "GetStateExplicitRoPathsExpandWildcards"
)

type ModelInfo

type ModelInfo struct {
	Name         Name         `json:"name"`
	Version      Version      `json:"version"`
	GetStateMode GetStateMode `json:"getStateMode"`
	Files        []FileInfo   `json:"files"`
	Modules      []ModuleInfo `json:"modules"`
	Plugin       PluginInfo   `json:"plugin"`
}

ModelInfo is config model info

func (ModelInfo) String added in v0.4.0

func (m ModelInfo) String() string

type ModuleInfo

type ModuleInfo struct {
	Name         Name     `json:"name"`
	File         string   `json:"file"`
	Organization string   `json:"organization"`
	Revision     Revision `json:"revision"`
}

ModuleInfo is a config module info

type Name

type Name string

Name is a config model name

type PluginInfo

type PluginInfo struct {
	Name    Name    `json:"name"`
	Version Version `json:"version"`
}

PluginInfo is config model plugin info

type Revision added in v0.2.0

type Revision string

Revision is a config module revision

type Unmarshaler added in v0.1.2

type Unmarshaler func([]byte) (*ygot.ValidatedGoStruct, error)

Unmarshaler is a config model unmarshaler function

type Validator

type Validator func(model *ygot.ValidatedGoStruct, opts ...ygot.ValidationOption) error

Validator is a config model validator function

type Version

type Version string

Version is a config model version

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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