Remove unused hostname_prefix from server types and add duplicate checking
The HostnamePrefix field on ServerType was loaded from YAML but never used — hostnames are user-provided. This removes the field and adds explicit duplicate checks (hostname + MAC) with clear per-field error messages in both the JSON API and web UI, backed by a new GetByHostname store method with case-insensitive matching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -85,13 +85,12 @@ type ActivityEntry struct {
|
||||
}
|
||||
|
||||
type ServerType struct {
|
||||
Key string
|
||||
DisplayName string `yaml:"display_name"`
|
||||
BootDisk string `yaml:"boot_disk"`
|
||||
ManagementNIC string `yaml:"management_nic"`
|
||||
GPU bool `yaml:"gpu"`
|
||||
HostnamePrefix string `yaml:"hostname_prefix"`
|
||||
ExpectedNICs []NICDef `yaml:"expected_nics"`
|
||||
Key string
|
||||
DisplayName string `yaml:"display_name"`
|
||||
BootDisk string `yaml:"boot_disk"`
|
||||
ManagementNIC string `yaml:"management_nic"`
|
||||
GPU bool `yaml:"gpu"`
|
||||
ExpectedNICs []NICDef `yaml:"expected_nics"`
|
||||
}
|
||||
|
||||
type NICDef struct {
|
||||
|
||||
Reference in New Issue
Block a user