Documentation ¶
Index ¶
- func AddPathElem(p *config.Path, e *container.Entry) *config.Path
- func DeepCopyConfigPath(in *config.Path) *config.Path
- type HeInfo
- type Option
- type Resource
- func (r *Resource) AddExternalLeafRef(ll, rl *config.Path)
- func (r *Resource) AddLocalLeafRef(ll, rl *config.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() *config.Path
- func (r *Resource) GetAbsoluteGnmiPath() *config.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() *config.Path
- func (r *Resource) GetExcludeRelativeXPath() []string
- func (r *Resource) GetExternalLeafRef() []*parser.LeafRef
- func (r *Resource) GetHierarchicalElements() []*HeInfo
- func (r *Resource) GetInternalHierarchicalPaths() []*config.Path
- func (r *Resource) GetLocalLeafRef() []*parser.LeafRef
- func (r *Resource) GetPath() *config.Path
- func (r *Resource) GetRelativeGnmiActualResourcePath() *config.Path
- func (r *Resource) GetRelativeGnmiPath() *config.Path
- func (r *Resource) GetRelativeXPath() *string
- func (r *Resource) GetResourceNameWithPrefix(prefix string) string
- 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 *config.Path // relative path from the resource; the absolute path is assembled using the resurce hierarchy with dependsOn ActualPath *config.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 []*config.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.LeafRef ExternalLeafRefs []*parser.LeafRef }
func NewResource ¶
func (*Resource) AddExternalLeafRef ¶
func (*Resource) AddLocalLeafRef ¶
func (*Resource) AssignFileName ¶
func (*Resource) CreateFile ¶
func (*Resource) GetAbsoluteGnmiActualResourcePath ¶
root resource have a 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 (*Resource) GetHierarchicalElements ¶
func (*Resource) GetInternalHierarchicalPaths ¶
func (*Resource) GetLocalLeafRef ¶
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) GetRootContainerEntry ¶
func (*Resource) ResourceLastElement ¶
func (*Resource) SetRootContainerEntry ¶
Click to show internal directories.
Click to hide internal directories.