Documentation ¶
Index ¶
- func GetFakeInternalName(name string) string
- func NewTridentOrchestrator(client persistent_store.Client) *tridentOrchestrator
- type MockOrchestrator
- func (m *MockOrchestrator) AddFrontend(f frontend.FrontendPlugin)
- func (m *MockOrchestrator) AddMockONTAPNFSBackend(name, lif string) *storage.StorageBackendExternal
- func (m *MockOrchestrator) AddStorageBackend(configJSON string) (*storage.StorageBackendExternal, error)
- func (m *MockOrchestrator) AddStorageClass(scConfig *storage_class.Config) (*storage_class.StorageClassExternal, error)
- func (m *MockOrchestrator) AddVolume(volumeConfig *storage.VolumeConfig) (*storage.VolumeExternal, error)
- func (m *MockOrchestrator) Bootstrap() error
- func (m *MockOrchestrator) DeleteStorageClass(scName string) (bool, error)
- func (m *MockOrchestrator) DeleteVolume(volumeName string) (found bool, err error)
- func (m *MockOrchestrator) GetBackend(backend string) *storage.StorageBackendExternal
- func (m *MockOrchestrator) GetDriverTypeForVolume(vol *storage.VolumeExternal) string
- func (m *MockOrchestrator) GetStorageClass(scName string) *storage_class.StorageClassExternal
- func (o *MockOrchestrator) GetVersion() string
- func (m *MockOrchestrator) GetVolume(volume string) *storage.VolumeExternal
- func (m *MockOrchestrator) GetVolumeType(vol *storage.VolumeExternal) config.VolumeType
- func (m *MockOrchestrator) ListBackends() []*storage.StorageBackendExternal
- func (m *MockOrchestrator) ListStorageClasses() []*storage_class.StorageClassExternal
- func (m *MockOrchestrator) ListVolumes() []*storage.VolumeExternal
- func (m *MockOrchestrator) ListVolumesByPlugin(pluginName string) []*storage.VolumeExternal
- func (m *MockOrchestrator) OfflineBackend(backend string) (bool, error)
- func (m *MockOrchestrator) ValidateVolumes(t *testing.T, expectedConfigs []*storage.VolumeConfig) bool
- type Orchestrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFakeInternalName ¶
func NewTridentOrchestrator ¶
func NewTridentOrchestrator(client persistent_store.Client) *tridentOrchestrator
returns a storage orchestrator instance
Types ¶
type MockOrchestrator ¶
type MockOrchestrator struct {
// contains filtered or unexported fields
}
MockOrchestrator is a struct that implements the Orchestrator interface for use in testing frontends. Although it retains the appearance of correct functionality for this purpose, all functions are effectively nops. Note: Many of the getter methods are copied verbatim from tridentOrchestrator, since their functionality is not inherently interesting or testable.
func NewMockOrchestrator ¶
func NewMockOrchestrator() *MockOrchestrator
func (*MockOrchestrator) AddFrontend ¶
func (m *MockOrchestrator) AddFrontend(f frontend.FrontendPlugin)
func (*MockOrchestrator) AddMockONTAPNFSBackend ¶
func (m *MockOrchestrator) AddMockONTAPNFSBackend(name, lif string) *storage.StorageBackendExternal
func (*MockOrchestrator) AddStorageBackend ¶
func (m *MockOrchestrator) AddStorageBackend(configJSON string) (*storage.StorageBackendExternal, error)
TODO: Add extra methods to add backends without needing to provide a valid, stringified JSON config.
func (*MockOrchestrator) AddStorageClass ¶
func (m *MockOrchestrator) AddStorageClass( scConfig *storage_class.Config, ) (*storage_class.StorageClassExternal, error)
func (*MockOrchestrator) AddVolume ¶
func (m *MockOrchestrator) AddVolume(volumeConfig *storage.VolumeConfig) (*storage.VolumeExternal, error)
func (*MockOrchestrator) Bootstrap ¶
func (m *MockOrchestrator) Bootstrap() error
func (*MockOrchestrator) DeleteStorageClass ¶
func (m *MockOrchestrator) DeleteStorageClass(scName string) (bool, error)
func (*MockOrchestrator) DeleteVolume ¶
func (m *MockOrchestrator) DeleteVolume(volumeName string) (found bool, err error)
func (*MockOrchestrator) GetBackend ¶
func (m *MockOrchestrator) GetBackend(backend string) *storage.StorageBackendExternal
func (*MockOrchestrator) GetDriverTypeForVolume ¶
func (m *MockOrchestrator) GetDriverTypeForVolume( vol *storage.VolumeExternal, ) string
Copied verbatim from tridentOrchestrator
func (*MockOrchestrator) GetStorageClass ¶
func (m *MockOrchestrator) GetStorageClass(scName string) *storage_class.StorageClassExternal
func (*MockOrchestrator) GetVersion ¶
func (o *MockOrchestrator) GetVersion() string
func (*MockOrchestrator) GetVolume ¶
func (m *MockOrchestrator) GetVolume(volume string) *storage.VolumeExternal
func (*MockOrchestrator) GetVolumeType ¶
func (m *MockOrchestrator) GetVolumeType(vol *storage.VolumeExternal) config.VolumeType
Copied verbatim from tridentOrchestrator
func (*MockOrchestrator) ListBackends ¶
func (m *MockOrchestrator) ListBackends() []*storage.StorageBackendExternal
func (*MockOrchestrator) ListStorageClasses ¶
func (m *MockOrchestrator) ListStorageClasses() []*storage_class.StorageClassExternal
func (*MockOrchestrator) ListVolumes ¶
func (m *MockOrchestrator) ListVolumes() []*storage.VolumeExternal
func (*MockOrchestrator) ListVolumesByPlugin ¶
func (m *MockOrchestrator) ListVolumesByPlugin(pluginName string) []*storage.VolumeExternal
func (*MockOrchestrator) OfflineBackend ¶
func (m *MockOrchestrator) OfflineBackend(backend string) (bool, error)
func (*MockOrchestrator) ValidateVolumes ¶
func (m *MockOrchestrator) ValidateVolumes( t *testing.T, expectedConfigs []*storage.VolumeConfig, ) bool
type Orchestrator ¶
type Orchestrator interface { Bootstrap() error AddFrontend(f frontend.FrontendPlugin) GetVersion() string AddStorageBackend(configJSON string) (*storage.StorageBackendExternal, error) GetBackend(backend string) *storage.StorageBackendExternal ListBackends() []*storage.StorageBackendExternal OfflineBackend(backend string) (bool, error) AddVolume(volumeConfig *storage.VolumeConfig) (*storage.VolumeExternal, error) GetVolume(volume string) *storage.VolumeExternal GetDriverTypeForVolume(vol *storage.VolumeExternal) string GetVolumeType(vol *storage.VolumeExternal) config.VolumeType ListVolumes() []*storage.VolumeExternal DeleteVolume(volume string) (found bool, err error) ListVolumesByPlugin(pluginName string) []*storage.VolumeExternal AddStorageClass(scConfig *storage_class.Config) (*storage_class.StorageClassExternal, error) GetStorageClass(scName string) *storage_class.StorageClassExternal ListStorageClasses() []*storage_class.StorageClassExternal DeleteStorageClass(scName string) (bool, error) }
Click to show internal directories.
Click to hide internal directories.