add quota related types

This commit is contained in:
alu
2026-07-23 16:23:31 +00:00
parent 05519694e1
commit f4deeb1ab6
2 changed files with 78 additions and 45 deletions
-45
View File
@@ -49,48 +49,3 @@ type VMID struct {
Min int `json:"min" mapstructure:"min"`
Max int `json:"max" mapstructure:"max"`
}
type Backups struct {
MaxPerInstance int `json:"max-per-instance" mapstructure:"max-per-instance"`
MaxTotal int `json:"max-total" mapstructure:"max-total"`
}
type Templates struct {
Instances struct {
LXC map[string]ResourceTemplate `json:"lxc" mapstructure:"lxc"`
QEMU map[string]ResourceTemplate `json:"qemu" mapstructure:"qemu"`
} `json:"instances"`
}
type SimpleResource struct {
Limits struct {
Global SimpleLimit `json:"global" mapstructure:"global"`
Nodes map[string]SimpleLimit `json:"nodes" mapstructure:"nodes"`
} `json:"limits"`
}
type SimpleLimit struct {
Max int `json:"max" mapstructure:"max"`
}
type MatchResource struct {
Limits struct {
Global []MatchLimit `json:"global" mapstructure:""`
Nodes map[string][]MatchLimit `json:"nodes" mapstructure:""`
} `json:"limits"`
}
type MatchLimit struct {
Match string `json:"match" mapstructure:""`
Name string `json:"name" mapstructure:""`
Max int `json:"max" mapstructure:""`
}
type ResourceTemplate struct {
Value string `json:"value" mapstructure:"value"`
Resource struct {
Enabled bool `json:"enabled" mapstructure:"enabled"`
Name string `json:"name" mapstructure:"name"`
Amount int `json:"amount" mapstructure:"amount"`
} `json:"resource" mapstructure:"resource"`
}