k8integration

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
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 CreateSC

func CreateSC(jsonNameForSC string) error

CreateSC creates storage class with json file name and returns error status

func CreateSSH

func CreateSSH() (*ssh.Session, error)

CreateSSH creates ssh connection to the kubernetes master

func CreateVolumeList

func CreateVolumeList(VolCount int, uniqueID int) []string

CreateVolumeList will create list of volume names to be created

func DeletePV

func DeletePV(uniqueID int) error

DeletePV deletes pvc files which is created as part of current scenario and also deletes storage class

func DeleteSC

func DeleteSC(jsonNameForSC string) error

DeleteSC deletes the storage class with json file name and returns error status

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

type RunningPods struct {
	NAME   string
	READY  string
	STATUS string
}

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

type VolumeCreateRequest

type VolumeCreateRequest struct {
	VolumeNames  []string
	SYMID        string
	SRP          string
	ServiceLevel string
	AccessModes  string
	VolSize      string
}

VolumeCreateRequest stores volume request information

type VolumeCreateResponse

type VolumeCreateResponse struct {
	NAME         string
	STATUS       string
	VOLUME       string
	CAPACITY     string
	ACMODES      string
	STORAGECLASS string
	AGE          string
}

VolumeCreateResponse stores volume response information

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL