Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
Name string `json:"name"`
Datastores []Datastore `json:"datastores"`
Hosts []Host `json:"hosts"`
Networks []Network `json:"networks"`
}
Cluster represents a VMware cluster with its resources.
type Concern ¶
type Concern struct {
Id string `json:"id" db:"Concern_ID"`
Label string `json:"label" db:"Label"`
Category string `json:"category" db:"Category"`
Assessment string `json:"assessment" db:"Assessment"`
}
Concern represents a validation concern for a VM.
type Concerns ¶
type Concerns []Concern
Concerns is a slice of Concern that implements sql.Scanner for DuckDB LIST type.
type Datastore ¶
type Datastore struct {
Cluster string `db:"cluster" json:"-"`
DiskId string `db:"diskId" json:"diskId"`
FreeCapacityGB float64 `db:"freeCapacityGB" json:"freeCapacityGB"`
HardwareAcceleratedMove bool `db:"hardwareAcceleratedMove" json:"hardwareAcceleratedMove"`
HostId string `db:"hostId" json:"hostId"`
Model string `db:"model" json:"model"`
ProtocolType string `db:"protocolType" json:"protocolType"`
TotalCapacityGB float64 `db:"totalCapacityGB" json:"totalCapacityGB"`
Type string `db:"type" json:"type"`
Vendor string `db:"vendor" json:"vendor"`
}
Datastore represents a VMware datastore.
type Disk ¶
type Disk struct {
Key string `db:"Disk Key"` // vdisk
UnitNumber string `db:"Unit #"` // vdisk
ControllerKey int32 // derived
File string `db:"Path"` // vdisk
Capacity int64 `db:"Capacity MiB"` // vdisk
RDM bool `db:"Raw"` // vdisk
Bus string `db:"Shared Bus"` // vdisk
Mode string `db:"Disk Mode"` // vdisk
Serial string `db:"Disk UUID"` // vdisk
Thin string `db:"Thin"` // vdisk
Controller string `db:"Controller"` // vdisk
Label string `db:"Label"` // vdisk
SCSIUnit string `db:"SCSI Unit #"` // vdisk
}
Disk represents a virtual disk from the vdisk table.
type Disks ¶
type Disks []Disk
Disks is a slice of Disk that implements sql.Scanner for DuckDB LIST type.
type Host ¶
type Host struct {
Cluster string `db:"cluster" json:"-"`
CpuCores int `db:"cpuCores" json:"cpuCores"`
CpuSockets int `db:"cpuSockets" json:"cpuSockets"`
Id string `db:"id" json:"id"`
MemoryMB int `db:"memoryMB" json:"memoryMB"`
Model string `db:"model" json:"model"`
Vendor string `db:"vendor" json:"vendor"`
}
Host represents a VMware ESXi host.
type NIC ¶
type NIC struct {
Network string `db:"Network"` // vnetwork
MAC string `db:"Mac Address"` // vnetwork
Label string `db:"NIC label"` // vnetwork
Adapter string `db:"Adapter"` // vnetwork
Switch string `db:"Switch"` // vnetwork
Connected bool `db:"Connected"` // vnetwork
StartsConnected bool `db:"Starts Connected"` // vnetwork
Type string `db:"Type"` // vnetwork
IPv4Address string `db:"IPv4 Address"` // vnetwork
IPv6Address string `db:"IPv6 Address"` // vnetwork
}
NIC represents a network interface from the vnetwork table.
type NICs ¶
type NICs []NIC
NICs is a slice of NIC that implements sql.Scanner for DuckDB LIST type.
type Network ¶
type Network struct {
Cluster string `db:"cluster" json:"-"`
Dvswitch string `db:"dvswitch" json:"dvswitch"`
Name string `db:"name" json:"name"`
Type string `db:"type" json:"type"`
VlanId string `db:"vlanId" json:"vlanId"`
VmsCount int `db:"vmsCount" json:"vmsCount"`
}
Network represents a VMware network.
type Networks ¶
type Networks []string
Networks is a slice of strings that implements sql.Scanner for DuckDB LIST type.
type Os ¶
type Os struct {
Name string `db:"name" json:"name"`
Count int `db:"count" json:"count"`
Supported bool `db:"supported" json:"supported"`
}
Os represents an operating system summary.
type VM ¶
type VM struct {
ID string `db:"VM ID"` // vinfo
Name string `db:"VM"` // vinfo
Folder string `db:"Folder ID"` // vinfo
Host string `db:"Host"` // vinfo
UUID string `db:"SMBIOS UUID"` // vinfo
Firmware string `db:"Firmware"` // vinfo
PowerState string `db:"Powerstate"` // vinfo
ConnectionState string `db:"Connection state"` // vinfo
CpuHotAddEnabled bool `db:"Hot Add"` // vcpu
CpuHotRemoveEnabled bool `db:"Hot Remove"` // vcpu
MemoryHotAddEnabled bool `db:"Hot Add"` // vmemory
FaultToleranceEnabled bool `db:"FT State"` // vinfo
CpuCount int32 `db:"CPUs"` // vinfo
CpuSockets int32 `db:"Sockets"` // vcpu
CoresPerSocket int32 `db:"Cores p/s"` // vcpu
MemoryMB int32 `db:"Memory"` // vinfo
GuestName string `db:"OS according to the configuration file"` // vinfo
GuestNameFromVmwareTools string `db:"OS according to the VMware Tools"` // vinfo
HostName string `db:"DNS Name"` // vinfo
BalloonedMemory int32 `db:"Ballooned"` // vmemory
IpAddress string `db:"Primary IP Address"` // vinfo
StorageUsed int32 `db:"In Use MiB"` // vinfo
IsTemplate bool `db:"Template"` // vinfo
ChangeTrackingEnabled bool `db:"CBT"` // vinfo
NICs NICs // vnetwork
Disks Disks // vdisk
Networks Networks `db:"network_object_id"` // vinfo (Network #1, #2, etc.)
DiskEnableUuid bool `db:"EnableUUID"` // vinfo
Datacenter string `db:"Datacenter"` // vinfo
Cluster string `db:"Cluster"` // vinfo
HWVersion string `db:"HW version"` // vinfo
TotalDiskCapacityMiB int32 `db:"Total disk capacity MiB"` // vinfo
ProvisionedMiB int32 `db:"Provisioned MiB"` // vinfo
ResourcePool string `db:"Resource pool"` // vinfo
Concerns Concerns // concerns table (via LEFT JOIN)
}
VM represents a virtual machine from VMware inventory.