v3

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v3 contains common functions for creating block storage based resources for use in acceptance tests. See the `*_test.go` files for example usages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePrivateVolumeType added in v0.17.0

func CreatePrivateVolumeType(t *testing.T, client *gophercloud.ServiceClient) (*volumetypes.VolumeType, error)

CreatePrivateVolumeType will create a private volume type with a random name and no extra specs. An error will be returned if the volume type was unable to be created.

func CreateQoS added in v0.17.0

func CreateQoS(t *testing.T, client *gophercloud.ServiceClient) (*qos.QoS, error)

CreateQoS will create a QoS with one spec and a random name. An error will be returned if the volume was unable to be created.

func CreateSnapshot

func CreateSnapshot(t *testing.T, client *gophercloud.ServiceClient, volume *volumes.Volume) (*snapshots.Snapshot, error)

CreateSnapshot will create a snapshot of the specified volume. Snapshot will be assigned a random name and description.

func CreateVolume

func CreateVolume(t *testing.T, client *gophercloud.ServiceClient) (*volumes.Volume, error)

CreateVolume will create a volume with a random name and size of 1GB. An error will be returned if the volume was unable to be created.

func CreateVolumeAttachment added in v0.10.0

func CreateVolumeAttachment(t *testing.T, client *gophercloud.ServiceClient, volume *v3.Volume, server *servers.Server) error

CreateVolumeAttachment will attach a volume to an instance. An error will be returned if the attachment failed.

func CreateVolumeType

func CreateVolumeType(t *testing.T, client *gophercloud.ServiceClient) (*volumetypes.VolumeType, error)

CreateVolumeType will create a volume type with a random name. An error will be returned if the volume was unable to be created.

func CreateVolumeTypeNoExtraSpecs added in v0.16.0

func CreateVolumeTypeNoExtraSpecs(t *testing.T, client *gophercloud.ServiceClient) (*volumetypes.VolumeType, error)

CreateVolumeTypeNoExtraSpecs will create a volume type with a random name and no extra specs. This is required to bypass cinder-scheduler filters and be able to create a volume with this volumeType. An error will be returned if the volume type was unable to be created.

func CreateVolumeWithType added in v0.16.0

func CreateVolumeWithType(t *testing.T, client *gophercloud.ServiceClient, vt *volumetypes.VolumeType) (*volumes.Volume, error)

CreateVolumeWithType will create a volume of the given volume type with a random name and size of 1GB. An error will be returned if the volume was unable to be created.

func DeleteQoS added in v0.17.0

func DeleteQoS(t *testing.T, client *gophercloud.ServiceClient, qs *qos.QoS)

DeleteQoS will delete a QoS. A fatal error will occur if the QoS failed to be deleted. This works best when used as a deferred function.

func DeleteSnapshot

func DeleteSnapshot(t *testing.T, client *gophercloud.ServiceClient, snapshot *snapshots.Snapshot)

DeleteSnapshot will delete a snapshot. A fatal error will occur if the snapshot failed to be deleted.

func DeleteVolume

func DeleteVolume(t *testing.T, client *gophercloud.ServiceClient, volume *volumes.Volume)

DeleteVolume will delete a volume. A fatal error will occur if the volume failed to be deleted. This works best when used as a deferred function.

func DeleteVolumeAttachment added in v0.10.0

func DeleteVolumeAttachment(t *testing.T, client *gophercloud.ServiceClient, volume *v3.Volume)

DeleteVolumeAttachment will detach a volume from an instance. A fatal error will occur if the attachment failed to be deleted.

func DeleteVolumeType

func DeleteVolumeType(t *testing.T, client *gophercloud.ServiceClient, vt *volumetypes.VolumeType)

DeleteVolumeType will delete a volume type. A fatal error will occur if the volume type failed to be deleted. This works best when used as a deferred function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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