set boot order in instance config handler
This commit is contained in:
parent
e8ed9fc3b8
commit
098818b205
@ -78,7 +78,8 @@ router.post(`${basePath}/resources`, async (req, res) => {
|
|||||||
proctype: req.body.proctype,
|
proctype: req.body.proctype,
|
||||||
cores: req.body.cores,
|
cores: req.body.cores,
|
||||||
memory: req.body.memory,
|
memory: req.body.memory,
|
||||||
swap: req.body.swap
|
swap: req.body.swap,
|
||||||
|
boot: req.body.boot
|
||||||
};
|
};
|
||||||
// check auth for specific instance
|
// check auth for specific instance
|
||||||
const vmpath = `/nodes/${params.node}/${params.type}/${params.vmid}`;
|
const vmpath = `/nodes/${params.node}/${params.type}/${params.vmid}`;
|
||||||
@ -111,6 +112,7 @@ router.post(`${basePath}/resources`, async (req, res) => {
|
|||||||
}
|
}
|
||||||
else if (params.type === "qemu") {
|
else if (params.type === "qemu") {
|
||||||
action.cpu = params.proctype;
|
action.cpu = params.proctype;
|
||||||
|
action.boot = `order=${params.boot.toString().replace(",", ";")}`;
|
||||||
}
|
}
|
||||||
action = JSON.stringify(action);
|
action = JSON.stringify(action);
|
||||||
const method = params.type === "qemu" ? "POST" : "PUT";
|
const method = params.type === "qemu" ? "POST" : "PUT";
|
||||||
|
Loading…
Reference in New Issue
Block a user