f-28: api: add uefi params
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
c602725de9
commit
325f1acff5
5 changed files with 15 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ type VMCreateRequest struct {
|
|||
Name string `json:"name"`
|
||||
Memory int `json:"memory"`
|
||||
CPUs int `json:"cpus"`
|
||||
UEFI bool `json:"uefi"`
|
||||
Password string `json:"password"`
|
||||
SSHKey string `json:"sshkey"`
|
||||
Interfaces []VMInterface `json:"interfaces"`
|
||||
|
|
@ -61,6 +62,7 @@ type VM struct {
|
|||
MetadataPort string `json:"metadata_port"`
|
||||
Memory int `json:"memory"`
|
||||
CPUs int `json:"cpus"`
|
||||
UEFI bool `json:"uefi"`
|
||||
Interfaces []VMInterface `json:"interfaces"`
|
||||
Storage []VMStorage `json:"storage"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ func vmFromDB(name string, entries map[string]string) (VM, error) {
|
|||
vm.MetadataPort = entries[prefix+"metadata_port"]
|
||||
vm.Memory, _ = strconv.Atoi(entries[prefix+"memory"])
|
||||
vm.CPUs, _ = strconv.Atoi(entries[prefix+"cpus"])
|
||||
vm.UEFI = entries[prefix+"uefi"] == "true"
|
||||
|
||||
subnet := entries[prefix+"subnet"]
|
||||
ip := entries[prefix+"ip"]
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ func (s *Server) startVM(w http.ResponseWriter, r *http.Request) {
|
|||
VolumePath: req.Storage[0].Path,
|
||||
Memory: req.Memory,
|
||||
CPUs: req.CPUs,
|
||||
UEFI: req.UEFI,
|
||||
Password: req.Password,
|
||||
SSHKey: req.SSHKey,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue