volumeactions

package
v0.0.0-...-d5be3fe Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachMode

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

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

AttachOpts contains options for attaching a Volume.

func (AttachOpts) ToVolumeAttachMap

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

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

type AttachOptsBuilder

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

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

type AttachResult

type AttachResult struct {
	gophercloud.ErrResult
}

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

func Attach

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

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

type DetachOpts

type DetachOpts struct {
	AttachmentID string `json:"attachment_id,omitempty"`
}

func (DetachOpts) ToVolumeDetachMap

func (opts DetachOpts) ToVolumeDetachMap() (map[string]interface{}, error)

ToVolumeDetachMap assembles a request body based on the contents of a DetachOpts.

type DetachOptsBuilder

type DetachOptsBuilder interface {
	ToVolumeDetachMap() (map[string]interface{}, error)
}

DetachOptsBuilder allows extensions to add additional parameters to the Detach request.

type DetachResult

type DetachResult struct {
	gophercloud.ErrResult
}

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

func Detach

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

Detach will detach a volume based on volume id.

type InitializeConnectionOpts

type InitializeConnectionOpts struct {
	IP        string   `json:"ip,omitempty"`
	Host      string   `json:"host,omitempty"`
	Initiator string   `json:"initiator,omitempty"`
	Wwpns     []string `json:"wwpns,omitempty"`
	Wwnns     string   `json:"wwnns,omitempty"`
	Multipath *bool    `json:"multipath,omitempty"`
	Platform  string   `json:"platform,omitempty"`
	OSType    string   `json:"os_type,omitempty"`
}

InitializeConnectionOpts hosts options for InitializeConnection.

func (InitializeConnectionOpts) ToVolumeInitializeConnectionMap

func (opts InitializeConnectionOpts) ToVolumeInitializeConnectionMap() (map[string]interface{}, error)

ToVolumeInitializeConnectionMap assembles a request body based on the contents of a InitializeConnectionOpts.

type InitializeConnectionOptsBuilder

type InitializeConnectionOptsBuilder interface {
	ToVolumeInitializeConnectionMap() (map[string]interface{}, error)
}

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

type InitializeConnectionResult

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

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

func InitializeConnection

InitializeConnection initializes iscsi connection.

func (InitializeConnectionResult) Extract

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

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

type ReserveResult

type ReserveResult struct {
	gophercloud.ErrResult
}

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

func Reserve

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

Reserve will reserve a volume based on volume id.

type TerminateConnectionOpts

type TerminateConnectionOpts struct {
	IP        string   `json:"ip,omitempty"`
	Host      string   `json:"host,omitempty"`
	Initiator string   `json:"initiator,omitempty"`
	Wwpns     []string `json:"wwpns,omitempty"`
	Wwnns     string   `json:"wwnns,omitempty"`
	Multipath *bool    `json:"multipath,omitempty"`
	Platform  string   `json:"platform,omitempty"`
	OSType    string   `json:"os_type,omitempty"`
}

TerminateConnectionOpts hosts options for TerminateConnection.

func (TerminateConnectionOpts) ToVolumeTerminateConnectionMap

func (opts TerminateConnectionOpts) ToVolumeTerminateConnectionMap() (map[string]interface{}, error)

ToVolumeTerminateConnectionMap assembles a request body based on the contents of a TerminateConnectionOpts.

type TerminateConnectionOptsBuilder

type TerminateConnectionOptsBuilder interface {
	ToVolumeTerminateConnectionMap() (map[string]interface{}, error)
}

TerminateConnectionOptsBuilder allows extensions to add additional parameters to the TerminateConnection request.

type TerminateConnectionResult

type TerminateConnectionResult struct {
	gophercloud.ErrResult
}

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

func TerminateConnection

TerminateConnection terminates iscsi connection.

type UnreserveResult

type UnreserveResult struct {
	gophercloud.ErrResult
}

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

func Unreserve

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

Unreserve will unreserve a volume based on volume id.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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