targetd

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidError              = -1
	NameConflictError         = -50
	CloneNameExistsError      = -51
	InitiatorExistsError      = -52
	FSExistsError             = -53
	VolumeNotFoundError       = -103
	FSNotFoundError           = -104
	InvalidPoolError          = -110
	SSNotFoundError           = -112
	VolumeExportNotFoundError = -151
	VolumeGroupNotFoundError  = -152
	NotSupportedError         = -153
	AccessGroupNotFoundError  = -200
	UnexpectedExitCodeError   = -303
	VolumeMaskedError         = -303
	NFSExportNotFoundError    = -400
	NFSNotSupportedError      = -401
	NoFreeHostLunIdError      = -1000
	InvalidArgumentError      = -32602
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(url string) *Client

func (*Client) ExportCreate

func (c *Client) ExportCreate(pool, vol, initiatorWWN string, lun int32) error

func (*Client) ExportDestroy

func (c *Client) ExportDestroy(pool, vol, initiatorWWN string) error

func (*Client) ExportList

func (c *Client) ExportList() ([]Export, error)

func (*Client) GetFirstAvailableLun

func (c *Client) GetFirstAvailableLun() (int32, error)

func (*Client) PoolList

func (c *Client) PoolList() ([]Pool, error)

func (*Client) VolCopy

func (c *Client) VolCopy(pool, orig, name string, size int64) error

func (*Client) VolCreate

func (c *Client) VolCreate(pool, name string, size int64) error

func (*Client) VolDestroy

func (c *Client) VolDestroy(pool, name string) error

func (*Client) VolList

func (c *Client) VolList(pool string) ([]Volume, error)

func (*Client) VolResize

func (c *Client) VolResize(pool, name string, size int64) error

type Error

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

Error is a wrapper struct arround jsonrpc2.Error that helps getting information about server errors.

func UnwrapError

func UnwrapError(err error) *Error

UnwrapError transform an error into an Error if possible.

func (*Error) Code

func (e *Error) Code() int

Code exposes the error code returned by the server.

func (*Error) Message

func (e *Error) Message() string

Message exposes the error message returned by the server.

func (*Error) String

func (e *Error) String() string

String returns a formated error.

type Export

type Export struct {
	InitiatorWwn string `json:"initiator_wwn"`
	LUN          int32  `json:"lun"`
	VolName      string `json:"vol_name"`
	VolSize      int64  `json:"vol_size"`
	VolUUID      string `json:"vol_uuid"`
	Pool         string `json:"pool"`
}

type Pool

type Pool struct {
	Name     string `json:"name"`
	Size     int64  `json:"size"`
	FreeSize int64  `json:"free_size"`
	Type     string `json:"type"`
	UUID     string `json:"uuid"`
}

type Volume

type Volume struct {
	Name string `json:"name"`
	Size int64  `json:"size"`
	UUID string `json:"uuid"`
}

Jump to

Keyboard shortcuts

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