Documentation ¶
Overview ¶
Package cloud contains CloudStack related functions.
Package cloud is a generated GoMock package.
Index ¶
- Variables
- type Cloud
- type Config
- type MockCloud
- func (m *MockCloud) AttachVolume(ctx context.Context, volumeID, vmID string) (string, error)
- func (m *MockCloud) CreateVolume(ctx context.Context, diskOfferingID, zoneID, name string, sizeInGB int64) (string, error)
- func (m *MockCloud) DeleteVolume(ctx context.Context, id string) error
- func (m *MockCloud) DetachVolume(ctx context.Context, volumeID string) error
- func (m *MockCloud) EXPECT() *MockCloudMockRecorder
- func (m *MockCloud) ExpandVolume(ctx context.Context, volumeID string, newSizeInGB int64) error
- func (m *MockCloud) GetNodeInfo(ctx context.Context, vmName string) (*VM, error)
- func (m *MockCloud) GetVMByID(ctx context.Context, vmID string) (*VM, error)
- func (m *MockCloud) GetVolumeByID(ctx context.Context, volumeID string) (*Volume, error)
- func (m *MockCloud) GetVolumeByName(ctx context.Context, name string) (*Volume, error)
- func (m *MockCloud) ListZonesID(ctx context.Context) ([]string, error)
- type MockCloudMockRecorder
- func (mr *MockCloudMockRecorder) AttachVolume(ctx, volumeID, vmID any) *gomock.Call
- func (mr *MockCloudMockRecorder) CreateVolume(ctx, diskOfferingID, zoneID, name, sizeInGB any) *gomock.Call
- func (mr *MockCloudMockRecorder) DeleteVolume(ctx, id any) *gomock.Call
- func (mr *MockCloudMockRecorder) DetachVolume(ctx, volumeID any) *gomock.Call
- func (mr *MockCloudMockRecorder) ExpandVolume(ctx, volumeID, newSizeInGB any) *gomock.Call
- func (mr *MockCloudMockRecorder) GetNodeInfo(ctx, vmName any) *gomock.Call
- func (mr *MockCloudMockRecorder) GetVMByID(ctx, vmID any) *gomock.Call
- func (mr *MockCloudMockRecorder) GetVolumeByID(ctx, volumeID any) *gomock.Call
- func (mr *MockCloudMockRecorder) GetVolumeByName(ctx, name any) *gomock.Call
- func (mr *MockCloudMockRecorder) ListZonesID(ctx any) *gomock.Call
- type VM
- type Volume
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = errors.New("not found") ErrTooManyResults = errors.New("too many results") )
Specific errors.
Functions ¶
This section is empty.
Types ¶
type Cloud ¶ added in v0.8.1
type Cloud 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 }
Cloud is the CloudStack client interface.
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 MockCloud ¶ added in v0.8.1
type MockCloud struct {
// contains filtered or unexported fields
}
MockCloud is a mock of Cloud interface.
func NewMockCloud ¶ added in v0.8.1
func NewMockCloud(ctrl *gomock.Controller) *MockCloud
NewMockCloud creates a new mock instance.
func (*MockCloud) AttachVolume ¶ added in v0.8.1
AttachVolume mocks base method.
func (*MockCloud) CreateVolume ¶ added in v0.8.1
func (m *MockCloud) CreateVolume(ctx context.Context, diskOfferingID, zoneID, name string, sizeInGB int64) (string, error)
CreateVolume mocks base method.
func (*MockCloud) DeleteVolume ¶ added in v0.8.1
DeleteVolume mocks base method.
func (*MockCloud) DetachVolume ¶ added in v0.8.1
DetachVolume mocks base method.
func (*MockCloud) EXPECT ¶ added in v0.8.1
func (m *MockCloud) EXPECT() *MockCloudMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCloud) ExpandVolume ¶ added in v0.8.1
ExpandVolume mocks base method.
func (*MockCloud) GetNodeInfo ¶ added in v0.8.1
GetNodeInfo mocks base method.
func (*MockCloud) GetVolumeByID ¶ added in v0.8.1
GetVolumeByID mocks base method.
func (*MockCloud) GetVolumeByName ¶ added in v0.8.1
GetVolumeByName mocks base method.
type MockCloudMockRecorder ¶ added in v0.8.1
type MockCloudMockRecorder struct {
// contains filtered or unexported fields
}
MockCloudMockRecorder is the mock recorder for MockCloud.
func (*MockCloudMockRecorder) AttachVolume ¶ added in v0.8.1
func (mr *MockCloudMockRecorder) AttachVolume(ctx, volumeID, vmID any) *gomock.Call
AttachVolume indicates an expected call of AttachVolume.
func (*MockCloudMockRecorder) CreateVolume ¶ added in v0.8.1
func (mr *MockCloudMockRecorder) CreateVolume(ctx, diskOfferingID, zoneID, name, sizeInGB any) *gomock.Call
CreateVolume indicates an expected call of CreateVolume.
func (*MockCloudMockRecorder) DeleteVolume ¶ added in v0.8.1
func (mr *MockCloudMockRecorder) DeleteVolume(ctx, id any) *gomock.Call
DeleteVolume indicates an expected call of DeleteVolume.
func (*MockCloudMockRecorder) DetachVolume ¶ added in v0.8.1
func (mr *MockCloudMockRecorder) DetachVolume(ctx, volumeID any) *gomock.Call
DetachVolume indicates an expected call of DetachVolume.
func (*MockCloudMockRecorder) ExpandVolume ¶ added in v0.8.1
func (mr *MockCloudMockRecorder) ExpandVolume(ctx, volumeID, newSizeInGB any) *gomock.Call
ExpandVolume indicates an expected call of ExpandVolume.
func (*MockCloudMockRecorder) GetNodeInfo ¶ added in v0.8.1
func (mr *MockCloudMockRecorder) GetNodeInfo(ctx, vmName any) *gomock.Call
GetNodeInfo indicates an expected call of GetNodeInfo.
func (*MockCloudMockRecorder) GetVMByID ¶ added in v0.8.1
func (mr *MockCloudMockRecorder) GetVMByID(ctx, vmID any) *gomock.Call
GetVMByID indicates an expected call of GetVMByID.
func (*MockCloudMockRecorder) GetVolumeByID ¶ added in v0.8.1
func (mr *MockCloudMockRecorder) GetVolumeByID(ctx, volumeID any) *gomock.Call
GetVolumeByID indicates an expected call of GetVolumeByID.
func (*MockCloudMockRecorder) GetVolumeByName ¶ added in v0.8.1
func (mr *MockCloudMockRecorder) GetVolumeByName(ctx, name any) *gomock.Call
GetVolumeByName indicates an expected call of GetVolumeByName.
func (*MockCloudMockRecorder) ListZonesID ¶ added in v0.8.1
func (mr *MockCloudMockRecorder) ListZonesID(ctx any) *gomock.Call
ListZonesID indicates an expected call of ListZonesID.