Documentation ¶
Index ¶
- Constants
- func ChooseExportLocation(locs []shares.ExportLocation) (shares.ExportLocation, error)
- func FillInPV(options controller.VolumeOptions, share shares.Share, ...) (*v1.PersistentVolume, error)
- func GetShareIDfromPV(volume *v1.PersistentVolume) (string, error)
- func PrepareCreateRequest(options controller.VolumeOptions) (shares.CreateOpts, error)
- func SplitMicroversion(mv string) (major, minor int)
- func ValidMicroversion(mv string) (err error)
- func WaitTillAvailable(client *gophercloud.ServiceClient, shareID string) error
Constants ¶
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 = "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 ¶
SplitMicroversion splits OpenStack microversion represented as string into Major and Minor versions represented as ints
func ValidMicroversion ¶
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.