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 ¶
- func MockAttachResponse(t *testing.T)
- func MockDetachResponse(t *testing.T)
- func MockInitializeConnectionResponse(t *testing.T)
- func MockReserveResponse(t *testing.T)
- func MockTerminateConnectionResponse(t *testing.T)
- func MockUnreserveResponse(t *testing.T)
- type AttachMode
- type AttachOpts
- type AttachOptsBuilder
- type AttachResult
- type ConnectorOpts
- type ConnectorOptsBuilder
- type DetachResult
- type InitializeConnectionResult
- type ReserveResult
- type TerminateConnectionResult
- type UnreserveResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockAttachResponse ¶
func MockDetachResponse ¶
func MockReserveResponse ¶
func MockUnreserveResponse ¶
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 // 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 ¶
func (opts AttachOpts) ToVolumeAttachMap() (map[string]interface{}, error)
ToVolumeAttachMap assembles a request body based on the contents of a AttachOpts.
type AttachOptsBuilder ¶
AttachOptsBuilder allows extensions to add additional parameters to the Attach request.
type AttachResult ¶
type AttachResult struct {
// contains filtered or unexported fields
}
AttachResult contains the response body and error from a Get request.
func Attach ¶
func Attach(client *gophercloud.ServiceClient, id string, opts AttachOptsBuilder) AttachResult
Attach will attach a volume based on the values in AttachOpts.
type ConnectorOpts ¶
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 ¶
func (opts ConnectorOpts) ToConnectorMap() (map[string]interface{}, error)
ToConnectorMap assembles a request body based on the contents of a ConnectorOpts.
type ConnectorOptsBuilder ¶
ConnectorOptsBuilder allows extensions to add additional parameters to the InitializeConnection request.
type DetachResult ¶
type DetachResult struct {
// contains filtered or unexported fields
}
DetachResult contains the response body and error from a Get request.
func Detach ¶
func Detach(client *gophercloud.ServiceClient, id string) DetachResult
Attach will detach a volume based on volume id.
type InitializeConnectionResult ¶
type InitializeConnectionResult struct {
// contains filtered or unexported fields
}
InitializeConnectionResult contains the response body and error from a Get request.
func InitializeConnection ¶
func InitializeConnection(client *gophercloud.ServiceClient, id string, opts *ConnectorOpts) InitializeConnectionResult
InitializeConnection initializes iscsi connection.
type ReserveResult ¶
type ReserveResult struct {
// contains filtered or unexported fields
}
ReserveResult contains the response body and error from a Get request.
func Reserve ¶
func Reserve(client *gophercloud.ServiceClient, id string) ReserveResult
Reserve will reserve a volume based on volume id.
type TerminateConnectionResult ¶
type TerminateConnectionResult struct {
// contains filtered or unexported fields
}
TerminateConnectionResult contains the response body and error from a Get request.
func TerminateConnection ¶
func TerminateConnection(client *gophercloud.ServiceClient, id string, opts *ConnectorOpts) TerminateConnectionResult
TerminateConnection terminates iscsi connection.
type UnreserveResult ¶
type UnreserveResult struct {
// contains filtered or unexported fields
}
UnreserveResult contains the response body and error from a Get request.
func Unreserve ¶
func Unreserve(client *gophercloud.ServiceClient, id string) UnreserveResult
Unreserve will unreserve a volume based on volume id.