Documentation ¶
Index ¶
- type StorageProvider
- func (provider *StorageProvider) CloneVolume(name, description, sourceID, snapshotID string, size int64, ...) (*model.Volume, error)
- func (provider *StorageProvider) CreateSnapshot(name, description, sourceID string, opts map[string]interface{}) (*model.Snapshot, error)
- func (provider *StorageProvider) CreateSnapshotGroup(name, sourceVolumeGroupID string, opts map[string]interface{}) (*model.SnapshotGroup, error)
- func (provider *StorageProvider) CreateVolume(name, description string, size int64, opts map[string]interface{}) (*model.Volume, error)
- func (provider *StorageProvider) CreateVolumeGroup(name, description string, opts map[string]interface{}) (*model.VolumeGroup, error)
- func (provider *StorageProvider) DeleteSnapshot(id string) error
- func (provider *StorageProvider) DeleteSnapshotGroup(id string) error
- func (provider *StorageProvider) DeleteVolume(id string, force bool) error
- func (provider *StorageProvider) DeleteVolumeGroup(id string) error
- func (provider *StorageProvider) EditVolume(id string, parameters map[string]interface{}) (*model.Volume, error)
- func (provider *StorageProvider) ExpandVolume(id string, requestBytes int64) (*model.Volume, error)
- func (provider *StorageProvider) GetNodeContext(nodeID string) (*model.Node, error)
- func (provider *StorageProvider) GetSnapshot(id string) (*model.Snapshot, error)
- func (provider *StorageProvider) GetSnapshotByName(name string, sourceID string) (*model.Snapshot, error)
- func (provider *StorageProvider) GetSnapshots(sourceID string) ([]*model.Snapshot, error)
- func (provider *StorageProvider) GetVolume(id string) (*model.Volume, error)
- func (provider *StorageProvider) GetVolumeByName(name string) (*model.Volume, error)
- func (provider *StorageProvider) GetVolumes() ([]*model.Volume, error)
- func (provider *StorageProvider) Initialize()
- func (provider *StorageProvider) PublishVolume(id, hostUUID, accessProtocol string) (*model.PublishInfo, error)
- func (provider *StorageProvider) SetNodeContext(node *model.Node) error
- func (provider *StorageProvider) UnpublishVolume(id, hostUUID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageProvider ¶
type StorageProvider struct {
// contains filtered or unexported fields
}
StorageProvider is an implementor of the StorageProvider interface
func NewFakeStorageProvider ¶
func NewFakeStorageProvider() *StorageProvider
NewFakeStorageProvider returns a fake storage provider
func (*StorageProvider) CloneVolume ¶
func (provider *StorageProvider) CloneVolume(name, description, sourceID, snapshotID string, size int64, opts map[string]interface{}) (*model.Volume, error)
CloneVolume returns a fake volume
func (*StorageProvider) CreateSnapshot ¶
func (provider *StorageProvider) CreateSnapshot(name, description, sourceID string, opts map[string]interface{}) (*model.Snapshot, error)
CreateSnapshot returns a fake snapshot
func (*StorageProvider) CreateSnapshotGroup ¶
func (provider *StorageProvider) CreateSnapshotGroup(name, sourceVolumeGroupID string, opts map[string]interface{}) (*model.SnapshotGroup, error)
CreateSnapshotGroup returns a fake volume group
func (*StorageProvider) CreateVolume ¶
func (provider *StorageProvider) CreateVolume(name, description string, size int64, opts map[string]interface{}) (*model.Volume, error)
CreateVolume returns a fake volume
func (*StorageProvider) CreateVolumeGroup ¶
func (provider *StorageProvider) CreateVolumeGroup(name, description string, opts map[string]interface{}) (*model.VolumeGroup, error)
CreateVolumeGroup returns a fake volume group
func (*StorageProvider) DeleteSnapshot ¶
func (provider *StorageProvider) DeleteSnapshot(id string) error
DeleteSnapshot removes a fake volume
func (*StorageProvider) DeleteSnapshotGroup ¶
func (provider *StorageProvider) DeleteSnapshotGroup(id string) error
DeleteSnapshotGroup removes a fake snapshotGroup
func (*StorageProvider) DeleteVolume ¶
func (provider *StorageProvider) DeleteVolume(id string, force bool) error
DeleteVolume removes a fake volume
func (*StorageProvider) DeleteVolumeGroup ¶
func (provider *StorageProvider) DeleteVolumeGroup(id string) error
DeleteVolumeGroup removes a fake volumeGroup
func (*StorageProvider) EditVolume ¶
func (provider *StorageProvider) EditVolume(id string, parameters map[string]interface{}) (*model.Volume, error)
EditVolume will edit the fake volume with requested params
func (*StorageProvider) ExpandVolume ¶
ExpandVolume will expand the fake volume to requested size
func (*StorageProvider) GetNodeContext ¶
func (provider *StorageProvider) GetNodeContext(nodeID string) (*model.Node, error)
GetNodeContext does nothing
func (*StorageProvider) GetSnapshot ¶
func (provider *StorageProvider) GetSnapshot(id string) (*model.Snapshot, error)
GetSnapshot returns the fake snapshot from memory
func (*StorageProvider) GetSnapshotByName ¶
func (provider *StorageProvider) GetSnapshotByName(name string, sourceID string) (*model.Snapshot, error)
GetSnapshotByName returns a fake snapshot from memory
func (*StorageProvider) GetSnapshots ¶
func (provider *StorageProvider) GetSnapshots(sourceID string) ([]*model.Snapshot, error)
GetSnapshots returns the fake snapshots saved in the map
func (*StorageProvider) GetVolume ¶
func (provider *StorageProvider) GetVolume(id string) (*model.Volume, error)
GetVolume returns a fake volume from memory
func (*StorageProvider) GetVolumeByName ¶
func (provider *StorageProvider) GetVolumeByName(name string) (*model.Volume, error)
GetVolumeByName returns a fake volume from memory
func (*StorageProvider) GetVolumes ¶
func (provider *StorageProvider) GetVolumes() ([]*model.Volume, error)
GetVolumes returns the fake volumes saved in the map
func (*StorageProvider) Initialize ¶
func (provider *StorageProvider) Initialize()
Initialize does nothing
func (*StorageProvider) PublishVolume ¶
func (provider *StorageProvider) PublishVolume(id, hostUUID, accessProtocol string) (*model.PublishInfo, error)
PublishVolume returns fake publish data
func (*StorageProvider) SetNodeContext ¶
func (provider *StorageProvider) SetNodeContext(node *model.Node) error
SetNodeContext does nothing
func (*StorageProvider) UnpublishVolume ¶
func (provider *StorageProvider) UnpublishVolume(id, hostUUID string) error
UnpublishVolume does nothing