Documentation ¶
Overview ¶
Package model package for backend model
Package model for storage pool model
Index ¶
- type Backend
- type SelectPoolPair
- type StorageBackendTuple
- type StoragePool
- func (p *StoragePool) GetCapabilities() map[string]bool
- func (p *StoragePool) GetCapacities() map[string]string
- func (p *StoragePool) GetName() string
- func (p *StoragePool) GetParent() string
- func (p *StoragePool) GetStorage() string
- func (p *StoragePool) UpdateCapabilities(ctx context.Context, capabilities map[string]bool)
- func (p *StoragePool) UpdateCapacities(ctx context.Context, capacities map[string]string)
- func (p *StoragePool) UpdatePoolBySBCT(ctx context.Context, content *xuanwuV1.StorageBackendContent)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { Name string ContentName string Storage string Available bool Plugin plugin.StoragePlugin Pools []*StoragePool Parameters map[string]interface{} SupportedTopologies []map[string]string AccountName string MetroDomain string MetrovStorePairID string MetroBackendName string MetroBackend *Backend ReplicaBackendName string ReplicaBackend *Backend }
Backend for storage
func (*Backend) NeedRebuild ¶
NeedRebuild checks whether the backend needs rebuild
func (*Backend) SetAvailable ¶
SetAvailable set Backend available
func (*Backend) UpdatePools ¶
func (b *Backend) UpdatePools(ctx context.Context, sbct *xuanwuV1.StorageBackendContent)
UpdatePools update Backend pools
type SelectPoolPair ¶
type SelectPoolPair struct { Local *StoragePool Remote *StoragePool }
SelectPoolPair for pool pair
type StorageBackendTuple ¶
type StorageBackendTuple struct { Claim *xuanwuV1.StorageBackendClaim Content *xuanwuV1.StorageBackendContent }
StorageBackendTuple contains sbc and sbct
type StoragePool ¶
type StoragePool struct { Name string Storage string Parent string Capabilities map[string]bool Capacities map[string]string Plugin plugin.StoragePlugin }
StoragePool field and method of storage pool
func (*StoragePool) GetCapabilities ¶
func (p *StoragePool) GetCapabilities() map[string]bool
GetCapabilities used to get capabilities
func (*StoragePool) GetCapacities ¶
func (p *StoragePool) GetCapacities() map[string]string
GetCapacities used to get capacities
func (*StoragePool) GetParent ¶
func (p *StoragePool) GetParent() string
GetParent used to get parent
func (*StoragePool) GetStorage ¶
func (p *StoragePool) GetStorage() string
GetStorage used to get storage
func (*StoragePool) UpdateCapabilities ¶
func (p *StoragePool) UpdateCapabilities(ctx context.Context, capabilities map[string]bool)
UpdateCapabilities update pool capabilities
func (*StoragePool) UpdateCapacities ¶
func (p *StoragePool) UpdateCapacities(ctx context.Context, capacities map[string]string)
UpdateCapacities update pool capacities
func (*StoragePool) UpdatePoolBySBCT ¶
func (p *StoragePool) UpdatePoolBySBCT(ctx context.Context, content *xuanwuV1.StorageBackendContent)
UpdatePoolBySBCT update capabilities and capacities by sbct step 1: update pool Capabilities step 2: update pool Capacities