api: disk list: sort by name

So callers get more stable results. Most noticeable, the disk list in
the web UI doesn't jump around upon reloading, and while sorting could
be done directly there, like this other callers get the benefit too.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner authored and Thomas Lamprecht committed 2021-07-09 13:02:30 +02:00
1 parent 20429238e0
commit bbff317aa7
1 file changed
+2
+2
View File
@@ -66,6 +66,8 @@ pub fn list_disks(
}
}
list.sort_by(|a, b| a.name.cmp(&b.name));
Ok(list)
}