Documentation
¶
Index ¶
- type DefaultProvider
- func (p *DefaultProvider) Create(ctx context.Context, nodeClass *v1.CloudStackNodeClass, ...) (*Instance, error)
- func (p *DefaultProvider) Delete(ctx context.Context, id string) error
- func (p *DefaultProvider) Get(ctx context.Context, id string) (*Instance, error)
- func (p *DefaultProvider) List(ctx context.Context) ([]*Instance, error)
- type Instance
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultProvider ¶
type DefaultProvider struct {
// contains filtered or unexported fields
}
DefaultProvider implements the Instance Provider
func NewDefaultProvider ¶
func NewDefaultProvider( csClient csapi.CloudStackAPI, networkProvider network.Provider, templateProvider template.Provider, cache *cache.Cache, clusterName string, ) *DefaultProvider
NewDefaultProvider creates a new instance provider
func (*DefaultProvider) Create ¶
func (p *DefaultProvider) Create(ctx context.Context, nodeClass *v1.CloudStackNodeClass, nodeClaim *karpv1.NodeClaim, instanceTypes []*cloudprovider.InstanceType) (*Instance, error)
Create creates a new virtual machine
func (*DefaultProvider) Delete ¶
func (p *DefaultProvider) Delete(ctx context.Context, id string) error
Delete deletes an instance
type Instance ¶
type Instance struct {
ID string
Name string
State string
Zone string
ZoneID string
ServiceOffering string
ServiceOfferingID string
Template string
TemplateID string
NetworkID string
IPAddress string
CreatedTime time.Time
Tags map[string]string
}
Instance represents a CloudStack virtual machine
type Provider ¶
type Provider interface {
Create(ctx context.Context, nodeClass *v1.CloudStackNodeClass, nodeClaim *karpv1.NodeClaim, instanceTypes []*cloudprovider.InstanceType) (*Instance, error)
Get(ctx context.Context, id string) (*Instance, error)
List(ctx context.Context) ([]*Instance, error)
Delete(ctx context.Context, id string) error
}
Provider provides instance management
Click to show internal directories.
Click to hide internal directories.