public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager 2/5] fake remote: fix nonsensical values
Date: Fri, 20 Mar 2026 10:25:39 +0100	[thread overview]
Message-ID: <20260320092702.1069143-3-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260320092702.1069143-1-d.csapak@proxmox.com>

maxdisk being smaller than disk does not make sense, seems there was
just a * 1024 missing, same for memhost.

Also a storage needs to have an associated node.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 server/src/test_support/fake_remote.rs | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/server/src/test_support/fake_remote.rs b/server/src/test_support/fake_remote.rs
index 93c1c495..21e3a1c9 100644
--- a/server/src/test_support/fake_remote.rs
+++ b/server/src/test_support/fake_remote.rs
@@ -150,10 +150,10 @@ impl pve_api_types::client::PveClient for FakePveClient {
                 id: format!("qemu/{vmid}"),
                 level: Some("".into()),
                 maxcpu: Some(4.),
-                maxdisk: Some(100 * 1024 * 1024),
+                maxdisk: Some(100 * 1024 * 1024 * 1024),
                 maxmem: Some(8 * 1024 * 1024 * 1024),
                 mem: Some(3 * 1024 * 1024 * 1024),
-                memhost: Some(4 * 1024 * 1024),
+                memhost: Some(4 * 1024 * 1024 * 1024),
                 name: Some(format!("vm-{vmid}")),
                 netin: Some(1034),
                 netout: Some(1034),
@@ -190,9 +190,9 @@ impl pve_api_types::client::PveClient for FakePveClient {
                 id: format!("lxc/{vmid}"),
                 level: Some("".into()),
                 maxcpu: Some(4.),
-                maxdisk: Some(100 * 1024 * 1024),
+                maxdisk: Some(100 * 1024 * 1024 * 1024),
                 maxmem: Some(8 * 1024 * 1024 * 1024),
-                memhost: Some(4 * 1024 * 1024),
+                memhost: Some(4 * 1024 * 1024 * 1024),
                 mem: Some(3 * 1024 * 1024 * 1024),
                 name: Some(format!("ct-{vmid}")),
                 netin: Some(1034),
@@ -229,7 +229,7 @@ impl pve_api_types::client::PveClient for FakePveClient {
                 id: format!("node/node-{i}"),
                 level: Some("".into()),
                 maxcpu: Some(16.),
-                maxdisk: Some(100 * 1024 * 1024),
+                maxdisk: Some(100 * 1024 * 1024 * 1024),
                 maxmem: Some(8 * 1024 * 1024 * 1024),
                 mem: Some(3 * 1024 * 1024 * 1024),
                 memhost: None,
@@ -268,14 +268,14 @@ impl pve_api_types::client::PveClient for FakePveClient {
                 id: format!("storage/node-0/storage-{i}"),
                 level: None,
                 maxcpu: None,
-                maxdisk: Some(100 * 1024 * 1024),
+                maxdisk: Some(100 * 1024 * 1024 * 1024),
                 maxmem: None,
                 mem: None,
                 memhost: None,
                 name: None,
                 netin: None,
                 netout: None,
-                node: None,
+                node: Some(format!("node-{}", i % self.nr_of_nodes)),
                 plugintype: Some("dir".into()),
                 pool: None,
                 status: Some("available".into()),
-- 
2.47.3





  parent reply	other threads:[~2026-03-20  9:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20  9:25 [PATCH datacenter-manager 0/5] fix/improve fake-remote code Dominik Csapak
2026-03-20  9:25 ` [PATCH datacenter-manager 1/5] fake remote: update code to implement/use new interfaces Dominik Csapak
2026-03-20  9:25 ` Dominik Csapak [this message]
2026-03-20  9:25 ` [PATCH datacenter-manager 3/5] fake remote: factor out cpu/disk/mem values Dominik Csapak
2026-03-20  9:25 ` [PATCH datacenter-manager 4/5] fake remote: add jitter to disk/memory values Dominik Csapak
2026-03-20  9:25 ` [PATCH datacenter-manager 5/5] fake remotes: make use of ClusterResource more resilient to changes Dominik Csapak
2026-03-20 10:48 ` applied: [PATCH datacenter-manager 0/5] fix/improve fake-remote code Lukas Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260320092702.1069143-3-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pdm-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal