nova

package
v0.0.0-...-8f6c52d Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: Apache-2.0 Imports: 20 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 NovaAPI

type NovaAPI interface {
	// Init the nova API.
	Init(ctx context.Context)
	// 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)
}

func NewNovaAPI

Create a new OpenStack server syncer.

type NovaSyncer

type NovaSyncer struct {
	// Database to store the nova objects in.
	DB db.DB
	// Monitor to track the syncer.
	Mon sync.Monitor
	// Configuration for the nova syncer.
	Conf conf.SyncOpenStackNovaConfig
	// Nova API client to fetch the data.
	API NovaAPI
	// MQTT client to publish mqtt data.
	MqttClient mqtt.Client
}

Syncer for OpenStack nova.

func (*NovaSyncer) Init

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

Init the OpenStack nova syncer.

func (*NovaSyncer) Sync

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

Sync the OpenStack nova objects and publish triggers.

func (*NovaSyncer) SyncAllAggregates

func (s *NovaSyncer) SyncAllAggregates(ctx context.Context) ([]nova.Aggregate, error)

Sync the OpenStack aggregates into the database.

func (*NovaSyncer) SyncAllFlavors

func (s *NovaSyncer) SyncAllFlavors(ctx context.Context) ([]nova.Flavor, error)

Sync the OpenStack flavors into the database.

func (*NovaSyncer) SyncAllHypervisors

func (s *NovaSyncer) SyncAllHypervisors(ctx context.Context) ([]nova.Hypervisor, error)

Sync the OpenStack hypervisors into the database.

func (*NovaSyncer) SyncAllMigrations

func (s *NovaSyncer) SyncAllMigrations(ctx context.Context) ([]nova.Migration, error)

Sync the OpenStack migrations into the database.

func (*NovaSyncer) SyncAllServers

func (s *NovaSyncer) SyncAllServers(ctx context.Context) ([]nova.Server, 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) ([]nova.DeletedServer, 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