Documentation
¶
Index ¶
- Constants
- Variables
- func FindTopoFileByPath(path string) (string, error)
- func RetrieveSSHAgentKeys(ctx context.Context) ([]ssh.PublicKey, error)
- func RetrieveSSHPubKeysFromFiles() ([]ssh.PublicKey, error)
- func RuntimeInitializer(name string) (string, clabruntime.Initializer, error)
- type AnsibleInventory
- type AnsibleInventoryNode
- type AnsibleKindProps
- type CLab
- func (c *CLab) BuildGraphFromDeployedLab(g *GraphTopo, containers []clabruntime.GenericContainer)
- func (c *CLab) BuildGraphFromTopo(g *GraphTopo)
- func (c *CLab) CheckConnectivity(ctx context.Context) error
- func (c *CLab) CreateNetwork(ctx context.Context) error
- func (c *CLab) DeleteEntriesFromHostsFile() error
- func (c *CLab) Deploy(ctx context.Context, options *DeployOptions) ([]clabruntime.GenericContainer, error)
- func (c *CLab) Destroy(ctx context.Context, options ...DestroyOption) (err error)
- func (c *CLab) Exec(ctx context.Context, cmds []string, listOptions ...ListOption) (*clabexec.ExecCollection, error)
- func (c *CLab) GenerateDotGraph(ctx context.Context) error
- func (c *CLab) GenerateDrawioDiagram(version string, userArgs []string) error
- func (c *CLab) GenerateExports(ctx context.Context, f io.Writer, p string) error
- func (c *CLab) GenerateInventories() error
- func (c *CLab) GenerateMermaidGraph(direction string) error
- func (c *CLab) GetNode(name string) (clabnodes.Node, error)
- func (c *CLab) HasKind(k string) bool
- func (c *CLab) ListContainerInterfaces(ctx context.Context, container *clabruntime.GenericContainer) (*clabtypes.ContainerInterfaces, error)
- func (c *CLab) ListContainers(ctx context.Context, options ...ListOption) ([]clabruntime.GenericContainer, error)
- func (c *CLab) ListContainersInterfaces(ctx context.Context, containers []clabruntime.GenericContainer) ([]*clabtypes.ContainerInterfaces, error)
- func (c *CLab) ListNodesContainers(ctx context.Context) ([]clabruntime.GenericContainer, error)
- func (c *CLab) ListNodesContainersIgnoreNotFound(ctx context.Context) ([]clabruntime.GenericContainer, error)
- func (c *CLab) LoadOrGenerateCA(caCertInput *clabcert.CACSRInput) error
- func (c *CLab) LoadTopologyFromFile(topo, varsFile string) error
- func (c *CLab) NewNode(nodeName, nodeRuntime string, nodeDef *clabtypes.NodeDefinition, idx int) error
- func (c *CLab) ProcessTopoPath(path string) (string, error)
- func (c *CLab) RegisterNodes()
- func (c *CLab) RemoveSSHConfig(topoPaths *clabtypes.TopoPaths) error
- func (c *CLab) ResolveLinks() error
- func (c *CLab) RetrieveSSHPubKeys(ctx context.Context) ([]ssh.PublicKey, error)
- func (c *CLab) Save(ctx context.Context) error
- func (c *CLab) ServeTopoGraph(tmpl, staticDir, srv string, topoD TopoData) error
- type ClabOption
- func WithDebug(debug bool) ClabOption
- func WithDependencyManager(dm clabcoredependency_manager.DependencyManager) ClabOption
- func WithKeepMgmtNet() ClabOption
- func WithLabOwner(owner string) ClabOption
- func WithManagementIpv4Subnet(s string) ClabOption
- func WithManagementIpv6Subnet(s string) ClabOption
- func WithManagementNetworkName(n string) ClabOption
- func WithNodeFilter(nodeFilter []string) ClabOption
- func WithRuntime(name string, rtconfig *clabruntime.RuntimeConfig) ClabOption
- func WithSkippedBindsPathsCheck() ClabOption
- func WithTimeout(dur time.Duration) ClabOption
- func WithTopoBackup(path string) ClabOption
- func WithTopoPath(path, varsFile string) ClabOption
- func WithTopologyFromLab(labName string) ClabOption
- func WithTopologyName(n string) ClabOption
- type Config
- type DeployOptions
- func (d *DeployOptions) ExportTemplate() string
- func (d *DeployOptions) Graph() bool
- func (d *DeployOptions) MaxWorkers() uint
- func (d *DeployOptions) Reconfigure() bool
- func (d *DeployOptions) RestoreAll() string
- func (d *DeployOptions) RestoreNodeSnapshots() []string
- func (d *DeployOptions) SetExportTemplate(templatePath string) *DeployOptions
- func (d *DeployOptions) SetGraph(b bool) *DeployOptions
- func (d *DeployOptions) SetMaxWorkers(i uint) *DeployOptions
- func (d *DeployOptions) SetReconfigure(b bool) *DeployOptions
- func (d *DeployOptions) SetRestoreAll(path string) *DeployOptions
- func (d *DeployOptions) SetRestoreNodeSnapshots(snapshots []string) *DeployOptions
- func (d *DeployOptions) SetSkipLabDirFileACLs(b bool) *DeployOptions
- func (d *DeployOptions) SetSkipPostDeploy(b bool) *DeployOptions
- func (d *DeployOptions) SkipPostDeploy() bool
- type DestroyOption
- func WithDestroyAll() DestroyOption
- func WithDestroyCleanup() DestroyOption
- func WithDestroyGraceful() DestroyOption
- func WithDestroyKeepMgmtNet() DestroyOption
- func WithDestroyMaxWorkers(i uint) DestroyOption
- func WithDestroyNodeFilter(ss []string) DestroyOption
- func WithDestroyTerminalPrompt() DestroyOption
- type DestroyOptions
- type GraphTopo
- type Link
- type ListOption
- func WithListContainerName(s string) ListOption
- func WithListFilter(fs []*clabtypes.GenericFilter) ListOption
- func WithListFromCliArgs(ss []string) ListOption
- func WithListLabName(s string) ListOption
- func WithListNodeName(s string) ListOption
- func WithListToolType(s string) ListOption
- func WithListclabLabelExists() ListOption
- type ListOptions
- type NornirSimpleInventory
- type NornirSimpleInventoryKindProps
- type NornirSimpleInventoryNode
- type SSHConfigNodeTmpl
- type SSHConfigTmpl
- type TopoData
- type TopologyExport
Constants ¶
const (
// DefaultVethLinkMTU is the veth link mtu.
DefaultVethLinkMTU = 9500
)
Variables ¶
var ErrNodeNotFound = errors.New("node not found")
Functions ¶
func FindTopoFileByPath ¶
FindTopoFileByPath takes a topology path, which might be the path to a directory and returns the topology file name if found.
func RetrieveSSHAgentKeys ¶
RetrieveSSHAgentKeys retrieves public keys registered with the ssh-agent.
func RetrieveSSHPubKeysFromFiles ¶
RetrieveSSHPubKeysFromFiles retrieves public keys from the ~/.ssh/*.authorized_keys and ~/.ssh/*.pub files.
func RuntimeInitializer ¶
func RuntimeInitializer(name string) (string, clabruntime.Initializer, error)
RuntimeInitializer returns a runtime initializer function for a provided runtime name. Order of preference: cli flag -> env var -> default value of docker.
Types ¶
type AnsibleInventory ¶
type AnsibleInventory struct {
// clab node kinds
Kinds map[string]*AnsibleKindProps
// clab nodes aggregated by their kind
Nodes map[string][]*AnsibleInventoryNode
// clab nodes aggregated by user-defined groups
Groups map[string][]*AnsibleInventoryNode
}
AnsibleInventory represents the data structure used to generate the ansible inventory file.
type AnsibleInventoryNode ¶
type AnsibleInventoryNode struct {
*clabtypes.NodeConfig
}
AnsibleInventoryNode represents the data structure used to generate the ansible inventory file. It embeds the NodeConfig struct and adds the Username and Password fields extracted from the node registry.
type AnsibleKindProps ¶
type AnsibleKindProps struct {
Username string
Password string
NetworkOS string
AnsibleConn string
}
AnsibleKindProps is the kind properties structure used to generate the ansible inventory file.
type CLab ¶
type CLab struct {
Config *Config `json:"config,omitempty"`
TopoPaths *clabtypes.TopoPaths
Nodes map[string]clabnodes.Node `json:"nodes,omitempty"`
Links map[int]clablinks.Link `json:"links,omitempty"`
Endpoints []clablinks.Endpoint
Runtimes map[string]clabruntime.ContainerRuntime `json:"runtimes,omitempty"`
// reg is a registry of node kinds
Reg *clabnodes.NodeRegistry
Cert *clabcert.Cert
// List of SSH public keys extracted from the ~/.ssh/authorized_keys file
// and ~/.ssh/*.pub files.
// The keys are used to enable key-based SSH access for the nodes.
SSHPubKeys []ssh.PublicKey
// contains filtered or unexported fields
}
func NewContainerLab ¶
func NewContainerLab(opts ...ClabOption) (*CLab, error)
NewContainerLab function defines a new container lab.
func (*CLab) BuildGraphFromDeployedLab ¶
func (c *CLab) BuildGraphFromDeployedLab(g *GraphTopo, containers []clabruntime.GenericContainer)
func (*CLab) BuildGraphFromTopo ¶
func (*CLab) CheckConnectivity ¶
CheckConnectivity checks the connectivity to all container runtimes, returns an error if it encounters any, otherwise nil.
func (*CLab) DeleteEntriesFromHostsFile ¶
func (*CLab) Deploy ¶
func (c *CLab) Deploy( ctx context.Context, options *DeployOptions, ) ([]clabruntime.GenericContainer, error)
Deploy the given topology. skipcq: GO-R1005
func (*CLab) Destroy ¶
func (c *CLab) Destroy(ctx context.Context, options ...DestroyOption) (err error)
func (*CLab) Exec ¶
func (c *CLab) Exec( ctx context.Context, cmds []string, listOptions ...ListOption, ) (*clabexec.ExecCollection, error)
Exec execute commands on running topology nodes.
func (*CLab) GenerateDotGraph ¶
GenerateDotGraph generates a graph of the lab topology.
func (*CLab) GenerateDrawioDiagram ¶
GenerateDrawioDiagram pulls (if needed) and runs the "clab-io-draw" container in interactive TTY mode. The container is removed automatically when the TUI session ends.
func (*CLab) GenerateExports ¶
GenerateExports generates various export files and writes it to a file in the lab directory. `p` is the path to the template. `f` is the file to write the exported data to.
func (*CLab) GenerateInventories ¶
GenerateInventories generate various inventory files and writes it to a lab location.
func (*CLab) GenerateMermaidGraph ¶
func (*CLab) ListContainerInterfaces ¶
func (c *CLab) ListContainerInterfaces( ctx context.Context, container *clabruntime.GenericContainer, ) (*clabtypes.ContainerInterfaces, error)
ListContainerInterfaces list interfaces of the given container.
func (*CLab) ListContainers ¶
func (c *CLab) ListContainers( ctx context.Context, options ...ListOption, ) ([]clabruntime.GenericContainer, error)
ListContainers lists all containers using provided filter.
func (*CLab) ListContainersInterfaces ¶
func (c *CLab) ListContainersInterfaces( ctx context.Context, containers []clabruntime.GenericContainer, ) ([]*clabtypes.ContainerInterfaces, error)
ListContainersInterfaces list interfaces of all given containers.
func (*CLab) ListNodesContainers ¶
func (c *CLab) ListNodesContainers( ctx context.Context, ) ([]clabruntime.GenericContainer, error)
ListNodesContainers lists all containers based on the nodes stored in clab instance.
func (*CLab) ListNodesContainersIgnoreNotFound ¶
func (c *CLab) ListNodesContainersIgnoreNotFound( ctx context.Context, ) ([]clabruntime.GenericContainer, error)
ListNodesContainersIgnoreNotFound lists all containers based on the nodes stored in clab instance, ignoring errors for non found containers.
func (*CLab) LoadOrGenerateCA ¶
func (c *CLab) LoadOrGenerateCA(caCertInput *clabcert.CACSRInput) error
LoadOrGenerateCA loads the CA certificate from the storage, or generates a new one if it does not exist.
func (*CLab) LoadTopologyFromFile ¶
LoadTopologyFromFile loads a topology by the topo file path parses the topology file into c.Conf structure as well as populates the TopoFile structure with the topology file related information.
func (*CLab) NewNode ¶
func (c *CLab) NewNode( nodeName, nodeRuntime string, nodeDef *clabtypes.NodeDefinition, idx int, ) error
NewNode initializes a new node object.
func (*CLab) ProcessTopoPath ¶
ProcessTopoPath takes a topology path, which might be the path to a directory or a file or stdin or a URL (HTTP/HTTPS/S3) and returns the topology file name if found.
func (*CLab) RegisterNodes ¶
func (c *CLab) RegisterNodes()
RegisterNodes registers all the nodes/kinds supported by containerlab.
func (*CLab) RemoveSSHConfig ¶
RemoveSSHConfig removes the lab specific ssh config file.
func (*CLab) ResolveLinks ¶
ResolveLinks resolves raw links to the actual link types and stores them in the CLab.Links map.
func (*CLab) RetrieveSSHPubKeys ¶
RetrieveSSHPubKeys retrieves the PubKeys from the different sources SSHAgent as well as all home dir based /.ssh/*.pub files.
type ClabOption ¶
func WithDependencyManager ¶
func WithDependencyManager(dm clabcoredependency_manager.DependencyManager) ClabOption
WithDependencyManager adds Dependency Manager.
func WithKeepMgmtNet ¶
func WithKeepMgmtNet() ClabOption
func WithLabOwner ¶
func WithLabOwner(owner string) ClabOption
WithLabOwner sets the owner label for all nodes in the lab. Only users in the clab_admins group can set a custom owner.
func WithManagementIpv4Subnet ¶
func WithManagementIpv4Subnet(s string) ClabOption
WithManagementIpv4Subnet defined the IPv4 subnet that will be used for the mgmt network.
func WithManagementIpv6Subnet ¶
func WithManagementIpv6Subnet(s string) ClabOption
WithManagementIpv6Subnet defined the IPv6 subnet that will be used for the mgmt network.
func WithManagementNetworkName ¶
func WithManagementNetworkName(n string) ClabOption
WithManagementNetworkName sets the name of the management network that is to be used.
func WithNodeFilter ¶
func WithNodeFilter(nodeFilter []string) ClabOption
WithNodeFilter option sets a filter for nodes to be deployed. A filter is a list of node names to be deployed, names are provided exactly as they are listed in the topology file. Since this is altering the clab.config.Topology.[Nodes,Links] it must only be called after WithTopoFile.
func WithRuntime ¶
func WithRuntime(name string, rtconfig *clabruntime.RuntimeConfig) ClabOption
WithRuntime option sets a container runtime to be used by containerlab.
func WithSkippedBindsPathsCheck ¶
func WithSkippedBindsPathsCheck() ClabOption
WithSkippedBindsPathsCheck skips the binds paths checks.
func WithTimeout ¶
func WithTimeout(dur time.Duration) ClabOption
func WithTopoBackup ¶
func WithTopoBackup(path string) ClabOption
WithTopoBackup creates a backup of the topology file.
func WithTopoPath ¶
func WithTopoPath(path, varsFile string) ClabOption
func WithTopologyFromLab ¶ added in v0.71.0
func WithTopologyFromLab(labName string) ClabOption
WithTopologyFromLab loads the topology file path based on a running lab name. The lab name is used to look up the container labels of a running lab and derive the topology file location. It falls back to WithTopoPath once the topology path is discovered.
func WithTopologyName ¶ added in v0.70.0
func WithTopologyName(n string) ClabOption
WithTopologyName sets the name of the lab/topology to the provided string.
type Config ¶
type Config struct {
Name string `json:"name,omitempty"`
Prefix *string `json:"prefix,omitempty"`
Mgmt *clabtypes.MgmtNet `json:"mgmt,omitempty"`
Settings *clabtypes.Settings `json:"settings,omitempty"`
Topology *clabtypes.Topology `json:"topology,omitempty"`
// the debug flag value as passed via cli
// may be used by other packages to enable debug logging
Debug bool `json:"debug"`
}
Config defines lab configuration as it is provided in the YAML file.
type DeployOptions ¶
type DeployOptions struct {
// contains filtered or unexported fields
}
DeployOptions represents the options for deploying a lab.
func NewDeployOptions ¶
func NewDeployOptions(maxWorkers uint) (*DeployOptions, error)
NewDeployOptions creates a new DeployOptions instance with the specified maxWorkers value.
func (*DeployOptions) ExportTemplate ¶
func (d *DeployOptions) ExportTemplate() string
ExportTemplate returns the exportTemplate option value.
func (*DeployOptions) Graph ¶
func (d *DeployOptions) Graph() bool
Graph returns the graph option value.
func (*DeployOptions) MaxWorkers ¶
func (d *DeployOptions) MaxWorkers() uint
MaxWorkers returns the maxWorkers option value.
func (*DeployOptions) Reconfigure ¶
func (d *DeployOptions) Reconfigure() bool
Reconfigure returns the reconfigure option value.
func (*DeployOptions) RestoreAll ¶ added in v0.72.0
func (d *DeployOptions) RestoreAll() string
RestoreAll returns the restoreAll option value.
func (*DeployOptions) RestoreNodeSnapshots ¶ added in v0.72.0
func (d *DeployOptions) RestoreNodeSnapshots() []string
RestoreNodeSnapshots returns the restoreNodeSnapshots option value.
func (*DeployOptions) SetExportTemplate ¶
func (d *DeployOptions) SetExportTemplate(templatePath string) *DeployOptions
SetExportTemplate sets the exportTemplate option and returns the updated DeployOptions instance.
func (*DeployOptions) SetGraph ¶
func (d *DeployOptions) SetGraph(b bool) *DeployOptions
SetGraph sets the graph option and returns the updated DeployOptions instance.
func (*DeployOptions) SetMaxWorkers ¶
func (d *DeployOptions) SetMaxWorkers(i uint) *DeployOptions
SetMaxWorkers sets the maxWorkers option and returns the updated DeployOptions instance.
func (*DeployOptions) SetReconfigure ¶
func (d *DeployOptions) SetReconfigure(b bool) *DeployOptions
SetReconfigure sets the reconfigure option and returns the updated DeployOptions instance.
func (*DeployOptions) SetRestoreAll ¶ added in v0.72.0
func (d *DeployOptions) SetRestoreAll(path string) *DeployOptions
SetRestoreAll sets the restoreAll option and returns the updated DeployOptions instance.
func (*DeployOptions) SetRestoreNodeSnapshots ¶ added in v0.72.0
func (d *DeployOptions) SetRestoreNodeSnapshots(snapshots []string) *DeployOptions
SetRestoreNodeSnapshots sets the restoreNodeSnapshots option and returns the updated DeployOptions instance.
func (*DeployOptions) SetSkipLabDirFileACLs ¶
func (d *DeployOptions) SetSkipLabDirFileACLs(b bool) *DeployOptions
SetSkipLabDirFileACLs sets the skipLabDirFileACLs deployment option.
func (*DeployOptions) SetSkipPostDeploy ¶
func (d *DeployOptions) SetSkipPostDeploy(b bool) *DeployOptions
SetSkipPostDeploy sets the skipPostDeploy option and returns the updated DeployOptions instance.
func (*DeployOptions) SkipPostDeploy ¶
func (d *DeployOptions) SkipPostDeploy() bool
SkipPostDeploy returns the skipPostDeploy option value.
type DestroyOption ¶ added in v0.70.0
type DestroyOption func(o *DestroyOptions)
DestroyOption is a type used for functional options for the Clab Destroy method.
func WithDestroyAll ¶ added in v0.70.0
func WithDestroyAll() DestroyOption
WithDestroyAll informs the destroy method to destroy all labs.
func WithDestroyCleanup ¶ added in v0.70.0
func WithDestroyCleanup() DestroyOption
WithDestroyCleanup informs the destroy method to also try to cleanup directories.
func WithDestroyGraceful ¶ added in v0.70.0
func WithDestroyGraceful() DestroyOption
WithDestroyGraceful attempts to stop containers before destroying them.
func WithDestroyKeepMgmtNet ¶ added in v0.70.0
func WithDestroyKeepMgmtNet() DestroyOption
WithDestroyKeepMgmtNet retains the mgmt network on destroy.
func WithDestroyMaxWorkers ¶ added in v0.70.0
func WithDestroyMaxWorkers( i uint, ) DestroyOption
WithDestroyMaxWorkers sets max workers for destroy events.
func WithDestroyNodeFilter ¶ added in v0.70.0
func WithDestroyNodeFilter(ss []string) DestroyOption
WithDestroyNodeFilter accepts a normal node-filter to be used with the Destroy operation.
func WithDestroyTerminalPrompt ¶ added in v0.70.0
func WithDestroyTerminalPrompt() DestroyOption
WithDestroyTerminalPrompt asks the destroy method to prompt for deletion when using the all option.
type DestroyOptions ¶ added in v0.70.0
type DestroyOptions struct {
// contains filtered or unexported fields
}
DestroyOptions represents the options for destroying lab(s).
func NewDestroyOptions ¶ added in v0.70.0
func NewDestroyOptions() *DestroyOptions
NewDestroyOptions returns a new destroy options object.
type GraphTopo ¶
type GraphTopo struct {
Nodes []clabtypes.ContainerDetails `json:"nodes,omitempty"`
Links []Link `json:"links,omitempty"`
}
type ListOption ¶ added in v0.70.0
type ListOption func(o *ListOptions)
ListOption is a type used for functional options for the Clab List method.
func WithListContainerName ¶ added in v0.71.0
func WithListContainerName( s string, ) ListOption
WithListContainerName filters the list operation to the given container name.
func WithListFilter ¶ added in v0.71.0
func WithListFilter(fs []*clabtypes.GenericFilter) ListOption
WithListFilter adds user created normal filters to the filter set.
func WithListFromCliArgs ¶ added in v0.70.0
func WithListFromCliArgs(ss []string) ListOption
WithListFromCliArgs filters the list based on a string slice of cli args, transforming those args into proper filters in the ToFilters method.
func WithListLabName ¶ added in v0.70.0
func WithListLabName( s string, ) ListOption
WithListLabName filters the list operation to the given lab name.
func WithListNodeName ¶ added in v0.70.0
func WithListNodeName( s string, ) ListOption
WithListNodeName filters the list operation to the given node name.
func WithListToolType ¶ added in v0.70.0
func WithListToolType( s string, ) ListOption
WithListToolType filters the list operation to the tool type name.
func WithListclabLabelExists ¶ added in v0.70.0
func WithListclabLabelExists() ListOption
WithListclabLabelExists filters the list to any containers that include a containerlab label.
type ListOptions ¶ added in v0.70.0
type ListOptions struct {
// contains filtered or unexported fields
}
ListOptions represents the options for listing containers.
func NewListOptions ¶ added in v0.70.0
func NewListOptions() *ListOptions
NewListOptions returns a new list options object.
func (*ListOptions) ToFilters ¶ added in v0.70.0
func (o *ListOptions) ToFilters() []*clabtypes.GenericFilter
ToFilters converts the list options to a slice of generic filters.
type NornirSimpleInventory ¶
type NornirSimpleInventory struct {
// clab node kinds
Kinds map[string]*NornirSimpleInventoryKindProps
// clab nodes aggregated by their kind
Nodes map[string][]*NornirSimpleInventoryNode
// clab nodes aggregated by user-defined groups
Groups map[string][]*NornirSimpleInventoryNode
}
NornirSimpleInventory represents the data structure used to generate the nornir simple inventory file.
type NornirSimpleInventoryKindProps ¶
NornirSimpleInventoryKindProps is the kind properties structure used to generate the nornir simple inventory file.
type NornirSimpleInventoryNode ¶
type NornirSimpleInventoryNode struct {
*clabtypes.NodeConfig
NornirGroups []string
}
NornirSimpleInventoryNode represents the data structure used to generate the nornir simple inventory file. It embeds the NodeConfig struct and adds the Username and Password fields extracted from the node registry.
type SSHConfigNodeTmpl ¶
SSHConfigNodeTmpl represents values for a single node in the sshconfig template.
type SSHConfigTmpl ¶
type SSHConfigTmpl struct {
Nodes []SSHConfigNodeTmpl
TopologyName string
}
SSHConfigTmpl is the top-level data structure for the sshconfig template.
type TopologyExport ¶
type TopologyExport struct {
Name string `json:"name"`
Type string `json:"type"`
Clab *CLab `json:"clab,omitempty"`
// SSHPubKeys is a list of string representations of SSH public keys.
SSHPubKeys []string `json:"SSHPubKeys,omitempty"`
NodeConfigs map[string]*clabtypes.NodeConfig `json:"nodeconfigs,omitempty"`
}
TopologyExport holds a combination of CLab structure and map of NodeConfig types, which expands Node definitions with dynamically created values.