Documentation ¶
Index ¶
- Constants
- func NewFakeStorageDriverConfigJSON(name string, protocol config.Protocol, pools map[string]*FakeStoragePool) (string, error)
- type FakeStorageDriver
- func (d *FakeStorageDriver) Attach(name, mountpoint string, opts map[string]string) error
- func (d *FakeStorageDriver) Create(name string, sizeBytes uint64, opts map[string]string) error
- func (d *FakeStorageDriver) CreateClone(name, source, snapshot string, opts map[string]string) error
- func (d *FakeStorageDriver) Destroy(name string) error
- func (d *FakeStorageDriver) Detach(name, mountpoint string) error
- func (d *FakeStorageDriver) Get(name string) error
- func (d *FakeStorageDriver) Initialize(context dvp.DriverContext, configJSON string, ...) error
- func (d *FakeStorageDriver) List() ([]string, error)
- func (d *FakeStorageDriver) Name() string
- func (d *FakeStorageDriver) SnapshotList(name string) ([]dvp.CommonSnapshot, error)
- func (d *FakeStorageDriver) Validate(context dvp.DriverContext) error
- type FakeStorageDriverConfig
- type FakeStoragePool
- type FakeVolume
Constants ¶
View Source
const ( FakeStorageDriverName = "fake" FakePoolAttribute = "pool" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FakeStorageDriver ¶
type FakeStorageDriver struct { Config FakeStorageDriverConfig // DestroyedVolumes is here so that tests can check whether destroy // has been called on a volume during or after bootstrapping, since // different driver instances with the same config won't actually share // state. DestroyedVolumes map[string]bool // contains filtered or unexported fields }
func (*FakeStorageDriver) Attach ¶
func (d *FakeStorageDriver) Attach(name, mountpoint string, opts map[string]string) error
func (*FakeStorageDriver) CreateClone ¶
func (d *FakeStorageDriver) CreateClone(name, source, snapshot string, opts map[string]string) error
func (*FakeStorageDriver) Destroy ¶
func (d *FakeStorageDriver) Destroy(name string) error
func (*FakeStorageDriver) Detach ¶
func (d *FakeStorageDriver) Detach(name, mountpoint string) error
func (*FakeStorageDriver) Get ¶
func (d *FakeStorageDriver) Get(name string) error
func (*FakeStorageDriver) Initialize ¶
func (d *FakeStorageDriver) Initialize( context dvp.DriverContext, configJSON string, commonConfig *dvp.CommonStorageDriverConfig, ) error
func (*FakeStorageDriver) List ¶
func (d *FakeStorageDriver) List() ([]string, error)
func (*FakeStorageDriver) Name ¶
func (d *FakeStorageDriver) Name() string
func (*FakeStorageDriver) SnapshotList ¶
func (d *FakeStorageDriver) SnapshotList(name string) ([]dvp.CommonSnapshot, error)
func (*FakeStorageDriver) Validate ¶
func (d *FakeStorageDriver) Validate(context dvp.DriverContext) error
type FakeStorageDriverConfig ¶
type FakeStorageDriverConfig struct { *dvp.CommonStorageDriverConfig Protocol config.Protocol `json:"protocol"` // pools represents the possible buckets into which a given volume should go Pools map[string]*FakeStoragePool `json:"pools"` InstanceName string `json:"instanceName"` }
type FakeStoragePool ¶
type FakeStoragePool struct { Attrs map[string]sa.Offer `json:"attributes"` Bytes uint64 `json:"sizeBytes"` }
func (*FakeStoragePool) UnmarshalJSON ¶
func (p *FakeStoragePool) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler and allows FakeStoragePool to be unmarshaled with the Attrs map correctly defined.
type FakeVolume ¶
type FakeVolume struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.