cloudinit

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDeviceAttr

func GetDeviceAttr(device, attr string) (string, error)

func IsNoCloudMarkerPresent

func IsNoCloudMarkerPresent() (bool, error)

Types

type Data

type Data struct {
	Network *NetworkConfig
}

func ReadData

func ReadData() (*Data, error)

type EthernetConfig

type EthernetConfig struct {
	Match struct {
		MacAddress string `json:"mac_address" yaml:"mac_address"`
	} `json:"match" yaml:"match"`
	Addresses []string `json:"addresses" yaml:"addresses"`
	Gateway4  string   `json:"gateway4" yaml:"gateway4"`
	Gateway6  string   `json:"gateway6" yaml:"gateway6"`
	Routes    []struct {
		To  string `json:"to" yaml:"to"`
		Via string `json:"via" yaml:"via"`
	} `json:"routes" yaml:"routes"`
}

type NetworkConfig

type NetworkConfig struct {
	Version   int                       `json:"version" yaml:"version"`
	Ethernets map[string]EthernetConfig `json:"ethernets" yaml:"ethernets"`
}

Jump to

Keyboard shortcuts

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