configdrive

package
v0.2.134 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudConfig

type CloudConfig struct {
	Metadata struct {
		InstanceID    string `yaml:"instance-id"`
		LocalHostname string `yaml:"local-hostname"`
	}
	Userdata struct {
		Users []cloudConfigUser `yaml:"users"`
	}
	NetworkConfig struct {
		Version int                   `yaml:"version"`
		Config  []*cloudNetworkConfig `yaml:"config"`
	}
	// contains filtered or unexported fields
}

func StructConfig

func StructConfig(user, hostname string, keys []ssh.PublicKey, eth []*CloudConfigEthernet) *CloudConfig

func (*CloudConfig) Clean

func (c *CloudConfig) Clean() error

Clean generated yaml files

func (*CloudConfig) Delete

func (c *CloudConfig) Delete() error

Delete generated the iso file

func (*CloudConfig) Generate

func (c *CloudConfig) Generate(basedir string) (string, error)

Generate ISO and yaml files

func (*CloudConfig) GenerateMetadataFile

func (c *CloudConfig) GenerateMetadataFile(basedir string) error

func (*CloudConfig) GenerateNetworkConfigFile

func (c *CloudConfig) GenerateNetworkConfigFile(basedir string) error

func (*CloudConfig) GenerateUserdataFile

func (c *CloudConfig) GenerateUserdataFile(basedir string) error

type CloudConfigEthernet

type CloudConfigEthernet struct {
	MacAddress net.HardwareAddr
	Address4   *netutil.IPv4Cidr
	Gateway4   net.IP
	// Address6    []net.IP
	// Mask6 int
	// Gateway6    net.IP
	NameServers []net.IP
}

Jump to

Keyboard shortcuts

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