iscsi

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const (
	//ISCSITranslateTCP tcp
	ISCSITranslateTCP = "tcp"
)

Variables

This section is empty.

Functions

func Connect

func Connect(connMap map[string]interface{}) (string, error)

Connect ISCSI Target

func Delete

func Delete(targetiqn string) error

Delete ISCSI Node

func Disconnect

func Disconnect(portal string, targetiqn string) error

Disconnect ISCSI Target

func Discovery

func Discovery(portal string) error

Discovery ISCSI Target

func Format

func Format(device string, fstype string) error

Format device by File System Type

func FormatAndMount added in v0.1.9

func FormatAndMount(device string, fstype string, mountpoint string) error

FormatAndMount device

func GetFSType

func GetFSType(device string) string

GetFSType returns the File System Type of device

func GetHostIp

func GetHostIp() string

GetHostIp return Host IP

func GetInitiator

func GetInitiator() ([]string, error)

GetInitiator returns all the ISCSI Initiator Name

func Login

func Login(portal string, targetiqn string) error

Login ISCSI Target

func Logout

func Logout(portal string, targetiqn string) error

Logout ISCSI Target

func Mount

func Mount(device string, mountpoint string) error

Mount device into mount point

func SetAuth added in v0.1.9

func SetAuth(portal string, targetiqn string, name string, passwd string) error

Login ISCSI Target

func Umount

func Umount(mountpoint string) error

Umount from mountpoint

Types

type Iscsi

type Iscsi struct{}

func (*Iscsi) Attach

func (isc *Iscsi) Attach(conn map[string]interface{}) (string, error)

func (*Iscsi) Detach

func (isc *Iscsi) Detach(conn map[string]interface{}) error

type IscsiConnectorInfo

type IscsiConnectorInfo struct {
	AccessMode string `mapstructure:"accessMode"`
	AuthUser   string `mapstructure:"authUserName"`
	AuthPass   string `mapstructure:"authPassword"`
	AuthMethod string `mapstructure:"authMethod"`
	TgtDisco   bool   `mapstructure:"targetDiscovered"`
	TgtIQN     string `mapstructure:"targetIqn"`
	TgtPortal  string `mapstructure:"targetPortal"`
	VolumeID   string `mapstructure:"volumeId"`
	TgtLun     int    `mapstructure:"targetLun"`
	Encrypted  bool   `mapstructure:"encrypted"`
}

IscsiConnectorInfo define

func ParseIscsiConnectInfo

func ParseIscsiConnectInfo(connectInfo map[string]interface{}) *IscsiConnectorInfo

ParseIscsiConnectInfo decode

Jump to

Keyboard shortcuts

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