Documentation
¶
Index ¶
- Constants
- func GenerateVolumePublishName(volumeID, nodeID string) string
- type AttachmentInfo
- type AutogrowPolicyReason
- type DFInfo
- type EffectiveAutogrowPolicyInfo
- type FCPAccessInfo
- type FibreChannelAccessInfo
- type GraftAttachmentRequest
- type GraftAttachmentResponse
- type HostSystem
- type ISCSIAction
- type ISCSIDiscoveryInfo
- type ISCSISessionData
- type ISCSISessions
- func (p *ISCSISessions) AddLUNToPortal(portal string, lData LUNData) error
- func (p *ISCSISessions) AddPortal(portal string, portalInfo PortalInfo) error
- func (p *ISCSISessions) CheckPortalExists(portal string) bool
- func (p *ISCSISessions) GeneratePublishInfo(portal string) (*VolumePublishInfo, error)
- func (p *ISCSISessions) GoString() string
- func (p *ISCSISessions) ISCSISessionData(portal string) (*ISCSISessionData, error)
- func (p *ISCSISessions) IsEmpty() bool
- func (p *ISCSISessions) LUNInfo(portal string) (*LUNs, error)
- func (p *ISCSISessions) LUNsForPortal(portal string) ([]int32, error)
- func (p *ISCSISessions) PortalInfo(portal string) (*PortalInfo, error)
- func (p *ISCSISessions) RemoveLUNFromPortal(portal string, lunID int32)
- func (p *ISCSISessions) RemovePortal(portal string)
- func (p *ISCSISessions) ResetAllRemediationValues() error
- func (p *ISCSISessions) ResetPortalRemediationValue(portal string) error
- func (p *ISCSISessions) String() string
- func (p *ISCSISessions) UpdateAndRecordPortalInfoChanges(portal string, portalInfo PortalInfo) (string, error)
- func (p *ISCSISessions) UpdateCHAPForPortal(portal string, newCHAP IscsiChapInfo) error
- func (p *ISCSISessions) VolumeIDForPortal(portal string) (string, error)
- func (p *ISCSISessions) VolumeIDForPortalAndLUN(portal string, lunID int32) (string, error)
- type IscsiAccessInfo
- type IscsiChapInfo
- type LUNData
- type LUNs
- func (l *LUNs) AddLUN(m LUNData)
- func (l *LUNs) AllLUNs() []int32
- func (l *LUNs) CheckLUNExists(x int32) bool
- func (l *LUNs) IdentifyMissingLUNs(m LUNs) []int32
- func (l *LUNs) IsEmpty() bool
- func (l *LUNs) RemoveLUN(x int32)
- func (l *LUNs) String() string
- func (l *LUNs) VolumeID(x int32) (string, error)
- type MountInfo
- type MountPoint
- type NVMeAccessInfo
- type NfsAccessInfo
- type Node
- type NodeExternal
- type NodePrep
- type NodePrepBreadcrumb
- type NodePrepStatus
- type NodePublicationState
- type NodePublicationStateFlags
- type PortalInfo
- func (p *PortalInfo) CHAPInUse() bool
- func (p *PortalInfo) HasTargetIQN() bool
- func (p *PortalInfo) IsFirstIdentifiedStaleAtSet() bool
- func (p *PortalInfo) IsValid() bool
- func (p *PortalInfo) RecordChanges(m PortalInfo) string
- func (p *PortalInfo) ResetFirstIdentifiedStaleAt()
- func (p *PortalInfo) String() string
- func (p *PortalInfo) UpdateCHAPCredentials(credentials IscsiChapInfo)
- type PortalInvalid
- type PruneAttachmentRequest
- type PruneAttachmentResponse
- type SCSIDeviceInfoGetter
- type SMBAccessInfo
- type ScsiDeviceAddress
- type ScsiDeviceInfo
- type SystemOS
- type VolumeAccessInfo
- type VolumeAutogrowStatus
- type VolumeMoveAttachmentState
- type VolumeMoveInfo
- type VolumeMoveState
- func (v VolumeMoveState) HasMoved() bool
- func (v VolumeMoveState) IsActive() bool
- func (v VolumeMoveState) IsControllerStaging() bool
- func (v VolumeMoveState) IsControllerUnstaging() bool
- func (v VolumeMoveState) IsEmpty() bool
- func (v VolumeMoveState) IsFailed() bool
- func (v VolumeMoveState) IsMoving() bool
- func (v VolumeMoveState) IsNodeStaging() bool
- func (v VolumeMoveState) IsNodeUnstaging() bool
- func (v VolumeMoveState) IsPending() bool
- func (v VolumeMoveState) IsSucceeded() bool
- func (v VolumeMoveState) IsTerminal() bool
- func (v VolumeMoveState) String() string
- type VolumePublication
- type VolumePublicationExternal
- type VolumePublishInfo
- type VolumeTrackingInfo
- type VolumeTrackingPublishInfo
- type VolumeUpdateInfo
Constants ¶
const ( ScanAllSCSIDeviceAddress = "-" ScanSCSIDeviceAddressZero = "0" )
const ( NodeDirty = NodePublicationState("dirty") NodeCleanable = NodePublicationState("cleanable") NodeClean = NodePublicationState("clean") )
Variables ¶
This section is empty.
Functions ¶
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 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 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 ¶
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 LUNs ¶
func (*LUNs) CheckLUNExists ¶
CheckLUNExists verifies whether the given LUN exists in LUNs map
func (*LUNs) IdentifyMissingLUNs ¶
IdentifyMissingLUNs returns the missing LUNs i.e., existing in m but not in l.
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 ¶
MountPoint represents a single line in /proc/mounts or /etc/fstab.
type NVMeAccessInfo ¶
type NfsAccessInfo ¶
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.
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 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 ScsiDeviceAddress ¶
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 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 ¶
func (v *VolumePublication) Copy() *VolumePublication
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"`
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"`
}