mock

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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 (m *MockCloudManager) CloneVolume(volName string, volType int, srcVolId string, zone string) (newVolId string, err error)

func (*MockCloudManager) CreateSnapshot

func (m *MockCloudManager) CreateSnapshot(snapName string, volId string) (snapId string, err error)

func (*MockCloudManager) CreateVolume

func (m *MockCloudManager) CreateVolume(volName string, requestSize int, replicas int, volType int, zone string, containerConfID string, rg string, placeGroupPD string) (
	volId string, err error)

func (*MockCloudManager) CreateVolumeFromSnapshot

func (m *MockCloudManager) CreateVolumeFromSnapshot(volName string, snapId string, zone string) (volId string,
	err error)

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)

func (*MockCloudManager) SetZones

func (m *MockCloudManager) SetZones(zones map[string]*qcservice.Zone)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL