cloudinit

package
v0.0.0-...-38b8b32 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMetadata

func GetMetadata(metadataValues *MetadataValues) ([]byte, error)

GetMetadata returns the metadata

func GetUserData

func GetUserData(values *UserDataValues) ([]byte, error)

GetUserData returns the user data

Types

type Config

type Config []types.BaseOptionValue

Config for base options

func GenerateUserData

func GenerateUserData(bootScript string, publicKey []string, osUser string) (Config, error)

GenerateUserData creates the user data

func (*Config) SetCloudInitMetadata

func (e *Config) SetCloudInitMetadata(data []byte) error

SetCloudInitMetadata sets the cloud init user data at the key "guestinfo.metadata" as a base64-encoded string.

func (*Config) SetCloudInitUserData

func (e *Config) SetCloudInitUserData(data []byte) error

SetCloudInitUserData sets the cloud init user data at the key "guestinfo.userdata" as a base64-encoded string.

type MetadataValues

type MetadataValues struct {
	Hostname string
	Networks []NetworkConfig
}

MetadataValues used

type NetworkConfig

type NetworkConfig struct {
	MACAddress  string
	DHCP4       bool
	IPAddress   string
	Netmask     string
	Gateway     string
	NameServers []string
	DNSSearch   []string
}

NetworkConfig values

type UserDataValues

type UserDataValues struct {
	User              string
	SSHAuthorizedKeys []string
	BootScript        string
}

UserDataValues for system

Jump to

Keyboard shortcuts

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