blockdevice

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

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"
	// FilterNodeName is used to filter based on nodename
	FilterNodeName = "filterNodeName"
)

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

Jump to

Keyboard shortcuts

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