cloud

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 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.

Types

type Account added in v0.4.3

type Account struct {
	Name   string
	Domain Domain
	ID     string
}

Account contains specifications that identify an account.

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(*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 Config added in v0.4.3

type Config struct {
	APIURL    string `ini:"api-url"`
	APIKey    string `ini:"api-key"`
	SecretKey string `ini:"secret-key"`
	VerifySSL bool   `ini:"verify-ssl"`
}

cloud-config ini structure.

type Domain added in v0.4.3

type Domain struct {
	Name string
	Path string
	ID   string
}

Domain contains specifications that identify a domain.

type NetworkIface added in v0.4.0

type NetworkIface interface {
	ResolveNetwork(*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 User added in v0.4.3

type User struct {
	ID        string
	Name      string
	APIKey    string
	SecretKey string
	Account
}

User contains information uniquely identifying and scoping a user.

type UserCredIFace added in v0.4.3

type UserCredIFace interface {
	ResolveDomain(*Domain) error
	ResolveAccount(*Account) error
	ResolveUser(*User) error
	ResolveUserKeys(*User) error
	GetUserWithKeys(*User) (bool, error)
}

type VMIface added in v0.4.0

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

type ZoneIFace added in v0.4.3

type ZoneIFace interface {
	ResolveZone(*infrav1.CloudStackZone) error
	ResolveNetworkForZone(*infrav1.CloudStackZone) error
}

Jump to

Keyboard shortcuts

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