Help us shape the future of Go! Take the 2026 Go Developer Survey

shareoptions

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendOptions

type BackendOptions struct {
	CSICEPHFSdriver string `name:"csi-driver" backend:"csi-cephfs" protocol:"CEPHFS"`
}

BackendOptions contains backend-specific options

type CommonOptions

type CommonOptions struct {
	Zones    string `name:"zones" value:"default=nova"`
	Type     string `name:"type" value:"default=default"`
	Protocol string `name:"protocol"`
	Backend  string `name:"backend"`

	OSSecretName         string `name:"osSecretName"`
	OSSecretNamespace    string `name:"osSecretNamespace" value:"default=default"`
	ShareSecretNamespace string `name:"shareSecretNamespace" value:"coalesce=osSecretNamespace"`

	OSShareID       string `name:"osShareID" value:"requires=osShareAccessID"`
	OSShareName     string `name:"osShareName" value:"requires=osShareAccessID"`
	OSShareAccessID string `name:"osShareAccessID" value:"requires=osShareID|osShareName"`
}

CommonOptions contains options common for any backend/protocol

type OpenStackOptions

type OpenStackOptions struct {
	OSAuthURL    string `name:"os-authURL" value:"alwaysRequires=os-password|os-trustID"`
	OSRegionName string `name:"os-region"`

	OSCertAuthority string `name:"os-certAuthority" value:"optional"`
	OSTLSInsecure   string `name:"os-TLSInsecure" value:"requires=os-certAuthority"`

	OSPassword string `name:"os-password" value:"requires=os-domainID|os-domainName,os-projectID|os-projectName,os-userID|os-userName"`
	OSUserID   string `name:"os-userID" value:"requires=os-password"`
	OSUsername string `name:"os-userName" value:"requires=os-password"`

	OSDomainID   string `name:"os-domainID" value:"requires=os-password"`
	OSDomainName string `name:"os-domainName" value:"requires=os-password"`

	OSProjectID   string `name:"os-projectID" value:"requires=os-password"`
	OSProjectName string `name:"os-projectName" value:"requires=os-password"`

	OSTrustID         string `name:"os-trustID" value:"requires=os-trusteeID,os-trusteePassword"`
	OSTrusteeID       string `name:"os-trusteeID" value:"requires=os-trustID"`
	OSTrusteePassword string `name:"os-trusteePassword" value:"requires=os-trustID"`
}

OpenStackOptions contains fields used for authenticating to OpenStack

func NewOpenStackOptionsFromMap

func NewOpenStackOptionsFromMap(params map[string]string) (*OpenStackOptions, error)

NewOpenStackOptionsFromMap validates and populates OpenStackOptions

func NewOpenStackOptionsFromSecret

func NewOpenStackOptionsFromSecret(c clientset.Interface, secretRef *v1.SecretReference) (*OpenStackOptions, error)

NewOpenStackOptionsFromSecret reads k8s secrets, validates and populates OpenStackOptions

func (*OpenStackOptions) ToAuthOptions

func (o *OpenStackOptions) ToAuthOptions() *gophercloud.AuthOptions

ToAuthOptions converts OpenStackOptions to gophercloud.AuthOptions

func (*OpenStackOptions) ToAuthOptionsExt

func (o *OpenStackOptions) ToAuthOptionsExt() *trusts.AuthOptsExt

ToAuthOptionsExt converts OpenStackOptions to trusts.AuthOptsExt

type ProtocolOptions

type ProtocolOptions struct {
}

ProtocolOptions contains protocol-specific options

type ShareOptions

type ShareOptions struct {
	ShareName string // Used in CreateOpts when creating a new share

	// If applicable, to be used when creating a k8s Secret in GrantAccess.
	// The same SecretReference will be retrieved for RevokeAccess.
	ShareSecretRef v1.SecretReference

	CommonOptions    // Required common options
	ProtocolOptions  // Protocol specific options
	BackendOptions   // Backend specific options
	OpenStackOptions // OpenStack credentials
}

ShareOptions contains options for provisioning and attaching a share

func NewShareOptions

func NewShareOptions(volOptions *controller.VolumeOptions, c clientset.Interface) (*ShareOptions, error)

NewShareOptions creates new share options

Jump to

Keyboard shortcuts

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