shared

package
v0.0.0-...-0eb2bac Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostAZ

type HostAZ struct {
	// Name of the OpenStack compute host.
	ComputeHost string `db:"compute_host"`
	// Availability zone of the compute host, if available.
	AvailabilityZone *string `db:"availability_zone"`
}

func (HostAZ) Indexes

func (HostAZ) Indexes() []db.Index

Indexes for the feature.

func (HostAZ) TableName

func (HostAZ) TableName() string

Table under which the feature is stored.

type HostAZExtractor

type HostAZExtractor struct {
	// Common base for all extractors that provides standard functionality.
	plugins.BaseExtractor[
		struct{},
		HostAZ,
	]
}

func (*HostAZExtractor) Extract

func (e *HostAZExtractor) Extract() ([]plugins.Feature, error)

Extract the traits of a compute host from the database.

func (*HostAZExtractor) GetName

func (*HostAZExtractor) GetName() string

Name of this feature extractor that is used in the yaml config, for logging etc.

func (HostAZExtractor) Triggers

func (HostAZExtractor) Triggers() []string

Get message topics that trigger a re-execution of this extractor.

type HostCapabilities

type HostCapabilities struct {
	// Name of the OpenStack compute host.
	ComputeHost string `db:"compute_host"`
	// Comma-separated list of traits assigned to the compute host.
	Traits string `db:"traits"`
	// The type of hypervisor running on the compute host.
	HypervisorType string `db:"hypervisor_type"`
}

Feature that maps the traits of a compute host in OpenStack.

func (HostCapabilities) Indexes

func (HostCapabilities) Indexes() []db.Index

Indexes for the feature.

func (HostCapabilities) TableName

func (HostCapabilities) TableName() string

Table under which the feature is stored.

type HostCapabilitiesExtractor

type HostCapabilitiesExtractor struct {
	// Common base for all extractors that provides standard functionality.
	plugins.BaseExtractor[
		struct{},
		HostCapabilities,
	]
}

Extractor that extracts the traits of a compute host.

func (*HostCapabilitiesExtractor) Extract

func (e *HostCapabilitiesExtractor) Extract() ([]plugins.Feature, error)

Extract the traits of a compute host from the database.

func (*HostCapabilitiesExtractor) GetName

func (*HostCapabilitiesExtractor) GetName() string

Name of this feature extractor that is used in the yaml config, for logging etc.

func (HostCapabilitiesExtractor) Triggers

func (HostCapabilitiesExtractor) Triggers() []string

Get message topics that trigger a re-execution of this extractor.

type HostPinnedProjects

type HostPinnedProjects struct {
	// The name of the aggregate where the filter is defined
	AggregateName *string `db:"aggregate_name"`
	// UUID of the aggregate where the filter is defined
	AggregateUUID *string `db:"aggregate_uuid"`
	// Tenant ID that belongs to the filter
	ProjectID *string `db:"project_id"`
	// Name of the OpenStack compute host.
	ComputeHost *string `db:"compute_host"`
}

Feature that maps hosts that are pinned to projects. See the docs: https://docs.openstack.org/nova/latest/admin/scheduling.html#aggregatemultitenancyisolation

func (HostPinnedProjects) Indexes

func (HostPinnedProjects) Indexes() []db.Index

Indexes for the feature.

func (HostPinnedProjects) TableName

func (HostPinnedProjects) TableName() string

Table under which the feature is stored.

type HostPinnedProjectsExtractor

type HostPinnedProjectsExtractor struct {
	// Common base for all extractors that provides standard functionality.
	plugins.BaseExtractor[
		struct{},
		HostPinnedProjects,
	]
}

Extractor that extracts the pinned projects of a compute host.

func (*HostPinnedProjectsExtractor) Extract

Extract the pinned projects of a compute host.

func (*HostPinnedProjectsExtractor) GetName

Name of this feature extractor that is used in the yaml config, for logging etc.

func (HostPinnedProjectsExtractor) Triggers

func (HostPinnedProjectsExtractor) Triggers() []string

Get message topics that trigger a re-execution of this extractor.

type HostUtilization

type HostUtilization struct {
	// Name of the OpenStack compute host.
	ComputeHost string `db:"compute_host" json:"computeHost"`

	// VCPU resource usage
	VCPUsUsed             float64 `db:"vcpus_used" json:"vcpusUsed"`
	VCPUsUtilizedPct      float64 `db:"vcpus_utilized_pct" json:"vcpusUtilizedPct"`
	TotalVCPUsAllocatable float64 `db:"total_vcpus_allocatable" json:"totalVCPUsAllocatable"`

	// RAM resource usage
	RAMUsedMB             float64 `db:"ram_used_mb" json:"ramUsedMB"`
	RAMUtilizedPct        float64 `db:"ram_utilized_pct" json:"ramUtilizedPct"`
	TotalRAMAllocatableMB float64 `db:"total_ram_allocatable_mb" json:"totalRAMAllocatableMB"`

	// Disk resource usage
	DiskUsedGB             float64 `db:"disk_used_gb" json:"diskUsedGB"`
	DiskUtilizedPct        float64 `db:"disk_utilized_pct" json:"diskUtilizedPct"`
	TotalDiskAllocatableGB float64 `db:"total_disk_allocatable_gb" json:"totalDiskAllocatableGB"`
}

Feature that maps how many resources are utilized on a compute host.

func (HostUtilization) Indexes

func (HostUtilization) Indexes() []db.Index

Indexes for the feature.

func (HostUtilization) TableName

func (HostUtilization) TableName() string

Table under which the feature is stored.

type HostUtilizationExtractor

type HostUtilizationExtractor struct {
	// Common base for all extractors that provides standard functionality.
	plugins.BaseExtractor[
		struct{},
		HostUtilization,
	]
}

Extractor that extracts the utilization on a compute host.

func (*HostUtilizationExtractor) Extract

func (e *HostUtilizationExtractor) Extract() ([]plugins.Feature, error)

Extract the utilization on a compute host. Depends on the OpenStack hypervisors to be synced.

func (*HostUtilizationExtractor) GetName

func (*HostUtilizationExtractor) GetName() string

Name of this feature extractor that is used in the yaml config, for logging etc.

func (HostUtilizationExtractor) Triggers

func (HostUtilizationExtractor) Triggers() []string

Get message topics that trigger a re-execution of this extractor.

type VMHostResidency

type VMHostResidency struct {
	// Time the vm stayed on the host in seconds.
	Duration int `db:"duration"`
	// Flavor name of the virtual machine.
	FlavorName string `db:"flavor_name"`
	// The UUID of the virtual machine.
	InstanceUUID string `db:"instance_uuid"`
	// The migration uuid.
	MigrationUUID string `db:"migration_uuid"`
	// The host the VM was running on and needed to move out.
	SourceHost string `db:"source_host"`
	// The host the VM was moved to.
	TargetHost string `db:"target_host"`
	// The source node the VM was running on and needed to move out.
	SourceNode string `db:"source_node"`
	// The target node the VM was moved to.
	TargetNode string `db:"target_node"`
	// Who forced the VM to move out.
	UserID string `db:"user_id"`
	// To which project the user belongs that forced the VM to move out.
	ProjectID string `db:"project_id"`
	// Migration type (live-migration or resize).
	Type string `db:"type"`
	// Time when the migration was triggered in seconds since epoch.
	Time int `db:"time"`
}

Feature that describes how long a vm was running on a host until it needed to move out, and the reason for the move (i.e., who forced it to move).

func (VMHostResidency) Indexes

func (VMHostResidency) Indexes() []db.Index

Indexes for the feature.

func (VMHostResidency) TableName

func (VMHostResidency) TableName() string

Table under which the feature is stored.

type VMHostResidencyExtractor

type VMHostResidencyExtractor struct {
	// Common base for all extractors that provides standard functionality.
	plugins.BaseExtractor[
		struct{},
		VMHostResidency,
	]
}

Extractor that extracts the time elapsed until the first migration of a virtual machine.

func (*VMHostResidencyExtractor) Extract

func (e *VMHostResidencyExtractor) Extract() ([]plugins.Feature, error)

Extract the time elapsed until the first migration of a virtual machine. Depends on the OpenStack servers and migrations to be synced.

func (*VMHostResidencyExtractor) GetName

func (*VMHostResidencyExtractor) GetName() string

Name of this feature extractor that is used in the yaml config, for logging etc.

func (VMHostResidencyExtractor) Triggers

func (VMHostResidencyExtractor) Triggers() []string

Get message topics that trigger a re-execution of this extractor.

type VMLifeSpanHistogramBucket

type VMLifeSpanHistogramBucket struct {
	// Flavor name of the virtual machine.
	FlavorName string `db:"flavor_name"`
	// The bucket this life span falls into.
	Bucket float64 `db:"bucket"`
	// The value of the bucket.
	Value uint64 `db:"value"`
	// The count of vms that fell into this bucket.
	Count uint64 `db:"count"`
	// The sum of all durations that fell into this bucket.
	Sum float64 `db:"sum"`
}

Feature that describes how long a vm existed before it was deleted.

func (VMLifeSpanHistogramBucket) Indexes

func (VMLifeSpanHistogramBucket) Indexes() []db.Index

Indexes for the feature.

func (VMLifeSpanHistogramBucket) TableName

func (VMLifeSpanHistogramBucket) TableName() string

Table under which the feature is stored.

type VMLifeSpanHistogramExtractor

type VMLifeSpanHistogramExtractor struct {
	// Common base for all extractors that provides standard functionality.
	plugins.BaseExtractor[
		struct{},
		VMLifeSpanHistogramBucket,
	]
}

Extractor that extracts the time elapsed until the vm was deleted.

func (*VMLifeSpanHistogramExtractor) Extract

Extract the time elapsed until the first migration of a virtual machine. Depends on the OpenStack servers and migrations to be synced.

func (*VMLifeSpanHistogramExtractor) GetName

Name of this feature extractor that is used in the yaml config, for logging etc.

func (VMLifeSpanHistogramExtractor) Triggers

func (VMLifeSpanHistogramExtractor) Triggers() []string

Get message topics that trigger a re-execution of this extractor.

type VMLifeSpanRaw

type VMLifeSpanRaw struct {
	// Time the vm stayed on the host in seconds.
	Duration int `db:"duration"`
	// Flavor name of the virtual machine.
	FlavorName string `db:"flavor_name"`
}

Jump to

Keyboard shortcuts

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