Documentation
¶
Index ¶
- func Attach(client *golangsdk.ServiceClient, id string, opts AttachOpts) (err error)
- func BeginDetaching(client *golangsdk.ServiceClient, id string) (err error)
- func Detach(client *golangsdk.ServiceClient, id string, opts DetachOpts) (err error)
- func ExtendSize(client *golangsdk.ServiceClient, id string, opts ExtendSizeOpts) (err error)
- func ForceDelete(client *golangsdk.ServiceClient, id string) (err error)
- func InitializeConnection(client *golangsdk.ServiceClient, id string, opts InitializeConnectionOpts) (map[string]interface{}, error)
- func Reserve(client *golangsdk.ServiceClient, id string) (err error)
- func TerminateConnection(client *golangsdk.ServiceClient, id string, opts TerminateConnectionOpts) (err error)
- func Unreserve(client *golangsdk.ServiceClient, id string) (err error)
- type AttachMode
- type AttachOpts
- type DetachOpts
- type ExtendSizeOpts
- type ImageVolumeType
- type InitializeConnectionOpts
- type TerminateConnectionOpts
- type UploadImageOpts
- type VolumeImage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Attach ¶
func Attach(client *golangsdk.ServiceClient, id string, opts AttachOpts) (err error)
func BeginDetaching ¶
func Detach ¶
func Detach(client *golangsdk.ServiceClient, id string, opts DetachOpts) (err error)
func ExtendSize ¶
func ExtendSize(client *golangsdk.ServiceClient, id string, opts ExtendSizeOpts) (err error)
func ForceDelete ¶
func InitializeConnection ¶
func InitializeConnection(client *golangsdk.ServiceClient, id string, opts InitializeConnectionOpts) (map[string]interface{}, error)
func TerminateConnection ¶
func TerminateConnection(client *golangsdk.ServiceClient, id string, opts TerminateConnectionOpts) (err error)
Types ¶
type AttachMode ¶
type AttachMode string
const ( ReadOnly AttachMode = "ro" ReadWrite AttachMode = "rw" )
type AttachOpts ¶
type AttachOpts struct {
// The mountpoint of this volume.
MountPoint string `json:"mountpoint,omitempty"`
// The nova instance ID, can't set simultaneously with HostName.
InstanceUUID string `json:"instance_uuid,omitempty"`
// The hostname of baremetal host, can't set simultaneously with InstanceUUID.
HostName string `json:"host_name,omitempty"`
// Mount mode of this volume.
Mode AttachMode `json:"mode,omitempty"`
}
type DetachOpts ¶
type DetachOpts struct {
// AttachmentID is the ID of the attachment between a volume and instance.
AttachmentID string `json:"attachment_id,omitempty"`
}
type ExtendSizeOpts ¶
type ExtendSizeOpts struct {
// NewSize is the new size of the volume, in GB.
NewSize int `json:"new_size" required:"true"`
}
type ImageVolumeType ¶
type ImageVolumeType struct {
// The ID of a volume type.
ID string `json:"id"`
// Human-readable display name for the volume type.
Name string `json:"name"`
// Human-readable description for the volume type.
Description string `json:"display_description"`
// Flag for public access.
IsPublic bool `json:"is_public"`
// Extra specifications for volume type.
ExtraSpecs map[string]interface{} `json:"extra_specs"`
// ID of quality of service specs.
QosSpecsID string `json:"qos_specs_id"`
// Flag for deletion status of volume type.
Deleted bool `json:"deleted"`
// The date when volume type was deleted.
DeletedAt time.Time `json:"-"`
// The date when volume type was created.
CreatedAt time.Time `json:"-"`
// The date when this volume was last updated.
UpdatedAt time.Time `json:"-"`
}
func (*ImageVolumeType) UnmarshalJSON ¶
func (r *ImageVolumeType) UnmarshalJSON(b []byte) error
type InitializeConnectionOpts ¶
type InitializeConnectionOpts struct {
IP string `json:"ip,omitempty"`
Host string `json:"host,omitempty"`
Initiator string `json:"initiator,omitempty"`
Wwpns []string `json:"wwpns,omitempty"`
Wwnns string `json:"wwnns,omitempty"`
Multipath *bool `json:"multipath,omitempty"`
Platform string `json:"platform,omitempty"`
OSType string `json:"os_type,omitempty"`
}
type TerminateConnectionOpts ¶
type TerminateConnectionOpts struct {
IP string `json:"ip,omitempty"`
Host string `json:"host,omitempty"`
Initiator string `json:"initiator,omitempty"`
Wwpns []string `json:"wwpns,omitempty"`
Wwnns string `json:"wwnns,omitempty"`
Multipath *bool `json:"multipath,omitempty"`
Platform string `json:"platform,omitempty"`
OSType string `json:"os_type,omitempty"`
}
func (TerminateConnectionOpts) ToVolumeTerminateConnectionMap ¶
func (opts TerminateConnectionOpts) ToVolumeTerminateConnectionMap() (map[string]interface{}, error)
type UploadImageOpts ¶
type UploadImageOpts struct {
// Container format, may be bare, ofv, ova, etc.
ContainerFormat string `json:"container_format,omitempty"`
// Disk format, may be raw, qcow2, vhd, vdi, vmdk, etc.
DiskFormat string `json:"disk_format,omitempty"`
// The name of image that will be stored in glance.
ImageName string `json:"image_name,omitempty"`
// Force image creation, usable if volume attached to instance.
Force bool `json:"force,omitempty"`
}
type VolumeImage ¶
type VolumeImage struct {
// The ID of a volume an image is created from.
VolumeID string `json:"id"`
// Container format, may be bare, ofv, ova, etc.
ContainerFormat string `json:"container_format"`
// Disk format, may be raw, qcow2, vhd, vdi, vmdk, etc.
DiskFormat string `json:"disk_format"`
// Human-readable description for the volume.
Description string `json:"display_description"`
// The ID of the created image.
ImageID string `json:"image_id"`
// Human-readable display name for the image.
ImageName string `json:"image_name"`
// Size of the volume in GB.
Size int `json:"size"`
// Current status of the volume.
Status string `json:"status"`
// The date when this volume was last updated.
UpdatedAt time.Time `json:"-"`
// Volume type object of used volume.
VolumeType ImageVolumeType `json:"volume_type"`
}
func UploadImage ¶
func UploadImage(client *golangsdk.ServiceClient, id string, opts UploadImageOpts) (*VolumeImage, error)
func (*VolumeImage) UnmarshalJSON ¶
func (r *VolumeImage) UnmarshalJSON(b []byte) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.