fix VMID Max naming issue,
add mapstructure decode tags
This commit is contained in:
+6
-6
@@ -6,9 +6,9 @@ type Pool struct {
|
|||||||
Groups []Group `json:"groups"`
|
Groups []Group `json:"groups"`
|
||||||
Resources map[string]any `json:"resources"`
|
Resources map[string]any `json:"resources"`
|
||||||
Templates Templates `json:"templates"`
|
Templates Templates `json:"templates"`
|
||||||
AllowedNodes map[string]bool `json:"nodes-allowed"`
|
AllowedNodes map[string]bool `json:"nodes-allowed" mapstructure:"nodes-allowed"`
|
||||||
AllowedVMIDRange VMID `json:"vmid-allowed"`
|
AllowedVMIDRange VMID `json:"vmid-allowed" mapstructure:"vmid-allowed"`
|
||||||
AllowedBackups Backups `json:"backups-allowed"`
|
AllowedBackups Backups `json:"backups-allowed" mapstructure:"backups-allowed"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// proxmox typically formats as gid-realm for non pve realms
|
// proxmox typically formats as gid-realm for non pve realms
|
||||||
@@ -40,12 +40,12 @@ type User struct {
|
|||||||
|
|
||||||
type VMID struct {
|
type VMID struct {
|
||||||
Min int `json:"min"`
|
Min int `json:"min"`
|
||||||
MAx int `json:"max"`
|
Max int `json:"max"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Backups struct {
|
type Backups struct {
|
||||||
MaxPerInstance int `json:"max-per-instance"`
|
MaxPerInstance int `json:"max-per-instance" mapstructure:"max-per-instance"`
|
||||||
MaxTotal int `json:"max-total"`
|
MaxTotal int `json:"max-total" mapstructure:"max-total"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Templates struct {
|
type Templates struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user