From 0e836d50c420e37cb114cabb8d1bcea1906338fb Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Tue, 22 Aug 2023 06:06:10 +0000 Subject: [PATCH] set boot order in instance config handler --- src/routes/cluster.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/routes/cluster.js b/src/routes/cluster.js index a5dbafa..70b0719 100644 --- a/src/routes/cluster.js +++ b/src/routes/cluster.js @@ -78,7 +78,8 @@ router.post(`${basePath}/resources`, async (req, res) => { proctype: req.body.proctype, cores: req.body.cores, memory: req.body.memory, - swap: req.body.swap + swap: req.body.swap, + boot: req.body.boot }; // check auth for specific instance 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") { action.cpu = params.proctype; + action.boot = `order=${params.boot.toString().replace(",", ";")}`; } action = JSON.stringify(action); const method = params.type === "qemu" ? "POST" : "PUT";