gophercloud: github.com/rackspace/gophercloud/openstack/blockstorage/v2/extensions/volumeactions Index | Files

package volumeactions

import "github.com/rackspace/gophercloud/openstack/blockstorage/v2/extensions/volumeactions"

Package volumeactions provides information and interaction with volumes in the OpenStack Block Storage service. A volume is a detachable block storage device, akin to a USB hard drive. It can only be attached to one instance at a time.

Index

Package Files

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

func MockAttachResponse Uses

func MockAttachResponse(t *testing.T)

func MockDetachResponse Uses

func MockDetachResponse(t *testing.T)

func MockInitializeConnectionResponse Uses

func MockInitializeConnectionResponse(t *testing.T)

func MockReserveResponse Uses

func MockReserveResponse(t *testing.T)

func MockTerminateConnectionResponse Uses

func MockTerminateConnectionResponse(t *testing.T)

func MockUnreserveResponse Uses

func MockUnreserveResponse(t *testing.T)

type AttachMode Uses

type AttachMode string

AttachMode describes the attachment mode for volumes.

const (
    ReadOnly  AttachMode = "ro"
    ReadWrite AttachMode = "rw"
)

These constants determine how a volume is attached

type AttachOpts Uses

type AttachOpts struct {
    // The mountpoint of this volume
    MountPoint string
    // The nova instance ID, can't set simultaneously with HostName
    InstanceUUID string
    // The hostname of baremetal host, can't set simultaneously with InstanceUUID
    HostName string
    // Mount mode of this volume
    Mode AttachMode
}

AttachOpts contains options for attaching a Volume.

func (AttachOpts) ToVolumeAttachMap Uses

func (opts AttachOpts) ToVolumeAttachMap() (map[string]interface{}, error)

ToVolumeAttachMap assembles a request body based on the contents of a AttachOpts.

type AttachOptsBuilder Uses

type AttachOptsBuilder interface {
    ToVolumeAttachMap() (map[string]interface{}, error)
}

AttachOptsBuilder allows extensions to add additional parameters to the Attach request.

type AttachResult Uses

type AttachResult struct {
    gophercloud.ErrResult
}

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

func Attach Uses

func Attach(client *gophercloud.ServiceClient, id string, opts AttachOptsBuilder) AttachResult

Attach will attach a volume based on the values in AttachOpts.

type ConnectorOpts Uses

type ConnectorOpts struct {
    IP        string
    Host      string
    Initiator string
    Wwpns     []string
    Wwnns     string
    Multipath bool
    Platform  string
    OSType    string
}

ConnectorOpts hosts options for InitializeConnection.

func (ConnectorOpts) ToConnectorMap Uses

func (opts ConnectorOpts) ToConnectorMap() (map[string]interface{}, error)

ToConnectorMap assembles a request body based on the contents of a ConnectorOpts.

type ConnectorOptsBuilder Uses

type ConnectorOptsBuilder interface {
    ToConnectorMap() (map[string]interface{}, error)
}

ConnectorOptsBuilder allows extensions to add additional parameters to the InitializeConnection request.

type DetachResult Uses

type DetachResult struct {
    gophercloud.ErrResult
}

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

func Detach Uses

func Detach(client *gophercloud.ServiceClient, id string) DetachResult

Attach will detach a volume based on volume id.

type InitializeConnectionResult Uses

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

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

func InitializeConnection Uses

func InitializeConnection(client *gophercloud.ServiceClient, id string, opts *ConnectorOpts) InitializeConnectionResult

InitializeConnection initializes iscsi connection.

func (InitializeConnectionResult) Extract Uses

func (r InitializeConnectionResult) Extract() (map[string]interface{}, error)

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

type ReserveResult Uses

type ReserveResult struct {
    gophercloud.ErrResult
}

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

func Reserve Uses

func Reserve(client *gophercloud.ServiceClient, id string) ReserveResult

Reserve will reserve a volume based on volume id.

type TerminateConnectionResult Uses

type TerminateConnectionResult struct {
    gophercloud.ErrResult
}

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

func TerminateConnection Uses

func TerminateConnection(client *gophercloud.ServiceClient, id string, opts *ConnectorOpts) TerminateConnectionResult

TerminateConnection terminates iscsi connection.

type UnreserveResult Uses

type UnreserveResult struct {
    gophercloud.ErrResult
}

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

func Unreserve Uses

func Unreserve(client *gophercloud.ServiceClient, id string) UnreserveResult

Unreserve will unreserve a volume based on volume id.

Package volumeactions imports 7 packages (graph) and is imported by 4 packages. Updated 2016-07-25. Refresh now. Tools for package owners.