Documentation
¶
Index ¶
- Constants
- Variables
- func InvalidMIgrationPoicy(policy string) error
- type Attachment
- type Backup
- type Service
- type Snapshot
- type Volume
- func (volume Volume) GetAttachmentList() []string
- func (volume Volume) GetImageMetadataList() []string
- func (volume Volume) GetMetadataList() []string
- func (volume Volume) IsAvailable() bool
- func (volume Volume) IsBootable() bool
- func (volume Volume) IsError() bool
- func (volume Volume) IsInuse() bool
- type VolumeType
- type Volumes
Constants ¶
View Source
const ( KB = 1024 MB = KB * 1024 GB = MB * 1024 POLICY_NEVER = "never" POLICY_ON_DEMAND = "on-demand" )
Variables ¶
View Source
var MIGRATION_POLICYS = []string{POLICY_NEVER, POLICY_ON_DEMAND}
Functions ¶
func InvalidMIgrationPoicy ¶
Types ¶
type Attachment ¶
type Attachment struct { Id string `json:"id,omitempty"` ServerId string `json:"server_id,omitempty"` AttachmentId string `json:"attachment_id,omitempty"` Device string `json:"device,omitempty"` AttachmentAt string `json:"attached_at,omitempty"` HostName string `json:"host_name,omitempty"` VolumeId string `json:"volume_id,omitempty"` }
type Backup ¶
type Backup struct { model.Resource Size uint `json:"size,omitempty"` VolumeId string `json:"volume_id,omitempty"` ProjectId string `json:"os-extended-snapshot-attributes:project_id,omitempty"` Progress string `json:"os-extended-snapshot-attributes:progress,omitempty"` Metadata map[string]interface{} `json:"metadata:progress,omitempty"` }
type Snapshot ¶
type Snapshot struct { model.Resource Size uint `json:"size,omitempty"` VolumeId string `json:"volume_id,omitempty"` ProjectId string `json:"os-extended-snapshot-attributes:project_id,omitempty"` Progress string `json:"os-extended-snapshot-attributes:progress,omitempty"` Metadata map[string]interface{} `json:"metadata:progress,omitempty"` }
type Volume ¶
type Volume struct { model.Resource Size uint `json:"size,omitempty"` VolumeType string `json:"volume_type,omitempty"` Bootable string `json:"bootable"` Attachments []Attachment `json:"attachments"` Metadata map[string]string `json:"metadata"` AvailabilityZone string `json:"availability_zone"` Host string `json:"os-vol-host-attr:host"` Multiattach bool `json:"multiattach"` SourceVolid string `json:"source_volid"` GroupId string `json:"group_id"` TaskStatus string `json:"task_status"` VolumeImageMetadata map[string]string `json:"volume_image_metadata"` TenantId string `json:"os-vol-tenant-attr:tenant_id,omitempty"` }
func (Volume) GetAttachmentList ¶
func (Volume) GetImageMetadataList ¶
func (Volume) GetMetadataList ¶
func (Volume) IsAvailable ¶
func (Volume) IsBootable ¶
type VolumeType ¶
type VolumeType struct { model.Resource QosSpecsId string `json:"qos_specs_id,omitempty"` IsPublic bool `json:"is_public"` IsEncrypted bool `json:"is_encrypted"` OsVolumeTypeAccessIsPublic bool `json:"os-volume-type-access:is_public"` ExtraSpecs map[string]string `json:"extra_specs,omitempty"` }
func (VolumeType) GetExtraSpecsList ¶
func (volumeType VolumeType) GetExtraSpecsList() []string
Click to show internal directories.
Click to hide internal directories.