Documentation ¶
Overview ¶
Package volumetypes provides information and interaction with volume types in the OpenStack Block Storage service. A volume type indicates the type of a block storage volume, such as SATA, SCSCI, SSD, etc. These can be customized or defined by the OpenStack admin.
You can also define extra_specs associated with your volume types. For instance, you could have a VolumeType=SATA, with extra_specs (RPM=10000, RAID-Level=5) . Extra_specs are defined and customized by the admin.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient) pagination.Pager
List returns all volume types.
Types ¶
type CreateOpts ¶
type CreateOpts struct { // See VolumeType. ExtraSpecs map[string]interface{} `json:"extra_specs,omitempty"` // See VolumeType. Name string `json:"name,omitempty"` }
CreateOpts are options for creating a volume type.
func (CreateOpts) ToVolumeTypeCreateMap ¶
func (opts CreateOpts) ToVolumeTypeCreateMap() (map[string]interface{}, error)
ToVolumeTypeCreateMap casts a CreateOpts struct to a map.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult contains the response body and error from a Create request.
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create will create a new volume. To extract the created volume type object, call the Extract method on the CreateResult.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*VolumeType, error)
Extract will get the Volume Type object out of the commonResult object.
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
DeleteResult contains the response error from a Delete request.
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
Delete will delete the volume type with the provided ID.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult contains the response body and error from a Get request.
func Get ¶
Get will retrieve the volume type with the provided ID. To extract the volume type from the result, call the Extract method on the GetResult.
func (GetResult) Extract ¶
func (r GetResult) Extract() (*VolumeType, error)
Extract will get the Volume Type object out of the commonResult object.
type VolumeType ¶
type VolumeType struct { ExtraSpecs map[string]interface{} `json:"extra_specs"` // user-defined metadata ID string `json:"id"` // unique identifier Name string `json:"name"` // display name }
VolumeType contains all information associated with an OpenStack Volume Type.
func ExtractVolumeTypes ¶
func ExtractVolumeTypes(r pagination.Page) ([]VolumeType, error)
ExtractVolumeTypes extracts and returns Volume Types.
type VolumeTypePage ¶
type VolumeTypePage struct {
pagination.SinglePageBase
}
VolumeTypePage is a pagination.Pager that is returned from a call to the List function.
func (VolumeTypePage) IsEmpty ¶
func (r VolumeTypePage) IsEmpty() (bool, error)
IsEmpty returns true if a VolumeTypePage contains no Volume Types.