Expand guest metrics and add Proxmox maintenance overview

This commit is contained in:
Maxim
2026-08-01 11:38:03 +03:00
parent 5491be2e0c
commit ad8972320d
8 changed files with 536 additions and 38 deletions

View File

@@ -15,3 +15,16 @@ func TestGuestJSON(t *testing.T) {
t.Fatalf("неожиданные данные гостя: %+v", guest)
}
}
func TestGuestConfigHelpers(t *testing.T) {
if got := storageName("local-zfs:vm-101-disk-0,size=32G"); got != "local-zfs" {
t.Fatalf("storage: %s", got)
}
ips := ipsFromConfig("name=eth0,bridge=vmbr0,ip=192.168.0.20/24,ip6=auto")
if len(ips) != 1 || ips[0] != "192.168.0.20" {
t.Fatalf("ips: %+v", ips)
}
if !agentEnabled("enabled=1,fstrim_cloned_disks=1") {
t.Fatal("agent should be enabled")
}
}