yparser

package
v0.1.225 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendPathElem2GnmiPath

func AppendPathElem2GnmiPath(path *gnmi.Path, name string, keys []string) *gnmi.Path

AppendPathElem2GnmiPath adds a pathElem to the config gnmi path

func DeepCopyGnmiPath

func DeepCopyGnmiPath(in *gnmi.Path) *gnmi.Path

func GetGranularUpdatesFromJSON added in v0.1.224

func GetGranularUpdatesFromJSON(p *gnmi.Path, d interface{}, rs yentry.Handler) ([]*gnmi.Update, error)

GetGranularUpdatesFromJSON provides an update per leaf level

func GetHierIDsFromPath added in v0.1.225

func GetHierIDsFromPath(p *gnmi.Path) []string

GetHierIDsFromPath from path gets the hierarchical ids from the gnmi path

func GetTypeKind

func GetTypeKind(e *yang.Entry) string

GetTypeKind returns a string of the kind of the yang entry

func GetTypeName

func GetTypeName(e *yang.Entry) string

GetypeName return a string of the type of the yang entry

func GetUpdatesFromJSON added in v0.1.224

func GetUpdatesFromJSON(p *gnmi.Path, d interface{}, rs yentry.Handler) ([]*gnmi.Update, error)

GetUpdatesFromJSON provides an update per container, list and leaflist level

func GnmiPath2XPath

func GnmiPath2XPath(path *gnmi.Path, keys bool) string

GnmiPath2XPath converts a gnmi path with or without keys to a string pointer

func ProcessLeafRefGnmi

func ProcessLeafRefGnmi(e *yang.Entry, resfullPath string, activeResPath *gnmi.Path) (*gnmi.Path, *gnmi.Path, bool)

ProcessLeafRef processes the leafref and returns if this is a leafref and if so the leafrefs local and remote path if the leafRef is local or external to the resource

func RemoveFirstEntryFromXpath

func RemoveFirstEntryFromXpath(s string) string

RemoveFirstEntryFromXpath removes the first entry of the xpath, so it trims the first element of the /

func RemoveHierIDsFomData added in v0.1.225

func RemoveHierIDsFomData(hids []string, x interface{}) interface{}

RemoveHierIDs removes the hierarchical IDs from the data

func TransformGnmiPathAsRelative2Resource

func TransformGnmiPathAsRelative2Resource(localPath, activeResPath *gnmi.Path) *gnmi.Path

TransformPathAsRelative2Resource returns a relative path

func Xpath2GnmiPath

func Xpath2GnmiPath(xpath string, offset int) (path *gnmi.Path)

Xpath2GnmiPath convertss a xpath string to a gnmi path

Types

This section is empty.

Jump to

Keyboard shortcuts

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