client

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageName = "storage-1"
	VolumeName  = "volume-1"
	Prefix      = "DVOLD-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Debug *bool
	Api   *dsdk.SDK
	Conf  *Config
}

func NewClient

func NewClient(ctxt context.Context, conf *Config) *Client

func (Client) CreateACL

func (r Client) CreateACL(ctxt context.Context, name string, random bool) error

func (Client) CreateVolume

func (r Client) CreateVolume(ctxt context.Context, name string, volOpts *VolOpts) error

func (Client) DeleteVolume

func (r Client) DeleteVolume(ctxt context.Context, name, mountpoint string) error

func (Client) DetachVolume

func (r Client) DetachVolume(ctxt context.Context, name string) error

func (Client) FindDeviceFsType

func (r Client) FindDeviceFsType(ctxt context.Context, diskPath string) (string, error)

func (Client) GetIQNandPortals added in v1.1.1

func (r Client) GetIQNandPortals(ctxt context.Context, name string) (string, []string, string, error)

func (Client) GetMetadata

func (r Client) GetMetadata(ctxt context.Context, name string) (*map[string]interface{}, error)

func (Client) GetVolume

func (r Client) GetVolume(ctxt context.Context, name string) (*dsdk.AppInstance, error)

func (Client) ListVolumes

func (r Client) ListVolumes(ctxt context.Context) ([]string, error)

func (Client) LoginVolume

func (r Client) LoginVolume(ctxt context.Context, name string, destination string) (string, error)

func (Client) MountVolume

func (r Client) MountVolume(ctxt context.Context, name, destination, fsType, diskPath string) error

func (Client) OnlineVolume added in v1.1.3

func (r Client) OnlineVolume(ctxt context.Context, name string) error

func (Client) PutMetadata

func (r Client) PutMetadata(ctxt context.Context, name string, m *map[string]interface{}) error

func (Client) UnmountVolume

func (r Client) UnmountVolume(ctxt context.Context, name string, destination string) error

type Config

type Config struct {
	DateraCluster string   `json:"datera-cluster"`
	Username      string   `json:"username"`
	Password      string   `json:"password"`
	Ssl           bool     `json:"ssl"`
	Tenant        string   `json:"tenant,omitempty"`
	OsUser        string   `json:"os-user,omitempty"`
	Debug         bool     `json:"debug,omitempty"`
	Framework     string   `json:"framework,omitempty"`
	Volume        *VolOpts `json:"volume,omitempty"`
}

type VolOpts added in v1.1.3

type VolOpts struct {
	Size          uint64 `json:"size,omitempty"`
	Replica       uint64 `json:"replica,omitempty"`
	Template      string `json:"template,omitempty"`
	FsType        string `json:"fstype,omitempty"`
	MaxIops       uint64 `json:"maxiops,omitempty"`
	MaxBW         uint64 `json:"maxbw,omitempty"`
	PlacementMode string `json:"placement,omitempty"`
	Persistence   string `json:"persistence,omitempty"`
	CloneSrc      string `json:"clone-src,omitempty"`
}

Jump to

Keyboard shortcuts

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