Documentation ¶
Index ¶
- Constants
- type ActivateRequest
- type ActivateResponse
- type AfterDetachRequest
- type AttachRequest
- type AttachResponse
- type BackendInitializationError
- type BrokerConfig
- type ConnectionInfo
- type CreateVolumeRequest
- type CredentialInfo
- type DetachRequest
- type DockerGetResponse
- type FlexVolumeAttachRequest
- type FlexVolumeDetachRequest
- type FlexVolumeMountRequest
- type FlexVolumeResponse
- type FlexVolumeUnmountRequest
- type GenericResponse
- type GetConfigResponse
- type GetResponse
- type GetVolumeConfigRequest
- type GetVolumeRequest
- type ListResponse
- type ListVolumesRequest
- type MountRequest
- type MountResponse
- type Mounter
- type RemoveVolumeRequest
- type RequestContext
- type RestConfig
- type ScbeConfig
- type SpectrumNfsRemoteConfig
- type SpectrumScaleConfig
- type SshConfig
- type StorageClient
- type UbiquityDockerPluginConfig
- type UbiquityPluginConfig
- type UbiquityPluginSslConfig
- type UbiquityServerConfig
- type UbiquityServerConnectionInfo
- type UnmountRequest
- type VolAlreadyExistsError
- type Volume
- type VolumeConfigGetter
- type VolumeMountProperties
- type VolumeNotFoundError
Constants ¶
View Source
const ( SpectrumScale string = "spectrum-scale" SpectrumScaleNFS string = "spectrum-scale-nfs" SoftlayerNFS string = "softlayer-nfs" SCBE string = "scbe" ScbeInterfaceName string = "Enabler for Containers" )
View Source
const ClientInitializationErrorStr = "" /* 127-byte string literal not displayed */
View Source
const DefaultDbSslMode = SslModeVerifyFull
View Source
const DefaultForScbeConfigParamDefaultFilesystem = "ext4" // if customer don't mention fstype, then the default is ext4
View Source
const DefaultForScbeConfigParamDefaultVolumeSize = "1" // if customer don't mention size, then the default is 1gb
View Source
const DefaultPluginsSslMode = SslModeVerifyFull
View Source
const DefaultScbeSslMode = SslModeVerifyFull
View Source
const DefaultSpectrumScaleSslMode = SslModeVerifyFull
View Source
const KeyScbeSslMode = "SCBE_SSL_MODE"
View Source
const KeySpectrumScaleSslMode = SpectrumScaleParamPrefix + "SSL_MODE"
View Source
const KeySslMode = "UBIQUITY_PLUGIN_SSL_MODE"
View Source
const OptionNameForVolumeFsType = "fstype" // the option name of the fstype and also the key in the volumeConfig
View Source
const PathToMountUbiquityBlockDevices = "/ubiquity/%s" // %s is the WWN of the volume # TODO this should be moved to docker plugin side
View Source
const ScbeDefaultPort = 8440 // the default port for SCBE management
View Source
const ScbeKeyVolAttachLunNumToHost = "LunNumber" // the key in map for volume lun number to host attachments
View Source
const ScbeKeyVolAttachToHost = "attach-to" // the key in map for volume to host attachments
View Source
const SpectrumScaleParamPrefix = "SPECTRUMSCALE_"
View Source
const SpectrumscaleDefaultPort = 443 // the default port for SPECTRUM SCALE management
View Source
const SslModeRequire = "require"
View Source
const SslModeVerifyFull = "verify-full"
View Source
const UbiquityInstanceNameMaxSize = 15
View Source
const VolumeNotFoundErrorMsg = "volume was not found in Ubiqutiy database."
volumeNotFoundError error for Attach, Detach, GetVolume, GetVolumeConfig, RemoveVolume interfaces if volume not found in Ubiquity DB
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivateRequest ¶
type ActivateRequest struct { CredentialInfo CredentialInfo Backends []string Opts map[string]string Context RequestContext }
type ActivateResponse ¶
type AfterDetachRequest ¶
type AfterDetachRequest struct { VolumeConfig map[string]interface{} Context RequestContext }
func (*AfterDetachRequest) GetVolumeConfig ¶
func (r *AfterDetachRequest) GetVolumeConfig() map[string]interface{}
type AttachRequest ¶
type AttachRequest struct { CredentialInfo CredentialInfo Name string Host string Context RequestContext }
type AttachResponse ¶
type BackendInitializationError ¶
func (*BackendInitializationError) Error ¶
func (e *BackendInitializationError) Error() string
type BrokerConfig ¶
type ConnectionInfo ¶
type ConnectionInfo struct { CredentialInfo CredentialInfo Port int ManagementIP string }
type CreateVolumeRequest ¶
type CreateVolumeRequest struct { CredentialInfo CredentialInfo Name string Backend string Opts map[string]interface{} Context RequestContext }
type CredentialInfo ¶
type DetachRequest ¶
type DetachRequest struct { CredentialInfo CredentialInfo Name string Host string Context RequestContext }
type DockerGetResponse ¶
type FlexVolumeAttachRequest ¶
type FlexVolumeDetachRequest ¶
type FlexVolumeMountRequest ¶
type FlexVolumeResponse ¶
type FlexVolumeUnmountRequest ¶
type FlexVolumeUnmountRequest struct {
MountPath string `json:"mountPath"`
}
type GenericResponse ¶
type GenericResponse struct {
Err string
}
type GetConfigResponse ¶
type GetResponse ¶
type GetVolumeConfigRequest ¶
type GetVolumeConfigRequest struct { CredentialInfo CredentialInfo Name string Context RequestContext }
type GetVolumeRequest ¶
type GetVolumeRequest struct { CredentialInfo CredentialInfo Name string Context RequestContext }
type ListResponse ¶
type ListVolumesRequest ¶
type ListVolumesRequest struct { CredentialInfo CredentialInfo //TODO add filter Backends []string Context RequestContext }
type MountRequest ¶
type MountRequest struct { Mountpoint string VolumeConfig map[string]interface{} Context RequestContext }
func (*MountRequest) GetVolumeConfig ¶
func (r *MountRequest) GetVolumeConfig() map[string]interface{}
type MountResponse ¶
type Mounter ¶
type Mounter interface { Mount(mountRequest MountRequest) (string, error) Unmount(unmountRequest UnmountRequest) error ActionAfterDetach(request AfterDetachRequest) error }
type RemoveVolumeRequest ¶
type RemoveVolumeRequest struct { CredentialInfo CredentialInfo Name string Context RequestContext }
type RequestContext ¶ added in v1.2.0
type RestConfig ¶
type ScbeConfig ¶
type ScbeConfig struct { ConfigPath string // TODO consider to remove later ConnectionInfo ConnectionInfo DefaultService string // SCBE storage service to be used by default if not mentioned by plugin DefaultVolumeSize string // The default volume size in case not specified by user UbiquityInstanceName string // Prefix for the volume name in the storage side (max length 15 char) DefaultFilesystemType string // The default filesystem type to create on new provisioned volume during attachment to the host }
type SpectrumNfsRemoteConfig ¶
type SpectrumNfsRemoteConfig struct {
ClientConfig string
}
type SpectrumScaleConfig ¶
type SpectrumScaleConfig struct { DefaultFilesystemName string NfsServerAddr string RestConfig RestConfig ForceDelete bool }
TODO we should consider to move dedicated backend structs to the backend resource file instead of this one.
type StorageClient ¶
type StorageClient interface { Activate(activateRequest ActivateRequest) error CreateVolume(createVolumeRequest CreateVolumeRequest) error RemoveVolume(removeVolumeRequest RemoveVolumeRequest) error ListVolumes(listVolumeRequest ListVolumesRequest) ([]Volume, error) GetVolume(getVolumeRequest GetVolumeRequest) (Volume, error) GetVolumeConfig(getVolumeConfigRequest GetVolumeConfigRequest) (map[string]interface{}, error) Attach(attachRequest AttachRequest) (string, error) Detach(detachRequest DetachRequest) error }
type UbiquityPluginConfig ¶
type UbiquityPluginConfig struct { DockerPlugin UbiquityDockerPluginConfig LogPath string LogRotateMaxSize int UbiquityServer UbiquityServerConnectionInfo SpectrumNfsRemoteConfig SpectrumNfsRemoteConfig Backends []string LogLevel string CredentialInfo CredentialInfo SslConfig UbiquityPluginSslConfig }
type UbiquityPluginSslConfig ¶ added in v1.0.0
type UbiquityServerConfig ¶
type UbiquityServerConfig struct { Port int LogPath string ConfigPath string SpectrumScaleConfig SpectrumScaleConfig ScbeConfig ScbeConfig BrokerConfig BrokerConfig DefaultBackend string LogLevel string }
type UnmountRequest ¶
type UnmountRequest struct { // TODO missing Mountpoint string VolumeConfig map[string]interface{} Context RequestContext }
type VolAlreadyExistsError ¶ added in v1.2.0
type VolAlreadyExistsError struct {
VolName string
}
volAlreadyExistsError error for Create interface if volume is already exist in the Ubiquity DB
func (*VolAlreadyExistsError) Error ¶ added in v1.2.0
func (e *VolAlreadyExistsError) Error() string
type VolumeConfigGetter ¶
type VolumeConfigGetter interface {
GetVolumeConfig() map[string]interface{}
}
type VolumeMountProperties ¶
type VolumeNotFoundError ¶ added in v1.2.0
type VolumeNotFoundError struct {
VolName string
}
func (*VolumeNotFoundError) Error ¶ added in v1.2.0
func (e *VolumeNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.