cloud

package
v0.4.6-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 16 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"
)
View Source
const GLOBAL = "Global"

Variables

This section is empty.

Functions

func CompressAndEncodeString

func CompressAndEncodeString(str string) (string, error)

func NetworkExists

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

type Account struct {
	Name   string
	Domain Domain
	ID     string
}

Account contains specifications that identify an account.

type AffinityGroup

type AffinityGroup struct {
	Type string
	Name string
	ID   string
}

type AffinityGroupIface

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 added in v0.4.9

func NewClient(ccPath string) (Client, error)

func NewClientFromCSAPIClient

func NewClientFromCSAPIClient(cs *cloudstack.CloudStackClient) Client

type Config

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

type Domain struct {
	Name string
	Path string
	ID   string
}

Domain contains specifications that identify a domain.

type NetworkIface

type NetworkIface interface {
	ResolveNetwork(*capcv1.Network) error
}

type ResourceType

type ResourceType string

type TagIface

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

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

User contains information uniquely identifying and scoping a user.

type UserCredIFace

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

type VMIface

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

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