Documentation
¶
Index ¶
- func NewOpenstackClient(cfg *Config) (*gophercloud.ProviderClient, error)
- type BlockStorage
- type Config
- type EndpointOpts
- type Global
- type IOpenstack
- type Openstack
- func (op *Openstack) AttachVolume(volumeID, mountPoint, hostName string) error
- func (op *Openstack) CheckBlockStorageAPI() error
- func (op *Openstack) CreateSnapShot(name string, sourceVolumeID string) (*snapshots.Snapshot, error)
- func (op *Openstack) CreateVolume(name, zone, volType, snapshotID, sourceVolID string, size int) (*volumes.Volume, error)
- func (op *Openstack) CreateVolumeAttachment(volumeID, instanceID string) (*attachments.Attachment, error)
- func (op *Openstack) DeleteSnapshot(snapshotID string) error
- func (op *Openstack) DeleteVolume(volumeID string) error
- func (op *Openstack) DeleteVolumeAttachment(volumeID string) error
- func (op *Openstack) DetachVolume(volumeID string) error
- func (op *Openstack) ExpandVolume(volumeID string, status string, size int) error
- func (op *Openstack) GetAttachmentByVolumeID(volumeID string) (*attachments.Attachment, error)
- func (op *Openstack) GetAvailability() (string, error)
- func (op *Openstack) GetBsOpts() BlockStorage
- func (op *Openstack) GetMaxVolumeLimit() int64
- func (op *Openstack) GetSnapshotByID(snapshotID string) (*snapshots.Snapshot, error)
- func (op *Openstack) GetVolumeAttachment(attachmentID string) (*attachments.Attachment, error)
- func (op *Openstack) GetVolumeByID(volumeID string) (*volumes.Volume, error)
- func (op *Openstack) GetVolumeByName(volumeName string) ([]volumes.Volume, error)
- func (op *Openstack) ListSnapshot(filter map[string]string) ([]snapshots.Snapshot, string, error)
- func (op *Openstack) ListVolume(maxLimit int32, marker string) ([]volumes.Volume, string, error)
- func (op *Openstack) VolumeAttachmentComplete(attachmentID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOpenstackClient ¶
func NewOpenstackClient(cfg *Config) (*gophercloud.ProviderClient, error)
Types ¶
type BlockStorage ¶
type Config ¶
type Config struct { Global BlockStorage }
type EndpointOpts ¶
type EndpointOpts struct { Region string Availability gophercloud.Availability }
type Global ¶
type Global struct { AuthUrl string `ini:"auth-url"` Username string `ini:"username"` Password string `ini:"password"` UserDomainName string `ini:"user-domain-name"` ProjectDomainName string `ini:"project-domain-name"` ProjectName string `ini:"project-name"` TenantName string `ini:"tenant-name"` RegionName string `ini:"region-name"` EndpointType gophercloud.Availability `ini:"endpoint-type"` }
type IOpenstack ¶
type IOpenstack interface { CreateVolume(name, zone, volType, snapshotID, sourceVolID string, size int) (*volumes.Volume, error) DeleteVolume(volumeID string) error AttachVolume(volumeID, mountPoint, hostName string) error DetachVolume(volumeID string) error GetVolumeByName(volumeName string) ([]volumes.Volume, error) GetVolumeByID(volumeID string) (*volumes.Volume, error) GetAvailability() (string, error) ListVolume(maxLimit int32, marker string) ([]volumes.Volume, string, error) CreateSnapShot(name string, sourceVolumeID string) (*snapshots.Snapshot, error) DeleteSnapshot(snapshotID string) error ListSnapshot(filter map[string]string) ([]snapshots.Snapshot, string, error) GetSnapshotByID(snapshotID string) (*snapshots.Snapshot, error) ExpandVolume(volumeID string, status string, size int) error GetBsOpts() BlockStorage CheckBlockStorageAPI() error GetMaxVolumeLimit() int64 CreateVolumeAttachment(volumeID, instanceID string) (*attachments.Attachment, error) GetVolumeAttachment(attachmentID string) (*attachments.Attachment, error) DeleteVolumeAttachment(volumeID string) error VolumeAttachmentComplete(attachmentID string) error GetAttachmentByVolumeID(volumeID string) (*attachments.Attachment, error) }
func CreateOpenstackClient ¶
func CreateOpenstackClient(cloudConf string) (IOpenstack, error)
type Openstack ¶
type Openstack struct { BlockStorageClient *gophercloud.ServiceClient EsOpts gophercloud.EndpointOpts BsOpts BlockStorage }
func (*Openstack) AttachVolume ¶
func (*Openstack) CheckBlockStorageAPI ¶
func (*Openstack) CreateSnapShot ¶
func (*Openstack) CreateVolume ¶
func (*Openstack) CreateVolumeAttachment ¶
func (op *Openstack) CreateVolumeAttachment(volumeID, instanceID string) (*attachments.Attachment, error)
func (*Openstack) DeleteSnapshot ¶
func (*Openstack) DeleteVolume ¶
func (*Openstack) DeleteVolumeAttachment ¶
func (*Openstack) DetachVolume ¶
func (*Openstack) ExpandVolume ¶
func (*Openstack) GetAttachmentByVolumeID ¶
func (op *Openstack) GetAttachmentByVolumeID(volumeID string) (*attachments.Attachment, error)
func (*Openstack) GetAvailability ¶
func (*Openstack) GetBsOpts ¶
func (op *Openstack) GetBsOpts() BlockStorage
func (*Openstack) GetMaxVolumeLimit ¶
func (*Openstack) GetSnapshotByID ¶
func (*Openstack) GetVolumeAttachment ¶
func (op *Openstack) GetVolumeAttachment(attachmentID string) (*attachments.Attachment, error)
func (*Openstack) GetVolumeByID ¶
func (*Openstack) GetVolumeByName ¶
func (*Openstack) ListSnapshot ¶
func (*Openstack) ListVolume ¶
func (*Openstack) VolumeAttachmentComplete ¶
Click to show internal directories.
Click to hide internal directories.