Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetChildNode ¶
func GetChildNode(node map[string]interface{}, schema *yang.Entry, elem *pb.PathElem, createIfNotExist bool) (interface{}, *yang.Entry)
GetChildNode gets a node's child with corresponding schema specified by path element. If not found and createIfNotExist is set as true, an empty node is created and returned.
func GetKeyedListEntry ¶
func GetKeyedListEntry(node map[string]interface{}, elem *pb.PathElem, createIfNotExist bool) map[string]interface{}
GetKeyedListEntry finds the keyed list entry in node by the name and key of path elem. If entry is not found and createIfNotExist is true, an empty entry will be created (the list will be created if necessary).
Types ¶
type GoStructEnumData ¶
type GoStructEnumData map[string]map[int64]ygot.EnumDefinition
GoStructEnumData is the data type to maintain GoStruct enum type.
type JSONUnmarshaler ¶
JSONUnmarshaler is the signature of the Unmarshal() function in the GoStruct code generated by openconfig ygot library.
type Model ¶
type Model struct { ModelData []*pb.ModelData StructRootType reflect.Type SchemaTreeRoot *yang.Entry JSONUnmarshaler JSONUnmarshaler EnumData GoStructEnumData }
Model contains the model data and GoStruct information for the device to config.
func NewModel ¶
func NewModel(m []*pb.ModelData, t reflect.Type, r *yang.Entry, f JSONUnmarshaler, e GoStructEnumData) *Model
NewModel returns an instance of Model struct.
func (*Model) NewConfigStruct ¶
func (m *Model) NewConfigStruct(jsonConfig []byte) (ygot.ValidatedGoStruct, error)
NewConfigStruct creates a ValidatedGoStruct of this model from jsonConfig. If jsonConfig is nil, creates an empty GoStruct.
func (*Model) SupportedModels ¶
SupportedModels returns a list of supported models.