volume

package
v0.0.0-...-52cd4e6 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package volume defines status code of oceanstor storage

Package volume defines the required struct

Index

Constants

This section is empty.

Variables

View Source
var ErrLogicPortFailOver = errors.New("logic port is not running on it's own site")

ErrLogicPortFailOver indicates an error that logic port is fail over.

Functions

This section is empty.

Types

type Base

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

Base defines the base storage client

type CloneFilesystemRequest

type CloneFilesystemRequest struct {
	FsName               string
	VStoreId             string
	ParentID             string
	ParentSnapshotID     string
	AllocType            int
	CloneSpeed           int
	CloneFsCapacity      int64
	SrcCapacity          int64
	DeleteParentSnapshot bool
}

CloneFilesystemRequest used for CloneFilesystem request

type DTree

type DTree struct {
	Base
}

DTree provides base DTree client

func NewDTree

func NewDTree(cli client.BaseClientInterface) *DTree

NewDTree inits a new DTree client

func (*DTree) Create

func (p *DTree) Create(ctx context.Context, params map[string]interface{}) (utils.Volume, error)

Create creates DTree volume

func (*DTree) Delete

func (p *DTree) Delete(ctx context.Context, params map[string]interface{}) error

Delete deletes volume

func (*DTree) Expand

func (p *DTree) Expand(ctx context.Context, parentName, dTreeName, vstoreID string, spaceSoftQuota,
	spaceHardQuota int64) error

Expand expands volume size

type NAS

type NAS struct {
	Base
	NASHyperMetro
	// contains filtered or unexported fields
}

NAS provides base nas client

func NewNAS

func NewNAS(cli, metroRemoteCli client.BaseClientInterface, product string,
	nasHyperMetro NASHyperMetro, isRunningOnOwnSite bool) *NAS

NewNAS inits a new nas client

func (*NAS) Create

func (p *NAS) Create(ctx context.Context, params map[string]interface{}) (utils.Volume, error)

Create creates fs volume

func (*NAS) CreateSnapshot

func (p *NAS) CreateSnapshot(ctx context.Context, fsName, snapshotName string) (map[string]interface{}, error)

CreateSnapshot creates fs snapshot

func (*NAS) Delete

func (p *NAS) Delete(ctx context.Context, fsName string) error

Delete deletes volume by name

func (*NAS) DeleteFS

func (p *NAS) DeleteFS(ctx context.Context, fsName string, cli client.BaseClientInterface) error

DeleteFS used to delete filesystem by name

func (*NAS) DeleteHyperMetro

func (p *NAS) DeleteHyperMetro(ctx context.Context,
	params, taskResult map[string]interface{}) (map[string]interface{}, error)

DeleteHyperMetro used to delete hyperMetro pair

func (*NAS) DeleteShare

func (p *NAS) DeleteShare(ctx context.Context, name, vStoreID string, cli client.BaseClientInterface) error

DeleteShare used to delete filesystem share

func (*NAS) DeleteSnapshot

func (p *NAS) DeleteSnapshot(ctx context.Context, snapshotParentId, snapshotName string) error

DeleteSnapshot deletes fs snapshot

func (*NAS) Expand

func (p *NAS) Expand(ctx context.Context, fsName string, newSize int64) error

Expand expands volume size

func (*NAS) GetActiveHyperMetroCli

func (p *NAS) GetActiveHyperMetroCli() client.BaseClientInterface

GetActiveHyperMetroCli used to get active cli

func (*NAS) GetStandbyHyperMetroCli

func (p *NAS) GetStandbyHyperMetroCli() client.BaseClientInterface

GetStandbyHyperMetroCli used to get standby cli

func (*NAS) Modify

func (p *NAS) Modify(ctx context.Context, params map[string]interface{}) (utils.Volume, error)

Modify modify fs volume

func (*NAS) Query

func (p *NAS) Query(ctx context.Context, fsName string, params map[string]interface{}) (utils.Volume, error)

Query queries volume by name

func (*NAS) SafeDeleteShare

func (p *NAS) SafeDeleteShare(ctx context.Context, name, vStoreID string, cli client.BaseClientInterface) error

SafeDeleteShare used to delete filesystem share

type NASHyperMetro

type NASHyperMetro struct {
	FsHyperMetroActiveSite bool
	LocVStoreID            string
	RmtVStoreID            string
}

NASHyperMetro defines HyperMetro nas storage

type SAN

type SAN struct {
	Base
}

SAN provides base san client

func NewSAN

func NewSAN(cli, metroRemoteCli, replicaRemoteCli client.BaseClientInterface, product string) *SAN

NewSAN inits a new san client

func (*SAN) Create

func (p *SAN) Create(ctx context.Context, params map[string]interface{}) (utils.Volume, error)

Create creates lun volume

func (*SAN) CreateSnapshot

func (p *SAN) CreateSnapshot(ctx context.Context,
	lunName, snapshotName string) (map[string]interface{}, error)

CreateSnapshot creates lun snapshot

func (*SAN) Delete

func (p *SAN) Delete(ctx context.Context, name string) error

Delete deletes volume by name

func (*SAN) DeleteSnapshot

func (p *SAN) DeleteSnapshot(ctx context.Context, snapshotName string) error

DeleteSnapshot deletes lun snapshot

func (*SAN) Expand

func (p *SAN) Expand(ctx context.Context, name string, newSize int64) (bool, error)

Expand expands volume size

func (*SAN) Query

func (p *SAN) Query(ctx context.Context, name string) (utils.Volume, error)

Query queries volume by name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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