gophercloud: github.com/rackspace/gophercloud/openstack/blockstorage/v1/volumetypes Index | Files

package volumetypes

import "github.com/rackspace/gophercloud/openstack/blockstorage/v1/volumetypes"

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

Package Files

doc.go requests.go results.go urls.go

func ExtractVolumeTypes Uses

func ExtractVolumeTypes(page pagination.Page) ([]VolumeType, error)

ExtractVolumeTypes extracts and returns Volume Types.

func List Uses

func List(client *gophercloud.ServiceClient) pagination.Pager

List returns all volume types.

type CreateOpts Uses

type CreateOpts struct {
    // OPTIONAL. See VolumeType.
    ExtraSpecs map[string]interface{}
    // OPTIONAL. See VolumeType.
    Name string
}

CreateOpts are options for creating a volume type.

func (CreateOpts) ToVolumeTypeCreateMap Uses

func (opts CreateOpts) ToVolumeTypeCreateMap() (map[string]interface{}, error)

ToVolumeTypeCreateMap casts a CreateOpts struct to a map.

type CreateOptsBuilder Uses

type CreateOptsBuilder interface {
    ToVolumeTypeCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder allows extensions to add additional parameters to the Create request.

type CreateResult Uses

type CreateResult struct {
    // contains filtered or unexported fields
}

CreateResult contains the response body and error from a Create request.

func Create Uses

func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) CreateResult

Create will create a new volume. To extract the created volume type object, call the Extract method on the CreateResult.

func (CreateResult) Extract Uses

func (r CreateResult) Extract() (*VolumeType, error)

Extract will get the Volume Type object out of the commonResult object.

type DeleteResult Uses

type DeleteResult struct {
    gophercloud.ErrResult
}

DeleteResult contains the response error from a Delete request.

func Delete Uses

func Delete(client *gophercloud.ServiceClient, id string) DeleteResult

Delete will delete the volume type with the provided ID.

type GetResult Uses

type GetResult struct {
    // contains filtered or unexported fields
}

GetResult contains the response body and error from a Get request.

func Get Uses

func Get(client *gophercloud.ServiceClient, id string) GetResult

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 Uses

func (r GetResult) Extract() (*VolumeType, error)

Extract will get the Volume Type object out of the commonResult object.

type ListResult Uses

type ListResult struct {
    pagination.SinglePageBase
}

ListResult is a pagination.Pager that is returned from a call to the List function.

func (ListResult) IsEmpty Uses

func (r ListResult) IsEmpty() (bool, error)

IsEmpty returns true if a ListResult contains no Volume Types.

type VolumeType Uses

type VolumeType struct {
    ExtraSpecs map[string]interface{} `json:"extra_specs" mapstructure:"extra_specs"` // user-defined metadata
    ID         string                 `json:"id" mapstructure:"id"`                   // unique identifier
    Name       string                 `json:"name" mapstructure:"name"`               // display name
}

VolumeType contains all information associated with an OpenStack Volume Type.

Package volumetypes imports 3 packages (graph) and is imported by 2 packages. Updated 2016-07-23. Refresh now. Tools for package owners.