ccsdisk

package
v2.3.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionCreateDisk = "CsiCreateDisk"
	ActionDeleteDisk = "CsiDeleteDisk"
	ActionAttachDisk = "CsiAttachDisk"
	ActionDetachDisk = "CsiDetachDisk"
	ActionDiskStatus = "CsiDiskInfo"
	ActionDiskCount  = "CsiDiskCount"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachDiskArgs

type AttachDiskArgs struct {
	VolumeID string `json:"UUID"`
	NodeID   string `json:"VM_ID"`
}

type AttachDiskResponse

type AttachDiskResponse struct {
	Response
	TaskID string `json:"TaskId"`
}

func AttachDisk

func AttachDisk(args *AttachDiskArgs) (*AttachDiskResponse, error)

type CreateDiskArgs

type CreateDiskArgs struct {
	RegionID    string `json:"SiteId"`
	DiskType    string `json:"DiskType"`
	Size        int    `json:"Size"`
	Iops        int    `json:"IOPS"`
	ClusterName string `json:"ClusterName"`
}

type CreateDiskResponse

type CreateDiskResponse struct {
	Response
	Data struct {
		VolumeID string `json:"uuid"`
	} `json:"Data"`
	TaskID string `json:"TaskId"`
}

func CreateDisk

func CreateDisk(args *CreateDiskArgs) (*CreateDiskResponse, error)

type DeleteDiskArgs

type DeleteDiskArgs struct {
	VolumeID string `json:"UUID"`
}

type DeleteDiskResponse

type DeleteDiskResponse struct {
	Response
	VolumeID string `json:"disk_id"`
}

func DeleteDisk

func DeleteDisk(args *DeleteDiskArgs) (*DeleteDiskResponse, error)

type DescribeTaskStatusResponse

type DescribeTaskStatusResponse struct {
	Response
	Data struct {
		Status string `json:"status"`
	} `json:"Data"`
}

type DetachDiskArgs

type DetachDiskArgs struct {
	VolumeID string `json:"UUID"`
	NodeID   string `json:"VM_ID"`
}

type DetachDiskResponse

type DetachDiskResponse struct {
	Response
	TaskID string `json:"TaskId"`
}

func DetachDisk

func DetachDisk(args *DetachDiskArgs) (*DetachDiskResponse, error)

type DiskCountArgs

type DiskCountArgs struct {
	NodeID string `json:"VM_ID"`
}

type DiskCountResponse

type DiskCountResponse struct {
	Response
	Data struct {
		DiskCount int `json:"disk_count"`
	} `json:"Data"`
}

func GetDiskCount

func GetDiskCount(args *DiskCountArgs) (*DiskCountResponse, error)

type DiskInfoArgs

type DiskInfoArgs struct {
	VolumeID string `json:"UUID"`
}

type DiskInfoResponse

type DiskInfoResponse struct {
	Response
	Data struct {
		NodeID     string `json:"vm_id"`
		Status     string `json:"status"`
		TaskStatus string `json:"res_status"`
		VolumeId   string `json:"disk_id"`
		Mounted    int    `json:"is_load"`
		IsValid    int    `json:"is_valid"`
	} `json:"data"`
}

func GetDiskInfo

func GetDiskInfo(args *DiskInfoArgs) (*DiskInfoResponse, error)

type Response

type Response struct {
	Code     string `json:"Code"`
	Message  string `json:"Message"`
	CodeDesc string `json:"codeDesc,omitempty"`
}

Jump to

Keyboard shortcuts

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