resources

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2017 License: Apache-2.0 Imports: 1 Imported by: 37

Documentation

Index

Constants

View Source
const (
	SpectrumScale    string = "spectrum-scale"
	SpectrumScaleNFS string = "spectrum-scale-nfs"
	SoftlayerNFS     string = "softlayer-nfs"
	SCBE             string = "scbe"
)
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 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 UbiquityInstanceNameMaxSize = 15

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivateRequest

type ActivateRequest struct {
	Backends []string
	Opts     map[string]string
}

type ActivateResponse

type ActivateResponse struct {
	Implements []string
	Err        string
}

type AfterDetachRequest

type AfterDetachRequest struct {
	VolumeConfig map[string]interface{}
}

type AttachRequest

type AttachRequest struct {
	Name string
	Host string
}

type AttachResponse

type AttachResponse struct {
	Mountpoint string
	Err        string
}

type BrokerConfig

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

type ConnectionInfo

type ConnectionInfo struct {
	CredentialInfo CredentialInfo
	Port           int
	ManagementIP   string
	SkipVerifySSL  bool
}

type CreateVolumeRequest

type CreateVolumeRequest struct {
	Name    string
	Backend string
	Opts    map[string]interface{}
}

type CredentialInfo

type CredentialInfo struct {
	UserName string `json:"username"`
	Password string `json:"password"`
	Group    string `json:"group"`
}

type DetachRequest

type DetachRequest struct {
	Name string
	Host string
}

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 GenericRequest

type GenericRequest struct {
	Name string
}

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 {
	Name string
}

type GetVolumeRequest

type GetVolumeRequest struct {
	Name string
}

type ListResponse

type ListResponse struct {
	Volumes []Volume
	Err     string
}

type ListVolumesRequest

type ListVolumesRequest struct {
	//TODO add filter
	Backends []string
}

type MountRequest

type MountRequest struct {
	Mountpoint   string
	VolumeConfig 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 {
	Name string
}

type RestConfig

type RestConfig struct {
	Endpoint 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 ScbeRemoteConfig added in v0.4.0

type ScbeRemoteConfig struct {
	SkipRescanISCSI bool
}

type SpectrumNfsRemoteConfig

type SpectrumNfsRemoteConfig struct {
	ClientConfig string
}

type SpectrumScaleConfig

type SpectrumScaleConfig struct {
	DefaultFilesystemName string
	NfsServerAddr         string
	SshConfig             SshConfig
	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
	UbiquityServer          UbiquityServerConnectionInfo
	SpectrumNfsRemoteConfig SpectrumNfsRemoteConfig
	ScbeRemoteConfig        ScbeRemoteConfig
	Backends                []string
	LogLevel                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 {
	VolumeConfig map[string]interface{}
}

type Volume

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

Jump to

Keyboard shortcuts

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