models

package
v0.0.0-...-eec02a6 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScanAllSCSIDeviceAddress  = "-"
	ScanSCSIDeviceAddressZero = "0"
)
View Source
const (
	NodeDirty     = NodePublicationState("dirty")
	NodeCleanable = NodePublicationState("cleanable")
	NodeClean     = NodePublicationState("clean")
)

Variables

This section is empty.

Functions

func GenerateVolumePublishName

func GenerateVolumePublishName(volumeID, nodeID string) string

Types

type AttachmentInfo

type AttachmentInfo struct {
	*VolumePublishInfo `json:"volumePublishInfo"`
	*ScsiDeviceInfo    `json:"scsiDeviceInfo,omitempty"`
}

type AutogrowPolicyReason

type AutogrowPolicyReason string

AutogrowPolicyReason indicates why the effective Autogrow policy is in its current state

const (
	AutogrowPolicyReasonActive        AutogrowPolicyReason = "Active"
	AutogrowPolicyReasonNotConfigured AutogrowPolicyReason = "NotConfigured"
	AutogrowPolicyReasonDisabled      AutogrowPolicyReason = "Disabled"
	AutogrowPolicyReasonNotFound      AutogrowPolicyReason = "NotFound"
	AutogrowPolicyReasonUnusable      AutogrowPolicyReason = "Unusable"
	AutogrowPolicyReasonIneligible    AutogrowPolicyReason = "Ineligible"
)

func (AutogrowPolicyReason) MarshalJSON

func (r AutogrowPolicyReason) MarshalJSON() ([]byte, error)

func (AutogrowPolicyReason) String

func (r AutogrowPolicyReason) String() string

String returns a human-readable message for the Autogrow policy reason

type DFInfo

type DFInfo struct {
	Target string
	Source string
}

DFInfo data structure for wrapping the parsed output from the 'df' command

type EffectiveAutogrowPolicyInfo

type EffectiveAutogrowPolicyInfo struct {
	// PolicyName is the name of the effective Autogrow policy
	PolicyName string

	// Reason explains why the policy is in its current state
	Reason AutogrowPolicyReason
}

EffectiveAutogrowPolicyInfo contains the resolved Autogrow policy and why it's in that state This is computed at runtime and not persisted

type FCPAccessInfo

type FCPAccessInfo struct {
	FibreChannelAccessInfo
	FCPLunNumber int32  `json:"fcpLunNumber,omitempty"`
	FCPIgroup    string `json:"fcpIgroup,omitempty"`
	FCPLunSerial string `json:"fcpLunSerial,omitempty"`
}

type FibreChannelAccessInfo

type FibreChannelAccessInfo struct {
	FCTargetWWNN string `json:"fcTargetWWNN,omitempty"`
}

type GraftAttachmentRequest

type GraftAttachmentRequest struct {
	VolumeAccessInfo `json:"volumeAccessInfo"`
	VolumeName       string          `json:"volumeName"`
	Protocol         config.Protocol `json:"protocol"`
}

TODO: Refine these request and response objects.

type GraftAttachmentResponse

type GraftAttachmentResponse struct {
	VolumeAccessInfo `json:"volumeAccessInfo"`
	VolumeName       string          `json:"volumeName"`
	Protocol         config.Protocol `json:"protocol"`
}

type HostSystem

type HostSystem struct {
	OS       SystemOS `json:"os"`
	Services []string `json:"services,omitempty"`
}

type ISCSIAction

type ISCSIAction int8

ISCSIAction is a data structure for iSCSI self-healing actions

const (
	NoAction ISCSIAction = iota
	Scan
	LoginScan
	LogoutLoginScan
)

func (ISCSIAction) String

func (a ISCSIAction) String() string

type ISCSIDiscoveryInfo

type ISCSIDiscoveryInfo struct {
	Portal     string
	PortalIP   string
	TargetName string
}

ISCSIDiscoveryInfo contains information about discovered iSCSI targets.

type ISCSISessionData

type ISCSISessionData struct {
	PortalInfo  PortalInfo
	LUNs        LUNs
	Remediation ISCSIAction
}

type ISCSISessions

type ISCSISessions struct {
	Info map[string]*ISCSISessionData
}

func NewISCSISessions

func NewISCSISessions() *ISCSISessions

func (*ISCSISessions) AddLUNToPortal

func (p *ISCSISessions) AddLUNToPortal(portal string, lData LUNData) error

AddLUNToPortal adds a LUNInfo to a pre-existing portal entry in the map

func (*ISCSISessions) AddPortal

func (p *ISCSISessions) AddPortal(portal string, portalInfo PortalInfo) error

AddPortal creates a portal entry along with PortalInfo but without any LUNInfo

func (*ISCSISessions) CheckPortalExists

func (p *ISCSISessions) CheckPortalExists(portal string) bool

CheckPortalExists checks whether the portal is already in the map

func (*ISCSISessions) GeneratePublishInfo

func (p *ISCSISessions) GeneratePublishInfo(portal string) (*VolumePublishInfo, error)

func (*ISCSISessions) GoString

func (p *ISCSISessions) GoString() string

GoString prints Go-syntax representation of the map

func (*ISCSISessions) ISCSISessionData

func (p *ISCSISessions) ISCSISessionData(portal string) (*ISCSISessionData, error)

ISCSISessionData returns the PortalInfo and LUNInfo associated to a portal

func (*ISCSISessions) IsEmpty

func (p *ISCSISessions) IsEmpty() bool

IsEmpty identifies whether portal to LUN mapping is empty or not.

func (*ISCSISessions) LUNInfo

func (p *ISCSISessions) LUNInfo(portal string) (*LUNs, error)

LUNInfo returns LUNInfo for a given portal.

func (*ISCSISessions) LUNsForPortal

func (p *ISCSISessions) LUNsForPortal(portal string) ([]int32, error)

LUNsForPortal returns the list of LUNs associated with this portal

func (*ISCSISessions) PortalInfo

func (p *ISCSISessions) PortalInfo(portal string) (*PortalInfo, error)

PortalInfo returns portal info for a given portal.

func (*ISCSISessions) RemoveLUNFromPortal

func (p *ISCSISessions) RemoveLUNFromPortal(portal string, lunID int32)

RemoveLUNFromPortal removes a LUNInfo from the given portal mapping If it is the last LUNInfo corresponding to a portal, then portal is removed from the map as well

func (*ISCSISessions) RemovePortal

func (p *ISCSISessions) RemovePortal(portal string)

RemovePortal removes portal (along with its PortalInfo and LUNInfo) from the map

func (*ISCSISessions) ResetAllRemediationValues

func (p *ISCSISessions) ResetAllRemediationValues() error

ResetAllRemediationValues resets remediation information associated with all the portals

func (*ISCSISessions) ResetPortalRemediationValue

func (p *ISCSISessions) ResetPortalRemediationValue(portal string) error

ResetPortalRemediationValue resets remediation information associated with the portal

func (*ISCSISessions) String

func (p *ISCSISessions) String() string

String prints values of the map

func (*ISCSISessions) UpdateAndRecordPortalInfoChanges

func (p *ISCSISessions) UpdateAndRecordPortalInfoChanges(portal string, portalInfo PortalInfo) (string, error)

UpdateAndRecordPortalInfoChanges updates the portal information associated with the portal and identifies changes to the portal info (if any)

func (*ISCSISessions) UpdateCHAPForPortal

func (p *ISCSISessions) UpdateCHAPForPortal(portal string, newCHAP IscsiChapInfo) error

UpdateCHAPForPortal updates the CHAP information associated with the portal

func (*ISCSISessions) VolumeIDForPortal

func (p *ISCSISessions) VolumeIDForPortal(portal string) (string, error)

VolumeIDForPortal to get any valid volume ID behind a given portal.

func (*ISCSISessions) VolumeIDForPortalAndLUN

func (p *ISCSISessions) VolumeIDForPortalAndLUN(portal string, lunID int32) (string, error)

VolumeIDForPortalAndLUN to get any valid volume ID behind a given portal.

type IscsiAccessInfo

type IscsiAccessInfo struct {
	IscsiTargetPortal string   `json:"iscsiTargetPortal,omitempty"`
	IscsiPortals      []string `json:"iscsiPortals,omitempty"`
	IscsiTargetIQN    string   `json:"iscsiTargetIqn,omitempty"`
	IscsiLunNumber    int32    `json:"iscsiLunNumber,omitempty"`
	IscsiInterface    string   `json:"iscsiInterface,omitempty"`
	IscsiIgroup       string   `json:"iscsiIgroup,omitempty"`
	IscsiVAGs         []int64  `json:"iscsiVags,omitempty"`
	IscsiLunSerial    string   `json:"iscsiLunSerial,omitempty"`
	IscsiChapInfo
}

type IscsiChapInfo

type IscsiChapInfo struct {
	UseCHAP              bool   `json:"useCHAP"`
	IscsiUsername        string `json:"iscsiUsername,omitempty"`
	IscsiInitiatorSecret string `json:"iscsiInitiatorSecret,omitempty"`
	IscsiTargetUsername  string `json:"iscsiTargetUsername,omitempty"`
	IscsiTargetSecret    string `json:"iscsiTargetSecret,omitempty"`
}

func (IscsiChapInfo) String

func (i IscsiChapInfo) String() string

String implements the stringer interface and ensures that sensitive fields are redacted before being logged/printed

type LUNData

type LUNData struct {
	LUN   int32
	VolID string
}

type LUNs

type LUNs struct {
	Info map[int32]string
}

func (*LUNs) AddLUN

func (l *LUNs) AddLUN(m LUNData)

AddLUN adds a LUN to LUNs map

func (*LUNs) AllLUNs

func (l *LUNs) AllLUNs() []int32

AllLUNs returns a list of LUN Numbers.

func (*LUNs) CheckLUNExists

func (l *LUNs) CheckLUNExists(x int32) bool

CheckLUNExists verifies whether the given LUN exists in LUNs map

func (*LUNs) IdentifyMissingLUNs

func (l *LUNs) IdentifyMissingLUNs(m LUNs) []int32

IdentifyMissingLUNs returns the missing LUNs i.e., existing in m but not in l.

func (*LUNs) IsEmpty

func (l *LUNs) IsEmpty() bool

IsEmpty verifies whether there are any LUN entries in the map

func (*LUNs) RemoveLUN

func (l *LUNs) RemoveLUN(x int32)

RemoveLUN removes a given LUN from LUNs map

func (*LUNs) String

func (l *LUNs) String() string

func (*LUNs) VolumeID

func (l *LUNs) VolumeID(x int32) (string, error)

VolumeID returns volume ID associated with a LUN.

type MountInfo

type MountInfo struct {
	MountId      int
	ParentId     int
	DeviceId     string
	Root         string
	MountPoint   string
	MountOptions []string
	FsType       string
	MountSource  string
	SuperOptions []string
}

MountInfo represents a single line in /proc/self/mountinfo.

type MountPoint

type MountPoint struct {
	Device string
	Path   string
	Type   string
	Opts   []string
	Freq   int
	Pass   int
}

MountPoint represents a single line in /proc/mounts or /etc/fstab.

type NVMeAccessInfo

type NVMeAccessInfo struct {
	NVMeTargetIPs     []string `json:"nvmeTargetIPs,omitempty"`
	NVMeSubsystemNQN  string   `json:"nvmeSubsystemNqn,omitempty"`
	NVMeSubsystemUUID string   `json:"nvmeSubsystemUUID,omitempty"`
	NVMeNamespaceUUID string   `json:"nvmeNamespaceUUID,omitempty"`
}

type NfsAccessInfo

type NfsAccessInfo struct {
	NfsServerIP string `json:"nfsServerIp,omitempty"`
	NfsPath     string `json:"nfsPath,omitempty"`
	NfsUniqueID string `json:"nfsUniqueID,omitempty"`
}

type Node

type Node struct {
	Name             string               `json:"name"`
	IQN              string               `json:"iqn,omitempty"`
	NQN              string               `json:"nqn,omitempty"`
	HostWWPNMap      map[string][]string  `json:"hostWWPNMap,omitempty"`
	IPs              []string             `json:"ips,omitempty"`
	TopologyLabels   map[string]string    `json:"topologyLabels,omitempty"`
	NodePrep         *NodePrep            `json:"nodePrep,omitempty"`
	HostInfo         *HostSystem          `json:"hostInfo,omitempty"`
	Deleted          bool                 `json:"deleted"`
	PublicationState NodePublicationState `json:"publicationState"`
	LogLevel         string               `json:"logLevel"`
	LogWorkflows     string               `json:"logWorkflows"`
	LogLayers        string               `json:"logLayers"`
}

func (*Node) ConstructExternal

func (n *Node) ConstructExternal() *NodeExternal

ConstructExternal returns an externally facing representation of the Node.

func (*Node) Copy

func (n *Node) Copy() *Node

func (*Node) SmartCopy

func (n *Node) SmartCopy() interface{}

type NodeExternal

type NodeExternal struct {
	Name             string               `json:"name"`
	IQN              string               `json:"iqn,omitempty"`
	NQN              string               `json:"nqn,omitempty"`
	HostWWPNMap      map[string][]string  `json:"hostWWPNMap,omitempty"`
	IPs              []string             `json:"ips,omitempty"`
	TopologyLabels   map[string]string    `json:"topologyLabels,omitempty"`
	NodePrep         *NodePrep            `json:"nodePrep,omitempty"`
	HostInfo         *HostSystem          `json:"hostInfo,omitempty"`
	Deleted          *bool                `json:"deleted,omitempty"`
	PublicationState NodePublicationState `json:"publicationState,omitempty"`
	LogLevel         string               `json:"logLevel"`
	LogWorkflows     string               `json:"logWorkflows"`
	LogLayers        string               `json:"logLayers"`
}

type NodePrep

type NodePrep struct {
	Enabled            bool           `json:"enabled"`
	NFS                NodePrepStatus `json:"nfs,omitempty"`
	NFSStatusMessage   string         `json:"nfsStatusMessage,omitempty"`
	ISCSI              NodePrepStatus `json:"iscsi,omitempty"`
	ISCSIStatusMessage string         `json:"iscsiStatusMessage,omitempty"`
}

NodePrep struct is deprecated and only here for backwards compatibility

type NodePrepBreadcrumb

type NodePrepBreadcrumb struct {
	TridentVersion string `json:"tridentVersion"`
	NFS            string `json:"nfs,omitempty"`
	ISCSI          string `json:"iscsi,omitempty"`
}

type NodePrepStatus

type NodePrepStatus string

type NodePublicationState

type NodePublicationState string

type NodePublicationStateFlags

type NodePublicationStateFlags struct {
	OrchestratorReady  *bool `json:"orchestratorReady,omitempty"`  // Is the node in a state such that volumes may be published?
	AdministratorReady *bool `json:"administratorReady,omitempty"` // Should new publications be allowed?
	ProvisionerReady   *bool `json:"provisionerReady,omitempty"`   // Is publishing volumes to this node safe for the backend?
}

func (*NodePublicationStateFlags) IsNodeCleanable

func (f *NodePublicationStateFlags) IsNodeCleanable() bool

func (*NodePublicationStateFlags) IsNodeCleaned

func (f *NodePublicationStateFlags) IsNodeCleaned() bool

func (*NodePublicationStateFlags) IsNodeDirty

func (f *NodePublicationStateFlags) IsNodeDirty() bool

func (*NodePublicationStateFlags) String

func (f *NodePublicationStateFlags) String() string

type PortalInfo

type PortalInfo struct {
	ISCSITargetIQN         string
	SessionNumber          string // Should only be set when capturing current state of the Portal
	Credentials            IscsiChapInfo
	ReasonInvalid          PortalInvalid // A portal may be in an invalid state, if so then why?
	LastAccessTime         time.Time     // Time at which there was an attempt to self-heal session
	FirstIdentifiedStaleAt time.Time     // Time at which session was first identified to be stale
	Source                 string        // Source of the portal Info
}

func (*PortalInfo) CHAPInUse

func (p *PortalInfo) CHAPInUse() bool

CHAPInUse identifies whether CHAP is set or not

func (*PortalInfo) HasTargetIQN

func (p *PortalInfo) HasTargetIQN() bool

HasTargetIQN verifies if target IQN is set or not

func (*PortalInfo) IsFirstIdentifiedStaleAtSet

func (p *PortalInfo) IsFirstIdentifiedStaleAtSet() bool

IsFirstIdentifiedStaleAtSet identifies if FirstIdentifiedStaleAt time is set or not

func (*PortalInfo) IsValid

func (p *PortalInfo) IsValid() bool

IsValid verifies if PortalInfo is valid or not

func (*PortalInfo) RecordChanges

func (p *PortalInfo) RecordChanges(m PortalInfo) string

RecordChanges compares a given portal info with another portal info and record changes

func (*PortalInfo) ResetFirstIdentifiedStaleAt

func (p *PortalInfo) ResetFirstIdentifiedStaleAt()

ResetFirstIdentifiedStaleAt reset FirstIdentifiedStaleAt time to its zero value

func (*PortalInfo) String

func (p *PortalInfo) String() string

func (*PortalInfo) UpdateCHAPCredentials

func (p *PortalInfo) UpdateCHAPCredentials(credentials IscsiChapInfo)

UpdateCHAPCredentials updates Portal's CHAP credentials

type PortalInvalid

type PortalInvalid int8

PortalInvalid is a data structure for iSCSI self-healing capturing Portal's invalid non-recoverable state

const (
	NotInvalid PortalInvalid = iota
	MissingTargetIQN
	MissingMpathDevice
	DuplicatePortals
)

func (PortalInvalid) String

func (a PortalInvalid) String() string

type PruneAttachmentRequest

type PruneAttachmentRequest struct {
	VolumeAccessInfo `json:"volumeAccessInfo"`
	VolumeName       string          `json:"volumeName"`
	Protocol         config.Protocol `json:"protocol"`
}

type PruneAttachmentResponse

type PruneAttachmentResponse struct {
	VolumeAccessInfo `json:"volumeAccessInfo"`
	VolumeName       string          `json:"volumeName"`
	Protocol         config.Protocol `json:"protocol"`
}

type SCSIDeviceInfoGetter

type SCSIDeviceInfoGetter func(ctx context.Context) (*ScsiDeviceInfo, error)

type SMBAccessInfo

type SMBAccessInfo struct {
	SMBServer string `json:"smbServer,omitempty"`
	SMBPath   string `json:"smbPath,omitempty"`
}

type ScsiDeviceAddress

type ScsiDeviceAddress struct {
	Host    string
	Channel string
	Target  string
	LUN     string
}

ScsiDeviceAddress is a data structure for representing a SCSI device address

func (ScsiDeviceAddress) String

func (s ScsiDeviceAddress) String() string

type ScsiDeviceInfo

type ScsiDeviceInfo struct {
	ScsiDeviceAddress
	Devices         []string
	DevicePaths     []string
	MultipathDevice string
	Filesystem      string
	IQN             string
	WWNN            string
	SessionNumber   int
	CHAPInfo        IscsiChapInfo
}

ScsiDeviceInfo contains information about SCSI devices

func (*ScsiDeviceInfo) Copy

func (s *ScsiDeviceInfo) Copy() *ScsiDeviceInfo

func (*ScsiDeviceInfo) Equal

func (s *ScsiDeviceInfo) Equal(other *ScsiDeviceInfo) bool

func (*ScsiDeviceInfo) String

func (s *ScsiDeviceInfo) String() string

type SystemOS

type SystemOS struct {
	Distro  string `json:"distro"` // ubuntu/centos/rhel/windows
	Version string `json:"version"`
	Release string `json:"release,omitempty"`
}

type VolumeAccessInfo

type VolumeAccessInfo struct {
	IscsiAccessInfo
	NVMeAccessInfo
	NfsAccessInfo
	SMBAccessInfo
	FCPAccessInfo
	MountOptions       string `json:"mountOptions,omitempty"`
	FormatOptions      string `json:"formatOptions,omitempty"`
	PublishEnforcement bool   `json:"publishEnforcement,omitempty"`
	ReadOnly           bool   `json:"readOnly,omitempty"`
	// The access mode values are defined by CSI
	// See https://github.com/container-storage-interface/spec/blob/release-1.5/lib/go/csi/csi.pb.go#L135
	AccessMode int32 `json:"accessMode,omitempty"`
}

func (*VolumeAccessInfo) DeepCopy

func (v *VolumeAccessInfo) DeepCopy() *VolumeAccessInfo

func (*VolumeAccessInfo) DeepCopyInto

func (in *VolumeAccessInfo) DeepCopyInto(out *VolumeAccessInfo)

func (*VolumeAccessInfo) SmartCopy

func (v *VolumeAccessInfo) SmartCopy() interface{}

type VolumeAutogrowStatus

type VolumeAutogrowStatus struct {
	// LastAutogrowPolicyUsed is the autogrow policy used latest
	// Precedence: PVC annotation > SC annotation > Backend config
	LastAutogrowPolicyUsed string `json:"lastAutogrowPolicyUsed,omitempty"`

	// LastAutogrowAttemptedAt is the timestamp of the most recent attempt
	LastAutogrowAttemptedAt *time.Time `json:"lastAutogrowAttemptedAt,omitempty"`

	// LastProposedSize is the size that was last attempted (may have failed)
	LastProposedSize string `json:"lastProposedSize,omitempty"`

	// LastSuccessfulAutogrowAt is when the last successful autogrow completed
	LastSuccessfulAutogrowAt *time.Time `json:"lastSuccessfulAutogrowAt,omitempty"`

	// LastSuccessfulSize is the size after the last successful autogrow
	LastSuccessfulSize string `json:"lastSuccessfulSize,omitempty"`

	// LastError contains the most recent error message (empty on success)
	LastError string `json:"lastError,omitempty"`

	// TotalAutogrowAttempted is cumulative count of all autogrow attempts
	TotalAutogrowAttempted int `json:"totalAutogrowAttempted"`

	// TotalSuccessfulAutogrow is cumulative count of successful autogrows
	TotalSuccessfulAutogrow int `json:"totalSuccessfulAutogrow"`
}

VolumeAutogrowStatus tracks the autogrow feature state and history for a volume

type VolumeMoveAttachmentState

type VolumeMoveAttachmentState string
const (
	VolumeMoveAttachmentStatePending  VolumeMoveAttachmentState = "Pending"
	VolumeMoveAttachmentStateBridged  VolumeMoveAttachmentState = "Bridged"
	VolumeMoveAttachmentStateMigrated VolumeMoveAttachmentState = "Migrated"
	VolumeMoveAttachmentStateDetached VolumeMoveAttachmentState = "Detached"
	VolumeMoveAttachmentStateCleaned  VolumeMoveAttachmentState = "Cleaned"
	VolumeMoveAttachmentStateFailed   VolumeMoveAttachmentState = "Failed"
)

func (VolumeMoveAttachmentState) String

func (v VolumeMoveAttachmentState) String() string

type VolumeMoveInfo

type VolumeMoveInfo struct {
	// State is the current VolumeMoveState.
	State VolumeMoveState `json:"moveState,omitempty"`
	// VolumeName is the name of the Trident volume being moved.
	VolumeName string `json:"volumeName,omitempty"`
	// SourcePool is an opaque storage pool identifier from which the volume is being moved (backend-specific).
	SourcePool string `json:"sourcePool,omitempty"`
	// SourceNode is an opaque pool identifier from which the volume is being moved (backend-specific).
	SourceNode string `json:"sourceNode,omitempty"`
	// TargetPool is an opaque pool identifier to which the volume is being moved (backend-specific).
	TargetPool string `json:"targetPool,omitempty"`
	// TargetNode is an opaque node identifier to which the volume is being moved (backend-specific).
	TargetNode string `json:"targetNode,omitempty"`
	// BackendContext is an opaque context needed to monitor and complete the move (backend-specific).
	BackendContext json.RawMessage `json:"backendContext,omitempty"`
	// InitialAccessInfo is the access information for the volume before the move.
	InitialAccessInfo *VolumeAccessInfo `json:"initialAccessInfo,omitempty"`
	// TargetAccessInfo is the access information for the volume after the move.
	TargetAccessInfo *VolumeAccessInfo `json:"targetAccessInfo,omitempty"`
	// DeleteAfterSuccess is the duration after which the TVM CR should be automatically deleted if the move succeeds.
	DeleteAfterSuccess *time.Duration `json:"deleteAfterSuccess,omitempty"`
	// DryRun validates a move but does not actually stage or perform it.
	DryRun bool `json:"dryRun,omitempty"`
}

func (*VolumeMoveInfo) DeepCopy

func (i *VolumeMoveInfo) DeepCopy() *VolumeMoveInfo

func (*VolumeMoveInfo) Equals

func (i *VolumeMoveInfo) Equals(other *VolumeMoveInfo) bool

Equals compares the meaningful state changes to values in a VolumeMoveInfo. Two VolumeMoveInfo's are equivalent if State, TargetNode, TargetPool, and BackendContext values are equivalent.

type VolumeMoveState

type VolumeMoveState string
const (
	VolumeMoveStatePending             VolumeMoveState = "Pending"
	VolumeMoveStateControllerStaging   VolumeMoveState = "ControllerStaging"
	VolumeMoveStateNodeStaging         VolumeMoveState = "NodeStaging"
	VolumeMoveStateMoving              VolumeMoveState = "Moving"
	VolumeMoveStateControllerUnstaging VolumeMoveState = "ControllerUnstaging"
	VolumeMoveStateNodeUnstaging       VolumeMoveState = "NodeUnstaging"
	VolumeMoveStateSucceeded           VolumeMoveState = "Succeeded"
	VolumeMoveStateFailed              VolumeMoveState = "Failed"
)

func (VolumeMoveState) HasMoved

func (v VolumeMoveState) HasMoved() bool

func (VolumeMoveState) IsActive

func (v VolumeMoveState) IsActive() bool

func (VolumeMoveState) IsControllerStaging

func (v VolumeMoveState) IsControllerStaging() bool

func (VolumeMoveState) IsControllerUnstaging

func (v VolumeMoveState) IsControllerUnstaging() bool

func (VolumeMoveState) IsEmpty

func (v VolumeMoveState) IsEmpty() bool

func (VolumeMoveState) IsFailed

func (v VolumeMoveState) IsFailed() bool

func (VolumeMoveState) IsMoving

func (v VolumeMoveState) IsMoving() bool

func (VolumeMoveState) IsNodeStaging

func (v VolumeMoveState) IsNodeStaging() bool

func (VolumeMoveState) IsNodeUnstaging

func (v VolumeMoveState) IsNodeUnstaging() bool

func (VolumeMoveState) IsPending

func (v VolumeMoveState) IsPending() bool

func (VolumeMoveState) IsSucceeded

func (v VolumeMoveState) IsSucceeded() bool

func (VolumeMoveState) IsTerminal

func (v VolumeMoveState) IsTerminal() bool

func (VolumeMoveState) String

func (v VolumeMoveState) String() string

type VolumePublication

type VolumePublication struct {
	Name       string `json:"name"`
	NodeName   string `json:"node"`
	VolumeName string `json:"volume"`
	ReadOnly   bool   `json:"readOnly"`
	// The access mode values are defined by CSI
	// See https://github.com/container-storage-interface/spec/blob/release-1.5/lib/go/csi/csi.pb.go#L135
	AccessMode         int32             `json:"accessMode"`
	AutogrowPolicy     string            `json:"autogrowPolicy,omitempty"`
	AutogrowIneligible bool              `json:"autogrowIneligible,omitempty"` // Indicates if volume is ineligible for autogrow monitoring
	StorageClass       string            `json:"storageClass,omitempty"`       // StorageClass used by this volume
	BackendUUID        string            `json:"backendUUID,omitempty"`        // Backend UUID hosting this volume
	Pool               string            `json:"pool,omitempty"`               // Storage pool hosting this volume
	Labels             map[string]string `json:"labels,omitempty"`             // Labels mirrored from CRD metadata labels
}

func (*VolumePublication) ConstructExternal

func (v *VolumePublication) ConstructExternal() *VolumePublicationExternal

ConstructExternal returns an externally facing representation of the VolumePublication.

func (*VolumePublication) Copy

Copy returns a new copy of the VolumePublication.

func (*VolumePublication) GetNodeID

func (v *VolumePublication) GetNodeID() string

func (*VolumePublication) GetVolumeID

func (v *VolumePublication) GetVolumeID() string

func (*VolumePublication) SmartCopy

func (v *VolumePublication) SmartCopy() interface{}

type VolumePublicationExternal

type VolumePublicationExternal struct {
	Name       string `json:"name"`
	NodeName   string `json:"node"`
	VolumeName string `json:"volume"`
	ReadOnly   bool   `json:"readOnly"`
	// The access mode values are defined by CSI
	// See https://github.com/container-storage-interface/spec/blob/release-1.5/lib/go/csi/csi.pb.go#L135
	AccessMode         int32             `json:"accessMode"`
	AutogrowPolicy     string            `json:"autogrowPolicy,omitempty"`
	AutogrowIneligible bool              `json:"autogrowIneligible,omitempty"` // Indicates if volume is ineligible for autogrow monitoring
	StorageClass       string            `json:"storageClass,omitempty"`       // StorageClass used by this volume
	BackendUUID        string            `json:"backendUUID,omitempty"`        // Backend UUID hosting this volume
	Pool               string            `json:"pool,omitempty"`               // Storage pool hosting this volume
	Labels             map[string]string `json:"labels,omitempty"`             // Labels mirrored from CRD metadata labels
}

type VolumePublishInfo

type VolumePublishInfo struct {
	Localhost         bool                `json:"localhost,omitempty"`
	HostIQN           []string            `json:"hostIQN,omitempty"`
	HostNQN           string              `json:"hostNQN,omitempty"`
	HostWWPNMap       map[string][]string `json:"hostWWPNMap,omitempty"`
	HostIP            []string            `json:"hostIP,omitempty"`
	BackendUUID       string              `json:"backendUUID,omitempty"`
	Nodes             []*Node             `json:"nodes,omitempty"`
	HostName          string              `json:"hostName,omitempty"`
	FilesystemType    string              `json:"fstype,omitempty"`
	SharedTarget      bool                `json:"sharedTarget,omitempty"`
	DevicePath        string              `json:"devicePath,omitempty"`
	RawDevicePath     string              `json:"rawDevicePath,omitempty"` // NOTE: devicePath was renamed to this 23.01-23.04
	Unmanaged         bool                `json:"unmanaged,omitempty"`
	StagingMountpoint string              `json:"stagingMountpoint,omitempty"` // NOTE: Added in 22.04 release
	TridentUUID       string              `json:"tridentUUID,omitempty"`       // NOTE: Added in 22.07 release
	LUKSEncryption    string              `json:"LUKSEncryption,omitempty"`
	SANType           string              `json:"SANType,omitempty"`
	VolumeMode        string              `json:"volumeMode,omitempty"`
	// HostNVMeNamespaceUUIDs contains namespace UUIDs that remain published
	// to the host where this volume is mounted. Used by NVMe drivers to
	// determine if host should be removed from shared subsystems.
	HostNVMeNamespaceUUIDs []string `json:"-"`
	Pool                   string   `json:"pool,omitempty"`
	StorageClass           string   `json:"storageClass,omitempty"`
	VolumeAccessInfo
}

func (*VolumePublishInfo) DeepCopy

func (v *VolumePublishInfo) DeepCopy() *VolumePublishInfo

type VolumeTrackingInfo

type VolumeTrackingInfo struct {
	VolumePublishInfo
	VolumeTrackingInfoPath string
	StagingTargetPath      string              `json:"stagingTargetPath"`
	PublishedPaths         map[string]struct{} `json:"publishedTargetPaths"`
}

type VolumeTrackingPublishInfo

type VolumeTrackingPublishInfo struct {
	StagingTargetPath string `json:"stagingTargetPath"`
}

type VolumeUpdateInfo

type VolumeUpdateInfo struct {
	SnapshotDirectory string `json:"snapshotDirectory"`
	PoolLevel         bool   `json:"poolLevel"`
}

Jump to

Keyboard shortcuts

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