Documentation
¶
Overview ¶
Package cloud contains CloudStack related functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrTooManyResults = errors.New("too many results") ErrAlreadyExists = errors.New("already exists") )
Specific errors.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config holds CloudStack connection configuration.
func ReadConfig ¶
ReadConfig reads a config file with a format defined by CloudStack Cloud Controller Manager, and returns a CloudStackConfig.
type Interface ¶
type Interface interface {
GetNodeInfo(ctx context.Context, vmName string) (*VM, error)
GetVMByID(ctx context.Context, vmID string) (*VM, error)
ListZonesID(ctx context.Context) ([]string, error)
GetVolumeByID(ctx context.Context, volumeID string) (*Volume, error)
GetVolumeByName(ctx context.Context, name string) (*Volume, error)
CreateVolume(ctx context.Context, diskOfferingID, zoneID, name string, sizeInGB int64) (string, error)
DeleteVolume(ctx context.Context, id string) error
AttachVolume(ctx context.Context, volumeID, vmID string) (string, error)
DetachVolume(ctx context.Context, volumeID string) error
ExpandVolume(ctx context.Context, volumeID string, newSizeInGB int64) error
CreateVolumeFromSnapshot(ctx context.Context, zoneID, name, projectID, snapshotID string, sizeInGB int64) (*Volume, error)
GetSnapshotByID(ctx context.Context, snapshotID string) (*Snapshot, error)
GetSnapshotByName(ctx context.Context, name string) (*Snapshot, error)
CreateSnapshot(ctx context.Context, volumeID, name string) (*Snapshot, error)
DeleteSnapshot(ctx context.Context, snapshotID string) error
ListSnapshots(ctx context.Context, volumeID, snapshotID string) ([]*Snapshot, error)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.