Documentation ¶
Overview ¶
Package openstack provides the Openstack platform implementation.
Index ¶
- Constants
- type MetadataConfig
- type NetworkConfig
- type Openstack
- func (o *Openstack) Configuration(ctx context.Context, r state.State) (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, st state.State, ch chan<- *runtime.PlatformNetworkConfig) error
- func (o *Openstack) ParseMetadata(ctx context.Context, unmarshalledNetworkConfig *NetworkConfig, ...) (*runtime.PlatformNetworkConfig, error)
Constants ¶
View Source
const ( // OpenstackExternalIPEndpoint is the local Openstack endpoint for the external IP. OpenstackExternalIPEndpoint = endpoint + "latest/meta-data/public-ipv4" // OpenstackInstanceTypeEndpoint is the local Openstack endpoint for the instance-type. OpenstackInstanceTypeEndpoint = endpoint + "latest/meta-data/instance-type" // OpenstackMetaDataEndpoint is the local Openstack endpoint for the meta config. OpenstackMetaDataEndpoint = endpoint + configMetadataPath // OpenstackNetworkDataEndpoint is the local Openstack endpoint for the network config. OpenstackNetworkDataEndpoint = endpoint + configNetworkDataPath // OpenstackUserDataEndpoint is the local Openstack endpoint for the config. OpenstackUserDataEndpoint = endpoint + configUserDataPath )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetadataConfig ¶
type MetadataConfig struct { UUID string `json:"uuid,omitempty"` Hostname string `json:"hostname,omitempty"` AvailabilityZone string `json:"availability_zone,omitempty"` ProjectID string `json:"project_id"` InstanceType string `json:"instance_type"` }
MetadataConfig holds meta info.
type NetworkConfig ¶
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"` BondMode string `json:"bond_mode,omitempty"` BondLinks []string `json:"bond_links,omitempty"` BondMIIMon uint32 `json:"bond_miimon,string,omitempty"` BondHashPolicy string `json:"bond_xmit_hash_policy,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 ¶
func (o *Openstack) Configuration(ctx context.Context, r state.State) (machineConfig []byte, err error)
Configuration implements the runtime.Platform interface.
func (*Openstack) KernelArgs ¶
func (o *Openstack) KernelArgs() procfs.Parameters
KernelArgs implements the runtime.Platform interface.
func (*Openstack) NetworkConfiguration ¶
func (o *Openstack) NetworkConfiguration(ctx context.Context, st state.State, ch chan<- *runtime.PlatformNetworkConfig) error
NetworkConfiguration implements the runtime.Platform interface.
func (*Openstack) ParseMetadata ¶
func (o *Openstack) ParseMetadata( ctx context.Context, unmarshalledNetworkConfig *NetworkConfig, extIPs []netip.Addr, metadata *MetadataConfig, st state.State, ) (*runtime.PlatformNetworkConfig, error)
ParseMetadata converts OpenStack metadata to platform network configuration.
Click to show internal directories.
Click to hide internal directories.