Documentation ¶
Overview ¶
Package v2 contains common functions for creating block storage based resources for use in acceptance tests. See the `*_test.go` files for example usages.
Index ¶
- func CreateSnapshot(t *testing.T, client *gophercloud.ServiceClient, volume *volumes.Volume) (*snapshots.Snapshot, error)
- func CreateVolume(t *testing.T, client *gophercloud.ServiceClient) (*volumes.Volume, error)
- func CreateVolumeFromImage(t *testing.T, client *gophercloud.ServiceClient) (*volumes.Volume, error)
- func DeleteSnapshot(t *testing.T, client *gophercloud.ServiceClient, snapshot *snapshots.Snapshot)
- func DeleteVolume(t *testing.T, client *gophercloud.ServiceClient, volume *volumes.Volume)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 CreateVolumeFromImage ¶
func CreateVolumeFromImage(t *testing.T, client *gophercloud.ServiceClient) (*volumes.Volume, error)
CreateVolumeFromImage will create a volume from with a random name and size of 1GB. An error will be returned if the volume was unable to be created.
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.
Types ¶
This section is empty.