juju: github.com/juju/juju/storage/provider/dummy Index | Files

package dummy

import "github.com/juju/juju/storage/provider/dummy"

Index

Package Files

common.go filesystemsource.go provider.go volumesource.go

func StorageProviders Uses

func StorageProviders() storage.ProviderRegistry

StorageProviders returns a provider registry with some well-defined dummy storage providers.

type FilesystemSource Uses

type FilesystemSource struct {
    testing.Stub

    CreateFilesystemsFunc        func(context.ProviderCallContext, []storage.FilesystemParams) ([]storage.CreateFilesystemsResult, error)
    DestroyFilesystemsFunc       func(context.ProviderCallContext, []string) ([]error, error)
    ReleaseFilesystemsFunc       func(context.ProviderCallContext, []string) ([]error, error)
    ValidateFilesystemParamsFunc func(storage.FilesystemParams) error
    AttachFilesystemsFunc        func(context.ProviderCallContext, []storage.FilesystemAttachmentParams) ([]storage.AttachFilesystemsResult, error)
    DetachFilesystemsFunc        func(context.ProviderCallContext, []storage.FilesystemAttachmentParams) ([]error, error)
}

FilesystemSource is an implementation of storage.FilesystemSource, suitable for testing. Each method's default behaviour may be overridden by setting the corresponding Func field.

func (*FilesystemSource) AttachFilesystems Uses

func (s *FilesystemSource) AttachFilesystems(ctx context.ProviderCallContext, params []storage.FilesystemAttachmentParams) ([]storage.AttachFilesystemsResult, error)

AttachFilesystems is defined on storage.FilesystemSource.

func (*FilesystemSource) CreateFilesystems Uses

func (s *FilesystemSource) CreateFilesystems(ctx context.ProviderCallContext, params []storage.FilesystemParams) ([]storage.CreateFilesystemsResult, error)

CreateFilesystems is defined on storage.FilesystemSource.

func (*FilesystemSource) DestroyFilesystems Uses

func (s *FilesystemSource) DestroyFilesystems(ctx context.ProviderCallContext, volIds []string) ([]error, error)

DestroyFilesystems is defined on storage.FilesystemSource.

func (*FilesystemSource) DetachFilesystems Uses

func (s *FilesystemSource) DetachFilesystems(ctx context.ProviderCallContext, params []storage.FilesystemAttachmentParams) ([]error, error)

DetachFilesystems is defined on storage.FilesystemSource.

func (*FilesystemSource) ReleaseFilesystems Uses

func (s *FilesystemSource) ReleaseFilesystems(ctx context.ProviderCallContext, volIds []string) ([]error, error)

ReleaseFilesystems is defined on storage.FilesystemSource.

func (*FilesystemSource) ValidateFilesystemParams Uses

func (s *FilesystemSource) ValidateFilesystemParams(params storage.FilesystemParams) error

ValidateFilesystemParams is defined on storage.FilesystemSource.

type StorageProvider Uses

type StorageProvider struct {
    testing.Stub

    // StorageScope defines the scope of storage managed by this provider.
    StorageScope storage.Scope

    // IsDynamic defines whether or not the provider reports that it supports
    // dynamic provisioning.
    IsDynamic bool

    // IsReleasable defines whether or not the provider reports that it
    // supports releasing storage.
    IsReleasable bool

    // DefaultPools_ will be returned by DefaultPools.
    DefaultPools_ []*storage.Config

    // VolumeSourceFunc will be called by VolumeSource, if non-nil;
    // otherwise VolumeSource will return a NotSupported error.
    VolumeSourceFunc func(*storage.Config) (storage.VolumeSource, error)

    // FilesystemSourceFunc will be called by FilesystemSource, if non-nil;
    // otherwise FilesystemSource will return a NotSupported error.
    FilesystemSourceFunc func(*storage.Config) (storage.FilesystemSource, error)

    // ValidateConfigFunc will be called by ValidateConfig, if non-nil;
    // otherwise ValidateConfig returns nil.
    ValidateConfigFunc func(*storage.Config) error

    // SupportsFunc will be called by Supports, if non-nil; otherwise,
    // Supports returns true.
    SupportsFunc func(kind storage.StorageKind) bool
}

StorageProvider is an implementation of storage.Provider, suitable for testing. Each method's default behaviour may be overridden by setting the corresponding Func field.

func (*StorageProvider) DefaultPools Uses

func (p *StorageProvider) DefaultPools() []*storage.Config

DefaultPool is defined on storage.Provider.

func (*StorageProvider) Dynamic Uses

func (p *StorageProvider) Dynamic() bool

Dynamic is defined on storage.Provider.

func (*StorageProvider) FilesystemSource Uses

func (p *StorageProvider) FilesystemSource(providerConfig *storage.Config) (storage.FilesystemSource, error)

FilesystemSource is defined on storage.Provider.

func (*StorageProvider) Releasable Uses

func (p *StorageProvider) Releasable() bool

Releasable is defined on storage.Provider.

func (*StorageProvider) Scope Uses

func (p *StorageProvider) Scope() storage.Scope

Scope is defined on storage.Provider.

func (*StorageProvider) Supports Uses

func (p *StorageProvider) Supports(kind storage.StorageKind) bool

Supports is defined on storage.Provider.

func (*StorageProvider) ValidateConfig Uses

func (p *StorageProvider) ValidateConfig(providerConfig *storage.Config) error

ValidateConfig is defined on storage.Provider.

func (*StorageProvider) VolumeSource Uses

func (p *StorageProvider) VolumeSource(providerConfig *storage.Config) (storage.VolumeSource, error)

VolumeSource is defined on storage.Provider.

type VolumeSource Uses

type VolumeSource struct {
    testing.Stub

    CreateVolumesFunc        func(context.ProviderCallContext, []storage.VolumeParams) ([]storage.CreateVolumesResult, error)
    ListVolumesFunc          func(context.ProviderCallContext) ([]string, error)
    DescribeVolumesFunc      func(context.ProviderCallContext, []string) ([]storage.DescribeVolumesResult, error)
    DestroyVolumesFunc       func(context.ProviderCallContext, []string) ([]error, error)
    ReleaseVolumesFunc       func(context.ProviderCallContext, []string) ([]error, error)
    ValidateVolumeParamsFunc func(storage.VolumeParams) error
    AttachVolumesFunc        func(context.ProviderCallContext, []storage.VolumeAttachmentParams) ([]storage.AttachVolumesResult, error)
    DetachVolumesFunc        func(context.ProviderCallContext, []storage.VolumeAttachmentParams) ([]error, error)
}

VolumeSource is an implementation of storage.VolumeSource, suitable for testing. Each method's default behaviour may be overridden by setting the corresponding Func field.

func (*VolumeSource) AttachVolumes Uses

func (s *VolumeSource) AttachVolumes(ctx context.ProviderCallContext, params []storage.VolumeAttachmentParams) ([]storage.AttachVolumesResult, error)

AttachVolumes is defined on storage.VolumeSource.

func (*VolumeSource) CreateVolumes Uses

func (s *VolumeSource) CreateVolumes(ctx context.ProviderCallContext, params []storage.VolumeParams) ([]storage.CreateVolumesResult, error)

CreateVolumes is defined on storage.VolumeSource.

func (*VolumeSource) DescribeVolumes Uses

func (s *VolumeSource) DescribeVolumes(ctx context.ProviderCallContext, volIds []string) ([]storage.DescribeVolumesResult, error)

DescribeVolumes is defined on storage.VolumeSource.

func (*VolumeSource) DestroyVolumes Uses

func (s *VolumeSource) DestroyVolumes(ctx context.ProviderCallContext, volIds []string) ([]error, error)

DestroyVolumes is defined on storage.VolumeSource.

func (*VolumeSource) DetachVolumes Uses

func (s *VolumeSource) DetachVolumes(ctx context.ProviderCallContext, params []storage.VolumeAttachmentParams) ([]error, error)

DetachVolumes is defined on storage.VolumeSource.

func (*VolumeSource) ListVolumes Uses

func (s *VolumeSource) ListVolumes(ctx context.ProviderCallContext) ([]string, error)

ListVolumes is defined on storage.VolumeSource.

func (*VolumeSource) ReleaseVolumes Uses

func (s *VolumeSource) ReleaseVolumes(ctx context.ProviderCallContext, volIds []string) ([]error, error)

ReleaseVolumes is defined on storage.VolumeSource.

func (*VolumeSource) ValidateVolumeParams Uses

func (s *VolumeSource) ValidateVolumeParams(params storage.VolumeParams) error

ValidateVolumeParams is defined on storage.VolumeSource.

Package dummy imports 4 packages (graph) and is imported by 36 packages. Updated 2018-06-29. Refresh now. Tools for package owners.