resources

package
v2.1.0+incompatible Latest Latest
Warning

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

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

Documentation

Index

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 ActivateResponse struct {
	Implements []string
	Err        string
}

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 AttachResponse struct {
	Mountpoint string
	Err        string
}

type BackendInitializationError

type BackendInitializationError struct {
	BackendName string
	Err         error
}

func (*BackendInitializationError) Error

type BrokerConfig

type BrokerConfig struct {
	ConfigPath string
	Port       int //for CF Service broker
}

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 CredentialInfo struct {
	UserName string `json:"username"`
	Password string `json:"password"`
	Group    string `json:"group"`
}

type DetachRequest

type DetachRequest struct {
	CredentialInfo CredentialInfo
	Name           string
	Host           string
	Context        RequestContext
}

type DockerGetResponse

type DockerGetResponse struct {
	Volume map[string]interface{}
	Err    string
}

type FlexVolumeAttachRequest

type FlexVolumeAttachRequest struct {
	Name string            `json:"name"`
	Host string            `json:"host"`
	Opts map[string]string `json:"opts"`
}

type FlexVolumeDetachRequest

type FlexVolumeDetachRequest struct {
	Name string `json:"name"`
	Host string `json:"host"`
}

type FlexVolumeMountRequest

type FlexVolumeMountRequest struct {
	MountPath   string                 `json:"mountPath"`
	MountDevice string                 `json:"name"`
	Opts        map[string]interface{} `json:"opts"`
}

type FlexVolumeResponse

type FlexVolumeResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
	Device  string `json:"device"`
}

type FlexVolumeUnmountRequest

type FlexVolumeUnmountRequest struct {
	MountPath string `json:"mountPath"`
}

type GenericResponse

type GenericResponse struct {
	Err string
}

type GetConfigResponse

type GetConfigResponse struct {
	VolumeConfig map[string]interface{}
	Err          string
}

type GetResponse

type GetResponse struct {
	Volume Volume
	Err    string
}

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 ListResponse struct {
	Volumes []Volume
	Err     string
}

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 MountResponse struct {
	Mountpoint string
	Err        string
}

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 RequestContext struct {
	Id         string
	ActionName string
}

type RestConfig

type RestConfig struct {
	Port         int
	ManagementIP string
	User         string
	Password     string
	Hostname     string
}

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 SshConfig

type SshConfig struct {
	User string
	Host string
	Port string
}

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 UbiquityDockerPluginConfig

type UbiquityDockerPluginConfig struct {
	//Address          string
	Port             int
	PluginsDirectory string
}

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 UbiquityPluginSslConfig struct {
	UseSsl   bool
	SslMode  string
	VerifyCa string
}

type UbiquityServerConfig

type UbiquityServerConfig struct {
	Port                int
	LogPath             string
	ConfigPath          string
	SpectrumScaleConfig SpectrumScaleConfig
	ScbeConfig          ScbeConfig
	BrokerConfig        BrokerConfig
	DefaultBackend      string
	LogLevel            string
}

type UbiquityServerConnectionInfo

type UbiquityServerConnectionInfo struct {
	Address string
	Port    int
}

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 Volume

type Volume struct {
	gorm.Model
	Name       string
	Backend    string
	Mountpoint string
}

type VolumeConfigGetter

type VolumeConfigGetter interface {
	GetVolumeConfig() map[string]interface{}
}

type VolumeMountProperties

type VolumeMountProperties struct {
	WWN       string
	LunNumber int
}

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

Jump to

Keyboard shortcuts

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