netconfig

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Junos           JunosConfig      `yaml:"junos,omitempty"`
	OtelEndpoint    string           `yaml:"otel_endpoint"`
	Data            DataConfig       `yaml:"data"`
	Inventory       inventory.Config `yaml:"inventory"`
	Commit          bool
	Diff            bool
	CommitConfirmed int
}

func (*Config) RegisterFlagsAndApplyDefaults

func (c *Config) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet)

type DataConfig

type DataConfig struct {
	Directory string `yaml:"directory,omitempty"`
}

DataConfig is the configuration for data.

type Host

type Host struct {
	HostName    string
	NetworkHost *inventory.NetworkHost
	Data        data.HostData
	Environment map[string]string
}

Host is a single configurable host.

type JunosConfig

type JunosConfig struct {
	Hosts    []string `yaml:"hosts,omitempty"`
	Username string   `yaml:"username,omitempty"`
	Keyfile  string   `yaml:"keyfile,omitempty"`
}

JunosConfig is the configuration for Junos devices.

type NetConfig

type NetConfig struct {
	Data  data.Data
	Hosts []Host
	// contains filtered or unexported fields
}

NetConfig is enough data to configure some network hosts.

func New

func New(cfg Config, logger log.Logger) (*NetConfig, error)

New is used to build a new *NetConfig.

func (*NetConfig) ConfigureNetwork

func (n *NetConfig) ConfigureNetwork() error

ConfigureNetwork configures all discovered network devices.

func (*NetConfig) ConfigureNetworkHost

func (n *NetConfig) ConfigureNetworkHost(host Host) error

ConfigureNetworkHost renders the templates using associated data for a network host. The hosts about which to load the templates, are retrieved from LDAP.

type SecretClient

type SecretClient interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL