hwameistor

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConvertReplicaNum = 2
	DESC              = "DESC"
	ASC               = "ASC"
)
View Source
const (
	TimeSort = "time"
	TypeSort = "type"
	NameSort = "name"
	Migrate  = "Migrate"
	Expand   = "Expand"
	Convert  = "Convert"
)
View Source
const (
	LvmHwameistor  = "lvm.hwameistor.io"
	DiskHwameistor = "disk.hwameistor.io"
)
View Source
const Hwameistor = "lvm.hwameistor.io"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthController

type AuthController struct {
	client.Client
	record.EventRecorder
	// contains filtered or unexported fields
}

func NewAuthController

func NewAuthController(client client.Client, recorder record.EventRecorder) *AuthController

func (*AuthController) Auth

func (authController *AuthController) Auth(req api.AuthReqBody) (string, int64, error)

func (*AuthController) IsEnableAuth

func (authController *AuthController) IsEnableAuth() bool

IsEnableAuth return if enable Auth

func (*AuthController) Logout

func (authController *AuthController) Logout(token string) error

func (*AuthController) VerifyToken

func (authController *AuthController) VerifyToken(token string) bool

type LocalDiskController

type LocalDiskController struct {
	client.Client
	record.EventRecorder
}

func NewLocalDiskController

func NewLocalDiskController(client client.Client, recorder record.EventRecorder) *LocalDiskController

func (*LocalDiskController) GetLocalDisk

func (ldController *LocalDiskController) GetLocalDisk(localDiskName string) (*apisv1alpha1.LocalDisk, error)

func (*LocalDiskController) GetLocalDiskByPath

func (ldController *LocalDiskController) GetLocalDiskByPath(nodeName, shortPath string) (*apisv1alpha1.LocalDisk, error)

func (*LocalDiskController) ListLocalDisk

func (ldController *LocalDiskController) ListLocalDisk() (*apisv1alpha1.LocalDiskList, error)

func (*LocalDiskController) SetLocalDiskOwner

func (ldController *LocalDiskController) SetLocalDiskOwner(localDiskName string, owner string) error

type LocalDiskNodeController

type LocalDiskNodeController struct {
	client.Client
	record.EventRecorder
}

func NewLocalDiskNodeController

func NewLocalDiskNodeController(client client.Client, recorder record.EventRecorder) *LocalDiskNodeController

func (*LocalDiskNodeController) GetLocalDiskNode

func (ldController *LocalDiskNodeController) GetLocalDiskNode(key client.ObjectKey) (*apisv1alpha1.LocalDiskNode, error)

func (*LocalDiskNodeController) ListLocalDiskNode

func (ldController *LocalDiskNodeController) ListLocalDiskNode() (*apisv1alpha1.LocalDiskNodeList, error)

type LocalSnapshotController

type LocalSnapshotController struct {
	client.Client
	record.EventRecorder
}

func NewLocalSnapshotController

func NewLocalSnapshotController(client client.Client, recorder record.EventRecorder) *LocalSnapshotController

func (*LocalSnapshotController) GetLocalSnapshot

func (lvsController *LocalSnapshotController) GetLocalSnapshot(lvsname string) (*hwameistorapi.Snapshot, error)

func (*LocalSnapshotController) ListLocalSnapshot

func (lvsController *LocalSnapshotController) ListLocalSnapshot(queryPage hwameistorapi.QueryPage) (*hwameistorapi.SnapshotList, error)

func (*LocalSnapshotController) RollbackVolumeSnapshot

func (lvsController *LocalSnapshotController) RollbackVolumeSnapshot(lvsname string) error

type LocalStorageNodeController

type LocalStorageNodeController struct {
	client.Client
	record.EventRecorder
	// contains filtered or unexported fields
}

func NewLocalStorageNodeController

func NewLocalStorageNodeController(client client.Client, clientset *kubernetes.Clientset, recorder record.EventRecorder) *LocalStorageNodeController

func (*LocalStorageNodeController) GetLocalDiskNode

func (lsnController *LocalStorageNodeController) GetLocalDiskNode(nodeName string) (*apisv1alpha1.LocalDiskNode, error)

func (*LocalStorageNodeController) GetLocalStorageNode

func (lsnController *LocalStorageNodeController) GetLocalStorageNode(key client.ObjectKey) (*apisv1alpha1.LocalStorageNode, error)

func (*LocalStorageNodeController) GetStorageNode

func (lsnController *LocalStorageNodeController) GetStorageNode(nodeName string) (*hwameistorapi.StorageNode, error)

func (*LocalStorageNodeController) GetStorageNodeByPool

func (lsnController *LocalStorageNodeController) GetStorageNodeByPool(nodeName, poolName string) (*hwameistorapi.StorageNode, error)

func (*LocalStorageNodeController) GetStorageNodeDisk

func (lsnController *LocalStorageNodeController) GetStorageNodeDisk(page hwameistorapi.QueryPage) (*hwameistorapi.LocalDiskInfo, error)

func (*LocalStorageNodeController) GetStorageNodeMigrate

func (lsnController *LocalStorageNodeController) GetStorageNodeMigrate(queryPage hwameistorapi.QueryPage) (*hwameistorapi.VolumeOperationListByNode, error)

func (*LocalStorageNodeController) ListLocalStorageNode

func (lsnController *LocalStorageNodeController) ListLocalStorageNode(queryPage hwameistorapi.QueryPage) ([]*hwameistorapi.StorageNode, error)

func (*LocalStorageNodeController) ListStorageNodeDisks

func (lsnController *LocalStorageNodeController) ListStorageNodeDisks(queryPage hwameistorapi.QueryPage) ([]*hwameistorapi.LocalDiskInfo, error)

func (*LocalStorageNodeController) LocalDiskListByNode

func (lsnController *LocalStorageNodeController) LocalDiskListByNode(queryPage hwameistorapi.QueryPage) (*hwameistorapi.LocalDiskListByNode, error)

func (*LocalStorageNodeController) RemoveReserveStorageNodeDisk

func (lsnController *LocalStorageNodeController) RemoveReserveStorageNodeDisk(queryPage hwameistorapi.QueryPage) (*hwameistorapi.DiskRemoveReservedRspBody, error)

func (*LocalStorageNodeController) ReserveStorageNodeDisk

func (lsnController *LocalStorageNodeController) ReserveStorageNodeDisk(queryPage hwameistorapi.QueryPage) (*hwameistorapi.DiskReservedRspBody, error)

func (*LocalStorageNodeController) SetLdHandler

func (lsnController *LocalStorageNodeController) SetLdHandler(handler *localdisk.Handler)

func (*LocalStorageNodeController) SetStorageNodeDiskOwner

func (lsnController *LocalStorageNodeController) SetStorageNodeDiskOwner(queryPage hwameistorapi.QueryPage) (*hwameistorapi.DiskOwnerRspBody, error)

func (*LocalStorageNodeController) StorageNodeList

func (lsnController *LocalStorageNodeController) StorageNodeList(queryPage hwameistorapi.QueryPage) (*hwameistorapi.StorageNodeList, error)

func (*LocalStorageNodeController) StorageNodePoolDiskGet

func (lsnController *LocalStorageNodeController) StorageNodePoolDiskGet(page hwameistorapi.QueryPage) (*hwameistorapi.LocalDiskInfo, error)

func (*LocalStorageNodeController) StorageNodePoolDisksList

func (lsnController *LocalStorageNodeController) StorageNodePoolDisksList(page hwameistorapi.QueryPage) (*hwameistorapi.LocalDisksItemsList, error)

func (*LocalStorageNodeController) StorageNodePoolGet

func (lsnController *LocalStorageNodeController) StorageNodePoolGet(queryPage hwameistorapi.QueryPage) (*hwameistorapi.StoragePool, error)

func (*LocalStorageNodeController) StorageNodePoolsList

func (lsnController *LocalStorageNodeController) StorageNodePoolsList(queryPage hwameistorapi.QueryPage) (*hwameistorapi.StoragePoolList, error)

func (*LocalStorageNodeController) UpdateLocalStorageNode

func (lsnController *LocalStorageNodeController) UpdateLocalStorageNode(nodeName string, enable bool) error

type LocalStoragePoolController

type LocalStoragePoolController struct {
	client.Client
	record.EventRecorder
	// contains filtered or unexported fields
}

func NewLocalStoragePoolController

func NewLocalStoragePoolController(client client.Client, clientset *kubernetes.Clientset, recorder record.EventRecorder) *LocalStoragePoolController

func (*LocalStoragePoolController) ExpandStoragePool

func (lspController *LocalStoragePoolController) ExpandStoragePool(nodeName, diskType, owner string) error

func (*LocalStoragePoolController) GetStorageNodeByPoolName

func (lspController *LocalStoragePoolController) GetStorageNodeByPoolName(queryPage hwameistorapi.QueryPage) (*hwameistorapi.StorageNodeListByPool, error)

func (*LocalStoragePoolController) GetStoragePool

func (lspController *LocalStoragePoolController) GetStoragePool(poolName string) (*hwameistorapi.StoragePool, error)

func (*LocalStoragePoolController) StorageNodeDisksGetByPoolName

func (lspController *LocalStoragePoolController) StorageNodeDisksGetByPoolName(queryPage hwameistorapi.QueryPage) (*hwameistorapi.NodeDiskListByPool, error)

func (*LocalStoragePoolController) StoragePoolList

func (lspController *LocalStoragePoolController) StoragePoolList(queryPage hwameistorapi.QueryPage) (*hwameistorapi.StoragePoolList, error)

type LocalVolumeController

type LocalVolumeController struct {
	client.Client
	record.EventRecorder
}

func NewLocalVolumeController

func NewLocalVolumeController(client client.Client, recorder record.EventRecorder) *LocalVolumeController

func (*LocalVolumeController) CreateVolumeConvert

func (lvController *LocalVolumeController) CreateVolumeConvert(volName string, abort bool) (*hwameistorapi.VolumeConvertRspBody, error)

func (*LocalVolumeController) CreateVolumeExpand

func (lvController *LocalVolumeController) CreateVolumeExpand(volName string, targetCapacity string, abort bool) (*hwameistorapi.VolumeExpandRspBody, error)

func (*LocalVolumeController) CreateVolumeMigrate

func (lvController *LocalVolumeController) CreateVolumeMigrate(volName, srcNode, selectedNode string, abort bool) (*hwameistorapi.VolumeMigrateRspBody, error)

CreateVolumeMigrate it creates a migrate crd or set a migrate task abort, if abort, we need volName only

func (*LocalVolumeController) GetLocalVolume

func (lvController *LocalVolumeController) GetLocalVolume(lvname string) (*hwameistorapi.Volume, error)

func (*LocalVolumeController) GetVolumeConvert

func (lvController *LocalVolumeController) GetVolumeConvert(lvName string) (*apisv1alpha1.LocalVolumeConvert, error)

func (*LocalVolumeController) GetVolumeExpand

func (lvController *LocalVolumeController) GetVolumeExpand(lvName string) (*apisv1alpha1.LocalVolumeExpand, error)

func (*LocalVolumeController) GetVolumeMigrate

func (lvController *LocalVolumeController) GetVolumeMigrate(lvName string) (*apisv1alpha1.LocalVolumeMigrate, error)

func (*LocalVolumeController) GetVolumeOperation

func (lvController *LocalVolumeController) GetVolumeOperation(queryPage hwameistorapi.QueryPage) (*hwameistorapi.VolumeOperationByVolume, error)

func (*LocalVolumeController) GetVolumeReplicas

func (lvController *LocalVolumeController) GetVolumeReplicas(queryPage hwameistorapi.QueryPage) (*hwameistorapi.VolumeReplicaList, error)

func (*LocalVolumeController) ListLocalVolume

func (lvController *LocalVolumeController) ListLocalVolume(queryPage hwameistorapi.QueryPage) (*hwameistorapi.VolumeList, error)

func (*LocalVolumeController) ListVolumeConvert

func (lvController *LocalVolumeController) ListVolumeConvert() (*apisv1alpha1.LocalVolumeConvertList, error)

func (*LocalVolumeController) ListVolumeExpand

func (lvController *LocalVolumeController) ListVolumeExpand() (*apisv1alpha1.LocalVolumeExpandList, error)

func (*LocalVolumeController) ListVolumeMigrate

func (lvController *LocalVolumeController) ListVolumeMigrate() (*apisv1alpha1.LocalVolumeMigrateList, error)

type MetricController

type MetricController struct {
	client.Client
	record.EventRecorder
	// contains filtered or unexported fields
}

func NewMetricController

func NewMetricController(client client.Client, clientset *kubernetes.Clientset, recorder record.EventRecorder) *MetricController

func (*MetricController) EventList

func (mController *MetricController) EventList(queryPage hwameistorapi.QueryPage) (*hwameistorapi.EventActionList, error)

func (*MetricController) GetBaseMetric

func (mController *MetricController) GetBaseMetric() (*hwameistorapi.BaseMetric, error)

func (*MetricController) GetEvent

func (mController *MetricController) GetEvent(eventName string) (*hwameistorapi.Event, error)

func (*MetricController) GetModuleStatus

func (mController *MetricController) GetModuleStatus() (*hwameistorapi.ModuleStatus, error)

func (*MetricController) GetNodeStorageUseMetric

func (mController *MetricController) GetNodeStorageUseMetric(storagepoolclass string) (*hwameistorapi.NodeStorageUseMetric, error)

func (*MetricController) GetOperation

func (mController *MetricController) GetOperation(eventName, eventType string) (*hwameistorapi.Operation, error)

func (*MetricController) GetStoragePoolUseMetric

func (mController *MetricController) GetStoragePoolUseMetric() (*hwameistorapi.StoragePoolUseMetric, error)

func (*MetricController) OperationListMetric

func (mController *MetricController) OperationListMetric(page, pageSize int32, name string) (*hwameistorapi.OperationMetric, error)

type SettingController

type SettingController struct {
	client.Client
	record.EventRecorder
	// contains filtered or unexported fields
}

func NewSettingController

func NewSettingController(client client.Client, clientset *kubernetes.Clientset, recorder record.EventRecorder) *SettingController

func (*SettingController) EnableHighAvailability

func (settingController *SettingController) EnableHighAvailability() (*hwameistorapi.DrbdEnableSettingRspBody, error)

func (*SettingController) GetDRBDSetting

func (settingController *SettingController) GetDRBDSetting() (*hwameistorapi.DrbdEnableSetting, error)

type SnapShotClassController

type SnapShotClassController struct {
	client.Client
	record.EventRecorder
}

func NewSnapShotClassController

func NewSnapShotClassController(client client.Client, recorder record.EventRecorder) *SnapShotClassController

func (*SnapShotClassController) AddHwameistorSnapshotClass

func (scController *SnapShotClassController) AddHwameistorSnapshotClass(name, snapsize string) error

func (*SnapShotClassController) DeleteHwameistorSnapshotClass

func (scController *SnapShotClassController) DeleteHwameistorSnapshotClass(name string) error

func (*SnapShotClassController) ListSnapShotClass

func (sscController *SnapShotClassController) ListSnapShotClass() ([]*hwameistorapi.SnapshotClass, error)

type StorageClassController

type StorageClassController struct {
	client.Client
	record.EventRecorder
}

func NewStorageClassController

func NewStorageClassController(client client.Client, recorder record.EventRecorder) *StorageClassController

func (*StorageClassController) AddHwameistorStroageClass

func (scController *StorageClassController) AddHwameistorStroageClass(name, provisioner string, parameters map[string]string) error

func (*StorageClassController) DeleteHwameistorStroageClass

func (scController *StorageClassController) DeleteHwameistorStroageClass(name string) error

func (*StorageClassController) ListHwameistorStroageClass

func (scController *StorageClassController) ListHwameistorStroageClass(queryPage hwameistorapi.QueryPage) ([]*hwameistorapi.StorageClass, error)

type VolumeGroupController

type VolumeGroupController struct {
	client.Client
	record.EventRecorder
	// contains filtered or unexported fields
}

func NewVolumeGroupController

func NewVolumeGroupController(client client.Client, clientset *kubernetes.Clientset, recorder record.EventRecorder) *VolumeGroupController

func (*VolumeGroupController) GetVolumeGroupByVolumeGroupName

func (vgController *VolumeGroupController) GetVolumeGroupByVolumeGroupName(vgName string) (hwameistorapi.VolumeGroup, error)

func (*VolumeGroupController) ListVolumeGroup

func (vgController *VolumeGroupController) ListVolumeGroup() (*hwameistorapi.VolumeGroupList, error)

type VolumeSnapshotController

type VolumeSnapshotController struct {
	client.Client
	record.EventRecorder
}

func NewVolumeSnapshotController

func NewVolumeSnapshotController(client client.Client, recorder record.EventRecorder) *VolumeSnapshotController

func (*VolumeSnapshotController) AddVolumeSnapshot

func (vsController *VolumeSnapshotController) AddVolumeSnapshot(name, volumesnapshotClassName, pvcName, ns string) error

func (*VolumeSnapshotController) DeleteVolumeSnapshot

func (vsController *VolumeSnapshotController) DeleteVolumeSnapshot(name, ns string) error

func (*VolumeSnapshotController) ListVolumeSnapShot

func (vsController *VolumeSnapshotController) ListVolumeSnapShot() ([]*hwameistorapi.VolumeSnapshot, error)

func (*VolumeSnapshotController) RestoreVolumeSnapshot

func (vsController *VolumeSnapshotController) RestoreVolumeSnapshot(name, pvcName, storage, ns string) error

func (*VolumeSnapshotController) RollbackVolumeSnapshot

func (vsController *VolumeSnapshotController) RollbackVolumeSnapshot(vsname, ns string) error

Jump to

Keyboard shortcuts

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