v1alpha1

package
v1.11.0-RC2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// DiskStateActive is the active state of the disks.
	DiskStateActive = "Active"
	// ProvisioningTypeManual is the manual provisioned SPC.
	ProvisioningTypeManual = "manual"
	// ProvisioningTypeAuto is the auto provisioned SPC.
	ProvisioningTypeAuto = "auto"
)

Variables

This section is empty.

Functions

func ProvisioningType

func ProvisioningType(spc *apis.StoragePoolClaim) string

ProvisioningType returns the way pool should be provisioned e.g. auto or manual.

Types

type BDDetails

type BDDetails struct {
	DeviceID string
	BDName   string
}

BDDetails holds the claimed block device details

type ClaimedBDDetails

type ClaimedBDDetails struct {
	NodeName        string
	BlockDeviceList []BDDetails
}

ClaimedBDDetails holds the node name and claimed block device deatils corresponding to node

type Config

type Config struct {
	// Spc is the StoragePoolClaim object.
	Spc *apis.StoragePoolClaim
	// BlockDeviceClient is the client for Disk to perform CRUD operations on Disk object.
	BlockDeviceClient blockdevice.BlockDeviceInterface
	// SpClient is the client for SP to perform CRUD operations on SP object.
	SpClient sp.StoragepoolInterface
	// CspClient is the client for CSP to perform CRUD operations on CSP object.
	CspClient cstorpool.CstorpoolInterface
	// ProvisioningType tells the type of provisioning i.e. manual or auto.
	ProvisioningType string
	// VisitedNodes is a map which contains the node names which has already been
	// processed for pool provisioning
	VisitedNodes map[string]bool
	// Namespace where OpenEBS is deployed
	Namespace string
}

Config embeds clients for disk,csp and sp and contains, SPC object and ProvisioningType field which should tell provisioning type manual or auto.

func NewConfig

func NewConfig(spc *apis.StoragePoolClaim) *Config

NewConfig returns an instance of Config based on SPC object.

func (*Config) ClaimBlockDevice

func (ac *Config) ClaimBlockDevice(nodeBDs *nodeBlockDevice, spc *apis.StoragePoolClaim) (*ClaimedBDDetails, error)

ClaimBlockDevice will create BDC for corresponding BD

func (*Config) NodeBlockDeviceSelector

func (ac *Config) NodeBlockDeviceSelector() (*nodeBlockDevice, error)

NodeBlockDeviceSelector selects a node and block devices attached to it.

Jump to

Keyboard shortcuts

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