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 ClaimedBDDetails ¶
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 ¶
NodeBlockDeviceSelector selects a node and block devices attached to it.
Click to show internal directories.
Click to hide internal directories.