model

package
v4.7.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 0 Imported by: 74

Documentation

Index

Constants

View Source
const (
	// AccessProtocolIscsi - iSCSI volume
	AccessProtocolIscsi = "iscsi"

	// AccessProtocolFC - Fibre Channel volume
	AccessProtocolFC = "fc"
)
View Source
const (
	// TargetScopeGroup - Multi-LUN capable target, Group Scoped Target (GST)
	TargetScopeGroup = "group" // Group Scoped Target (GST)

	// TargetScopeVolume - Single LUN capable target, Volume Scoped Target (VST)
	TargetScopeVolume = "volume" // Volume Scoped Target (VST)
)
View Source
const (
	// ConnectTypeDefault - CHAPI2 will automatically detect and choose the optimal connection type.
	// This setting is also used if the connect type is not provided (e.g. empty string)
	ConnectTypeDefault = "default"

	// ConnectTypePing - Ping each I_T nexus to detect where connections are possible.
	ConnectTypePing = "ping"

	// ConnectTypeSubnet - Only make connections to initiator ports in same subnet as target ports.
	ConnectTypeSubnet = "subnet"

	// ConnectTypeAutoInitiator - Let the host's iSCSI initiator automatically select the initiator
	// to use to make a connection to the target ports.
	ConnectTypeAutoInitiator = "auto_initiator"
)
View Source
const (
	// FsCreateOpt filesystem create type
	FsCreateOpt = "filesystem"
	// FsModeOpt filesystem mode option
	FsModeOpt = "fsMode"
	// FsOwnerOpt filesystem owner option
	FsOwnerOpt = "fsOwner"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDeviceAccessInfo

type BlockDeviceAccessInfo struct {
	AccessProtocol  string           `json:"access_protocol,omitempty"` // Access protocol ("iscsi" or "fc")
	TargetName      string           `json:"target_name,omitempty"`     // Target name (iqn for iSCSI, empty for FC) - // TODO, clarify FC usage?
	TargetScope     string           `json:"target_scope,omitempty"`    // GST="group", VST="volume" or empty if unknown scope or FC
	LunID           string           `json:"lun_id,omitempty"`          // LunID is only used by Linux for rescan optimization and not used/required for Windows
	IscsiAccessInfo *IscsiAccessInfo `json:"iscsi_access_info,omitempty"`
}

BlockDeviceAccessInfo contains the common fields for accessing a block device

type Device

type Device struct {
	SerialNumber    string         `json:"serial_number,omitempty"`      // Nimble volume serial number
	Pathname        string         `json:"path_name,omitempty"`          // Path name (e.g. "dm-3" for Linux, "Disk3" for Windows)
	AltFullPathName string         `json:"alt_full_path_name,omitempty"` // Alternate path name (e.g. "/dev/mapper/mpathg" for Linux, "\\?\mpio#disk&ven_nimble&..." for Windows)
	Size            uint64         `json:"size,omitempty"`               // Volume capacity in total number of bytes //TODO ensure clients/servers change from MiB to byte count
	State           string         `json:"state,omitempty"`              // TODO, Shiva to define states
	IscsiTarget     *IscsiTarget   `json:"iscsi_target,omitempty"`       // Pointer to iSCSI target if device connected to an iSCSI target
	Private         *DevicePrivate `json:"-"`                            // Private device properties used internally by CHAPI
}

TODO: create fc and iscsi specific attributes Device struct

type DevicePartition

type DevicePartition struct {
	Name          string `json:"name,omitempty"`           // Partition name (e.g. "sda, mpathp1, mpathp2" for Linux, "Disk #1, Partition #0" for Windows)
	PartitionType string `json:"partition_type,omitempty"` // Partition type (e.g. "TODO" for Linux, "GPT: Basic Data" for Windows)
	Size          uint64 `json:"size,omitempty"`           // Partition size in total number of bytes
}

DevicePartition Partition Info for a Device

type DevicePrivate

type DevicePrivate struct {
	Paths []Path `json:"-"` // Physical path details (used internally by CHAPI server)
}

DevicePrivate provides model.Device platform specific private data

type FcHostPort

type FcHostPort struct {
	HostNumber string `json:"-"`
	PortWwn    string `json:"-"`
	NodeWwn    string `json:"-"`
}

FcHostPort FC host port

type FileSystemOptions

type FileSystemOptions struct {
	FsType    string   `json:"fs_type,omitempty"`       // Filesystem type
	FsMode    string   `json:"fs_mode,omitempty"`       // Filesystem permissions
	FsOwner   string   `json:"fs_owner,omitempty"`      // Filesystem owner
	MountOpts []string `json:"mount_options,omitempty"` // Mount options rw,ro nodiscard etc
}

FileSystemOptions represent file system options to be configured during mount

type Host

type Host struct {
	UUID   string `json:"id,omitempty"`     // Unique host identifier
	Name   string `json:"name,omitempty"`   // Host name
	Domain string `json:"domain,omitempty"` // Host domain name
}

Host : Host information

type Hosts

type Hosts []*Host

Hosts returns an array of Host objects

type Initiator

type Initiator struct {
	AccessProtocol string   `json:"access_protocol,omitempty"` // Access protocol ("iscsi" or "fc")
	Init           []string `json:"initiator,omitempty"`       // Initiator iqn if AccessProtocol=="iscsi" else WWPNs if "fc"
}

Initiator : Initiator details

type IscsiAccessInfo

type IscsiAccessInfo struct {
	ConnectType  string `json:"connect_type,omitempty"`  // How connections should be enumerated/established
	DiscoveryIP  string `json:"discovery_ip,omitempty"`  // iSCSI Discovery IP (empty for FC volumes)
	ChapUser     string `json:"chap_user,omitempty"`     // CHAP username (empty if CHAP not used)
	ChapPassword string `json:"chap_password,omitempty"` // CHAP password (empty if CHAP not used)
}

IscsiAccessInfo contains the fields necessary for iSCSI access

type IscsiTarget

type IscsiTarget struct {
	Name          string          `json:"name,omitempty"`           // Target iSCSI iqn
	TargetPortals []*TargetPortal `json:"target_portals,omitempty"` // Target portals
	TargetScope   string          `json:"target_scope,omitempty"`   // GST="group", VST="volume" or empty if unknown scope or FC
}

IscsiTarget struct

type Mount

type Mount struct {
	ID           string             `json:"id,omitempty"`            // Unique mount point ID
	MountPoint   string             `json:"mount_point,omitempty"`   // Mount point location e.g. "/mnt" for Linux, "C:\MountFolder" for Windows
	SerialNumber string             `json:"serial_number,omitempty"` // Nimble volume serial number
	FsOpts       *FileSystemOptions `json:"fs_options,omitempty"`    // Filesystem options like fsType, mode, owner and mount options
	Private      *MountPrivate      `json:"-"`                       // Private mount properties used internally by CHAPI
}

Mount structure represents all information required to mount and setup filesystem

type MountPrivate

type MountPrivate struct {
}

MountPrivate provides model.Mount platform specific private data

type Network

type Network struct {
	Name      string          `json:"name,omitempty"`       // NIC name (e.g. "eth0" for Linux, "Ethernet 1" for Windows)
	AddressV4 string          `json:"address_v4,omitempty"` // NIC IPv4 address
	MaskV4    string          `json:"mask_v4,omitempty"`    // NIC subnet mask
	Mac       string          `json:"mac,omitempty"`        // NIC MAC address
	Mtu       int64           `json:"mtu,omitempty"`        // NIC Maximum Transmission Unit (MTU)
	Up        bool            `json:"up"`                   // NIC available?
	Private   *NetworkPrivate `json:"-"`                    // Private network properties used internally by CHAPI
}

Network : network interface info for host

type NetworkPrivate

type NetworkPrivate struct {
}

NetworkPrivate provides model.Network platform specific private data

type Path

type Path struct {
	Name  string `json:"-"`
	Major string `json:"-"`
	Minor string `json:"-"`
	Hcils string `json:"-"`
	State string `json:"-"`
}

Path struct

type PublishInfo

type PublishInfo struct {
	SerialNumber string                   `json:"serial_number,omitempty"`
	BlockDev     *BlockDeviceAccessInfo   `json:"block_device,omitempty"`
	VirtualDev   *VirtualDeviceAccessInfo `json:"virtual_device,omitempty"`
}

PublishInfo is the node side data required to access a volume

type TargetPortal

type TargetPortal struct {
	Address string               `json:"address,omitempty"` // Target port IP address
	Port    string               `json:"port,omitempty"`    // Target port socket
	Tag     string               `json:"tag,omitempty"`     // Target port tag
	Private *TargetPortalPrivate `json:"-"`                 // Private TargetPortal properties used internally by CHAPI
}

TargetPortal provides information for a single iSCSI target portal (i.e. Data IP)

type TargetPortalPrivate

type TargetPortalPrivate struct {
}

TargetPortalPrivate provides model.TargetPortal platform specific private data

type VirtualDeviceAccessInfo

type VirtualDeviceAccessInfo struct {
	PciSlotNumber  string `json:"pci_slot_number,omitempty"`
	ScsiController string `json:"scsi_controller,omitempty"`
}

VirtualDeviceAccessInfo contains the required data to access a virtual device

Jump to

Keyboard shortcuts

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