sharedfilesystems

package
v0.0.0-...-fd19465 Latest Latest
Warning

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

Go to latest
Published: May 10, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ZonesSCParamName is the name of the Storage Class parameter in which a set of zones is specified.
	// The persistent volume will be dynamically provisioned in one of these zones.
	ZonesSCParamName = "zones"
	// TypeSCParamName is the name of a share type configured by administrator of Manila service.
	TypeSCParamName = "type"
	// ProtocolNFS is the NFS shared filesystems protocol
	ProtocolNFS = "NFS"
	// ManilaAnnotationShareIDName identifies provisioned Share ID
	ManilaAnnotationShareIDName = "manila.external-storage.incubator.kubernetes.io/" + "ID"
)

Variables

This section is empty.

Functions

func ChooseExportLocation

func ChooseExportLocation(locs []shares.ExportLocation) (shares.ExportLocation, error)

ChooseExportLocation chooses one ExportLocation according to the below rules: 1. Path is not empty, i.e. is not an empty string or does not contain spaces and tabs only 2. IsAdminOnly == false 3. Preferred == true are preferred over Preferred == false 4. Locations with lower slice index are preferred over locations with higher slice index In case no location complies with the above rules an error is returned.

func FillInPV

func FillInPV(options controller.VolumeOptions, share shares.Share, exportLocation shares.ExportLocation) (*v1.PersistentVolume, error)

FillInPV creates the PV data structure from original PVC, provisioned share and the share export location

func GetShareIDfromPV

func GetShareIDfromPV(volume *v1.PersistentVolume) (string, error)

GetShareIDfromPV returns: - an error in case there is no shareID stored in volume.ObjectMeta.Annotations[ManilaAnnotationShareIDName]

func PrepareCreateRequest

func PrepareCreateRequest(options controller.VolumeOptions) (shares.CreateOpts, error)

PrepareCreateRequest return: - success: ready to send shared filesystem create request data structure constructed from Persistent Volume Claim and corresponding Storage Class - failure: an error

func SplitMicroversion

func SplitMicroversion(mv string) (major, minor int)

SplitMicroversion splits OpenStack microversion represented as string into Major and Minor versions represented as ints

func ValidMicroversion

func ValidMicroversion(mv string) (err error)

ValidMicroversion checks whether the microversion provided as a string is a valid OpenStack microversion

func WaitTillAvailable

func WaitTillAvailable(client *gophercloud.ServiceClient, shareID string) error

WaitTillAvailable keeps querying Manila API for a share status until it is available. The waiting can: - succeed: in this case the is/becomes available - timeout: error is returned. - another error occurs: error is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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