Documentation ¶
Index ¶
- type Operations
- func (ops *Operations) DeleteCSP(spcName string, deleteCount int)
- func (ops *Operations) ExecPod(opts *Options) ([]byte, error)
- func (ops *Operations) ExecuteCMDEventually(podObj *corev1.Pod, containerName, cmd string) string
- func (ops *Operations) GetBDCCount(lSelector, namespace string) int
- func (ops *Operations) GetBDCCountEventually(listOptions metav1.ListOptions, expectedBDCCount int, namespace string) int
- func (ops *Operations) GetCSPCount(labelSelector string) int
- func (ops *Operations) GetCVCount(namespace, lselector string) int
- func (ops *Operations) GetCstorVolumeClaimCount(namespace, cvcName string) int
- func (ops *Operations) GetCstorVolumeClaimCountEventually(namespace, cvcName string, expectedCVCCount int) bool
- func (ops *Operations) GetCstorVolumeCount(namespace, lselector string, expectedCVCount int) int
- func (ops *Operations) GetCstorVolumeCountEventually(namespace, lselector string, expectedCVCount int) bool
- func (ops *Operations) GetCstorVolumeReplicaCount(namespace, lselector string) int
- func (ops *Operations) GetCstorVolumeReplicaCountEventually(namespace, lselector string, expectedCVRCount int) bool
- func (ops *Operations) GetHealthyCSPCount(spcName string, expectedCSPCount int) int
- func (ops *Operations) GetHealthyCSPCountEventually(spcName string, expectedCSPCount int) bool
- func (ops *Operations) GetHealthyCSPICount(cspcName string, expectedCSPICount int) int
- func (ops *Operations) GetPVNameFromPVCName(pvcName string) string
- func (ops *Operations) GetPodCompletedCount(namespace, lselector string) int
- func (ops *Operations) GetPodCompletedCountEventually(namespace, lselector string, expectedPodCount int) int
- func (ops *Operations) GetPodRunningCount(namespace, lselector string) int
- func (ops *Operations) GetPodRunningCountEventually(namespace, lselector string, expectedPodCount int) int
- func (ops *Operations) GetReadyNodes() *corev1.NodeList
- func (ops *Operations) GetSnapshotType(snapName string) string
- func (ops *Operations) GetSnapshotTypeEventually(snapName string) string
- func (ops *Operations) IsCSPCDeletedEventually(cspcName string) bool
- func (ops *Operations) IsFinalizerExistsOnBDC(bdcName, finalizer string) bool
- func (ops *Operations) IsPVCBound(pvcName string) bool
- func (ops *Operations) IsPVCBoundEventually(pvcName string) bool
- func (ops *Operations) IsPVCDeleted(pvcName string) bool
- func (ops *Operations) IsPVCDeletedEventually(pvcName string) bool
- func (ops *Operations) IsPodDeletedEventually(namespace, podName string) bool
- func (ops *Operations) IsPodRunningEventually(namespace, podName string) bool
- func (ops *Operations) IsSPCFinalizerExistsOnBDCs(listOptions metav1.ListOptions, spcFinalizer string) bool
- func (ops *Operations) IsSPCFinalizerExistsOnSPC(spcName, spcFinalizer string) bool
- func (ops *Operations) IsSPCNotExists(spcName string) bool
- func (ops *Operations) IsSnapshotDeleted(snapName string) bool
- func (ops *Operations) PodDeleteCollection(ns string, lopts metav1.ListOptions) error
- func (ops *Operations) RestartPodEventually(podObj *corev1.Pod) error
- func (ops *Operations) VerifyCapacity(pvcName, capacity string) bool
- func (ops *Operations) VerifyOpenebs(expectedPodCount int) *Operations
- func (ops *Operations) VerifyUpgradeResultTasksIsNotFail(namespace, lselector string) bool
- type OperationsOptions
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operations ¶
type Operations struct { KubeClient *kubeclient.Client NodeClient *node.Kubeclient PodClient *pod.KubeClient SCClient *sc.Kubeclient PVCClient *pvc.Kubeclient NSClient *ns.Kubeclient SnapClient *snap.Kubeclient CSPClient *csp.Kubeclient CSPIClient *cspi.Kubeclient SPCClient *spc.Kubeclient SVCClient *svc.Kubeclient CVClient *cv.Kubeclient CVCClient *cvc.Kubeclient CSPCClient *cspc.Kubeclient CVRClient *cvr.Kubeclient URClient *result.Kubeclient UnstructClient *unstruct.Kubeclient DeployClient *deploy.Kubeclient BDClient *bd.Kubeclient BDCClient *bdc.Kubeclient KubeConfigPath string }
Operations provides clients amd methods to perform operations
func NewOperations ¶
func NewOperations(opts ...OperationsOptions) *Operations
NewOperations returns a new instance of kubeclient meant for cstor volume replica operations
func (*Operations) DeleteCSP ¶
func (ops *Operations) DeleteCSP(spcName string, deleteCount int)
DeleteCSP ...
func (*Operations) ExecPod ¶
func (ops *Operations) ExecPod(opts *Options) ([]byte, error)
ExecPod executes arbitrary command inside the pod
func (*Operations) ExecuteCMDEventually ¶
func (ops *Operations) ExecuteCMDEventually( podObj *corev1.Pod, containerName, cmd string, ) string
ExecuteCMDEventually executes the command on pod container and returns stdout
func (*Operations) GetBDCCount ¶
func (ops *Operations) GetBDCCount(lSelector, namespace string) int
GetBDCCount gets BDC resource count based on provided label selector
func (*Operations) GetBDCCountEventually ¶
func (ops *Operations) GetBDCCountEventually(listOptions metav1.ListOptions, expectedBDCCount int, namespace string) int
GetBDCCountEventually gets BDC resource count based on provided list option.
func (*Operations) GetCSPCount ¶
func (ops *Operations) GetCSPCount(labelSelector string) int
GetCSPCount gets csp count based on spcName at that time
func (*Operations) GetCVCount ¶
func (ops *Operations) GetCVCount(namespace, lselector string) int
GetCVCount gives cstorvolume healthy count currently based on selecter
func (*Operations) GetCstorVolumeClaimCount ¶
func (ops *Operations) GetCstorVolumeClaimCount(namespace, cvcName string) int
GetCstorVolumeClaimCount gives cstorVolumeClaim healthy count currently
func (*Operations) GetCstorVolumeClaimCountEventually ¶
func (ops *Operations) GetCstorVolumeClaimCountEventually(namespace, cvcName string, expectedCVCCount int) bool
GetCstorVolumeClaimCountEventually gives the count of cstorvolume claim
func (*Operations) GetCstorVolumeCount ¶
func (ops *Operations) GetCstorVolumeCount(namespace, lselector string, expectedCVCount int) int
GetCstorVolumeCount gives the count of cstorvolume based on selecter
func (*Operations) GetCstorVolumeCountEventually ¶
func (ops *Operations) GetCstorVolumeCountEventually(namespace, lselector string, expectedCVCount int) bool
GetCstorVolumeCountEventually gives the count of cstorvolume based on selecter eventually
func (*Operations) GetCstorVolumeReplicaCount ¶
func (ops *Operations) GetCstorVolumeReplicaCount(namespace, lselector string) int
GetCstorVolumeReplicaCount gives cstorvolumereplica healthy count currently based on selecter
func (*Operations) GetCstorVolumeReplicaCountEventually ¶
func (ops *Operations) GetCstorVolumeReplicaCountEventually(namespace, lselector string, expectedCVRCount int) bool
GetCstorVolumeReplicaCountEventually gives the count of cstorvolume based on selecter eventually
func (*Operations) GetHealthyCSPCount ¶
func (ops *Operations) GetHealthyCSPCount(spcName string, expectedCSPCount int) int
GetHealthyCSPCount gets healthy csp based on spcName
func (*Operations) GetHealthyCSPCountEventually ¶
func (ops *Operations) GetHealthyCSPCountEventually(spcName string, expectedCSPCount int) bool
GetHealthyCSPCountEventually gets healthy csp based on spcName
func (*Operations) GetHealthyCSPICount ¶
func (ops *Operations) GetHealthyCSPICount(cspcName string, expectedCSPICount int) int
GetHealthyCSPICount gets healthy csp based on spcName
func (*Operations) GetPVNameFromPVCName ¶
func (ops *Operations) GetPVNameFromPVCName(pvcName string) string
GetPVNameFromPVCName gives the pv name for the given pvc
func (*Operations) GetPodCompletedCount ¶
func (ops *Operations) GetPodCompletedCount(namespace, lselector string) int
GetPodCompletedCount gives number of pods running currently
func (*Operations) GetPodCompletedCountEventually ¶
func (ops *Operations) GetPodCompletedCountEventually(namespace, lselector string, expectedPodCount int) int
GetPodCompletedCountEventually gives the number of pods running eventually
func (*Operations) GetPodRunningCount ¶
func (ops *Operations) GetPodRunningCount(namespace, lselector string) int
GetPodRunningCount gives number of pods running currently
func (*Operations) GetPodRunningCountEventually ¶
func (ops *Operations) GetPodRunningCountEventually(namespace, lselector string, expectedPodCount int) int
GetPodRunningCountEventually gives the number of pods running eventually
func (*Operations) GetReadyNodes ¶
func (ops *Operations) GetReadyNodes() *corev1.NodeList
GetReadyNodes gives cstorvolumereplica healthy count currently based on selecter
func (*Operations) GetSnapshotType ¶
func (ops *Operations) GetSnapshotType(snapName string) string
GetSnapshotType returns type of snapshot currently
func (*Operations) GetSnapshotTypeEventually ¶
func (ops *Operations) GetSnapshotTypeEventually(snapName string) string
GetSnapshotTypeEventually returns type of snapshot eventually
func (*Operations) IsCSPCDeletedEventually ¶
func (ops *Operations) IsCSPCDeletedEventually(cspcName string) bool
IsCSPCDeletedEventually tries to get the deleted cspc and returns true if cspc is not found else returns false
func (*Operations) IsFinalizerExistsOnBDC ¶
func (ops *Operations) IsFinalizerExistsOnBDC(bdcName, finalizer string) bool
IsFinalizerExistsOnBDC returns true if the object with provided name contains the finalizer.
func (*Operations) IsPVCBound ¶
func (ops *Operations) IsPVCBound(pvcName string) bool
IsPVCBound checks if the pvc is bound or not
func (*Operations) IsPVCBoundEventually ¶
func (ops *Operations) IsPVCBoundEventually(pvcName string) bool
IsPVCBoundEventually checks if the pvc is bound or not eventually
func (*Operations) IsPVCDeleted ¶
func (ops *Operations) IsPVCDeleted(pvcName string) bool
IsPVCDeleted tries to get the deleted pvc and returns true if pvc is not found else returns false
func (*Operations) IsPVCDeletedEventually ¶
func (ops *Operations) IsPVCDeletedEventually(pvcName string) bool
IsPVCDeletedEventually tries to get the deleted pvc and returns true if pvc is not found else returns false
func (*Operations) IsPodDeletedEventually ¶
func (ops *Operations) IsPodDeletedEventually(namespace, podName string) bool
IsPodDeletedEventually checks if the pod is deleted or not eventually
func (*Operations) IsPodRunningEventually ¶
func (ops *Operations) IsPodRunningEventually(namespace, podName string) bool
IsPodRunningEventually return true if the pod comes to running state
func (*Operations) IsSPCFinalizerExistsOnBDCs ¶
func (ops *Operations) IsSPCFinalizerExistsOnBDCs(listOptions metav1.ListOptions, spcFinalizer string) bool
IsSPCFinalizerExistsOnBDCs returns true if the all the BDCs( selected by provided list options) has spc finalizer on it.
func (*Operations) IsSPCFinalizerExistsOnSPC ¶
func (ops *Operations) IsSPCFinalizerExistsOnSPC(spcName, spcFinalizer string) bool
IsSPCFinalizerExistsOnSPC returns true if the spc with provided name contains the spc finalizer.
func (*Operations) IsSPCNotExists ¶
func (ops *Operations) IsSPCNotExists(spcName string) bool
IsSPCNotExists returns true if the spc with provided name does not exists.
func (*Operations) IsSnapshotDeleted ¶
func (ops *Operations) IsSnapshotDeleted(snapName string) bool
IsSnapshotDeleted checks if the snapshot is deleted or not
func (*Operations) PodDeleteCollection ¶
func (ops *Operations) PodDeleteCollection(ns string, lopts metav1.ListOptions) error
PodDeleteCollection deletes all the pods in a namespace matched the given labelselector
func (*Operations) RestartPodEventually ¶
func (ops *Operations) RestartPodEventually(podObj *corev1.Pod) error
RestartPodEventually restarts the pod and return
func (*Operations) VerifyCapacity ¶
func (ops *Operations) VerifyCapacity(pvcName, capacity string) bool
VerifyCapacity checks if the pvc capacity has been updated
func (*Operations) VerifyOpenebs ¶
func (ops *Operations) VerifyOpenebs(expectedPodCount int) *Operations
VerifyOpenebs verify running state of required openebs control plane components
func (*Operations) VerifyUpgradeResultTasksIsNotFail ¶
func (ops *Operations) VerifyUpgradeResultTasksIsNotFail(namespace, lselector string) bool
VerifyUpgradeResultTasksIsNotFail checks whether all the tasks in upgraderesult have success
type OperationsOptions ¶
type OperationsOptions func(*Operations)
OperationsOptions abstracts creating an instance of operations
func WithKubeConfigPath ¶
func WithKubeConfigPath(path string) OperationsOptions
WithKubeConfigPath sets the kubeConfig path against operations instance
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options holds the args used for exec'ing into the pod
func (*Options) WithCommand ¶
WithCommand fills the cmd field in Options struct
func (*Options) WithContainer ¶
WithContainer fills the container field in Options struct
func (*Options) WithNamespace ¶
WithNamespace fills the namespace field in Options struct
func (*Options) WithPodName ¶
WithPodName fills the podName field in Options struct