Documentation
¶
Overview ¶
Package provider contains the cloud provider specific implementations to manage machines
Package provider contains the cloud provider specific implementations to manage machines
Index ¶
- Variables
- func DecodeProviderSpec(decoder runtime.Decoder, raw runtime.RawExtension) (*openstack.MachineProviderConfig, error)
- func NewOpenstackDriver(decoder runtime.Decoder) driver.Driver
- type OpenstackDriver
- func (p *OpenstackDriver) CreateMachine(ctx context.Context, req *driver.CreateMachineRequest) (*driver.CreateMachineResponse, error)
- func (p *OpenstackDriver) DeleteMachine(ctx context.Context, req *driver.DeleteMachineRequest) (*driver.DeleteMachineResponse, error)
- func (p *OpenstackDriver) GetMachineStatus(_ context.Context, req *driver.GetMachineStatusRequest) (*driver.GetMachineStatusResponse, error)
- func (p *OpenstackDriver) GetVolumeIDs(_ context.Context, req *driver.GetVolumeIDsRequest) (*driver.GetVolumeIDsResponse, error)
- func (p *OpenstackDriver) InitializeMachine(_ context.Context, _ *driver.InitializeMachineRequest) (*driver.InitializeMachineResponse, error)
- func (p *OpenstackDriver) ListMachines(ctx context.Context, req *driver.ListMachinesRequest) (*driver.ListMachinesResponse, error)
Constants ¶
This section is empty.
Variables ¶
var Decoder = serializer.NewCodecFactory(install.Install(runtime.NewScheme())).UniversalDecoder()
Decoder is a decoder for a scheme containing the mcm-openstack APIs.
Functions ¶
func DecodeProviderSpec ¶
func DecodeProviderSpec(decoder runtime.Decoder, raw runtime.RawExtension) (*openstack.MachineProviderConfig, error)
DecodeProviderSpec can decode raw to a MachineProviderConfig.
Types ¶
type OpenstackDriver ¶
type OpenstackDriver struct {
// contains filtered or unexported fields
}
OpenstackDriver implements and handles requests via the Driver interface.
func (*OpenstackDriver) CreateMachine ¶
func (p *OpenstackDriver) CreateMachine(ctx context.Context, req *driver.CreateMachineRequest) (*driver.CreateMachineResponse, error)
CreateMachine handles a machine creation request
OPTIONAL IMPLEMENTATION LOGIC It is optionally expected by the safety controller to use an identification mechanism to map the VM Created by a providerSpec. These could be done using tag(s)/resource-groups etc. This logic is used by safety controller to delete orphan VMs which are not backed by any machine CRD
func (*OpenstackDriver) DeleteMachine ¶
func (p *OpenstackDriver) DeleteMachine(ctx context.Context, req *driver.DeleteMachineRequest) (*driver.DeleteMachineResponse, error)
DeleteMachine handles a machine deletion request
func (*OpenstackDriver) GetMachineStatus ¶
func (p *OpenstackDriver) GetMachineStatus(_ context.Context, req *driver.GetMachineStatusRequest) (*driver.GetMachineStatusResponse, error)
GetMachineStatus handles a machine get status request
func (*OpenstackDriver) GetVolumeIDs ¶
func (p *OpenstackDriver) GetVolumeIDs(_ context.Context, req *driver.GetVolumeIDsRequest) (*driver.GetVolumeIDsResponse, error)
GetVolumeIDs returns a list of Volume IDs for all PV Specs for whom an provider volume was found
func (*OpenstackDriver) InitializeMachine ¶ added in v0.17.0
func (p *OpenstackDriver) InitializeMachine(_ context.Context, _ *driver.InitializeMachineRequest) (*driver.InitializeMachineResponse, error)
InitializeMachine handles VM initialization for openstack VM's. Currently, un-implemented.
func (*OpenstackDriver) ListMachines ¶
func (p *OpenstackDriver) ListMachines(ctx context.Context, req *driver.ListMachinesRequest) (*driver.ListMachinesResponse, error)
ListMachines lists all the machines possibly created by a providerSpec Identifying machines created by a given providerSpec depends on the OPTIONAL IMPLEMENTATION LOGIC you have used to identify machines created by a providerSpec. It could be tags/resource-groups etc