Documentation ¶
Overview ¶
Package nocloud provides the NoCloud platform implementation.
Index ¶
- type Bonds
- type Ethernet
- type MetadataConfig
- type NetworkConfig
- type Nocloud
- func (n *Nocloud) Configuration(ctx context.Context, r state.State) ([]byte, error)
- func (n *Nocloud) KernelArgs() procfs.Parameters
- func (n *Nocloud) Mode() runtime.Mode
- func (n *Nocloud) Name() string
- func (n *Nocloud) NetworkConfiguration(ctx context.Context, _ state.State, ch chan<- *runtime.PlatformNetworkConfig) error
- func (n *Nocloud) ParseMetadata(unmarshalledNetworkConfig *NetworkConfig, metadata *MetadataConfig) (*runtime.PlatformNetworkConfig, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bonds ¶
type Bonds struct { Interfaces []string `yaml:"interfaces,omitempty"` Address []string `yaml:"addresses,omitempty"` NameServers struct { Search []string `yaml:"search,omitempty"` Address []string `yaml:"addresses,omitempty"` } `yaml:"nameservers,omitempty"` Params []struct { Mode string `yaml:"mode,omitempty"` LACPRate string `yaml:"lacp-rate,omitempty"` HashPolicy string `yaml:"transmit-hash-policy,omitempty"` } `yaml:"parameters,omitempty"` }
Bonds holds bonding interface info.
type Ethernet ¶
type Ethernet struct { Match struct { Name string `yaml:"name,omitempty"` HWAddr string `yaml:"macaddress,omitempty"` } `yaml:"match,omitempty"` DHCPv4 bool `yaml:"dhcp4,omitempty"` DHCPv6 bool `yaml:"dhcp6,omitempty"` Address []string `yaml:"addresses,omitempty"` Gateway4 string `yaml:"gateway4,omitempty"` Gateway6 string `yaml:"gateway6,omitempty"` MTU int `yaml:"mtu,omitempty"` NameServers struct { Search []string `yaml:"search,omitempty"` Address []string `yaml:"addresses,omitempty"` } `yaml:"nameservers,omitempty"` }
Ethernet holds network interface info.
type MetadataConfig ¶
type MetadataConfig struct { Hostname string `yaml:"hostname,omitempty"` InstanceID string `yaml:"instance-id,omitempty"` InstanceType string `yaml:"instance-type,omitempty"` ProviderID string `yaml:"provider-id,omitempty"` Region string `yaml:"region,omitempty"` Zone string `yaml:"zone,omitempty"` }
MetadataConfig holds meta info.
type NetworkConfig ¶
type NetworkConfig struct { Version int `yaml:"version"` Config []struct { Mac string `yaml:"mac_address,omitempty"` Interfaces string `yaml:"name,omitempty"` MTU string `yaml:"mtu,omitempty"` Subnets []struct { Address string `yaml:"address,omitempty"` Netmask string `yaml:"netmask,omitempty"` Gateway string `yaml:"gateway,omitempty"` Type string `yaml:"type"` } `yaml:"subnets,omitempty"` Address []string `yaml:"address,omitempty"` Type string `yaml:"type"` } `yaml:"config,omitempty"` Ethernets map[string]Ethernet `yaml:"ethernets,omitempty"` Bonds map[string]Bonds `yaml:"bonds,omitempty"` }
NetworkConfig holds network-config info.
type Nocloud ¶
type Nocloud struct{}
Nocloud is the concrete type that implements the runtime.Platform interface.
func (*Nocloud) Configuration ¶
Configuration implements the runtime.Platform interface.
func (*Nocloud) KernelArgs ¶
func (n *Nocloud) KernelArgs() procfs.Parameters
KernelArgs implements the runtime.Platform interface.
func (*Nocloud) NetworkConfiguration ¶
func (n *Nocloud) NetworkConfiguration(ctx context.Context, _ state.State, ch chan<- *runtime.PlatformNetworkConfig) error
NetworkConfiguration implements the runtime.Platform interface.
func (*Nocloud) ParseMetadata ¶
func (n *Nocloud) ParseMetadata(unmarshalledNetworkConfig *NetworkConfig, metadata *MetadataConfig) (*runtime.PlatformNetworkConfig, error)
ParseMetadata converts nocloud metadata to platform network config.
Click to show internal directories.
Click to hide internal directories.