Documentation ¶
Index ¶
- func CheckID(id string, list []string) bool
- func NewGetter() getter.Getter
- type Provider
- func (p *Provider) AddDeletedSnapID(id string)
- func (p *Provider) AddSnapID(id string)
- func (p *Provider) AddVolID(id string)
- func (p *Provider) InjectFailure(id string, err error)
- func (p *Provider) MockSnapshot() *blockstorage.Snapshot
- func (p *Provider) MockVolume() *blockstorage.Volume
- func (p *Provider) SetTags(ctx context.Context, resource interface{}, tags map[string]string) error
- func (p *Provider) SnapshotCopy(ctx context.Context, from, to blockstorage.Snapshot) (*blockstorage.Snapshot, error)
- func (p *Provider) SnapshotCopyWithArgs(ctx context.Context, from, to blockstorage.Snapshot, args map[string]string) (*blockstorage.Snapshot, error)
- func (p *Provider) SnapshotCreate(ctx context.Context, volume blockstorage.Volume, tags map[string]string) (*blockstorage.Snapshot, error)
- func (p *Provider) SnapshotCreateWaitForCompletion(context.Context, *blockstorage.Snapshot) error
- func (p *Provider) SnapshotDelete(ctx context.Context, snapshot *blockstorage.Snapshot) error
- func (p *Provider) SnapshotGet(ctx context.Context, id string) (*blockstorage.Snapshot, error)
- func (p *Provider) SnapshotsList(ctx context.Context, tags map[string]string) ([]*blockstorage.Snapshot, error)
- func (p *Provider) Type() blockstorage.Type
- func (p *Provider) VolumeCreate(context.Context, blockstorage.Volume) (*blockstorage.Volume, error)
- func (p *Provider) VolumeCreateFromSnapshot(ctx context.Context, snapshot blockstorage.Snapshot, tags map[string]string) (*blockstorage.Volume, error)
- func (p *Provider) VolumeDelete(context.Context, *blockstorage.Volume) error
- func (p *Provider) VolumeGet(ctx context.Context, id string, zone string) (*blockstorage.Volume, error)
- func (p *Provider) VolumesList(ctx context.Context, tags map[string]string, zone string) ([]*blockstorage.Volume, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Provider ¶
type Provider struct { SnapIDList []string DeletedSnapIDList []string VolIDList []string // contains filtered or unexported fields }
Provider implements a mock storage provider
func Get ¶
func Get(storageType blockstorage.Type) (*Provider, error)
Get returns a mock storage provider
func (*Provider) AddDeletedSnapID ¶
AddDeletedSnapID adds id to the list of delted snapshot id's
func (*Provider) InjectFailure ¶
InjectFailure adds an id that provider operations should be failed on
func (*Provider) MockSnapshot ¶
func (p *Provider) MockSnapshot() *blockstorage.Snapshot
MockSnapshot returns the mock snapshot used in the provider
func (*Provider) MockVolume ¶
func (p *Provider) MockVolume() *blockstorage.Volume
MockVolume returns the mock volume used in the provider
func (*Provider) SnapshotCopy ¶
func (p *Provider) SnapshotCopy(ctx context.Context, from, to blockstorage.Snapshot) (*blockstorage.Snapshot, error)
SnapshotCopy mock
func (*Provider) SnapshotCopyWithArgs ¶
func (p *Provider) SnapshotCopyWithArgs(ctx context.Context, from, to blockstorage.Snapshot, args map[string]string) (*blockstorage.Snapshot, error)
SnapshotCopyWithArgs mock
func (*Provider) SnapshotCreate ¶
func (p *Provider) SnapshotCreate(ctx context.Context, volume blockstorage.Volume, tags map[string]string) (*blockstorage.Snapshot, error)
SnapshotCreate mock
func (*Provider) SnapshotCreateWaitForCompletion ¶
SnapshotCreateWaitForCompletion mock
func (*Provider) SnapshotDelete ¶
SnapshotDelete mock
func (*Provider) SnapshotGet ¶
SnapshotGet mock
func (*Provider) SnapshotsList ¶
func (p *Provider) SnapshotsList(ctx context.Context, tags map[string]string) ([]*blockstorage.Snapshot, error)
SnapshotsList mock
func (*Provider) VolumeCreate ¶
func (p *Provider) VolumeCreate(context.Context, blockstorage.Volume) (*blockstorage.Volume, error)
VolumeCreate mock
func (*Provider) VolumeCreateFromSnapshot ¶
func (p *Provider) VolumeCreateFromSnapshot(ctx context.Context, snapshot blockstorage.Snapshot, tags map[string]string) (*blockstorage.Volume, error)
VolumeCreateFromSnapshot mock
func (*Provider) VolumeDelete ¶
VolumeDelete mock
Click to show internal directories.
Click to hide internal directories.