inventory

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TierCertified          = "certified"
	TierVendorSupported    = "vendor_supported"
	TierCommunitySupported = "community_supported"
	TierSpecialHandling    = "special_handling"
)

Variables

This section is empty.

Functions

func ClassifyOSTier added in v0.18.0

func ClassifyOSTier(osName string) string

ClassifyOSTier returns the support tier for the given OS name. Falls back to TierSpecialHandling for unrecognized OSes.

Types

type ClusterFeatures added in v0.13.4

type ClusterFeatures struct {
	DrsEnabled        *bool   `json:"drsEnabled,omitempty"`
	DrsMode           *string `json:"drsMode,omitempty"`
	StorageDrsEnabled *bool   `json:"storageDrsEnabled,omitempty"`
}

ClusterFeatures contains cluster-level feature information.

type ClusterUtilization added in v0.13.4

type ClusterUtilization struct {
	CpuAvg     float64
	CpuP95     float64
	CpuMax     float64
	MemAvg     float64
	MemP95     float64
	MemMax     float64
	Confidence float64
}

ClusterUtilization contains rightsizing utilization metrics for a cluster. Nested in InventoryData; ClusterID/ClusterName omitted as redundant (cluster ID is the map key). Contains only utilization percentages (0-100) needed for rightsizing-based sizing calculations.

type Datastore

type Datastore struct {
	DiskId          string
	FreeCapacityGB  float64
	TotalCapacityGB float64
	Type            string
	HostId          string
	Model           string
	ProtocolType    string
	Vendor          string
}

Datastore represents a VMware datastore.

type DiskSizeTierSummary

type DiskSizeTierSummary struct {
	VMCount     int
	TotalSizeTB float64
}

DiskSizeTierSummary contains VM count and total size for a disk size tier.

type DiskTypeSummary

type DiskTypeSummary struct {
	Type        string
	VMCount     int
	TotalSizeTB float64
}

DiskTypeSummary contains disk usage aggregated by datastore type.

type Host

type Host struct {
	ID         string
	Vendor     string
	Model      string
	CpuCores   int
	CpuSockets int
	MemoryMB   int
}

Host represents a VMware ESXi host.

type InfraData

type InfraData struct {
	Hosts                 []Host
	HostPowerStates       map[string]int
	Datastores            []Datastore
	Networks              []Network
	TotalHosts            int
	TotalDatacenters      int
	ClustersPerDatacenter []int
	CPUOverCommitment     *float64
	MemoryOverCommitment  *float64
}

InfraData contains infrastructure-level data (hosts, datastores, networks).

type Inventory

type Inventory struct {
	VCenterID      string
	VCenter        *InventoryData
	Clusters       map[string]InventoryData
	VCenterVersion string
}

Inventory is the domain representation of infrastructure inventory. It contains vCenter-level data and per-cluster inventories.

type InventoryData

type InventoryData struct {
	VMs                VMsData
	Infra              InfraData
	ClusterFeatures    *ClusterFeatures
	ClusterUtilization *ClusterUtilization
}

InventoryData contains VM and infrastructure data for a scope (vCenter or cluster).

type IssuesBreakdown added in v0.18.0

type IssuesBreakdown struct {
	Critical    int
	Warning     int
	Information int
	Advisory    int
	Error       int
}

IssuesBreakdown holds the number of VMs affected per issue severity category. A VM with multiple issues of the same category is counted once per category.

type MigrationIssue

type MigrationIssue struct {
	ID         string
	Label      string
	Category   string
	Assessment string
	Count      int
}

MigrationIssue represents a migration concern with its count.

type Network

type Network struct {
	Name     string
	Type     string
	Dvswitch string
	VlanId   string
	VmsCount int
}

Network represents a VMware network.

type OSInfo

type OSInfo struct {
	Count                 int
	IsSupported           bool
	SupportTier           string
	UpgradeRecommendation string
}

OSInfo contains OS distribution information.

type ResourceBreakdown

type ResourceBreakdown struct {
	Total                          int
	TotalForMigratable             int
	TotalForMigratableWithWarnings int
	TotalForNotMigratable          int
}

ResourceBreakdown contains resource totals split by migrability status.

type VMsData

type VMsData struct {
	Total                       int
	TotalMigratable             int
	TotalMigratableWithWarnings int
	TotalWithSharedDisks        int
	PowerStates                 map[string]int
	OSInfo                      map[string]OSInfo
	CPUCores                    ResourceBreakdown
	RamGB                       ResourceBreakdown
	DiskCount                   ResourceBreakdown
	DiskGB                      ResourceBreakdown
	NicCount                    ResourceBreakdown
	DistributionByCPUTier       map[string]int
	DistributionByMemoryTier    map[string]int
	DistributionByNICCount      map[string]int
	DistributionByComplexity    map[string]int
	ComplexityDistribution      map[string]DiskSizeTierSummary
	DiskSizeTiers               map[string]DiskSizeTierSummary
	DiskComplexityTiers         map[string]DiskSizeTierSummary // 4-bucket complexity tiers for estimation engine
	DiskTypes                   map[string]DiskTypeSummary
	MigrationWarnings           []MigrationIssue
	NotMigratableReasons        []MigrationIssue
	IssuesBreakdown             IssuesBreakdown
}

VMsData contains aggregated VM statistics and distribution data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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