Documentation ¶
Index ¶
- func DiskVolumeAttach(instanceName string, gcpProjectID string, zone string, deviceName string, ...) error
- func DiskVolumeDetach(instanceName string, gcpProjectID string, zone string, deviceName string) error
- func DiskVolumeStateCheck(gcpProjectID, zones, diskNames, deviceNames string) error
- func GetDiskVolumeState(diskName, gcpProjectID, instanceName, zone string) (string, error)
- func GetServiceAccountJSONFromSecret() ([]byte, error)
- func GetVMInstanceStatus(instanceName string, gcpProjectID string, instanceZone string) (string, error)
- func GetVolumeAttachmentDetails(gcpProjectID string, zone string, diskName string) (string, error)
- func InstanceStatusCheckByName(autoScalingGroup string, delay, timeout int, check string, ...) error
- func InstanceStatusCheckPostChaos(timeout, delay int, instanceNamesList []string, gcpProjectId string, ...) error
- func InstanceStatusCheckPreChaos(instanceNamesList []string, gcpProjectId string, instanceZonesList []string) error
- func VMInstanceStart(instanceName string, gcpProjectID string, instanceZone string) error
- func VMInstanceStop(instanceName string, gcpProjectID string, instanceZone string) error
- func WaitForVMInstanceDown(timeout int, delay int, instanceName string, gcpProjectID string, ...) error
- func WaitForVMInstanceUp(timeout int, delay int, instanceName string, gcpProjectID string, ...) error
- func WaitForVolumeAttachment(diskName, gcpProjectID, instanceName, zone string, delay, timeout int) error
- func WaitForVolumeDetachment(diskName, gcpProjectID, instanceName, zone string, delay, timeout int) error
- type GCPServiceAccountCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiskVolumeAttach ¶
func DiskVolumeAttach(instanceName string, gcpProjectID string, zone string, deviceName string, diskName string) error
DiskVolumeAttach will attach a disk volume to a VM instance
func DiskVolumeDetach ¶
func DiskVolumeDetach(instanceName string, gcpProjectID string, zone string, deviceName string) error
DiskVolumeDetach will detach a disk volume from a VM instance
func DiskVolumeStateCheck ¶
DiskVolumeStateCheck will check the attachment state of the given volume
func GetDiskVolumeState ¶
GetDiskVolumeState will verify and give the VM instance details along with the disk volume details
func GetServiceAccountJSONFromSecret ¶
GetServiceAccountJSONFromSecret fetches the secrets mounted as volume and returns the json credentials byte slice
func GetVMInstanceStatus ¶
func GetVMInstanceStatus(instanceName string, gcpProjectID string, instanceZone string) (string, error)
GetVMInstanceStatus returns the status of a VM instance
func GetVolumeAttachmentDetails ¶
GetVolumeAttachmentDetails returns the name of the VM instance attached to a disk volume
func InstanceStatusCheckByName ¶
func InstanceStatusCheckByName(autoScalingGroup string, delay, timeout int, check string, instanceNames string, gcpProjectId string, instanceZones string) error
InstanceStatusCheckByName is used to check the status of all the VM instances under chaos
func InstanceStatusCheckPostChaos ¶
func InstanceStatusCheckPostChaos(timeout, delay int, instanceNamesList []string, gcpProjectId string, instanceZonesList []string) error
InstanceStatusCheckPostChaos is used to check whether all VM instances under chaos are running or not with re-check
func InstanceStatusCheckPreChaos ¶
func InstanceStatusCheckPreChaos(instanceNamesList []string, gcpProjectId string, instanceZonesList []string) error
InstanceStatusCheckPreChaos is used to check whether all VM instances under chaos are running or not without any re-check
func VMInstanceStart ¶
VMInstanceStart starts a VM instance
func VMInstanceStop ¶
VMInstanceStop stops a VM Instance
func WaitForVMInstanceDown ¶
func WaitForVMInstanceDown(timeout int, delay int, instanceName string, gcpProjectID string, instanceZone string) error
WaitForVMInstanceDown will wait for the VM instance to attain the TERMINATED status
func WaitForVMInstanceUp ¶
func WaitForVMInstanceUp(timeout int, delay int, instanceName string, gcpProjectID string, instanceZone string) error
WaitForVMInstanceUp will wait for the VM instance to attain the RUNNING status
func WaitForVolumeAttachment ¶
func WaitForVolumeAttachment(diskName, gcpProjectID, instanceName, zone string, delay, timeout int) error
WaitForVolumeAttachment will wait for the disk volume to get attached to a VM instance
func WaitForVolumeDetachment ¶
func WaitForVolumeDetachment(diskName, gcpProjectID, instanceName, zone string, delay, timeout int) error
WaitForVolumeDetachment will wait for the disk volume to completely detach from a VM instance
Types ¶
type GCPServiceAccountCredentials ¶
type GCPServiceAccountCredentials struct { GCPType string `json:"type"` GCPProjectID string `json:"project_id"` GCPPrivateKeyID string `json:"private_key_id"` GCPPrivateKey string `json:"private_key"` GCPClientEmail string `json:"client_email"` GCPClientID string `json:"client_id"` GCPAuthURI string `json:"auth_uri"` GCPTokenURI string `json:"token_uri"` GCPAuthCertURL string `json:"auth_provider_x509_cert_url"` GCPClientCertURL string `json:"client_x509_cert_url"` }
GCPServiceAccountCredentials stores the service account credentials