nfs

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KLvPath            = "lvPath"
	KLvsPath           = "lvsPath"
	KFileshareName     = "nfsFileshareName"
	KFileshareID       = "nfsFileshareID"
	KFileshareSnapName = "snapshotName"
	KFileshareSnapID   = "snapshotID"
	AccessLevelRo      = "ro"
	AccessLevelRw      = "rw"
	MountPath          = "/mnt"
)
View Source
const (
	FileSharePrefix = "fileshare-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	// Command executer
	BaseExecuter exec.Executer
	// Command Root executer
	RootExecuter exec.Executer
}

func NewCli

func NewCli() (*Cli, error)

func (*Cli) CreateAccess

func (c *Cli) CreateAccess(accessto, accesscapability, fname string) error

func (*Cli) CreateDirectory

func (c *Cli) CreateDirectory(dirName string) error

func (*Cli) CreateFileShare

func (c *Cli) CreateFileShare(lvPath string) error

func (*Cli) CreateFileShareFromSnapshot added in v0.12.0

func (c *Cli) CreateFileShareFromSnapshot(lvPath string) error

func (*Cli) CreateLvSnapshot

func (c *Cli) CreateLvSnapshot(name, sourceLvName, vg string, size int64) error

func (*Cli) CreateVolume

func (c *Cli) CreateVolume(name string, vg string, size int64) error

func (*Cli) Delete

func (c *Cli) Delete(name, lvpath string) error

delete volume or snapshot

func (*Cli) DeleteAccess

func (c *Cli) DeleteAccess(accessto, fname string) error

func (*Cli) DeleteDirectory

func (c *Cli) DeleteDirectory(dirName string) error

func (*Cli) DeleteFileShareSnapshots

func (c *Cli) DeleteFileShareSnapshots(name, vg string) error

delete volume or snapshot

func (*Cli) Exists

func (c *Cli) Exists(name string) bool

func (*Cli) GetExportLocation

func (c *Cli) GetExportLocation(share_name, ip string) string

func (*Cli) ListVgs

func (c *Cli) ListVgs() (*[]VolumeGroup, error)

func (*Cli) LvIsActivate

func (c *Cli) LvIsActivate(name, vg string) bool

func (*Cli) Mount

func (c *Cli) Mount(lvPath, dirName string) error

func (*Cli) SetPermission

func (c *Cli) SetPermission(dirName string) error

func (*Cli) UnMount

func (c *Cli) UnMount(dirName string) error

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func (*Driver) CreateFileShare

func (d *Driver) CreateFileShare(opt *pb.CreateFileShareOpts) (*model.FileShareSpec, error)

func (*Driver) CreateFileShareAcl

func (d *Driver) CreateFileShareAcl(opt *pb.CreateFileShareAclOpts) (*model.FileShareAclSpec, error)

func (*Driver) CreateFileShareSnapshot

func (d *Driver) CreateFileShareSnapshot(opt *pb.CreateFileShareSnapshotOpts) (*model.FileShareSnapshotSpec, error)

CreateFileShareSnapshot

func (*Driver) DeleteFileShare

func (d *Driver) DeleteFileShare(opt *pb.DeleteFileShareOpts) error

delete fileshare from device

func (*Driver) DeleteFileShareAcl

func (d *Driver) DeleteFileShareAcl(opt *pb.DeleteFileShareAclOpts) error

func (*Driver) DeleteFileShareSnapshot

func (d *Driver) DeleteFileShareSnapshot(opt *pb.DeleteFileShareSnapshotOpts) error

DeleteFileShareSnapshot

func (*Driver) ListPools

func (d *Driver) ListPools() ([]*model.StoragePoolSpec, error)

ListPools

func (*Driver) Setup

func (d *Driver) Setup() error

func (*Driver) Unset

func (*Driver) Unset() error

type NFSConfig

type NFSConfig struct {
	TgtBindIp      string                    `yaml:"tgtBindIp"`
	TgtConfDir     string                    `yaml:"tgtConfDir"`
	EnableChapAuth bool                      `yaml:"enableChapAuth"`
	Pool           map[string]PoolProperties `yaml:"pool,flow"`
}

type VolumeGroup

type VolumeGroup struct {
	Name          string
	TotalCapacity int64
	FreeCapacity  int64
	UUID          string
}

Jump to

Keyboard shortcuts

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