[pdm-devel] [PATCH datacenter-manager] server: api: resources: handle template in status count
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Apr 17 17:38:09 CEST 2025
Seems simple enough, but the existences of the FIXME comments warrant
and actual commit message, i.e. why wasn't this done earlier already
if it's so simple? And FWIW, a short message would not hurt in any way.
Am 16.04.25 um 13:31 schrieb Dominik Csapak:
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> server/src/api/resources.rs | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/server/src/api/resources.rs b/server/src/api/resources.rs
> index 453d9e8..ddcee7e 100644
> --- a/server/src/api/resources.rs
> +++ b/server/src/api/resources.rs
> @@ -191,14 +191,14 @@ pub async fn get_status(
> _ => counts.storages.unknown += 1,
> },
> Resource::PveQemu(r) => match r.status.as_str() {
> + _ if r.template => counts.qemu.template += 1,
> "running" => counts.qemu.running += 1,
> - // FIXME: handle templates
> "stopped" => counts.qemu.stopped += 1,
> _ => counts.qemu.unknown += 1,
> },
> Resource::PveLxc(r) => match r.status.as_str() {
> + _ if r.template => counts.lxc.template += 1,
> "running" => counts.lxc.running += 1,
> - // FIXME: handle templates
> "stopped" => counts.lxc.stopped += 1,
> _ => counts.lxc.unknown += 1,
> },
More information about the pdm-devel
mailing list