Documentation ¶
Index ¶
- Constants
- type MockReplication
- func (m *MockReplication) ClearErrorAndCondition(force bool)
- func (m *MockReplication) CreateRemoteVolume(_ context.Context, volumeHandle string, params map[string]string) (*csiext.CreateRemoteVolumeResponse, error)
- func (m *MockReplication) CreateStorageProtectionGroup(_ context.Context, _ string, _ map[string]string) (*csiext.CreateStorageProtectionGroupResponse, error)
- func (m *MockReplication) DeleteLocalVolume(_ context.Context, _ string, _ map[string]string) (*csiext.DeleteLocalVolumeResponse, error)
- func (m *MockReplication) DeleteStorageProtectionGroup(_ context.Context, _ string, _ map[string]string) error
- func (m *MockReplication) ExecuteAction(_ context.Context, _ string, actionType *csiext.ExecuteActionRequest_Action, ...) (*csiext.ExecuteActionResponse, error)
- func (m *MockReplication) GetStorageProtectionGroupStatus(_ context.Context, _ string, _ map[string]string) (*csiext.GetStorageProtectionGroupStatusResponse, error)
- func (m *MockReplication) InjectError(err error)
- func (m *MockReplication) InjectErrorAutoClear(err error)
- func (m *MockReplication) InjectErrorClearAfterN(err error, clearAfter int)
- func (m *MockReplication) SetCondition(conditionType conditionType)
- type Replication
Constants ¶
const ( // ExecuteActionWithoutStatus condition ExecuteActionWithoutStatus = conditionType("ExecuteActionWithoutStatus") // ExecuteActionWithoutSuccess condition ExecuteActionWithoutSuccess = conditionType("ExecuteActionWithoutSuccess") // ExecuteActionWithSwap condition ExecuteActionWithSwap = conditionType("ExecuteActionWithSwap") // CreatePGWithMissingPGID condition CreatePGWithMissingPGID = conditionType("CreatePGWithMissingPGID") // CreatePGWithOutStatus condition CreatePGWithOutStatus = conditionType("CreatePGWithOutStatus") // GetPGStatusForTarget condition GetPGStatusForTarget = conditionType("GetPGStatusForTarget") // GetPGStatusInProgress condition GetPGStatusInProgress = conditionType("GetPGStatusInProgress") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockReplication ¶
type MockReplication struct {
// contains filtered or unexported fields
}
MockReplication is dummy implementation of Replication interface
func NewFakeReplicationClient ¶
func NewFakeReplicationClient(contextPrefix string) MockReplication
NewFakeReplicationClient returns mock implementation of Replication interface
func (*MockReplication) ClearErrorAndCondition ¶
func (m *MockReplication) ClearErrorAndCondition(force bool)
ClearErrorAndCondition clears injected error and resets condition
func (*MockReplication) CreateRemoteVolume ¶
func (m *MockReplication) CreateRemoteVolume(_ context.Context, volumeHandle string, params map[string]string, ) (*csiext.CreateRemoteVolumeResponse, error)
CreateRemoteVolume mocks call
func (*MockReplication) CreateStorageProtectionGroup ¶
func (m *MockReplication) CreateStorageProtectionGroup(_ context.Context, _ string, _ map[string]string, ) (*csiext.CreateStorageProtectionGroupResponse, error)
CreateStorageProtectionGroup mocks call
func (*MockReplication) DeleteLocalVolume ¶ added in v1.5.0
func (m *MockReplication) DeleteLocalVolume(_ context.Context, _ string, _ map[string]string, ) (*csiext.DeleteLocalVolumeResponse, error)
DeleteLocalVolume mocks call
func (*MockReplication) DeleteStorageProtectionGroup ¶
func (m *MockReplication) DeleteStorageProtectionGroup(_ context.Context, _ string, _ map[string]string, ) error
DeleteStorageProtectionGroup mocks call
func (*MockReplication) ExecuteAction ¶
func (m *MockReplication) ExecuteAction(_ context.Context, _ string, actionType *csiext.ExecuteActionRequest_Action, _ map[string]string, _ string, _ map[string]string, ) (*csiext.ExecuteActionResponse, error)
ExecuteAction mocks call
func (*MockReplication) GetStorageProtectionGroupStatus ¶
func (m *MockReplication) GetStorageProtectionGroupStatus(_ context.Context, _ string, _ map[string]string, ) (*csiext.GetStorageProtectionGroupStatusResponse, error)
GetStorageProtectionGroupStatus mocks call
func (*MockReplication) InjectError ¶
func (m *MockReplication) InjectError(err error)
InjectError injects error
func (*MockReplication) InjectErrorAutoClear ¶
func (m *MockReplication) InjectErrorAutoClear(err error)
InjectErrorAutoClear injects error and clears after 1 try
func (*MockReplication) InjectErrorClearAfterN ¶
func (m *MockReplication) InjectErrorClearAfterN(err error, clearAfter int)
InjectErrorClearAfterN injects error and clears after N tries
func (*MockReplication) SetCondition ¶
func (m *MockReplication) SetCondition(conditionType conditionType)
SetCondition sets condition to provided condition type
type Replication ¶
type Replication interface { CreateRemoteVolume(context.Context, string, map[string]string) (*csiext.CreateRemoteVolumeResponse, error) DeleteLocalVolume(context.Context, string, map[string]string) (*csiext.DeleteLocalVolumeResponse, error) CreateStorageProtectionGroup(context.Context, string, map[string]string) (*csiext.CreateStorageProtectionGroupResponse, error) DeleteStorageProtectionGroup(context.Context, string, map[string]string) error ExecuteAction(context.Context, string, *csiext.ExecuteActionRequest_Action, map[string]string, string, map[string]string) (*csiext.ExecuteActionResponse, error) GetStorageProtectionGroupStatus(context.Context, string, map[string]string) (*csiext.GetStorageProtectionGroupStatusResponse, error) }
Replication is an interface that defines calls used for querying replication management calls to the driver
func New ¶
func New(conn *grpc.ClientConn, log logr.Logger, timeout time.Duration) Replication
New returns new implementation of Replication interface