cloud

package
v0.4.2-RC1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AntiAffinityGroupType = "host anti-affinity"
	AffinityGroupType     = "host affinity"
)
View Source
const (
	NetOffering         = "DefaultIsolatedNetworkOfferingWithSourceNatService"
	K8sDefaultAPIPort   = 6443
	NetworkTypeIsolated = "Isolated"
	NetworkTypeShared   = "Shared"
	NetworkProtocolTCP  = "tcp"
)
View Source
const (
	ClusterTagNamePrefix               = "CAPC_cluster_"
	CreatedByCAPCTagName               = "created_by_CAPC"
	ResourceTypeNetwork   ResourceType = "Network"
	ResourceTypeIPAddress ResourceType = "PublicIpAddress"
)

Variables

This section is empty.

Functions

func CompressAndEncodeString

func CompressAndEncodeString(str string) (string, error)

func NetworkExists added in v0.4.0

func NetworkExists(net capcv1.Network) bool

NetworkExists checks that the network already exists based on the presence of all fields. Assumes that the a fetch has been done on network statuses prior.

func UsesIsolatedNetwork added in v0.4.0

func UsesIsolatedNetwork(csCluster *capcv1.CloudStackCluster) bool

usesIsolatedNetwork returns true if this cluster is specs an isolated network. Assumes that the a fetch has been done on network statuses prior.

Types

type AffinityGroup added in v0.4.0

type AffinityGroup struct {
	Type string
	Name string
	ID   string
}

type AffinityGroupIface added in v0.4.0

type AffinityGroupIface interface {
	FetchAffinityGroup(*AffinityGroup) error
	GetOrCreateAffinityGroup(*infrav1.CloudStackCluster, *AffinityGroup) error
	DeleteAffinityGroup(*AffinityGroup) error
	AssociateAffinityGroup(*infrav1.CloudStackMachine, AffinityGroup) error
	DisassociateAffinityGroup(*infrav1.CloudStackMachine, AffinityGroup) error
}

type Client

func NewClient

func NewClient(ccPath string) (Client, error)

func NewClientFromCSAPIClient

func NewClientFromCSAPIClient(cs *cloudstack.CloudStackClient) Client

type ClusterIface added in v0.4.0

type ClusterIface interface {
	GetOrCreateCluster(*infrav1.CloudStackCluster) error
	DisposeClusterResources(cluster *infrav1.CloudStackCluster) error
	ResolveZones(*infrav1.CloudStackCluster) error
}

type NetworkIface added in v0.4.0

type NetworkIface interface {
	ResolveNetworkStatuses(*capcv1.CloudStackCluster) error
	ResolveNetwork(*capcv1.CloudStackCluster, *capcv1.Network) error
	CreateIsolatedNetwork(*capcv1.CloudStackCluster) error
	OpenFirewallRules(networkID string) error
	FetchPublicIP(*capcv1.CloudStackCluster) (*cloudstack.PublicIpAddress, error)
	ResolveLoadBalancerRuleDetails(*capcv1.CloudStackCluster) error
	GetOrCreateLoadBalancerRule(*capcv1.CloudStackCluster) error
	GetOrCreateIsolatedNetwork(*capcv1.CloudStackCluster) error
	AssociatePublicIPAddress(*capcv1.CloudStackCluster) error
	DeleteNetwork(capcv1.Network) error
}

type ResourceType added in v0.4.0

type ResourceType string

type TagIface added in v0.4.0

type TagIface interface {
	AddClusterTag(ResourceType, string, *infrav1.CloudStackCluster) error
	DeleteClusterTag(ResourceType, string, *infrav1.CloudStackCluster) error
	AddCreatedByCAPCTag(ResourceType, string) error
	DeleteCreatedByCAPCTag(ResourceType, string) error
	DoClusterTagsAllowDisposal(ResourceType, string) (bool, error)
	AddTags(ResourceType, string, map[string]string) error
	GetTags(ResourceType, string) (map[string]string, error)
	DeleteTags(ResourceType, string, map[string]string) error
}

type VMIface added in v0.4.0

type VMIface interface {
	GetOrCreateVMInstance(*infrav1.CloudStackMachine, *capiv1.Machine, *infrav1.CloudStackCluster, string) error
	ResolveVMInstanceDetails(*infrav1.CloudStackMachine) error
	DestroyVMInstance(*infrav1.CloudStackMachine) error
	AssignVMToLoadBalancerRule(*infrav1.CloudStackCluster, string) error
}

Jump to

Keyboard shortcuts

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