add more codes
This commit is contained in:
@@ -11,35 +11,35 @@ type Client interface {
|
||||
}
|
||||
|
||||
type VMSpec struct {
|
||||
ID string
|
||||
Name string
|
||||
CPU int
|
||||
MemoryMB int
|
||||
Disks []DiskSpec
|
||||
NICs []NICSpec
|
||||
CloudInit *CloudInitSpec
|
||||
CloudInitISO string
|
||||
ID string `json:"id" yaml:"id"`
|
||||
Name string `json:"name" yaml:"name"`
|
||||
CPU int `json:"cpus" yaml:"cpus"`
|
||||
MemoryMB int `json:"memory_mb" yaml:"memory_mb"`
|
||||
Disks []DiskSpec `json:"disks" yaml:"disks"`
|
||||
NICs []NICSpec `json:"nics" yaml:"nics"`
|
||||
CloudInit *CloudInitSpec `json:"cloud_init" yaml:"cloud_init"`
|
||||
CloudInitISO string `json:"cloud_init_iso" yaml:"cloud_init_iso"`
|
||||
}
|
||||
|
||||
type DiskSpec struct {
|
||||
Name string
|
||||
Pool string
|
||||
SizeGB int
|
||||
Bus string
|
||||
Path string
|
||||
Prealloc string // "", "metadata", "full"
|
||||
Name string `json:"name" yaml:"name"`
|
||||
Pool string `json:"pool" yaml:"pool"`
|
||||
SizeGB int `json:"size_gb" yaml:"size_gb"`
|
||||
Bus string `json:"bus" yaml:"bus"`
|
||||
Path string `json:"path" yaml:"path"`
|
||||
Prealloc string `json:"prealloc" yaml:"prealloc"` // "", "metadata", "full"
|
||||
}
|
||||
|
||||
type NICSpec struct {
|
||||
Bridge string
|
||||
VLAN int
|
||||
Model string
|
||||
Bridge string `json:"bridge" yaml:"bridge"`
|
||||
VLAN int `json:"vlan" yaml:"vlan"`
|
||||
Model string `json:"model" yaml:"model"`
|
||||
}
|
||||
|
||||
type CloudInitSpec struct {
|
||||
User string
|
||||
SSHKeys []string
|
||||
UserData string
|
||||
User string `json:"user" yaml:"user"`
|
||||
SSHKeys []string `json:"ssh_keys" yaml:"ssh_keys"`
|
||||
UserData string `json:"user_data" yaml:"user_data"`
|
||||
}
|
||||
|
||||
type VM struct {
|
||||
|
||||
Reference in New Issue
Block a user