Documentation ¶
Index ¶
- Constants
- func AddDataToList(x interface{}) (interface{}, error)
- func DeepCopyGnmiPath(in *gnmi.Path) *gnmi.Path
- func FindResourceDelta(updatesx1, updatesx2 []*gnmi.Update) ([]*gnmi.Path, []*gnmi.Update, error)
- func GetDataType(t gnmi.GetRequest_DataType) string
- func GetGranularUpdatesFromJSON(p *gnmi.Path, d interface{}, rs *yentry.Entry) ([]*gnmi.Update, error)
- func GetHierIDsFromPath(p *gnmi.Path) []string
- func GetRemotePathsFromResolvedLeafRef(resolvedLeafRef *leafref.ResolvedLeafRef) []*gnmi.Path
- func GetTypeKind(e *yang.Entry) string
- func GetTypeName(e *yang.Entry) string
- func GetUpdatesFromJSON(p *gnmi.Path, d interface{}, rs *yentry.Entry) ([]*gnmi.Update, error)
- func GetValue(updValue *gnmi.TypedValue) (interface{}, error)
- func GnmiPath2XPath(path *gnmi.Path, keys bool) string
- func GnmiPathToSubResourceName(path *gnmi.Path) string
- func ProcessLeafRef(e *yang.Entry, resfullPath string, activeResPath *gnmi.Path) (*gnmi.Path, *gnmi.Path, bool)
- func RemoveFirstEntryFromXpath(s string) string
- func RemoveHierIDsFomData(hids []string, x interface{}) interface{}
- func ValidateLeafRef(rootPath *gnmi.Path, x1, x2 interface{}, definedLeafRefs []*leafref.LeafRef, ...) (bool, []*leafref.ResolvedLeafRef, error)
- func ValidateParentDependency(x1 interface{}, parentDependencies []*leafref.LeafRef, rs *yentry.Entry) (bool, []*leafref.ResolvedLeafRef, error)
- func Xpath2GnmiPath(xpath string, offset int) (path *gnmi.Path)
- type Operation
- type OperationType
Constants ¶
const ( CacheTypeState = "STATE" CacheTypeConfig = "CONFIG" CacheTypeTarget = "TARGET" )
Variables ¶
This section is empty.
Functions ¶
func AddDataToList ¶ added in v0.1.226
func AddDataToList(x interface{}) (interface{}, error)
func FindResourceDelta ¶ added in v0.1.227
func GetDataType ¶ added in v0.1.234
func GetDataType(t gnmi.GetRequest_DataType) string
func GetGranularUpdatesFromJSON ¶ added in v0.1.224
func GetGranularUpdatesFromJSON(p *gnmi.Path, d interface{}, rs *yentry.Entry) ([]*gnmi.Update, error)
GetGranularUpdatesFromJSON provides an update per leaf level
func GetHierIDsFromPath ¶ added in v0.1.225
GetHierIDsFromPath from path gets the hierarchical ids from the gnmi path
func GetRemotePathsFromResolvedLeafRef ¶ added in v0.1.276
func GetRemotePathsFromResolvedLeafRef(resolvedLeafRef *leafref.ResolvedLeafRef) []*gnmi.Path
func GetTypeKind ¶
GetTypeKind returns a string of the kind of the yang entry
func GetTypeName ¶
GetypeName return a string of the type of the yang entry
func GetUpdatesFromJSON ¶ added in v0.1.224
GetUpdatesFromJSON provides an update per container, list and leaflist level
func GetValue ¶ added in v0.1.227
func GetValue(updValue *gnmi.TypedValue) (interface{}, error)
GetValue return the data of the gnmi typed value
func GnmiPath2XPath ¶
GnmiPath2XPath converts a gnmi path with or without keys to a string pointer
func GnmiPathToSubResourceName ¶ added in v0.1.286
GnmiPathToSubResourceName special case since we have to remove the - from the first elemen used in nddbuilder
func ProcessLeafRef ¶ added in v0.1.275
func ProcessLeafRef(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 ¶
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 ValidateLeafRef ¶ added in v0.1.277
func ValidateParentDependency ¶ added in v0.1.275
func ValidateParentDependency(x1 interface{}, parentDependencies []*leafref.LeafRef, rs *yentry.Entry) (bool, []*leafref.ResolvedLeafRef, error)
ValidateParentDependency validates the parent resource dependency based on the result this function returns the result + information on the validation we use a get here since we resolved the values of the keys alreay
Types ¶
type Operation ¶ added in v0.1.227
type Operation struct { Type OperationType Path string Value interface{} }
func CompareJSONData ¶ added in v0.1.227
CompareJSONData compares the target with the source and provides operation guides
type OperationType ¶ added in v0.1.227
type OperationType string
A OperationType represents an operatio on a JSON resource
const ( // delete OperationTypeDelete OperationType = "Delete" // replace OperationTypeUpdate OperationType = "Update" // create OperationTypeCreate OperationType = "Create" )
Condition Kinds.