Documentation ¶
Index ¶
- Constants
- type MetadataConfig
- type NetworkConfig
- type Openstack
- func (o *Openstack) Configuration(ctx context.Context) (machineConfig []byte, err error)
- func (o *Openstack) KernelArgs() procfs.Parameters
- func (o *Openstack) Mode() runtime.Mode
- func (o *Openstack) Name() string
- func (o *Openstack) NetworkConfiguration(ctx context.Context, ch chan<- *runtime.PlatformNetworkConfig) error
- func (o *Openstack) ParseMetadata(unmarshalledMetadataConfig *MetadataConfig, ...) (*runtime.PlatformNetworkConfig, error)
Constants ¶
View Source
const ( // OpenstackExternalIPEndpoint is the local Openstack endpoint for the external IP. OpenstackExternalIPEndpoint = "http://169.254.169.254/latest/meta-data/public-ipv4" // OpenstackHostnameEndpoint is the local Openstack endpoint for the hostname. OpenstackHostnameEndpoint = "http://169.254.169.254/latest/meta-data/hostname" // OpenstackMetaDataEndpoint is the local Openstack endpoint for the meta config. OpenstackMetaDataEndpoint = "http://169.254.169.254/" + configMetadataPath // OpenstackNetworkDataEndpoint is the local Openstack endpoint for the network config. OpenstackNetworkDataEndpoint = "http://169.254.169.254/" + configNetworkDataPath // OpenstackUserDataEndpoint is the local Openstack endpoint for the config. OpenstackUserDataEndpoint = "http://169.254.169.254/" + configUserDataPath )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetadataConfig ¶ added in v0.14.0
type MetadataConfig struct {
Hostname string `json:"hostname,omitempty"`
}
MetadataConfig holds meta info.
type NetworkConfig ¶ added in v0.14.0
type NetworkConfig struct { Links []struct { ID string `json:"id,omitempty"` Type string `json:"type"` Mac string `json:"ethernet_mac_address,omitempty"` MTU int `json:"mtu,omitempty"` } `json:"links"` Networks []struct { ID string `json:"id,omitempty"` Link string `json:"link"` Type string `json:"type"` Address string `json:"ip_address,omitempty"` Netmask string `json:"netmask,omitempty"` Gateway string `json:"gateway,omitempty"` Routes []struct { Network string `json:"network,omitempty"` Netmask string `json:"netmask,omitempty"` Gateway string `json:"gateway,omitempty"` } `json:"routes,omitempty"` } `json:"networks"` Services []struct { Type string `json:"type"` Address string `json:"address"` } `json:"services,omitempty"` }
NetworkConfig holds NetworkData config.
type Openstack ¶
type Openstack struct{}
Openstack is the concrete type that implements the runtime.Platform interface.
func (*Openstack) Configuration ¶
Configuration implements the runtime.Platform interface.
func (*Openstack) KernelArgs ¶
func (o *Openstack) KernelArgs() procfs.Parameters
KernelArgs implements the runtime.Platform interface.
func (*Openstack) NetworkConfiguration ¶ added in v1.0.0
func (o *Openstack) NetworkConfiguration(ctx context.Context, ch chan<- *runtime.PlatformNetworkConfig) error
NetworkConfiguration implements the runtime.Platform interface.
func (*Openstack) ParseMetadata ¶ added in v1.0.0
func (o *Openstack) ParseMetadata(unmarshalledMetadataConfig *MetadataConfig, unmarshalledNetworkConfig *NetworkConfig, hostname string, extIPs []netaddr.IP) (*runtime.PlatformNetworkConfig, error)
ParseMetadata converts OpenStack metadata to platform network configuration.
Click to show internal directories.
Click to hide internal directories.