Documentation ¶
Index ¶
- func AddPathElem(p *gnmi.Path, e *container.Entry) *gnmi.Path
- func DeepCopyConfigPath(in *gnmi.Path) *gnmi.Path
- type HeInfo
- type Option
- type Resource
- func (r *Resource) AddExternalLeafRef(ll, rl *gnmi.Path)
- func (r *Resource) AddLocalLeafRef(ll, rl *gnmi.Path)
- func (r *Resource) AssignFileName(prefix, suffix string)
- func (r *Resource) CloseFile() error
- func (r *Resource) CreateFile(dir, subdir1, subdir2 string) (err error)
- func (r *Resource) GetAbsoluteGnmiActualResourcePath() *gnmi.Path
- func (r *Resource) GetAbsoluteGnmiPath() *gnmi.Path
- func (r *Resource) GetAbsoluteLevel() int
- func (r *Resource) GetAbsoluteName() string
- func (r *Resource) GetAbsoluteXPath() *string
- func (r *Resource) GetAbsoluteXPathWithoutKey() *string
- func (r *Resource) GetActualGnmiFullPath() *gnmi.Path
- func (r *Resource) GetExcludeRelativeXPath() []string
- func (r *Resource) GetExternalLeafRef() []*parser.LeafRefGnmi
- func (r *Resource) GetHierarchicalElements() []*HeInfo
- func (r *Resource) GetInternalHierarchicalPaths() []*gnmi.Path
- func (r *Resource) GetLocalLeafRef() []*parser.LeafRefGnmi
- func (r *Resource) GetPath() *gnmi.Path
- func (r *Resource) GetRelativeGnmiActualResourcePath() *gnmi.Path
- func (r *Resource) GetRelativeGnmiPath() *gnmi.Path
- func (r *Resource) GetRelativeXPath() *string
- func (r *Resource) GetResourceNameWithPrefix(prefix string) string
- func (r *Resource) GetResourcePath() *gnmi.Path
- func (r *Resource) GetRootContainerEntry() *container.Entry
- func (r *Resource) ResourceLastElement() string
- func (r *Resource) SetRootContainerEntry(e *container.Entry)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(g *Resource)
Option can be used to manipulate Options.
func WithDependsOn ¶
func WithExclude ¶
type Resource ¶
type Resource struct { Path *gnmi.Path // relative path from the resource; the absolute path is assembled using the resurce hierarchy with dependsOn ActualPath *gnmi.Path // ActualPath is a relative path from the resource with the actual key information; the absolute path is assembled using the resurce hierarchy with dependsOn DependsOn *Resource // resource dependency Excludes []*gnmi.Path // relative from the the resource FileName string // the filename the resource is using to render out the config ResFile *os.File // the file reference for writing the resource file RootContainerEntry *container.Entry // this is the root element which is used to reference the hierarchical resource information Container *container.Container // root container of the resource LastContainerPtr *container.Container // pointer to the last container we process ContainerList []*container.Container // List of all containers within the resource ContainerLevel int // the current container Level when processing the yang entries ContainerLevelKeys map[int][]*container.Container // the current container Level key list LocalLeafRefs []*parser.LeafRefGnmi ExternalLeafRefs []*parser.LeafRefGnmi // contains filtered or unexported fields }
func NewResource ¶
func (*Resource) AddExternalLeafRef ¶
func (*Resource) AddLocalLeafRef ¶
func (*Resource) AssignFileName ¶
func (*Resource) CreateFile ¶
func (*Resource) GetAbsoluteGnmiActualResourcePath ¶
root resource have an additional entry in the path which is inconsistent with hierarchical resources to provide consistency we introduced this method to provide a consistent result for paths used mainly for leafrefs for now
func (*Resource) GetAbsoluteGnmiPath ¶
func (*Resource) GetAbsoluteLevel ¶
func (*Resource) GetAbsoluteName ¶
func (*Resource) GetAbsoluteXPath ¶
func (*Resource) GetAbsoluteXPathWithoutKey ¶
func (*Resource) GetActualGnmiFullPath ¶
func (*Resource) GetExcludeRelativeXPath ¶
func (*Resource) GetExternalLeafRef ¶
func (r *Resource) GetExternalLeafRef() []*parser.LeafRefGnmi
func (*Resource) GetHierarchicalElements ¶
func (*Resource) GetInternalHierarchicalPaths ¶
func (*Resource) GetLocalLeafRef ¶
func (r *Resource) GetLocalLeafRef() []*parser.LeafRefGnmi
func (*Resource) GetPath ¶
GetPath returns the relative Path of the resource For the root resources we need to strip the first entry of the path since srl uses some prefix entry
func (*Resource) GetRelativeGnmiActualResourcePath ¶
root resource have a additional entry in the path which is inconsistent with hierarchical resources to provide consistencyw e introduced this method to provide a consistent result for paths used mainly for leafrefs for now
func (*Resource) GetRelativeGnmiPath ¶
func (*Resource) GetRelativeXPath ¶
func (*Resource) GetResourceNameWithPrefix ¶
func (*Resource) GetResourcePath ¶ added in v0.1.89
func (*Resource) GetRootContainerEntry ¶
func (*Resource) ResourceLastElement ¶
func (*Resource) SetRootContainerEntry ¶
Click to show internal directories.
Click to hide internal directories.