Documentation ¶
Index ¶
- type MockDataStore
- func (c *MockDataStore) CreateImageStore(op trace.Operation, storeName string) (*url.URL, error)
- func (c *MockDataStore) DeleteImage(op trace.Operation, image *image.Image) (*image.Image, error)
- func (c *MockDataStore) DeleteImageStore(op trace.Operation, storeName string) error
- func (m *MockDataStore) Export(op trace.Operation, child, ancestor string, spec *archive.FilterSpec, ...) (io.ReadCloser, error)
- func (c *MockDataStore) GetImage(op trace.Operation, store *url.URL, ID string) (*image.Image, error)
- func (c *MockDataStore) GetImageStorageUsage(op trace.Operation, storeName string) (int64, error)
- func (c *MockDataStore) GetImageStore(op trace.Operation, storeName string) (*url.URL, error)
- func (m *MockDataStore) Import(op trace.Operation, id string, spec *archive.FilterSpec, ...) error
- func (c *MockDataStore) ListImageStores(op trace.Operation) ([]*url.URL, error)
- func (c *MockDataStore) ListImages(op trace.Operation, store *url.URL, IDs []string) ([]*image.Image, error)
- func (m *MockDataStore) NewDataSink(op trace.Operation, id string) (storage.DataSink, error)
- func (m *MockDataStore) NewDataSource(op trace.Operation, id string) (storage.DataSource, error)
- func (c *MockDataStore) Owners(op trace.Operation, url *url.URL, filter func(vm *mo.VirtualMachine) bool) ([]*vm.VirtualMachine, error)
- func (c *MockDataStore) SetCreateImageStoreError(err error)
- func (c *MockDataStore) SetWriteImageError(err error)
- func (c *MockDataStore) URL(op trace.Operation, id string) (*url.URL, error)
- func (c *MockDataStore) WriteImage(op trace.Operation, parent *image.Image, ID string, meta map[string][]byte, ...) (*image.Image, error)
- func (c *MockDataStore) WriteMetadata(op trace.Operation, storeName string, ID string, meta map[string][]byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockDataStore ¶
type MockDataStore struct { object.DatastorePath // contains filtered or unexported fields }
func NewMockDataStore ¶
func (*MockDataStore) CreateImageStore ¶
func (*MockDataStore) DeleteImage ¶
DeleteImage removes an image from the image store
func (*MockDataStore) DeleteImageStore ¶
func (c *MockDataStore) DeleteImageStore(op trace.Operation, storeName string) error
func (*MockDataStore) Export ¶
func (m *MockDataStore) Export(op trace.Operation, child, ancestor string, spec *archive.FilterSpec, data bool) (io.ReadCloser, error)
func (*MockDataStore) GetImage ¶
func (c *MockDataStore) GetImage(op trace.Operation, store *url.URL, ID string) (*image.Image, error)
GetImage gets the specified image from the given store by retreiving it from the cache.
func (*MockDataStore) GetImageStorageUsage ¶
func (*MockDataStore) GetImageStore ¶
GetImageStore checks to see if a named image store exists and returls the URL to it if so or error.
func (*MockDataStore) Import ¶
func (m *MockDataStore) Import(op trace.Operation, id string, spec *archive.FilterSpec, tarstream io.ReadCloser) error
func (*MockDataStore) ListImageStores ¶
func (*MockDataStore) ListImages ¶
func (c *MockDataStore) ListImages(op trace.Operation, store *url.URL, IDs []string) ([]*image.Image, error)
ListImages resturns a list of Images for a list of IDs, or all if no IDs are passed
func (*MockDataStore) NewDataSink ¶
func (*MockDataStore) NewDataSource ¶
func (m *MockDataStore) NewDataSource(op trace.Operation, id string) (storage.DataSource, error)
func (*MockDataStore) Owners ¶
func (c *MockDataStore) Owners(op trace.Operation, url *url.URL, filter func(vm *mo.VirtualMachine) bool) ([]*vm.VirtualMachine, error)
func (*MockDataStore) SetCreateImageStoreError ¶
func (c *MockDataStore) SetCreateImageStoreError(err error)
SetCreateImageStoreError injects an error to be returned on next call to CreateImageStore
func (*MockDataStore) SetWriteImageError ¶
func (c *MockDataStore) SetWriteImageError(err error)
SetWriteImageError injects an error to be returned on next call to WriteImage
func (*MockDataStore) WriteImage ¶
func (*MockDataStore) WriteMetadata ¶
Click to show internal directories.
Click to hide internal directories.