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") )
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, vmID string) error }
Interface is the CloudStack client interface.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.