service

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Copyright (c) 2019 Dell EMC Corporation All Rights Reserved

Index

Constants

View Source
const (
	FC                       = "FC"
	ISCSI                    = "iSCSI"
	NFS                      = "NFS"
	ProtocolUnknown          = "Unknown"
	ProtocolNFS              = int(0)
	MAX_ENTRIES_SNAPSHOT     = 100
	MAX_ENTRIES_VOLUME       = 100
	NFSShareLocalPath        = "/"
	NFSShareNamePrefix       = "csishare-"
	AdditionalFilesystemSize = 1.5 * 1024 * 1024 * 1024
)
View Source
const (
	// EnvEndpoint is the name of the environment variable used to set the
	// HTTP endpoint of the Unity Gateway
	EnvEndpoint = "X_CSI_UNITY_ENDPOINT"

	// EnvNodeName is the name of the enviroment variable used to set the
	// hostname where the node service is running
	EnvNodeName = "X_CSI_UNITY_NODENAME"

	// EnvAutoProbe is the name of the environment variable used to specify
	// that the controller service should automatically probe itself if it
	// receives incoming requests before having been probed, in direct
	// violation of the CSI spec
	EnvAutoProbe = "X_CSI_UNITY_AUTOPROBE"

	//EnvPvtMountDir is required to Node Unstage volume where the volume has been mounted
	//as a global mount via CSI-Unity v1.0 or v1.1
	EnvPvtMountDir = "X_CSI_PRIVATE_MOUNT_DIR"

	// EnvISCSIChroot is the path to which the driver will chroot before
	// running any iscsi commands. This value should only be set when instructed
	// by technical support.
	EnvISCSIChroot = "X_CSI_ISCSI_CHROOT"

	//Time interval to add node info to array. Default 60 minutes.
	SyncNodeInfoTimeInterval = "X_CSI_UNITY_SYNC_NODEINFO_INTERVAL"
)
View Source
const (

	// VendorVersion is the version of this Unity CSI.
	VendorVersion = "0.0.0"

	//Tcp dial default timeout in Milliseconds
	TcpDialTimeout = 1000

	IScsiPort = "3260"
)

Variables

View Source
var DriverConfig string
View Source
var (
	LUNZHLU = 0
)
View Source
var Manifest = map[string]string{
	"url":    "http://github.com/dell/csi-unity",
	"semver": core.SemVer,
	"commit": core.CommitSha32,
	"formed": core.CommitTime.Format(time.RFC1123),
}

Manifest is the SP's manifest.

View Source
var Name string

Functions

func GetRunidLog

func GetRunidLog(ctx context.Context) (context.Context, *logrus.Entry, string)

Types

type Device

type Device struct {
	FullPath string
	Name     string
	RealDev  string
}

Device is a struct for holding details about a block device

func GetDevice

func GetDevice(ctx context.Context, path string) (*Device, error)

GetDevice returns a Device struct with info about the given device, or an error if it doesn't exist or is not a block device

type ISCSITargetInfo

type ISCSITargetInfo struct {
	Portal string
	Target string
}

ISCSITargetInfo represents basic information about iSCSI target

type Opts

type Opts struct {
	NodeName                 string
	LongNodeName             string
	Chroot                   string
	Thick                    bool
	AutoProbe                bool
	PvtMountDir              string
	Debug                    bool
	SyncNodeInfoTimeInterval int
}

Opts defines service configuration options.

type Service

Service is a CSI SP and idempotency.Provider.

func New

func New() Service

New returns a new CSI Service.

type StorageArrayConfig

type StorageArrayConfig struct {
	ArrayId        string `json:"arrayId"`
	Username       string `json:"username"`
	Password       string `json:"password"`
	RestGateway    string `json:"restGateway"`
	Insecure       bool   `json:"insecure, omitempty"`
	IsDefaultArray bool   `json:"isDefaultArray, omitempty"`
	IsProbeSuccess bool
	IsHostAdded    bool
	UnityClient    *gounity.Client
}

func (StorageArrayConfig) String

func (s StorageArrayConfig) String() string

To display the StorageArrayConfig content

type StorageArrayList

type StorageArrayList struct {
	StorageArrayList []StorageArrayConfig `json:"storageArrayList"`
}

To parse the secret json file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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