Documentation ¶
Index ¶
- func Delete(client *golangsdk.ServiceClient, id string) (err error)
- type CreateOpts
- type ListOpts
- type UpdateOpts
- type Volume
- func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*Volume, error)
- func Get(client *golangsdk.ServiceClient, id string) (*Volume, error)
- func List(client *golangsdk.ServiceClient, opts ListOpts) ([]Volume, error)
- func Update(client *golangsdk.ServiceClient, id string, opts UpdateOpts) (*Volume, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateOpts ¶
type CreateOpts struct { Size int `json:"size" required:"true"` AvailabilityZone string `json:"availability_zone,omitempty"` Description string `json:"display_description,omitempty"` Metadata map[string]string `json:"metadata,omitempty"` Name string `json:"display_name,omitempty"` SnapshotID string `json:"snapshot_id,omitempty"` SourceVolID string `json:"source_volid,omitempty"` ImageID string `json:"imageRef,omitempty"` VolumeType string `json:"volume_type,omitempty"` }
type ListOpts ¶
type ListOpts struct { // admin-only option. Set it to true to see all tenant volumes. AllTenants bool `q:"all_tenants"` // List only volumes that contain Metadata. Metadata map[string]string `q:"metadata"` // List only volumes that have Name as the display name. Name string `q:"display_name"` // List only volumes that have a status of Status. Status string `q:"status"` }
type UpdateOpts ¶
type Volume ¶
type Volume struct { // Current status of the volume. Status string `json:"status"` // Human-readable display name for the volume. Name string `json:"display_name"` // Instances onto which the volume is attached. Attachments []map[string]interface{} `json:"attachments"` // This parameter is no longer used. AvailabilityZone string `json:"availability_zone"` // Indicates whether this is a bootable volume. Bootable string `json:"bootable"` // The date when this volume was created. CreatedAt time.Time `json:"-"` // Human-readable description for the volume. Description string `json:"display_description"` // The type of volume to create, either SATA or SSD. VolumeType string `json:"volume_type"` // The ID of the snapshot from which the volume was created SnapshotID string `json:"snapshot_id"` // The ID of another block storage volume from which the current volume was created SourceVolID string `json:"source_volid"` // Arbitrary key-value pairs defined by the user. Metadata map[string]string `json:"metadata"` // Unique identifier for the volume. ID string `json:"id"` // Size of the volume in GB. Size int `json:"size"` }
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*Volume, error)
func Update ¶
func Update(client *golangsdk.ServiceClient, id string, opts UpdateOpts) (*Volume, error)
func (*Volume) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.