From: Dietmar Maurer <dietmar@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager] pdm: api: get_network: rename parameter interface-type to type
Date: Fri, 28 Nov 2025 13:33:28 +0100 [thread overview]
Message-ID: <20251128123328.1652152-1-dietmar@proxmox.com> (raw)
Use the same parameter name as in the pve api. Else we need to translate
parameter names for GUI components that works on both pve and pdm api.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
---
lib/pdm-client/src/lib.rs | 2 +-
server/src/api/pve/node.rs | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/pdm-client/src/lib.rs b/lib/pdm-client/src/lib.rs
index 29e9e7a..3d2135d 100644
--- a/lib/pdm-client/src/lib.rs
+++ b/lib/pdm-client/src/lib.rs
@@ -1090,7 +1090,7 @@ impl<T: HttpApiClient> PdmClient<T> {
let path = ApiPathBuilder::new(format!(
"/api2/extjs/pve/remotes/{remote}/nodes/{node}/network"
))
- .maybe_arg("interface-type", &interface_type)
+ .maybe_arg("type", &interface_type)
.build();
Ok(self.0.get(&path).await?.expect_json()?.data)
}
diff --git a/server/src/api/pve/node.rs b/server/src/api/pve/node.rs
index 9249711..708aabf 100644
--- a/server/src/api/pve/node.rs
+++ b/server/src/api/pve/node.rs
@@ -58,7 +58,7 @@ const STORAGE_ROUTER: Router = Router::new()
properties: {
remote: { schema: REMOTE_ID_SCHEMA },
node: { schema: NODE_SCHEMA },
- "interface-type": {
+ type: {
type: pve_api_types::ListNetworksType,
optional: true,
},
@@ -72,11 +72,11 @@ const STORAGE_ROUTER: Router = Router::new()
async fn get_network(
remote: String,
node: String,
- interface_type: Option<pve_api_types::ListNetworksType>,
+ r#type: Option<pve_api_types::ListNetworksType>,
) -> Result<Vec<pve_api_types::NetworkInterface>, Error> {
let (remotes, _) = pdm_config::remotes::config()?;
let client = super::connect_to_remote(&remotes, &remote)?;
- let networks = client.list_networks(&node, interface_type).await?;
+ let networks = client.list_networks(&node, r#type).await?;
Ok(networks)
}
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
reply other threads:[~2025-11-28 12:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20251128123328.1652152-1-dietmar@proxmox.com \
--to=dietmar@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