nova

package
v0.0.0-...-add18ed Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NovaAPI

type NovaAPI interface {
	// Init the nova API.
	Init(ctx context.Context) error
	// Get all nova servers that are NOT deleted. (Includes ERROR, SHUTOFF etc)
	GetAllServers(ctx context.Context) ([]nova.Server, error)
	// Get all deleted nova servers since the timestamp.
	GetDeletedServers(ctx context.Context, since time.Time) ([]nova.DeletedServer, error)
	// Get all nova hypervisors.
	GetAllHypervisors(ctx context.Context) ([]nova.Hypervisor, error)
	// Get all nova flavors.
	GetAllFlavors(ctx context.Context) ([]nova.Flavor, error)
	// Get all nova migrations.
	GetAllMigrations(ctx context.Context) ([]nova.Migration, error)
	// Get all aggregates.
	GetAllAggregates(ctx context.Context) ([]nova.Aggregate, error)
}

type NovaSyncer

type NovaSyncer struct {
	// Database to store the nova objects in.
	DB db.DB
	// Monitor to track the syncer.
	Mon datasources.Monitor
	// Configuration for the nova syncer.
	Conf v1alpha1.NovaDatasource
	// Nova API client to fetch the data.
	API NovaAPI
}

Syncer for OpenStack nova.

func (*NovaSyncer) Init

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

Init the OpenStack nova syncer.

func (*NovaSyncer) Sync

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

Sync the OpenStack nova objects and publish triggers.

func (*NovaSyncer) SyncAllAggregates

func (s *NovaSyncer) SyncAllAggregates(ctx context.Context) (int64, error)

Sync the OpenStack aggregates into the database.

func (*NovaSyncer) SyncAllFlavors

func (s *NovaSyncer) SyncAllFlavors(ctx context.Context) (int64, error)

Sync the OpenStack flavors into the database.

func (*NovaSyncer) SyncAllHypervisors

func (s *NovaSyncer) SyncAllHypervisors(ctx context.Context) (int64, error)

Sync the OpenStack hypervisors into the database.

func (*NovaSyncer) SyncAllMigrations

func (s *NovaSyncer) SyncAllMigrations(ctx context.Context) (int64, error)

Sync the OpenStack migrations into the database.

func (*NovaSyncer) SyncAllServers

func (s *NovaSyncer) SyncAllServers(ctx context.Context) (int64, error)

Sync all the active OpenStack servers into the database. (Includes ERROR, SHUTOFF, etc. state)

func (*NovaSyncer) SyncDeletedServers

func (s *NovaSyncer) SyncDeletedServers(ctx context.Context) (int64, error)

Sync all the deleted OpenStack servers into the database. Only fetch servers that were deleted since the last sync run.

Jump to

Keyboard shortcuts

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