Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Network Network `yaml:"network"`
}
Config represents the netplan configuration structure
func (Config) WriteToFile ¶
type DHCPOverrides ¶
type DHCPOverrides struct {
UseMTU *bool `yaml:"use-mtu,omitempty"`
}
type Ethernet ¶
type Ethernet struct {
DHCP4 *bool `yaml:"dhcp4,omitempty"`
DHCP6 *bool `yaml:"dhcp6,omitempty"`
// AcceptRA controls whether to accept IPv6 Router Advertisements (SLAAC).
// When false, the interface will not autoconfigure IPv6 addresses or routes from RAs.
AcceptRA *bool `yaml:"accept-ra,omitempty"`
MTU *int32 `yaml:"mtu,omitempty"`
Addresses []string `yaml:"addresses,omitempty"`
DHCP4Overrides *DHCPOverrides `yaml:"dhcp4-overrides,omitempty"`
DHCP6Overrides *DHCPOverrides `yaml:"dhcp6-overrides,omitempty"`
// LinkLocal configures the link-local addresses to bring up.
// A pointer is used to distinguish between nil (not specified) and empty slice
// Quote from netplan documentation:
// * If this field is not defined, the default is to enable only IPv6 link-local addresses
// * If the field is defined but configured as an empty set, IPv6 link-local addresses are disabled as well as IPv4 link- local addresses
LinkLocal *[]string `yaml:"link-local,omitempty"`
Optional *bool `yaml:"optional,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.