node

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNodeId

func GetNodeId(l *log.Entry) (string, error)

func GetStageStatus

func GetStageStatus(stp string) bool

GetStageStatus check if specified dir exists

func NodeGetServiceCapability

func NodeGetServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability

NodeGetServiceCapability provides service capabilities

Types

type NodePlugin

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

NodePlugin responsible for attaching and detaching volumes to host

func GetNodePlugin

func GetNodePlugin(l *log.Entry) (*NodePlugin, error)

GetNodePlugin inits NodePlugin

func (*NodePlugin) NodeExpandVolume

NodeExpandVolume responsible for update of file system on volume

func (*NodePlugin) NodeGetCapabilities

NodeGetCapabilities provides node capabilities

func (*NodePlugin) NodeGetInfo

func (np *NodePlugin) NodeGetInfo(
	ctx context.Context,
	req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)

NodeGetInfo returns node info

func (*NodePlugin) NodeGetVolumeStats

NodeGetVolumeStats volume total and available space

func (*NodePlugin) NodePublishVolume

func (np *NodePlugin) NodePublishVolume(
	ctx context.Context,
	req *csi.NodePublishVolumeRequest,
) (*csi.NodePublishVolumeResponse, error)

NodePublishVolume mount volume to target

func (*NodePlugin) NodeStageVolume

func (np *NodePlugin) NodeStageVolume(
	ctx context.Context,
	req *csi.NodeStageVolumeRequest,
) (*csi.NodeStageVolumeResponse, error)

NodeStageVolume introduce volume to host

func (*NodePlugin) NodeUnpublishVolume

NodeUnpublishVolume unmount volume

func (*NodePlugin) NodeUnstageVolume

func (np *NodePlugin) NodeUnstageVolume(
	ctx context.Context,
	req *csi.NodeUnstageVolumeRequest,
) (*csi.NodeUnstageVolumeResponse, error)

NodeUnstageVolume remove volume from host

type Target

type Target struct {
	STPath     string // Where target is staged
	TPath      string // Where target should be mounted
	DPath      string // Device representation in system
	Portal     string // ip of JovianDSS
	PortalPort string // port of JovianDSS
	Iqn        string // prefix part of iqn
	Lun        string // expected to be 0
	Tname      string // target name = volumeID
	// CoUser     string // Chap outgoing password
	// CoPass     string // Chap outgoing Password
	TProtocol string // tcp, others are not supported

	FsType     string   // Type of file system
	MountFlags []string // mount tool arguments
	// contains filtered or unexported fields
}

Target stores info about iscsi target

func GetTarget

func GetTarget(l *log.Entry, tp string) (t *Target, err error)

GetTarget constructs basic Target structure

func GetTargetFromPath

func GetTargetFromPath(l *log.Entry, path string) (t *Target, err error)

GetTargetFromPath recoinstruct Target on the basis of the path

func GetTargetFromReq

func GetTargetFromReq(ctx context.Context, r interface{}) (t *Target, err error)

GetTargetFromReq constructs Target structure from request data

func (*Target) DeSerializeTarget

func (t *Target) DeSerializeTarget(stp string) error

DeSerializeTarget restores Target form data file

func (*Target) DeleteSerialization

func (t *Target) DeleteSerialization() (err error)

DeleteSerialization deletes record file about target

func (*Target) FormatMountVolume

func (t *Target) FormatMountVolume(req *csi.NodePublishVolumeRequest) error

FormatMountVolume tries to check fs on volume and formats if not sutable been found

func (*Target) SerializeTarget

func (t *Target) SerializeTarget() error

SerializeTarget stores Target data to file

func (*Target) StageVolume

func (t *Target) StageVolume(ctx context.Context) error

StageVolume discovers iscsi target and attach it

func (*Target) UnMountVolume

func (t *Target) UnMountVolume(ctx context.Context) error

UnMountVolume unmounts volume

func (*Target) UnStageVolume

func (t *Target) UnStageVolume(ctx context.Context) error

UnStageVolume detachs iscsi target from host

Jump to

Keyboard shortcuts

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