volumes

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2015 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package volumes provides information and interaction with the volume API resource for the Rackspace Block Storage service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

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

Delete will delete the existing Volume with the provided ID.

func List

List returns volumes optionally limited by the conditions provided in ListOpts.

Types

type CreateOpts

type CreateOpts struct {
	os.CreateOpts
}

func (CreateOpts) ToVolumeCreateMap

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

type CreateResult

type CreateResult struct {
	os.CreateResult
}

CreateResult represents the result of a create operation

func Create

Create will create a new Volume based on the values in CreateOpts. To extract the Volume object from the response, call the Extract method on the CreateResult.

func (CreateResult) Extract

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

Extract will get the Volume object out of the CreateResult object.

type GetResult

type GetResult struct {
	os.GetResult
}

GetResult represents the result of a get operation

func Get

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

Get retrieves the Volume with the provided ID. To extract the Volume object from the response, call the Extract method on the GetResult.

func (GetResult) Extract

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

Extract will get the Volume object out of the GetResult object.

type UpdateOpts

type UpdateOpts struct {
	// OPTIONAL
	Name string
	// OPTIONAL
	Description string
}

UpdateOpts contain options for updating an existing Volume. This object is passed to the volumes.Update function. For more information about the parameters, see the Volume object.

func (UpdateOpts) ToVolumeUpdateMap

func (opts UpdateOpts) ToVolumeUpdateMap() (map[string]interface{}, error)

ToVolumeUpdateMap assembles a request body based on the contents of an UpdateOpts.

type UpdateResult

type UpdateResult struct {
	os.UpdateResult
}

UpdateResult represents the result of an update operation

func Update

Update will update the Volume with provided information. To extract the updated Volume from the response, call the Extract method on the UpdateResult.

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*Volume, error)

Extract will get the Volume object out of the UpdateResult object.

type Volume

type Volume os.Volume

Volume wraps an Openstack volume

func ExtractVolumes

func ExtractVolumes(page pagination.Page) ([]Volume, error)

ExtractVolumes extracts and returns Volumes. It is used while iterating over a volumes.List call.

Jump to

Keyboard shortcuts

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