volume

package
v4.6.0 Latest Latest
Warning

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

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

Documentation

Overview

Package volume defines operations of fusion storage

Index

Constants

View Source
const (
	// SCSITYPE defines scsi type
	SCSITYPE = 0

	// ISCSITYPE defines iscsi type
	ISCSITYPE = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NAS

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

NAS provides nas storage client

func NewNAS

func NewNAS(cli *client.Client) *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) Delete

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

Delete deletes volume by name

func (*NAS) DeleteNfsShare

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

DeleteNfsShare deletes nfs share

func (*NAS) Expand

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

Expand expands volume size

func (*NAS) Query

func (p *NAS) Query(ctx context.Context, fsName string) (utils.Volume, error)

Query queries volume by name

type SAN

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

SAN provides san storage client

func NewSAN

func NewSAN(cli *client.Client) *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

Jump to

Keyboard shortcuts

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