Documentation ¶
Index ¶
- Constants
- Variables
- func CheckImportedPoolVolume()
- func Create(csp *apis.CStorPoolInstance) error
- func Delete(cspi *apis.CStorPoolInstance) error
- func ErrorWrapf(err error, format string, args ...interface{}) error
- func GetPropertyValue(poolName, property string) (string, error)
- func Import(cspi *apis.CStorPoolInstance) (bool, error)
- func IsEmpty(s string) bool
- func PoolName(csp *apis.CStorPoolInstance) string
- func Update(cspi *apis.CStorPoolInstance) (*apis.CStorPoolInstance, error)
Constants ¶
const ( // DeviceTypeSpare .. spare device type DeviceTypeSpare = "spare" // DeviceTypeReadCache .. read cache device type DeviceTypeReadCache = "cache" // DeviceTypeWriteCache .. write cache device type DeviceTypeWriteCache = "log" // DeviceTypeEmpty .. empty device type.. data disk DeviceTypeEmpty = "" )
const ( // PoolPrefix is prefix for pool name PoolPrefix string = "cstor-" )
Variables ¶
var KubeClient kubernetes.Interface
KubeClient is for kubernetes CR operation
var OpenEBSClient clientset.Interface
OpenEBSClient is for openebs CR operation
Functions ¶
func CheckImportedPoolVolume ¶
func CheckImportedPoolVolume()
CheckImportedPoolVolume will notify CVR controller for new imported pool's volumes
func Create ¶
func Create(csp *apis.CStorPoolInstance) error
Create will create the pool for given csp object
func Delete ¶
func Delete(cspi *apis.CStorPoolInstance) error
Delete will destroy the pool for given cspi. It will also perform labelclear for pool disk.
func ErrorWrapf ¶
ErrorWrapf wrap error If given err is nil then it will return new error
func GetPropertyValue ¶
GetPropertyValue will return value of given property for given pool
func Import ¶
func Import(cspi *apis.CStorPoolInstance) (bool, error)
Import will import pool for given CSP object. It will also set `cachefile` property for that pool if it is mentioned in object It will return - - If pool is imported or not - If any error occurred during import operation
func PoolName ¶
func PoolName(csp *apis.CStorPoolInstance) string
PoolName return pool name for given CSP object
func Update ¶
func Update(cspi *apis.CStorPoolInstance) (*apis.CStorPoolInstance, error)
Update will update the deployed pool according to given cspi object
Types ¶
This section is empty.