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(string) 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 ¶ added in v1.8.0
type OpenStack struct{}
OpenStack is the concrete type that implements the runtime.Platform interface.
func (*OpenStack) Configuration ¶ added in v1.8.0
func (o *OpenStack) Configuration(ctx context.Context, r state.State) (machineConfig []byte, err error)
Configuration implements the runtime.Platform interface.
func (*OpenStack) KernelArgs ¶ added in v1.8.0
func (o *OpenStack) KernelArgs(string) procfs.Parameters
KernelArgs implements the runtime.Platform interface.
func (*OpenStack) NetworkConfiguration ¶ added in v1.8.0
func (o *OpenStack) NetworkConfiguration(ctx context.Context, st state.State, ch chan<- *runtime.PlatformNetworkConfig) error
NetworkConfiguration implements the runtime.Platform interface.
func (*OpenStack) ParseMetadata ¶ added in v1.8.0
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.