Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FilterActive is the filter for getting active BDs FilterActive = "filterActive" // FilterUnclaimed is the filter for getting unclaimed BDs FilterUnclaimed = "filterUnclaimed" // FilterDeviceType is the filter for matching DeviceType like SSD, HDD, sparse FilterDeviceType = "filterDeviceType" // FilterVolumeMode is the filter for filtering based on Volume Mode required FilterVolumeMode = "filterVolumeMode" // FilterBlockDeviceName is the filter for getting a BD based on a name FilterBlockDeviceName = "filterBlockDeviceName" // FilterResourceStorage is the filter for matching resource storage FilterResourceStorage = "filterResourceStorage" // FilterOutSparseBlockDevices is used to filter out sparse BDs FilterOutSparseBlockDevices = "filterSparseBlockDevice" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Client client.Client ClaimSpec *v1alpha1.DeviceClaimSpec ManualSelection bool }
Config stores the configuration for selecting a block device from a block device claim. It contains the claim spec, selection type and client to interface with etcd
func NewConfig ¶
func NewConfig(claimSpec *v1alpha1.DeviceClaimSpec, client client.Client) *Config
NewConfig creates a new Config struct for the block device claim
func (*Config) ApplyFilters ¶
func (c *Config) ApplyFilters(bdList *apis.BlockDeviceList, filterKeys ...string) *apis.BlockDeviceList
ApplyFilters apply the filter specified in the filterkeys on the given BD List,
func (*Config) Filter ¶
func (c *Config) Filter(bdList *apis.BlockDeviceList) (*apis.BlockDevice, error)
Filter selects a single block device from a list of block devices
Click to show internal directories.
Click to hide internal directories.