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, st state.State, ch chan<- *runtime.PlatformNetworkConfig) error
- func (n *Nocloud) ParseMetadata(unmarshalledNetworkConfig *NetworkConfig, st state.State, ...) (*runtime.PlatformNetworkConfig, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bonds ¶
type Bonds struct { Ethernet `yaml:",inline"` Interfaces []string `yaml:"interfaces,omitempty"` Params struct { Mode string `yaml:"mode,omitempty"` LACPRate string `yaml:"lacp-rate,omitempty"` HashPolicy string `yaml:"transmit-hash-policy,omitempty"` MIIMon uint32 `yaml:"mii-monitor-interval,omitempty"` UpDelay uint32 `yaml:"up-delay,omitempty"` DownDelay uint32 `yaml:"down-delay,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 uint32 `yaml:"mtu,omitempty"` NameServers struct { Search []string `yaml:"search,omitempty"` Address []string `yaml:"addresses,omitempty"` } `yaml:"nameservers,omitempty"` Routes []struct { To string `yaml:"to,omitempty"` Via string `yaml:"via,omitempty"` Metric string `yaml:"metric,omitempty"` Table uint32 `yaml:"table,omitempty"` } `yaml:"routes,omitempty"` RoutingPolicy []struct { From string `yaml:"froom,omitempty"` Table uint32 `yaml:"table,omitempty"` } `yaml:"routing-policy,omitempty"` }
Ethernet holds network interface info.
type MetadataConfig ¶
type MetadataConfig struct { Hostname string `yaml:"hostname,omitempty"` LocalHostname string `yaml:"local-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 uint32 `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, st state.State, ch chan<- *runtime.PlatformNetworkConfig) error
NetworkConfiguration implements the runtime.Platform interface.
func (*Nocloud) ParseMetadata ¶
func (n *Nocloud) ParseMetadata(unmarshalledNetworkConfig *NetworkConfig, st state.State, metadata *MetadataConfig) (*runtime.PlatformNetworkConfig, error)
ParseMetadata converts nocloud metadata to platform network config.
Click to show internal directories.
Click to hide internal directories.