v2

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptTransfer

func AcceptTransfer(t *testing.T, client *gophercloud.ServiceClient, transferRequest *sharetransfers.Transfer) error

func AccessRightToShareAccess

func AccessRightToShareAccess(accessRight *shares.AccessRight) *shareaccessrules.ShareAccess

AccessRightToShareAccess is a helper function that converts shares.AccessRight into shareaccessrules.ShareAccess struct.

func CreateReplica

func CreateReplica(t *testing.T, client *gophercloud.ServiceClient, share *shares.Share) (*replicas.Replica, error)

CreateReplica will create a replica from shareID. An error will be returned if the replica could not be created.

func CreateSecurityService

func CreateSecurityService(t *testing.T, client *gophercloud.ServiceClient) (*securityservices.SecurityService, error)

CreateSecurityService will create a security service with a random name. An error will be returned if the security service was unable to be created.

func CreateShare

func CreateShare(t *testing.T, client *gophercloud.ServiceClient, optShareType ...string) (*shares.Share, error)

CreateShare will create a share with a name, and a size of 1Gb. An error will be returned if the share could not be created

func CreateShareNetwork

func CreateShareNetwork(t *testing.T, client *gophercloud.ServiceClient) (*sharenetworks.ShareNetwork, error)

CreateShareNetwork will create a share network with a random name. An error will be returned if the share network was unable to be created.

func CreateShareType

func CreateShareType(t *testing.T, client *gophercloud.ServiceClient) (*sharetypes.ShareType, error)

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

func CreateSnapshot

func CreateSnapshot(t *testing.T, client *gophercloud.ServiceClient, shareID string) (*snapshots.Snapshot, error)

CreateSnapshot will create a snapshot from the share ID with a name. An error will be returned if the snapshot could not be created

func CreateTransferRequest

func CreateTransferRequest(t *testing.T, client *gophercloud.ServiceClient, share *shares.Share, name string) (*sharetransfers.Transfer, error)

func DeleteReplica

func DeleteReplica(t *testing.T, client *gophercloud.ServiceClient, replica *replicas.Replica)

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

func DeleteSecurityService

func DeleteSecurityService(t *testing.T, client *gophercloud.ServiceClient, securityService *securityservices.SecurityService)

DeleteSecurityService will delete a security service. An error will occur if the security service was unable to be deleted.

func DeleteShare

func DeleteShare(t *testing.T, client *gophercloud.ServiceClient, share *shares.Share)

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

func DeleteShareNetwork

func DeleteShareNetwork(t *testing.T, client *gophercloud.ServiceClient, shareNetworkID string)

DeleteShareNetwork will delete a share network. An error will occur if the share network was unable to be deleted.

func DeleteShareType

func DeleteShareType(t *testing.T, client *gophercloud.ServiceClient, shareType *sharetypes.ShareType)

DeleteShareType will delete a share type. An error will occur if the share type was unable to be deleted.

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. This works best when used as a deferred function.

func DeleteTransferRequest

func DeleteTransferRequest(t *testing.T, client *gophercloud.ServiceClient, transfer *sharetransfers.Transfer)

func ExtendShare

func ExtendShare(t *testing.T, client *gophercloud.ServiceClient, share *shares.Share, newSize int) error

ExtendShare extends the capacity of an existing share

func GetAccessRightsSlice

func GetAccessRightsSlice(t *testing.T, client *gophercloud.ServiceClient, share *shares.Share) ([]shares.AccessRight, error)

GetAccessRightsSlice will retrieve all access rules assigned to a share. A fatal error will occur if this operation fails.

func GrantAccess

func GrantAccess(t *testing.T, client *gophercloud.ServiceClient, share *shares.Share) (*shares.AccessRight, error)

GrantAccess will grant access to an existing share. A fatal error will occur if this operation fails.

func ListShareReplicas

func ListShareReplicas(t *testing.T, client *gophercloud.ServiceClient, shareID string) ([]replicas.Replica, error)

ListShareReplicas lists all replicas that belong to shareID. An error will be returned if the replicas could not be listed..

func ListShares

func ListShares(t *testing.T, client *gophercloud.ServiceClient) ([]shares.Share, error)

ListShares lists all shares that belong to this tenant's project. An error will be returned if the shares could not be listed..

func ListSnapshots

func ListSnapshots(t *testing.T, client *gophercloud.ServiceClient) ([]snapshots.Snapshot, error)

ListSnapshots lists all snapshots that belong to this tenant's project. An error will be returned if the snapshots could not be listed..

func PrintMessages

func PrintMessages(t *testing.T, c *gophercloud.ServiceClient, id string) error

func RevokeAccess

func RevokeAccess(t *testing.T, client *gophercloud.ServiceClient, share *shares.Share, accessRight *shares.AccessRight) error

RevokeAccess will revoke an exisiting access of a share. A fatal error will occur if this operation fails.

func ShareAccessRuleGet

func ShareAccessRuleGet(t *testing.T, client *gophercloud.ServiceClient, accessID string) (*shareaccessrules.ShareAccess, error)

func ShareAccessRuleList

func ShareAccessRuleList(t *testing.T, client *gophercloud.ServiceClient, shareID string) ([]shareaccessrules.ShareAccess, error)

func ShrinkShare

func ShrinkShare(t *testing.T, client *gophercloud.ServiceClient, share *shares.Share, newSize int) error

ShrinkShare shrinks the capacity of an existing share

func WaitForShareAccessRule

func WaitForShareAccessRule(t *testing.T, client *gophercloud.ServiceClient, accessRule *shareaccessrules.ShareAccess, status string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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