targetd

package
v0.0.0-...-f1b23c0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Targetd

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

Targetd is implement open-iscsi/targetd

func New

func New(apiURL, username, password, poolName, backendName, portalIP string, ds datastore.Datastore) (*Targetd, error)

New create instance of targetd.Client

func (*Targetd) AttachVolumeSatelit

func (t *Targetd) AttachVolumeSatelit(ctx context.Context, volName string, hostname string) (int, string, error)

AttachVolumeSatelit attach volume to satelit return (host lun id, attached device name, error)

func (*Targetd) AttachVolumeTeleskop

func (t *Targetd) AttachVolumeTeleskop(ctx context.Context, volName string, hostname string) (int, string, error)

AttachVolumeTeleskop attach volume to hostname (running teleskop) return (host lun id, attached device name, error)

func (*Targetd) CreateVolume

func (t *Targetd) CreateVolume(ctx context.Context, name uuid.UUID, capacityGB int) (*europa.Volume, error)

CreateVolume create raw volume

func (*Targetd) CreateVolumeFromImage

func (t *Targetd) CreateVolumeFromImage(ctx context.Context, name uuid.UUID, capacityGB int, imageID uuid.UUID) (*europa.Volume, error)

CreateVolumeFromImage create volume that copied image

func (*Targetd) DeleteImage

func (t *Targetd) DeleteImage(ctx context.Context, id uuid.UUID) error

DeleteImage delete image

func (*Targetd) DeleteVolume

func (t *Targetd) DeleteVolume(ctx context.Context, id string) error

DeleteVolume delete volume

func (*Targetd) DetachVolume

func (t *Targetd) DetachVolume(ctx context.Context, volName string) error

DetachVolume detach volume

func (*Targetd) DetachVolumeSatelit

func (t *Targetd) DetachVolumeSatelit(ctx context.Context, volName string, hostLUNID int) error

DetachVolumeSatelit detach volume from satelit server

func (*Targetd) GetHostLUNID

func (t *Targetd) GetHostLUNID(ctx context.Context, volName, iqn string) (int, error)

GetHostLUNID return host LUN id. (not created)

func (*Targetd) GetImage

func (t *Targetd) GetImage(imageID uuid.UUID) (*europa.BaseImage, error)

GetImage return image by id

func (*Targetd) GetVolume

func (t *Targetd) GetVolume(ctx context.Context, id string) (*europa.Volume, error)

GetVolume get volume

func (*Targetd) ListImage

func (t *Targetd) ListImage() ([]europa.BaseImage, error)

ListImage retrieves all images

func (*Targetd) ListVolume

func (t *Targetd) ListVolume(ctx context.Context) ([]europa.Volume, error)

ListVolume return list of volume

func (*Targetd) UploadImage

func (t *Targetd) UploadImage(ctx context.Context, image []byte, name, description string, imageSizeGB int) (*europa.BaseImage, error)

UploadImage upload to qcow2 image file

Jump to

Keyboard shortcuts

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