disk

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) error

func GetOwnerVm

func GetOwnerVm(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) (irs.VMInfo, error)

func List

func List(restClient *client.RestClient, requestOpts *client.RequestOpts) (*[]DiskInfo, error)

Types

type DiskInfo

type DiskInfo struct {
	ID        string
	Name      string `updateAble:"Name"`
	State     string
	Size      int `updateAble:"Size"`
	CreatedAt string

	// miscellaneous properties
	TemplateId  string `responseType:"KeyValue"`
	ClusterId   string `responseType:"KeyValue"`
	PoolId      string `responseType:"KeyValue"`
	Bootable    string `responseType:"KeyValue"`
	Iops        int    `responseType:"KeyValue"`
	Throughput  int    `responseType:"KeyValue"`
	Creator     string `responseType:"KeyValue"`
	Description string `responseType:"KeyValue" updateAble:"Description"`
	Dev         string `responseType:"KeyValue"`
}

func Create

func Create(restClient *client.RestClient, requestOpts *client.RequestOpts) (*DiskInfo, error)

func Get

func Get(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) (*DiskInfo, error)

func Update

func Update(restClient *client.RestClient, id string, requestOpts *client.RequestOpts) (*DiskInfo, error)

func (*DiskInfo) GetKeyValues

func (diskInfo *DiskInfo) GetKeyValues() []irs.KeyValue

func (*DiskInfo) ToIRSDisk

func (diskInfo *DiskInfo) ToIRSDisk(restClient *client.RestClient) irs.DiskInfo

func (*DiskInfo) ToUpdateDiskReqInfo

func (diskInfo *DiskInfo) ToUpdateDiskReqInfo() *DiskReqInfo

type DiskReqInfo

type DiskReqInfo struct {
	Name      string `json:"name,omitempty" required:"true"`
	ID        string `json:"volumeId,omitempty"`
	ClusterId string `json:"clusterId,omitempty" required:"true"`
	Size      int    `json:"size,omitempty" required:"true"`
	Mode      string `json:"mode,omitempty"`
}

Jump to

Keyboard shortcuts

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