Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AttachOpts ¶
type AttachOpts struct { // Indicates the disk device name. // NOTE: // The new disk device name cannot be the same as an existing one. // This parameter is mandatory for Xen ECSs. Set the parameter value to /dev/sda for the system disks of such ECSs // and to /dev/sdx for data disks, where x is a letter in alphabetical order. For example, if there are two data // disks, set the device names of the two data disks to /dev/sdb and /dev/sdc, respectively. If you set a device // name starting with /dev/vd, the system uses /dev/sd by default. // For KVM ECSs, set the parameter value to /dev/vda for system disks. The device names for data disks of KVM ECSs // are optional. If the device names of data disks are required, set them in alphabetical order. For example, if // there are two data disks, set the device names of the two data disks to /dev/vdb and /dev/vdc, respectively. // If you set a device name starting with /dev/sd, the system uses /dev/vd by default. Device string `json:"device"` // Specifies the ID of the disk to be attached. The value is in UUID format. VolumeId string `json:"volumeId" required:"true"` // Specifies the ID of the ECS to which the disk will be attached. ServerId string `json:"-" required:"true"` }
AttachOpts is the structure required by the Attach method to mount the disk.
type DetachOpts ¶
type DetachOpts struct { // Indicates whether to forcibly detach a data disk. // If yes, set it to 1. // If no, set it to 0. // Defaults to 0. DeleteFlag int `q:"delete_flag"` // Specifies the ID of the ECS to which the disk will be detached. ServerId string `json:"-" required:"true"` }
DetachOpts is the structure required by the Detach method to unmount a disk from the cloud server.
type ErrorResponse ¶
type ErrorResponse struct { // Response error. Error Error `json:"error"` }
type GetResult ¶
type GetResult struct {
golangsdk.Result
}
func (GetResult) Extract ¶
func (r GetResult) Extract() (*VolumeAttachment, error)
func (GetResult) ExtractInto ¶
type VolumeAttachment ¶
type VolumeAttachment struct { // Specifies the ECS ID in UUID format. ServerId string `json:"serverId"` // Specifies the EVS disk ID in UUID format. VolumeId string `json:"volumeId"` // Specifies the mount ID, which is the same as the EVS disk ID. // The value is in UUID format. Id string `json:"id"` // Specifies the drive letter of the EVS disk, which is the device name of the EVS disk. Device string `json:"device"` // Specifies the PCI address. PciAddress string `json:"pciAddress"` // Specifies the EVS disk size in GB. Size int `json:"size"` // Specifies the EVS disk boot sequence. // 0 indicates the system disk. // Non-0 indicates a data disk. BootIndex int `json:"bootIndex"` // Specifies the disk bus type. // Options: virtio and scsi BusType string `json:"bus"` }
VolumeAttachment is the structure of the detail of disk mounting.
func List ¶
func List(c *golangsdk.ServiceClient, serverId string) ([]VolumeAttachment, error)
List is a method to obtain the list of volume attachment details for specified cloud server.
func (*VolumeAttachment) UnmarshalJSON ¶
func (r *VolumeAttachment) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.