Documentation ¶
Index ¶
- func GetFakeContainerOrchestratorInterface(orchestratorType int) (commonco.COCommonInterface, error)
- func InitFakeVolumeOperationRequestInterface() (cnsvolumeoperationrequest.VolumeOperationRequest, error)
- type FakeK8SOrchestrator
- func (c *FakeK8SOrchestrator) ClearFakeAttached(ctx context.Context, volumeID string) error
- func (c *FakeK8SOrchestrator) InitTopologyServiceInController(ctx context.Context) (commoncotypes.ControllerTopologyService, error)
- func (c *FakeK8SOrchestrator) InitTopologyServiceInNode(ctx context.Context) (commoncotypes.NodeTopologyService, error)
- func (c *FakeK8SOrchestrator) IsFSSEnabled(ctx context.Context, featureName string) bool
- func (c *FakeK8SOrchestrator) IsFakeAttachAllowed(ctx context.Context, volumeID string, volumeManager cnsvolume.Manager) (bool, error)
- func (c *FakeK8SOrchestrator) MarkFakeAttached(ctx context.Context, volumeID string) error
- type MockVolumeMigrationService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFakeContainerOrchestratorInterface ¶
func GetFakeContainerOrchestratorInterface(orchestratorType int) (commonco.COCommonInterface, error)
GetFakeContainerOrchestratorInterface returns a dummy CO interface based on the CO type
func InitFakeVolumeOperationRequestInterface ¶
func InitFakeVolumeOperationRequestInterface() (cnsvolumeoperationrequest.VolumeOperationRequest, error)
InitFakeVolumeOperationRequestInterface returns a fake implementation of the VolumeOperationRequest interface.
Types ¶
type FakeK8SOrchestrator ¶
type FakeK8SOrchestrator struct {
// contains filtered or unexported fields
}
FakeK8SOrchestrator is used to mock common K8S Orchestrator instance to store FSS values
func (*FakeK8SOrchestrator) ClearFakeAttached ¶
func (c *FakeK8SOrchestrator) ClearFakeAttached(ctx context.Context, volumeID string) error
ClearFakeAttached checks if the volume was fake attached, and unmark it as not fake attached.
func (*FakeK8SOrchestrator) InitTopologyServiceInController ¶
func (c *FakeK8SOrchestrator) InitTopologyServiceInController(ctx context.Context) ( commoncotypes.ControllerTopologyService, error)
InitTopologyServiceInController returns a singleton implementation of the commoncotypes.ControllerTopologyService interface for the FakeK8SOrchestrator.
func (*FakeK8SOrchestrator) InitTopologyServiceInNode ¶
func (c *FakeK8SOrchestrator) InitTopologyServiceInNode(ctx context.Context) (commoncotypes.NodeTopologyService, error)
InitTopologyServiceInNode returns a singleton implementation of the commoncotypes.NodeTopologyService interface for the FakeK8SOrchestrator.
func (*FakeK8SOrchestrator) IsFSSEnabled ¶
func (c *FakeK8SOrchestrator) IsFSSEnabled(ctx context.Context, featureName string) bool
IsFSSEnabled returns the FSS values for a given feature
func (*FakeK8SOrchestrator) IsFakeAttachAllowed ¶
func (c *FakeK8SOrchestrator) IsFakeAttachAllowed( ctx context.Context, volumeID string, volumeManager cnsvolume.Manager, ) (bool, error)
IsFakeAttachAllowed checks if the passed volume can be fake attached and mark it as fake attached.
func (*FakeK8SOrchestrator) MarkFakeAttached ¶
func (c *FakeK8SOrchestrator) MarkFakeAttached(ctx context.Context, volumeID string) error
MarkFakeAttached marks the volume as fake attached.
type MockVolumeMigrationService ¶
type MockVolumeMigrationService interface { // GetVolumeID returns VolumeID for given migration volumeSpec // Returns an error if not able to retrieve VolumeID. GetVolumeID(ctx context.Context, volumeSpec *migration.VolumeSpec) (string, error) // GetVolumePath returns VolumePath for given VolumeID // Returns an error if not able to retrieve VolumePath. GetVolumePath(ctx context.Context, volumeID string) (string, error) // DeleteVolumeInfo helps delete mapping of volumePath to VolumeID for specified volumeID DeleteVolumeInfo(ctx context.Context, volumeID string) error }
MockVolumeMigrationService is a mocked VolumeMigrationService needed for CSI migration feature
func GetFakeVolumeMigrationService ¶
func GetFakeVolumeMigrationService( ctx context.Context, volumeManager *cnsvolume.Manager, cnsConfig *cnsconfig.Config, ) (MockVolumeMigrationService, error)
GetFakeVolumeMigrationService returns the mocked VolumeMigrationService