cloudstack

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCloudStackProviderConfiguration

func NewCloudStackProviderConfiguration(fileName string) (providers.ProviderConfiguration, error)

Types

type CloudStackOptions

type CloudStackOptions []cloudstack.OptionFunc

func (CloudStackOptions) ApplyOptions

func (opts CloudStackOptions) ApplyOptions(cs *cloudstack.CloudStackClient, params interface{}) (err error)

type ClusterIDSetter

type ClusterIDSetter interface {
	SetClusterid(string)
}

type Configuration

type Configuration struct {
	ApiUrl            string            `json:"api-url,omitempty"`
	ApiKey            string            `json:"api-key,omitempty"`
	SecretKey         string            `json:"secret-key,omitempty"`
	SSLNoVerify       bool              `json:"ssl-no-verify,omitempty"`
	SshKeyName        string            `json:"ssh-key-name,omitempty"`
	ProjectID         string            `json:"project-id,omitempty"`
	ZoneId            string            `json:"zone-id,omitempty"`
	PodId             string            `json:"pod-id,omitempty"`
	ClusterId         string            `json:"cluster-id,omitempty"`
	HostId            string            `json:"host-id,omitempty"`
	VpcId             string            `json:"vpc-id,omitempty"`
	Hypervisor        string            `json:"hypervisor,omitempty"`
	TemplateId        string            `json:"template,omitempty"`
	Timeout           time.Duration     `json:"timeout"`
	AvailableGPUTypes map[string]string `json:"gpu-types"`
	UseBind9          bool              `json:"use-bind9"`
	Bind9Host         string            `json:"bind9-host"`
	RndcKeyFile       string            `json:"rndc-key-file"`
	Network           Network           `json:"network"`
}

type HostIDSetter

type HostIDSetter interface {
	SetHostid(string)
}

type HypervisorSetter

type HypervisorSetter interface {
	SetHypervisor(string)
}

type Network

type Network struct {
	Domain                 string              `json:"domain,omitempty" yaml:"domain,omitempty"`
	Interfaces             []*NetworkInterface `json:"interfaces,omitempty" yaml:"interfaces,omitempty"`
	PublicControlPlaneNode bool                `json:"public-control-plane,omitempty"`
	PublicWorkerNode       bool                `json:"public-worker-node,omitempty"`
	SecurityGroup          SecurityGroup       `json:"security-group"`
}

type NetworkInfos

type NetworkInfos struct {
	PublicControlPlaneNode bool `json:"public-control-plane,omitempty"`
	PublicWorkerNode       bool `json:"public-worker-node,omitempty"`
}

type NetworkInterface

type NetworkInterface struct {
	Enabled     *bool  `json:"enabled,omitempty" yaml:"primary,omitempty"`
	Primary     bool   `json:"primary,omitempty" yaml:"primary,omitempty"`
	NetworkName string `json:"network,omitempty" yaml:"network,omitempty"`
	DHCP        bool   `json:"dhcp,omitempty" yaml:"dhcp,omitempty"`
	IPAddress   string `json:"address,omitempty" yaml:"address,omitempty"`
	Netmask     string `json:"netmask,omitempty" yaml:"netmask,omitempty"`
}

type PodIDSetter

type PodIDSetter interface {
	SetPodid(string)
}

type ProjectIDSetter

type ProjectIDSetter interface {
	SetProjectid(string)
}

type SecurityGroup

type SecurityGroup struct {
	ControlPlaneNode string `default:"default" json:"control-plane"`
	WorkerNode       string `default:"default" json:"worker-node"`
}

type ServerInstance

type ServerInstance struct {
	NodeIndex       int
	InstanceName    string
	PrivateDNSName  string
	InstanceID      string
	AddressIP       string
	PublicAddress   string
	PublicAddressID string
	ZoneName        string
	HostName        string
	// contains filtered or unexported fields
}

func (ServerInstance) AttachInstance

func (wrapper ServerInstance) AttachInstance(instanceName string, controlPlane bool, nodeIndex int) (handler providers.ProviderHandler, err error)

func (ServerInstance) ConfigurationDidLoad

func (wrapper ServerInstance) ConfigurationDidLoad() (err error)

func (*ServerInstance) Create

func (instance *ServerInstance) Create(controlPlane bool, nodeGroup, serviceOfferingId, userData string, diskSize int) (err error)

Create will create a named VM not powered memory and disk are in megabytes

func (ServerInstance) CreateInstance

func (wrapper ServerInstance) CreateInstance(instanceName, instanceType string, controlPlane bool, nodeIndex int) (handler providers.ProviderHandler, err error)

func (*ServerInstance) Delete

func (instance *ServerInstance) Delete() (err error)

func (ServerInstance) GetAvailableGpuTypes

func (wrapper ServerInstance) GetAvailableGpuTypes() map[string]string

func (ServerInstance) GetMode

func (wrapper ServerInstance) GetMode() bool

func (ServerInstance) InstanceExists

func (wrapper ServerInstance) InstanceExists(name string) (exists bool)

func (*ServerInstance) PowerOff

func (instance *ServerInstance) PowerOff(ctx *context.Context) (err error)

func (*ServerInstance) PowerOn

func (instance *ServerInstance) PowerOn(ctx *context.Context) (err error)

func (ServerInstance) RetrieveNetworkInfos

func (wrapper ServerInstance) RetrieveNetworkInfos(vmuuid string, network *providers.Network) (err error)

func (ServerInstance) SetMode

func (wrapper ServerInstance) SetMode(test bool)

func (*ServerInstance) ShutdownGuest

func (instance *ServerInstance) ShutdownGuest() (err error)

func (*ServerInstance) Status

func (instance *ServerInstance) Status() (status providers.InstanceStatus, err error)

func (ServerInstance) UUID

func (wrapper ServerInstance) UUID(name string) (vmuuid string, err error)

func (*ServerInstance) WaitForIP

func (instance *ServerInstance) WaitForIP(callback providers.CallbackWaitSSHReady) (address string, err error)

WaitForIP wait ip a VM by name

func (*ServerInstance) WaitForPowered

func (instance *ServerInstance) WaitForPowered() error

WaitForPowered wait ip a VM by name

type SetKeypairSetter

type SetKeypairSetter interface {
	SetKeypair(string)
}

type TemplateIDSetter

type TemplateIDSetter interface {
	SetTemplateid(string)
}

type VpcIDSetter

type VpcIDSetter interface {
	SetVpcid(string)
}

Jump to

Keyboard shortcuts

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