cinder

package
v0.0.0-...-e10f2d3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CinderAPI

type CinderAPI interface {
	// Int the cinder API.
	Init(ctx context.Context) error
	// Get all cinder storage pools.
	GetAllStoragePools(ctx context.Context) ([]StoragePool, error)
}

type CinderSyncer

type CinderSyncer struct {
	// Database to store the manila objects in.
	DB db.DB
	// Monitor to track the syncer.
	Mon datasources.Monitor
	// Configuration for the cinder syncer.
	Conf v1alpha1.CinderDatasource
	// Cinder API client to fetch the data.
	API CinderAPI
}

func (*CinderSyncer) Init

func (s *CinderSyncer) Init(ctx context.Context) error

Init the OpenStack cinder syncer.

func (*CinderSyncer) Sync

func (s *CinderSyncer) Sync(ctx context.Context) (int64, error)

Sync the OpenStack cinder objects and publish triggers.

func (*CinderSyncer) SyncAllStoragePools

func (s *CinderSyncer) SyncAllStoragePools(ctx context.Context) (int64, error)

Sync the OpenStack resource providers into the database.

type StoragePool

type StoragePool struct {
	Name string `json:"name" db:"name,primarykey"`

	// Shared capabilities
	CapabilitiesAllocatedCapacityGB      float64 `json:"-" db:"capabilities_allocated_capacity_gb"`
	CapabilitiesDriverVersion            string  `json:"-" db:"capabilities_driver_version"`
	CapabilitiesFreeCapacityGB           float64 `json:"-" db:"capabilities_free_capacity_gb"`
	CapabilitiesMultiattach              bool    `json:"-" db:"capabilities_multiattach"`
	CapabilitiesPoolName                 string  `json:"-" db:"capabilities_pool_name"`
	CapabilitiesReservedPercentage       float64 `json:"-" db:"capabilities_reserved_percentage"`
	CapabilitiesStorageProtocol          string  `json:"-" db:"capabilities_storage_protocol"`
	CapabilitiesThickProvisioningSupport bool    `json:"-" db:"capabilities_thick_provisioning_support"`
	CapabilitiesThinProvisioningSupport  bool    `json:"-" db:"capabilities_thin_provisioning_support"`
	CapabilitiesTimestamp                string  `json:"-" db:"capabilities_timestamp"`
	CapabilitiesTotalCapacityGB          float64 `json:"-" db:"capabilities_total_capacity_gb"`
	CapabilitiesVendorName               string  `json:"-" db:"capabilities_vendor_name"`
	CapabilitiesVolumeBackendName        string  `json:"-" db:"capabilities_volume_backend_name"`

	// VMware specific fields
	CapabilitiesBackendState                     *string `json:"-" db:"capabilities_backend_state"`
	CapabilitiesCustomAttributeCinderState       *string `json:"-" db:"capabilities_custom_attribute_cinder_state"`
	CapabilitiesCustomAttributeCinderAggregateID *string `json:"-" db:"capabilities_custom_attribute_cinder_aggregate_id"`
	CapabilitiesCustomAttributeNetAppFQDN        *string `json:"-" db:"capabilities_custom_attribute_netapp_fqdn"`
	CapabilitiesPoolDownReason                   *string `json:"-" db:"capabilities_pool_down_reason"`
	CapabilitiesPoolState                        *string `json:"-" db:"capabilities_pool_state"`

	// NetApp-specific fields for native NetApp pools
	CapabilitiesNetAppAggregate            *string  `json:"-" db:"capabilities_netapp_aggregate"`
	CapabilitiesNetAppAggregateUsedPercent *float64 `json:"-" db:"capabilities_netapp_aggregate_used_percent"`
	CapabilitiesUtilization                *float64 `json:"-" db:"capabilities_utilization"`
}

See https://docs.openstack.org/api-ref/block-storage/v3/#list-all-back-end-storage-pools Some fields are omitted.

func (StoragePool) Indexes

func (StoragePool) Indexes() map[string][]string

Index for the openstack model.

func (*StoragePool) MarshalJSON

func (sp *StoragePool) MarshalJSON() ([]byte, error)

Custom marshaler for StoragePool to handle nested JSON.

func (StoragePool) TableName

func (StoragePool) TableName() string

The table name for the storage pool model.

func (*StoragePool) UnmarshalJSON

func (sp *StoragePool) UnmarshalJSON(data []byte) error

Custom unmarshaler for StoragePool to handle nested JSON.

Jump to

Keyboard shortcuts

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