Documentation ¶
Index ¶
- func NewMockCloudManagerFromConfig(config *qcconfig.Config) (cloud.CloudManager, error)
- type MockCloudManager
- func (m *MockCloudManager) AttachTags(tagsId []string, resourceId string, resourceType string) (err error)
- func (m *MockCloudManager) AttachVolume(volId string, instanceId string) (err error)
- func (m *MockCloudManager) CloneVolume(volName string, volType int, srcVolId string, zone string) (newVolId string, err error)
- func (m *MockCloudManager) CreateSnapshot(snapName string, volId string) (snapId string, err error)
- func (m *MockCloudManager) CreateVolume(volName string, requestSize int, replicas int, volType int, zone string, ...) (volId string, err error)
- func (m *MockCloudManager) CreateVolumeFromSnapshot(volName string, snapId string, zone string) (volId string, err error)
- func (m *MockCloudManager) DeleteSnapshot(snapId string) (err error)
- func (m *MockCloudManager) DeleteVolume(volId string) (err error)
- func (m *MockCloudManager) DetachVolume(volId string, instanceId string) (err error)
- func (m *MockCloudManager) FindInstance(instanceId string) (instanceInfo *qcservice.Instance, err error)
- func (m *MockCloudManager) FindSnapshot(snapId string) (snapInfo *qcservice.Snapshot, err error)
- func (m *MockCloudManager) FindSnapshotByName(snapName string) (snapInfo *qcservice.Snapshot, err error)
- func (m *MockCloudManager) FindTag(tagId string) (tagInfo *qcservice.Tag, err error)
- func (m *MockCloudManager) FindVolume(volId string) (volInfo *qcservice.Volume, err error)
- func (m *MockCloudManager) FindVolumeByName(volName string) (volInfo *qcservice.Volume, err error)
- func (m *MockCloudManager) GetZone() (zoneName string)
- func (m *MockCloudManager) GetZoneList() (zoneNameList []string, err error)
- func (m *MockCloudManager) IsValidTags(tagsId []string) bool
- func (m *MockCloudManager) ResizeVolume(volId string, requestSize int) (err error)
- func (m *MockCloudManager) SetConfig(config *qcconfig.Config)
- func (m *MockCloudManager) SetInstances(instances map[string]*qcservice.Instance)
- func (m *MockCloudManager) SetSnapshots(snapshots map[string]*qcservice.Snapshot)
- func (m *MockCloudManager) SetVolumes(volumes map[string]*qcservice.Volume)
- func (m *MockCloudManager) SetZones(zones map[string]*qcservice.Zone)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockCloudManagerFromConfig ¶
func NewMockCloudManagerFromConfig(config *qcconfig.Config) (cloud.CloudManager, error)
Types ¶
type MockCloudManager ¶
type MockCloudManager struct {
// contains filtered or unexported fields
}
func (*MockCloudManager) AttachTags ¶
func (m *MockCloudManager) AttachTags(tagsId []string, resourceId string, resourceType string) (err error)
AttachTags add a slice of tags on a object
func (*MockCloudManager) AttachVolume ¶
func (m *MockCloudManager) AttachVolume(volId string, instanceId string) (err error)
func (*MockCloudManager) CloneVolume ¶
func (*MockCloudManager) CreateSnapshot ¶
func (m *MockCloudManager) CreateSnapshot(snapName string, volId string) (snapId string, err error)
func (*MockCloudManager) CreateVolume ¶
func (*MockCloudManager) CreateVolumeFromSnapshot ¶
func (*MockCloudManager) DeleteSnapshot ¶
func (m *MockCloudManager) DeleteSnapshot(snapId string) (err error)
func (*MockCloudManager) DeleteVolume ¶
func (m *MockCloudManager) DeleteVolume(volId string) (err error)
func (*MockCloudManager) DetachVolume ¶
func (m *MockCloudManager) DetachVolume(volId string, instanceId string) (err error)
func (*MockCloudManager) FindInstance ¶
func (m *MockCloudManager) FindInstance(instanceId string) (instanceInfo *qcservice.Instance, err error)
Util Method
func (*MockCloudManager) FindSnapshot ¶
func (m *MockCloudManager) FindSnapshot(snapId string) (snapInfo *qcservice.Snapshot, err error)
func (*MockCloudManager) FindSnapshotByName ¶
func (m *MockCloudManager) FindSnapshotByName(snapName string) (snapInfo *qcservice.Snapshot, err error)
func (*MockCloudManager) FindTag ¶
func (m *MockCloudManager) FindTag(tagId string) (tagInfo *qcservice.Tag, err error)
FindTags finds and gets tags information
func (*MockCloudManager) FindVolume ¶
func (m *MockCloudManager) FindVolume(volId string) (volInfo *qcservice.Volume, err error)
Volume Method
func (*MockCloudManager) FindVolumeByName ¶
func (m *MockCloudManager) FindVolumeByName(volName string) (volInfo *qcservice.Volume, err error)
func (*MockCloudManager) GetZone ¶
func (m *MockCloudManager) GetZone() (zoneName string)
func (*MockCloudManager) GetZoneList ¶
func (m *MockCloudManager) GetZoneList() (zoneNameList []string, err error)
func (*MockCloudManager) IsValidTags ¶
func (m *MockCloudManager) IsValidTags(tagsId []string) bool
IsValidTags checks tags exists.
func (*MockCloudManager) ResizeVolume ¶
func (m *MockCloudManager) ResizeVolume(volId string, requestSize int) (err error)
func (*MockCloudManager) SetConfig ¶
func (m *MockCloudManager) SetConfig(config *qcconfig.Config)
func (*MockCloudManager) SetInstances ¶
func (m *MockCloudManager) SetInstances(instances map[string]*qcservice.Instance)
func (*MockCloudManager) SetSnapshots ¶
func (m *MockCloudManager) SetSnapshots(snapshots map[string]*qcservice.Snapshot)
func (*MockCloudManager) SetVolumes ¶
func (m *MockCloudManager) SetVolumes(volumes map[string]*qcservice.Volume)
Click to show internal directories.
Click to hide internal directories.