* [pdm-devel] [PATCH datacenter-manager] pdm: api: get_network: rename parameter interface-type to type
@ 2025-11-28 12:33 Dietmar Maurer
0 siblings, 0 replies; only message in thread
From: Dietmar Maurer @ 2025-11-28 12:33 UTC (permalink / raw)
To: pdm-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-28 12:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-28 12:33 [pdm-devel] [PATCH datacenter-manager] pdm: api: get_network: rename parameter interface-type to type Dietmar Maurer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox