scope

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

View Source
const BucketAccess = "public"
View Source
const (
	DEBUGLEVEL = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterScope

type ClusterScope struct {
	logr.Logger

	IBMVPCClients
	Cluster       *clusterv1.Cluster
	IBMVPCCluster *infrav1.IBMVPCCluster
	// contains filtered or unexported fields
}

ClusterScope defines a scope defined around a cluster.

func NewClusterScope

func NewClusterScope(params ClusterScopeParams, authenticator core.Authenticator, svcEndpoint string) (*ClusterScope, error)

NewClusterScope creates a new ClusterScope from the supplied parameters.

func (*ClusterScope) Close

func (s *ClusterScope) Close() error

Close closes the current scope persisting the cluster configuration and status.

func (*ClusterScope) CreateSubnet

func (s *ClusterScope) CreateSubnet() (*vpcv1.Subnet, error)

CreateSubnet creates a subnet within provided vpc and zone

func (*ClusterScope) CreateVPC

func (s *ClusterScope) CreateVPC() (*vpcv1.VPC, error)

CreateVPC creates a new IBM VPC in specified resource group

func (*ClusterScope) DeleteFloatingIP

func (s *ClusterScope) DeleteFloatingIP() error

DeleteFloatingIP deletes a Floating IP associated with floating ip id

func (*ClusterScope) DeleteSubnet

func (s *ClusterScope) DeleteSubnet() error

DeleteSubnet deletes a subnet associated with subnet id

func (*ClusterScope) DeleteVPC

func (s *ClusterScope) DeleteVPC() error

DeleteVPC deletes IBM VPC associated with a VPC id

func (*ClusterScope) PatchObject

func (s *ClusterScope) PatchObject() error

PatchObject persists the cluster configuration and status.

func (*ClusterScope) ReserveFIP

func (s *ClusterScope) ReserveFIP() (*vpcv1.FloatingIP, error)

ReserveFIP creates a Floating IP in a provided resource group and zone

type ClusterScopeParams

type ClusterScopeParams struct {
	IBMVPCClients
	Client        client.Client
	Logger        logr.Logger
	Cluster       *clusterv1.Cluster
	IBMVPCCluster *infrav1.IBMVPCCluster
}

ClusterScopeParams defines the input parameters used to create a new ClusterScope.

type IBMVPCClients

type IBMVPCClients struct {
	VPCService *vpcv1.VpcV1
}

IBMVPCClients hosts the IBM VPC service

type MachineScope

type MachineScope struct {
	logr.Logger

	IBMVPCClients
	Cluster *clusterv1.Cluster
	Machine *clusterv1.Machine

	IBMVPCCluster *infrav1.IBMVPCCluster
	IBMVPCMachine *infrav1.IBMVPCMachine
	// contains filtered or unexported fields
}

MachineScope defines a scope defined around a machine and its cluster.

func NewMachineScope

func NewMachineScope(params MachineScopeParams, authenticator core.Authenticator, svcEndpoint string) (*MachineScope, error)

NewMachineScope creates a new MachineScope from the supplied parameters.

func (*MachineScope) Close

func (m *MachineScope) Close() error

Close closes the current scope persisting the cluster configuration and status.

func (*MachineScope) CreateMachine

func (m *MachineScope) CreateMachine() (*vpcv1.Instance, error)

CreateMachine creates a vpc machine

func (*MachineScope) DeleteMachine

func (m *MachineScope) DeleteMachine() error

DeleteMachine deletes the vpc machine associated with machine instance id.

func (*MachineScope) GetBootstrapData

func (m *MachineScope) GetBootstrapData() (string, error)

GetBootstrapData returns the bootstrap data from the secret in the Machine's bootstrap.dataSecretName.

func (*MachineScope) GetMachine

func (m *MachineScope) GetMachine(instanceID string) (*vpcv1.Instance, error)

GetMachine returns a machine associated with a machine instanceID

func (*MachineScope) PatchObject

func (m *MachineScope) PatchObject() error

PatchObject persists the cluster configuration and status.

type MachineScopeParams

type MachineScopeParams struct {
	IBMVPCClients
	Client        client.Client
	Logger        logr.Logger
	Cluster       *clusterv1.Cluster
	Machine       *clusterv1.Machine
	IBMVPCCluster *infrav1.IBMVPCCluster
	IBMVPCMachine *infrav1.IBMVPCMachine
}

MachineScopeParams defines the input parameters used to create a new MachineScope.

type PowerVSClusterScope

type PowerVSClusterScope struct {
	logr.Logger

	IBMPowerVSClient  powervs.PowerVS
	Cluster           *clusterv1.Cluster
	IBMPowerVSCluster *v1beta1.IBMPowerVSCluster
	// contains filtered or unexported fields
}

PowerVSClusterScope defines a scope defined around a Power VS Cluster.

func NewPowerVSClusterScope

func NewPowerVSClusterScope(params PowerVSClusterScopeParams) (scope *PowerVSClusterScope, err error)

NewPowerVSClusterScope creates a new PowerVSClusterScope from the supplied parameters.

func (*PowerVSClusterScope) Close

func (s *PowerVSClusterScope) Close() error

Close closes the current scope persisting the cluster configuration and status.

func (*PowerVSClusterScope) PatchObject

func (s *PowerVSClusterScope) PatchObject() error

PatchObject persists the cluster configuration and status.

type PowerVSClusterScopeParams

type PowerVSClusterScopeParams struct {
	Client            client.Client
	Logger            logr.Logger
	Cluster           *clusterv1.Cluster
	IBMPowerVSCluster *v1beta1.IBMPowerVSCluster
}

PowerVSClusterScopeParams defines the input parameters used to create a new PowerVSClusterScope.

type PowerVSImageScope added in v0.2.0

type PowerVSImageScope struct {
	logr.Logger

	IBMPowerVSClient powervs.PowerVS
	IBMPowerVSImage  *v1beta1.IBMPowerVSImage
	// contains filtered or unexported fields
}

PowerVSImageScope defines a scope defined around a Power VS Cluster.

func NewPowerVSImageScope added in v0.2.0

func NewPowerVSImageScope(params PowerVSImageScopeParams) (scope *PowerVSImageScope, err error)

NewPowerVSImageScope creates a new PowerVSImageScope from the supplied parameters.

func (*PowerVSImageScope) Close added in v0.2.0

func (i *PowerVSImageScope) Close() error

Close closes the current scope persisting the cluster configuration and status.

func (*PowerVSImageScope) CreateImageCOSBucket added in v0.2.0

func (i *PowerVSImageScope) CreateImageCOSBucket() (*models.ImageReference, *models.JobReference, error)

CreateImageCOSBucket creates a power vs image

func (*PowerVSImageScope) DeleteImage added in v0.2.0

func (i *PowerVSImageScope) DeleteImage() error

func (*PowerVSImageScope) DeleteImportJob added in v0.2.0

func (i *PowerVSImageScope) DeleteImportJob() error

func (*PowerVSImageScope) GetImageID added in v0.2.0

func (i *PowerVSImageScope) GetImageID() string

func (*PowerVSImageScope) GetImageState added in v0.2.0

func (i *PowerVSImageScope) GetImageState() v1beta1.PowerVSImageState

func (*PowerVSImageScope) GetImportJob added in v0.2.0

func (i *PowerVSImageScope) GetImportJob() (*models.Job, error)

func (*PowerVSImageScope) GetJobID added in v0.2.0

func (i *PowerVSImageScope) GetJobID() string

func (*PowerVSImageScope) IsReady added in v0.2.0

func (i *PowerVSImageScope) IsReady() bool

func (*PowerVSImageScope) PatchObject added in v0.2.0

func (i *PowerVSImageScope) PatchObject() error

PatchObject persists the cluster configuration and status.

func (*PowerVSImageScope) SetImageID added in v0.2.0

func (i *PowerVSImageScope) SetImageID(id *string)

func (*PowerVSImageScope) SetImageState added in v0.2.0

func (i *PowerVSImageScope) SetImageState(status string)

func (*PowerVSImageScope) SetJobID added in v0.2.0

func (i *PowerVSImageScope) SetJobID(id string)

func (*PowerVSImageScope) SetNotReady added in v0.2.0

func (i *PowerVSImageScope) SetNotReady()

func (*PowerVSImageScope) SetReady added in v0.2.0

func (i *PowerVSImageScope) SetReady()

type PowerVSImageScopeParams added in v0.2.0

type PowerVSImageScopeParams struct {
	Client          client.Client
	Logger          logr.Logger
	IBMPowerVSImage *v1beta1.IBMPowerVSImage
}

PowerVSImageScopeParams defines the input parameters used to create a new PowerVSImageScope.

type PowerVSMachineScope

type PowerVSMachineScope struct {
	logr.Logger

	IBMPowerVSClient  powervs.PowerVS
	Cluster           *clusterv1.Cluster
	Machine           *clusterv1.Machine
	IBMPowerVSCluster *v1beta1.IBMPowerVSCluster
	IBMPowerVSMachine *v1beta1.IBMPowerVSMachine
	IBMPowerVSImage   *v1beta1.IBMPowerVSImage
	// contains filtered or unexported fields
}

PowerVSMachineScope defines a scope defined around a Power VS Machine.

func NewPowerVSMachineScope

func NewPowerVSMachineScope(params PowerVSMachineScopeParams) (scope *PowerVSMachineScope, err error)

NewPowerVSMachineScope creates a new PowerVSMachineScope from the supplied parameters.

func (*PowerVSMachineScope) Close

func (m *PowerVSMachineScope) Close() error

Close closes the current scope persisting the cluster configuration and status.

func (*PowerVSMachineScope) CreateMachine

func (m *PowerVSMachineScope) CreateMachine() (*models.PVMInstanceReference, error)

CreateMachine creates a power vs machine

func (*PowerVSMachineScope) DeleteMachine

func (m *PowerVSMachineScope) DeleteMachine() error

DeleteMachine deletes the power vs machine associated with machine instance id and service instance id.

func (*PowerVSMachineScope) GetBootstrapData

func (m *PowerVSMachineScope) GetBootstrapData() (string, error)

GetBootstrapData returns the base64 encoded bootstrap data from the secret in the Machine's bootstrap.dataSecretName

func (*PowerVSMachineScope) GetImages

func (m *PowerVSMachineScope) GetImages() (*models.Images, error)

func (*PowerVSMachineScope) GetInstanceID added in v0.2.0

func (m *PowerVSMachineScope) GetInstanceID() string

func (*PowerVSMachineScope) GetInstanceState added in v0.2.0

func (m *PowerVSMachineScope) GetInstanceState() v1beta1.PowerVSInstanceState

func (*PowerVSMachineScope) GetNetworks

func (m *PowerVSMachineScope) GetNetworks() (*models.Networks, error)

func (*PowerVSMachineScope) GetRegion added in v0.2.0

func (m *PowerVSMachineScope) GetRegion() string

func (*PowerVSMachineScope) GetZone added in v0.2.0

func (m *PowerVSMachineScope) GetZone() string

func (*PowerVSMachineScope) IsReady added in v0.2.0

func (m *PowerVSMachineScope) IsReady() bool

func (*PowerVSMachineScope) PatchObject

func (m *PowerVSMachineScope) PatchObject() error

PatchObject persists the cluster configuration and status.

func (*PowerVSMachineScope) SetAddresses added in v0.2.0

func (m *PowerVSMachineScope) SetAddresses(instance *models.PVMInstance)

func (*PowerVSMachineScope) SetHealth added in v0.2.0

func (m *PowerVSMachineScope) SetHealth(health *models.PVMInstanceHealth)

func (*PowerVSMachineScope) SetInstanceID added in v0.2.0

func (m *PowerVSMachineScope) SetInstanceID(id *string)

func (*PowerVSMachineScope) SetInstanceState added in v0.2.0

func (m *PowerVSMachineScope) SetInstanceState(status *string)

func (*PowerVSMachineScope) SetNotReady added in v0.2.0

func (m *PowerVSMachineScope) SetNotReady()

func (*PowerVSMachineScope) SetProviderID added in v0.2.0

func (m *PowerVSMachineScope) SetProviderID(id *string)

SetProviderID will set the provider id for the machine

func (*PowerVSMachineScope) SetReady added in v0.2.0

func (m *PowerVSMachineScope) SetReady()

func (*PowerVSMachineScope) SetRegion added in v0.2.0

func (m *PowerVSMachineScope) SetRegion(region string)

func (*PowerVSMachineScope) SetZone added in v0.2.0

func (m *PowerVSMachineScope) SetZone(zone string)

type PowerVSMachineScopeParams

type PowerVSMachineScopeParams struct {
	Logger            logr.Logger
	Client            client.Client
	Cluster           *clusterv1.Cluster
	Machine           *clusterv1.Machine
	IBMPowerVSCluster *v1beta1.IBMPowerVSCluster
	IBMPowerVSMachine *v1beta1.IBMPowerVSMachine
	IBMPowerVSImage   *v1beta1.IBMPowerVSImage
}

PowerVSMachineScopeParams defines the input parameters used to create a new PowerVSMachineScope.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL