Documentation ¶
Index ¶
- Constants
- func ControllerIsRunning() error
- func CreateJSONFiles(newVolumeCreateRequest *VolumeCreateRequest, storageClassJSONFileName string, ...) error
- func CreatePV(newVolumeCreateRequest *VolumeCreateRequest, uniqueID int) error
- func CreateSC(jsonNameForSC string) error
- func CreateSSH() (*ssh.Session, error)
- func CreateVolumeList(VolCount int, uniqueID int) []string
- func DeletePV(uniqueID int) error
- func DeleteSC(jsonNameForSC string) error
- func ValidatePvDelete(newVolumeCreateRequest *VolumeCreateRequest) error
- func ValidatePvcreate(newVolumeCreateRequest *VolumeCreateRequest) (*[]VolumeCreateResponse, error)
- type MetadataPVC
- type MetadataSC
- type PVC
- type ParametersSC
- type RequestsPVC
- type ResourcesPVC
- type RunningPods
- type SpecPVC
- type StorageClass
- type VolumeCreateRequest
- type VolumeCreateResponse
Constants ¶
const (
Csiprovisioner = "csi-powermax"
)
Defination of constants
Variables ¶
This section is empty.
Functions ¶
func ControllerIsRunning ¶
func ControllerIsRunning() error
ControllerIsRunning will check whether csi controller pod is running
func CreateJSONFiles ¶
func CreateJSONFiles(newVolumeCreateRequest *VolumeCreateRequest, storageClassJSONFileName string, PVCJSONFileName string) error
CreateJSONFiles will generate json files dynamically
func CreatePV ¶
func CreatePV(newVolumeCreateRequest *VolumeCreateRequest, uniqueID int) error
CreatePV will get the dynamically created json file names and create storage class and pvc using the same
func CreateVolumeList ¶
CreateVolumeList will create list of volume names to be created
func DeletePV ¶
DeletePV deletes pvc files which is created as part of current scenario and also deletes storage class
func ValidatePvDelete ¶
func ValidatePvDelete(newVolumeCreateRequest *VolumeCreateRequest) error
ValidatePvDelete will validate whether volumes are deleted successfully and returns error status
func ValidatePvcreate ¶
func ValidatePvcreate(newVolumeCreateRequest *VolumeCreateRequest) (*[]VolumeCreateResponse, error)
ValidatePvcreate will validate whether intended volumes are created successfully and returns error status along with volume details and also we can validate other fields like size , storageClassName etc if needed
Types ¶
type MetadataPVC ¶
type MetadataPVC struct {
Name string `json:"name"`
}
MetadataPVC Struct had details of name of pvc
type MetadataSC ¶
type MetadataSC struct {
Name string `json:"name"`
}
MetadataSC struct had name details
type PVC ¶
type PVC struct { Apiversion string `json:"apiVersion"` Kind string `json:"kind"` Metadata MetadataPVC `json:"metadata"` Spec SpecPVC `json:"spec"` }
PVC Struct had all parameters for Persistent volume claim
type ParametersSC ¶
type ParametersSC struct { Symid string `json:"SYMID"` Srp string `json:"SRP"` ServiceLevel string `json:"ServiceLevel"` }
ParametersSC strucd had symid, srp details
type RequestsPVC ¶
type RequestsPVC struct {
Storage string `json:"storage"`
}
RequestsPVC Struct parameters for Persistent volume claim requests
type ResourcesPVC ¶
type ResourcesPVC struct {
Requests RequestsPVC `json:"requests"`
}
ResourcesPVC Struct parameters for Persistent volume claim resouces
type RunningPods ¶
RunningPods stores pod information
type SpecPVC ¶
type SpecPVC struct { AccessModes []string `json:"accessModes"` Resources ResourcesPVC `json:"resources"` StorageClassName string `json:"storageClassName"` }
SpecPVC Struct parameters for spec PVC
type StorageClass ¶
type StorageClass struct { Apiversion string `json:"apiVersion"` Kind string `json:"kind"` Metadata MetadataSC `json:"metadata"` Provisioner string `json:"provisioner"` ReclaimPolicy string `json:"reclaimPolicy"` Parameters ParametersSC `json:"parameters"` }
StorageClass struct details for all the parameters of sc