Documentation
¶
Index ¶
- type NovaAPI
- type NovaSyncer
- func (s *NovaSyncer) Init(ctx context.Context) error
- func (s *NovaSyncer) Sync(ctx context.Context) (int64, error)
- func (s *NovaSyncer) SyncAllAggregates(ctx context.Context) (int64, error)
- func (s *NovaSyncer) SyncAllFlavors(ctx context.Context) (int64, error)
- func (s *NovaSyncer) SyncAllHypervisors(ctx context.Context) (int64, error)
- func (s *NovaSyncer) SyncAllMigrations(ctx context.Context) (int64, error)
- func (s *NovaSyncer) SyncAllServers(ctx context.Context) (int64, error)
- func (s *NovaSyncer) SyncDeletedServers(ctx context.Context) (int64, error)
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)
}
func NewNovaAPI ¶
func NewNovaAPI(mon datasources.Monitor, k keystone.KeystoneAPI, conf v1alpha1.NovaDatasource) NovaAPI
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.
Click to show internal directories.
Click to hide internal directories.