Documentation
¶
Index ¶
- Constants
- Variables
- func GenericVMInterfaceCheck(nodeName string, eps []clablinks.Endpoint) error
- func LoadStartupConfigFileVr(node Node, configDirName, startupCfgFName string) error
- func SetNonDefaultRuntimePerKind(kindnames []string, runtime string) error
- type Credentials
- type DefaultNode
- func (d *DefaultNode) AddEndpoint(e clablinks.Endpoint) error
- func (d *DefaultNode) AddLinkToContainer(ctx context.Context, link netlink.Link, f func(ns.NetNS) error) error
- func (d *DefaultNode) CalculateInterfaceIndex(ifName string) (int, error)
- func (d *DefaultNode) CheckDeploymentConditions(ctx context.Context) error
- func (d *DefaultNode) CheckInterfaceName() error
- func (d *DefaultNode) CheckInterfaceOverlap() error
- func (d *DefaultNode) Config() *clabtypes.NodeConfig
- func (d *DefaultNode) Delete(ctx context.Context) error
- func (d *DefaultNode) DeleteNetnsSymlink() error
- func (d *DefaultNode) Deploy(ctx context.Context, _ *DeployParams) error
- func (d *DefaultNode) DeployEndpoints(ctx context.Context) error
- func (d *DefaultNode) ExecFunction(ctx context.Context, f func(ns.NetNS) error) error
- func (d *DefaultNode) GenerateConfig(dst, t string) error
- func (d *DefaultNode) GetContainerName() string
- func (d *DefaultNode) GetContainerStatus(ctx context.Context) clabruntime.ContainerStatus
- func (d *DefaultNode) GetContainers(ctx context.Context) ([]clabruntime.GenericContainer, error)
- func (d *DefaultNode) GetEndpoints() []clablinks.Endpoint
- func (d *DefaultNode) GetHostsEntries(ctx context.Context) (clabtypes.HostEntries, error)
- func (d *DefaultNode) GetImages(_ context.Context) map[string]string
- func (*DefaultNode) GetLinkEndpointType() clablinks.LinkEndpointType
- func (d *DefaultNode) GetMappedInterfaceName(ifName string) (string, error)
- func (d *DefaultNode) GetNSPath(ctx context.Context) (string, error)
- func (d *DefaultNode) GetRuntime() clabruntime.ContainerRuntime
- func (d *DefaultNode) GetSSHConfig() *clabtypes.SSHConfig
- func (d *DefaultNode) GetShortName() string
- func (d *DefaultNode) GetState() clabnodesstate.NodeState
- func (d *DefaultNode) IsHealthy(ctx context.Context) (bool, error)
- func (d *DefaultNode) LoadOrGenerateCertificate(certInfra *clabcert.Cert, topoName string) (nodeCert *clabcert.Certificate, err error)
- func (*DefaultNode) PostDeploy(_ context.Context, _ *PostDeployParams) error
- func (d *DefaultNode) PreDeploy(_ context.Context, params *PreDeployParams) error
- func (d *DefaultNode) PullImage(ctx context.Context) error
- func (d *DefaultNode) RunExec(ctx context.Context, execCmd *clabexec.ExecCmd) (*clabexec.ExecResult, error)
- func (d *DefaultNode) RunExecFromConfig(ctx context.Context, ec *clabexec.ExecCollection) error
- func (d *DefaultNode) RunExecNotWait(ctx context.Context, execCmd *clabexec.ExecCmd) error
- func (d *DefaultNode) SaveConfig(_ context.Context) error
- func (d *DefaultNode) SetState(s clabnodesstate.NodeState)
- func (d *DefaultNode) UpdateConfigWithRuntimeInfo(ctx context.Context) error
- func (d *DefaultNode) VerifyHostRequirements() error
- func (d *DefaultNode) VerifyLicenseFileExists(_ context.Context) error
- func (d *DefaultNode) VerifyStartupConfig(topoDir string) error
- func (d *DefaultNode) WithMgmtNet(mgmt *clabtypes.MgmtNet)
- func (d *DefaultNode) WithRuntime(r clabruntime.ContainerRuntime)
- type DeployParams
- type GenerateNodeAttributes
- type Initializer
- type Node
- type NodeOption
- type NodeOverwrites
- type NodeRegistry
- func (r *NodeRegistry) GetGenerateNodeAttributes() map[string]*GenerateNodeAttributes
- func (r *NodeRegistry) GetRegisteredNodeKindNames() []string
- func (r *NodeRegistry) Kind(kind string) *NodeRegistryEntry
- func (r *NodeRegistry) NewNodeOfKind(nodeKindName string) (Node, error)
- func (r *NodeRegistry) Register(names []string, initf Initializer, attributes *NodeRegistryEntryAttributes) error
- type NodeRegistryEntry
- type NodeRegistryEntryAttributes
- type PlatformAttrs
- type PostDeployParams
- type PreDeployParams
- type VRNode
- func (vr *VRNode) AddEndpoint(e clablinks.Endpoint) error
- func (vr *VRNode) CheckInterfaceName() error
- func (n *VRNode) Init(cfg *clabtypes.NodeConfig, opts ...NodeOption) error
- func (n *VRNode) PreDeploy(_ context.Context, params *PreDeployParams) error
- func (n *VRNode) SaveConfig(_ context.Context) error
Constants ¶
const ( // default connection mode for vrnetlab based containers. VrDefConnMode = "tc" // keys for the map returned by GetImages. ImageKey = "image" KernelKey = "kernel" SandboxKey = "sandbox" )
Variables ¶
var ( // a map of node kinds overriding the default global runtime. NonDefaultRuntimes = map[string]string{} // ErrCommandExecError is an error returned when a command is failed to execute on a given node. ErrCommandExecError = errors.New("command execution error") // ErrContainersNotFound indicated that for a given node no containers where found in the // runtime. ErrContainersNotFound = errors.New("containers not found") // ErrNoStartupConfig indicates that we are supposed to enforce a startup config but none are // provided. ErrNoStartupConfig = errors.New("no startup-config provided") // ErrIncompatibleOptions for options that are mutually exclusive. ErrIncompatibleOptions = errors.New("incompatible options") )
var VMInterfaceRegexp = regexp.MustCompile(`eth[1-9]\d*$`) // skipcq: GO-C4007
Functions ¶
func GenericVMInterfaceCheck ¶ added in v0.38.0
GenericVMInterfaceCheck checks interface names for generic VM-based nodes. These nodes could only have interfaces named ethX, where X is >0.
func LoadStartupConfigFileVr ¶ added in v0.34.0
LoadStartupConfigFileVr templates a startup-config using the file specified for VM-based nodes in the topo and puts the resulting config file by the LabDir/configDirName/startupCfgFName path.
func SetNonDefaultRuntimePerKind ¶ added in v0.27.0
SetNonDefaultRuntimePerKind sets a non default runtime for kinds that requires that (see cvx).
Types ¶
type Credentials ¶ added in v0.35.0
type Credentials struct {
// contains filtered or unexported fields
}
Credentials defines NOS SSH credentials.
func NewCredentials ¶ added in v0.35.0
func NewCredentials(username, password string) *Credentials
NewCredentials constructor for the Credentials struct.
func (*Credentials) GetPassword ¶ added in v0.35.0
func (c *Credentials) GetPassword() string
func (*Credentials) GetUsername ¶ added in v0.35.0
func (c *Credentials) GetUsername() string
func (*Credentials) Slice ¶ added in v0.35.2
func (c *Credentials) Slice() []string
Slice returns credentials as a slice.
type DefaultNode ¶ added in v0.33.0
type DefaultNode struct {
Cfg *clabtypes.NodeConfig
Mgmt *clabtypes.MgmtNet
Runtime clabruntime.ContainerRuntime
HostRequirements *clabtypes.HostRequirements
// SSHConfig is the SSH client configuration that a clab node requires.
SSHConfig *clabtypes.SSHConfig
// Indicates that the node should not start without no license file defined
LicensePolicy clabtypes.LicensePolicy
// OverwriteNode stores the interface used to overwrite methods defined
// for DefaultNode, so that particular nodes can provide custom implementations.
OverwriteNode NodeOverwrites
// List of link endpoints that are connected to the node.
Endpoints []clablinks.Endpoint
// Interface aliasing-related variables
InterfaceRegexp *regexp.Regexp
InterfaceMappedPrefix string
InterfaceOffset int
InterfaceHelp string
FirstDataIfIndex int
// contains filtered or unexported fields
}
DefaultNode implements the Node interface and is embedded to the structs of all other nodes. It has common fields and methods that every node should typically have. Nodes can override methods if needed.
func NewDefaultNode ¶ added in v0.34.0
func NewDefaultNode(n NodeOverwrites) *DefaultNode
NewDefaultNode initializes the DefaultNode structure and receives a NodeOverwrites interface which is implemented by the node struct of a particular kind. This allows DefaultNode to access fields of the specific node struct in the methods defined for DefaultNode.
func (*DefaultNode) AddEndpoint ¶ added in v0.44.0
func (d *DefaultNode) AddEndpoint(e clablinks.Endpoint) error
AddEndpoint maps the endpoint name to before adding it to the node endpoints if it matches the interface alias regexp. Returns an error if the mapping goes wrong.
func (*DefaultNode) AddLinkToContainer ¶ added in v0.44.0
func (*DefaultNode) CalculateInterfaceIndex ¶ added in v0.56.0
func (d *DefaultNode) CalculateInterfaceIndex(ifName string) (int, error)
CalculateInterfaceIndex parses the supplied interface name with the InterfaceRegexp. Using the the port offset, it calculates the mapped interface index based on the InterfaceOffset and the first data interface index.
func (*DefaultNode) CheckDeploymentConditions ¶ added in v0.34.0
func (d *DefaultNode) CheckDeploymentConditions(ctx context.Context) error
CheckDeploymentConditions wraps individual functions that check if a node satisfies deployment requirements.
func (*DefaultNode) CheckInterfaceName ¶ added in v0.34.0
func (d *DefaultNode) CheckInterfaceName() error
CheckInterfaceName checks if a name of the interface referenced in the topology file is in the expected range of name values. A no-op for the default node, specific nodes should implement this method.
func (*DefaultNode) CheckInterfaceOverlap ¶ added in v0.56.0
func (d *DefaultNode) CheckInterfaceOverlap() error
func (*DefaultNode) Config ¶ added in v0.33.0
func (d *DefaultNode) Config() *clabtypes.NodeConfig
func (*DefaultNode) Delete ¶ added in v0.33.0
func (d *DefaultNode) Delete(ctx context.Context) error
func (*DefaultNode) DeleteNetnsSymlink ¶ added in v0.34.0
func (d *DefaultNode) DeleteNetnsSymlink() error
DeleteNetnsSymlink deletes the symlink file created for the container netns.
func (*DefaultNode) Deploy ¶ added in v0.33.0
func (d *DefaultNode) Deploy(ctx context.Context, _ *DeployParams) error
func (*DefaultNode) DeployEndpoints ¶ added in v0.52.0
func (d *DefaultNode) DeployEndpoints(ctx context.Context) error
DeployEndpoints deploys endpoints associated with the node. The deployment of endpoints is done by deploying a link with the endpoint triggering it.
func (*DefaultNode) ExecFunction ¶ added in v0.44.0
ExecFunction executes the given function in the nodes network namespace.
func (*DefaultNode) GenerateConfig ¶ added in v0.34.0
func (d *DefaultNode) GenerateConfig(dst, t string) error
GenerateConfig generates configuration for the nodes out of the template `t` based on the node configuration and saves the result to dst. If the config file is already present in the node dir we do not regenerate the config unless EnforceStartupConfig is explicitly set to true and startup-config points to a file this will persist the changes that users make to a running config when booted from some startup config.
func (*DefaultNode) GetContainerName ¶ added in v0.35.0
func (d *DefaultNode) GetContainerName() string
GetContainerName returns the name used by the runtime to identify the container e.g. ext-container nodes use the name as defined in the topo file, while most other containers use long (prefixed) name.
func (*DefaultNode) GetContainerStatus ¶ added in v0.51.0
func (d *DefaultNode) GetContainerStatus(ctx context.Context) clabruntime.ContainerStatus
func (*DefaultNode) GetContainers ¶ added in v0.34.0
func (d *DefaultNode) GetContainers(ctx context.Context) ([]clabruntime.GenericContainer, error)
func (*DefaultNode) GetEndpoints ¶ added in v0.44.0
func (d *DefaultNode) GetEndpoints() []clablinks.Endpoint
func (*DefaultNode) GetHostsEntries ¶ added in v0.69.2
func (d *DefaultNode) GetHostsEntries(ctx context.Context) (clabtypes.HostEntries, error)
func (*DefaultNode) GetImages ¶ added in v0.33.0
func (d *DefaultNode) GetImages(_ context.Context) map[string]string
func (*DefaultNode) GetLinkEndpointType ¶ added in v0.44.0
func (*DefaultNode) GetLinkEndpointType() clablinks.LinkEndpointType
GetLinkEndpointType returns a veth link endpoint type for default nodes. The LinkEndpointTypeVeth indicates a veth endpoint which doesn't require special handling.
func (*DefaultNode) GetMappedInterfaceName ¶ added in v0.56.0
func (d *DefaultNode) GetMappedInterfaceName(ifName string) (string, error)
GetMappedInterfaceName returns with a mapped interface name based on the mapped interface prefix and calculated mapped interface index.
func (*DefaultNode) GetNSPath ¶ added in v0.69.0
func (d *DefaultNode) GetNSPath(ctx context.Context) (string, error)
GetNSPath retrieves the nodes nspath.
func (*DefaultNode) GetRuntime ¶ added in v0.33.0
func (d *DefaultNode) GetRuntime() clabruntime.ContainerRuntime
func (*DefaultNode) GetSSHConfig ¶ added in v0.48.0
func (d *DefaultNode) GetSSHConfig() *clabtypes.SSHConfig
func (*DefaultNode) GetShortName ¶ added in v0.44.0
func (d *DefaultNode) GetShortName() string
func (*DefaultNode) GetState ¶ added in v0.44.0
func (d *DefaultNode) GetState() clabnodesstate.NodeState
func (*DefaultNode) IsHealthy ¶ added in v0.51.0
func (d *DefaultNode) IsHealthy(ctx context.Context) (bool, error)
func (*DefaultNode) LoadOrGenerateCertificate ¶ added in v0.39.0
func (d *DefaultNode) LoadOrGenerateCertificate( certInfra *clabcert.Cert, topoName string, ) (nodeCert *clabcert.Certificate, err error)
LoadOrGenerateCertificate loads a certificate using a certificate storage provider provided in certInfra or generates a new one if it does not exist.
func (*DefaultNode) PostDeploy ¶ added in v0.33.0
func (*DefaultNode) PostDeploy(_ context.Context, _ *PostDeployParams) error
func (*DefaultNode) PreDeploy ¶ added in v0.33.0
func (d *DefaultNode) PreDeploy(_ context.Context, params *PreDeployParams) error
PreDeploy is a common method for all nodes that is called before the node is deployed.
func (*DefaultNode) PullImage ¶ added in v0.34.0
func (d *DefaultNode) PullImage(ctx context.Context) error
func (*DefaultNode) RunExec ¶ added in v0.34.0
func (d *DefaultNode) RunExec( ctx context.Context, execCmd *clabexec.ExecCmd, ) (*clabexec.ExecResult, error)
RunExec executes a single command for a node.
func (*DefaultNode) RunExecFromConfig ¶ added in v0.51.0
func (d *DefaultNode) RunExecFromConfig(ctx context.Context, ec *clabexec.ExecCollection) error
func (*DefaultNode) RunExecNotWait ¶ added in v0.35.0
RunExecNotWait executes a command for a node, and doesn't block waiting for the output. Should be overridden if the nodes implementation differs.
func (*DefaultNode) SaveConfig ¶ added in v0.33.0
func (d *DefaultNode) SaveConfig(_ context.Context) error
func (*DefaultNode) SetState ¶ added in v0.44.0
func (d *DefaultNode) SetState(s clabnodesstate.NodeState)
func (*DefaultNode) UpdateConfigWithRuntimeInfo ¶ added in v0.34.0
func (d *DefaultNode) UpdateConfigWithRuntimeInfo(ctx context.Context) error
func (*DefaultNode) VerifyHostRequirements ¶ added in v0.34.0
func (d *DefaultNode) VerifyHostRequirements() error
func (*DefaultNode) VerifyLicenseFileExists ¶ added in v0.36.0
func (d *DefaultNode) VerifyLicenseFileExists(_ context.Context) error
VerifyLicenseFileExists checks if a license file with a provided path exists.
func (*DefaultNode) VerifyStartupConfig ¶ added in v0.34.0
func (d *DefaultNode) VerifyStartupConfig(topoDir string) error
VerifyStartupConfig verifies that startup config files exists on disks.
func (*DefaultNode) WithMgmtNet ¶ added in v0.33.0
func (d *DefaultNode) WithMgmtNet(mgmt *clabtypes.MgmtNet)
func (*DefaultNode) WithRuntime ¶ added in v0.33.0
func (d *DefaultNode) WithRuntime(r clabruntime.ContainerRuntime)
type DeployParams ¶ added in v0.39.0
DeployParams contains parameters for the Deploy function.
type GenerateNodeAttributes ¶ added in v0.60.0
type GenerateNodeAttributes struct {
// contains filtered or unexported fields
}
func NewGenerateNodeAttributes ¶ added in v0.60.0
func NewGenerateNodeAttributes(generateable bool, ifFormat string) *GenerateNodeAttributes
func (*GenerateNodeAttributes) GetInterfaceFormat ¶ added in v0.60.0
func (ga *GenerateNodeAttributes) GetInterfaceFormat() string
func (*GenerateNodeAttributes) IsGenerateable ¶ added in v0.60.0
func (ga *GenerateNodeAttributes) IsGenerateable() bool
type Initializer ¶
type Initializer func() Node
type Node ¶
type Node interface {
Init(*clabtypes.NodeConfig, ...NodeOption) error
// GetContainers returns a pointer to GenericContainer that the node uses.
GetContainers(ctx context.Context) ([]clabruntime.GenericContainer, error)
DeleteNetnsSymlink() (err error)
Config() *clabtypes.NodeConfig // Config returns the nodes configuration
// CheckDeploymentConditions checks if node-scoped deployment conditions are met.
CheckDeploymentConditions(ctx context.Context) error
PreDeploy(ctx context.Context, params *PreDeployParams) error
Deploy(context.Context, *DeployParams) error // Deploy triggers the deployment of this node
PostDeploy(ctx context.Context, params *PostDeployParams) error
WithMgmtNet(
*clabtypes.MgmtNet,
) // WithMgmtNet provides the management network for the node
WithRuntime(clabruntime.ContainerRuntime) // WithRuntime provides the runtime for the node
PullImage(ctx context.Context) error // PullImage pulls the image for the node
// CalculateInterfaceIndex returns with the interface index offset from the first valid
// dataplane interface based on the interface name. Errors otherwise.
CalculateInterfaceIndex(ifName string) (int, error)
// CheckInterfaceName checks if a name of the interface referenced in the topology file is
// correct for this node
CheckInterfaceName() error
// VerifyStartupConfig checks for existence of the referenced file and maybe performs additional
// config checks
VerifyStartupConfig(topoDir string) error
SaveConfig(
context.Context,
) error // SaveConfig saves the nodes configuration to an external file
Delete(context.Context) error // Delete triggers the deletion of this node
GetImages(context.Context) map[string]string // GetImages returns the images used for this kind
GetRuntime() clabruntime.ContainerRuntime // GetRuntime returns the nodes assigned runtime
GenerateConfig(dst, templ string) error // Generate the nodes configuration
// UpdateConfigWithRuntimeInfo updates node config with runtime info like IP addresses assigned
// by runtime
UpdateConfigWithRuntimeInfo(context.Context) error
// RunExec execute a single command for a given node.
RunExec(ctx context.Context, execCmd *clabexec.ExecCmd) (*clabexec.ExecResult, error)
// Adds the given link to the Node (container). After adding the Link to the node,
// the given function f is called within the Nodes namespace to setup the link.
AddLinkToContainer(ctx context.Context, link netlink.Link, f func(ns.NetNS) error) error
AddEndpoint(e clablinks.Endpoint) error
GetEndpoints() []clablinks.Endpoint
GetLinkEndpointType() clablinks.LinkEndpointType
GetShortName() string
// DeployEndpoints deploys the links for the node.
DeployEndpoints(ctx context.Context) error
// ExecFunction executes the given function within the nodes network namespace
ExecFunction(context.Context, func(ns.NetNS) error) error
GetState() clabnodesstate.NodeState
SetState(clabnodesstate.NodeState)
GetSSHConfig() *clabtypes.SSHConfig
// RunExecFromConfig executes the topologyfile defined exec commands
RunExecFromConfig(context.Context, *clabexec.ExecCollection) error
IsHealthy(ctx context.Context) (bool, error)
GetContainerStatus(ctx context.Context) clabruntime.ContainerStatus
GetNSPath(ctx context.Context) (string, error)
// Generate the host entries for this node
GetHostsEntries(ctx context.Context) (clabtypes.HostEntries, error)
}
Node is an interface that defines the behavior of a node.
type NodeOption ¶
type NodeOption func(Node)
func WithMgmtNet ¶
func WithMgmtNet(mgmt *clabtypes.MgmtNet) NodeOption
func WithRuntime ¶
func WithRuntime(r clabruntime.ContainerRuntime) NodeOption
type NodeOverwrites ¶ added in v0.34.0
type NodeOverwrites interface {
VerifyStartupConfig(topoDir string) error
CheckInterfaceName() error
CalculateInterfaceIndex(ifName string) (int, error)
GetMappedInterfaceName(ifName string) (string, error)
VerifyHostRequirements() error
PullImage(ctx context.Context) error
GetImages(ctx context.Context) map[string]string
GetContainers(ctx context.Context) ([]clabruntime.GenericContainer, error)
GetContainerName() string
VerifyLicenseFileExists(context.Context) error
RunExec(context.Context, *clabexec.ExecCmd) (*clabexec.ExecResult, error)
GetNSPath(ctx context.Context) (string, error)
}
NodeOverwrites is an interface that every node implements. It is used to enable DefaultNode to get access to the particular node structs and is provided as an argument of the NewDefaultNode function. The methods defined for this interfaces are the methods that particular node has a custom implementation of.
type NodeRegistry ¶ added in v0.35.0
type NodeRegistry struct {
// contains filtered or unexported fields
}
func NewNodeRegistry ¶ added in v0.35.0
func NewNodeRegistry() *NodeRegistry
NewNodeRegistry constructs a new Registry.
func (*NodeRegistry) GetGenerateNodeAttributes ¶ added in v0.60.0
func (r *NodeRegistry) GetGenerateNodeAttributes() map[string]*GenerateNodeAttributes
func (*NodeRegistry) GetRegisteredNodeKindNames ¶ added in v0.35.0
func (r *NodeRegistry) GetRegisteredNodeKindNames() []string
GetRegisteredNodeKindNames returns a sorted slice of all the registered node kind names in the registry.
func (*NodeRegistry) Kind ¶ added in v0.35.2
func (r *NodeRegistry) Kind(kind string) *NodeRegistryEntry
func (*NodeRegistry) NewNodeOfKind ¶ added in v0.35.0
func (r *NodeRegistry) NewNodeOfKind(nodeKindName string) (Node, error)
NewNodeOfKind return a new Node of the given Node Kind.
func (*NodeRegistry) Register ¶ added in v0.35.0
func (r *NodeRegistry) Register( names []string, initf Initializer, attributes *NodeRegistryEntryAttributes, ) error
Register registers the node' init function for all provided names.
type NodeRegistryEntry ¶ added in v0.35.2
type NodeRegistryEntry struct {
// contains filtered or unexported fields
}
func (*NodeRegistryEntry) GetCredentials ¶ added in v0.60.0
func (nre *NodeRegistryEntry) GetCredentials() *Credentials
func (*NodeRegistryEntry) GetGenerateAttributes ¶ added in v0.60.0
func (nre *NodeRegistryEntry) GetGenerateAttributes() *GenerateNodeAttributes
func (*NodeRegistryEntry) PlatformAttrs ¶ added in v0.67.0
func (nre *NodeRegistryEntry) PlatformAttrs() *PlatformAttrs
type NodeRegistryEntryAttributes ¶ added in v0.60.0
type NodeRegistryEntryAttributes struct {
// contains filtered or unexported fields
}
func NewNodeRegistryEntryAttributes ¶ added in v0.60.0
func NewNodeRegistryEntryAttributes( c *Credentials, ga *GenerateNodeAttributes, pa *PlatformAttrs, ) *NodeRegistryEntryAttributes
NewNodeRegistryEntryAttributes creates a new NodeRegistryEntryAttributes.
func (*NodeRegistryEntryAttributes) Credentials ¶ added in v0.60.0
func (e *NodeRegistryEntryAttributes) Credentials() *Credentials
Credentials returns entry's credentials. might return nil if no default credentials present.
func (*NodeRegistryEntryAttributes) GetCredentials ¶ added in v0.60.0
func (nrea *NodeRegistryEntryAttributes) GetCredentials() *Credentials
func (*NodeRegistryEntryAttributes) GetGenerateAttributes ¶ added in v0.60.0
func (nrea *NodeRegistryEntryAttributes) GetGenerateAttributes() *GenerateNodeAttributes
func (*NodeRegistryEntryAttributes) PlatformAttrs ¶ added in v0.67.0
func (nrea *NodeRegistryEntryAttributes) PlatformAttrs() *PlatformAttrs
PlatformAttrs returns the platform attributes of this node's registry attributes.
type PlatformAttrs ¶ added in v0.67.0
PlatformAttrs contains the platform attributes this node/platform is known to have in different libraries and tools. Most often just the platform/provider name.
type PostDeployParams ¶ added in v0.39.0
PostDeployParams contains parameters for the PostDeploy function.
type PreDeployParams ¶ added in v0.39.0
type VRNode ¶ added in v0.56.0
type VRNode struct {
DefaultNode
ScrapliPlatformName string
ConfigDirName string
StartupCfgFName string
Credentials *Credentials
}
func NewVRNode ¶ added in v0.56.0
func NewVRNode(n NodeOverwrites, creds *Credentials, scrapliPlatformName string) *VRNode
func (*VRNode) AddEndpoint ¶ added in v0.56.0
AddEndpoint override version maps the endpoint name to an ethX-based name before adding it to the node endpoints. Returns an error if the mapping goes wrong.
func (*VRNode) CheckInterfaceName ¶ added in v0.56.0
CheckInterfaceName checks interface names for generic VM-based nodes. Displays InterfaceHelp if the check fails for the expected VM interface regexp.
func (*VRNode) Init ¶ added in v0.69.0
func (n *VRNode) Init(cfg *clabtypes.NodeConfig, opts ...NodeOption) error
Init stub function.