cinder

package
v0.0.0-...-e4c7a12 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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

func InvalidMIgrationPoicy(policy string) error

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 Service

type Service struct {
	model.Resource
	Host           string `json:"host,omitempty"`
	Binary         string `json:"binary,omitempty"`
	Zone           string `json:"zone,omitempty"`
	Status         string `json:"status,omitempty"`
	State          string `json:"state,omitempty"`
	DisabledReason string `json:"disabled_reason,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 Volume) GetAttachmentList() []string

func (Volume) GetImageMetadataList

func (volume Volume) GetImageMetadataList() []string

func (Volume) GetMetadataList

func (volume Volume) GetMetadataList() []string

func (Volume) IsAvailable

func (volume Volume) IsAvailable() bool

func (Volume) IsBootable

func (volume Volume) IsBootable() bool

func (Volume) IsError

func (volume Volume) IsError() bool

func (Volume) IsInuse

func (volume Volume) IsInuse() bool

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

type Volumes

type Volumes []Volume

Jump to

Keyboard shortcuts

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