[pdm-devel] [PATCH proxmox-datacenter-manager 24/25] pdm-client: add metric collection API methods
Lukas Wagner
l.wagner at proxmox.com
Thu Feb 13 14:52:18 CET 2025
On 2025-02-13 13:10, Wolfgang Bumiller wrote:
>> + /// Trigger metric collection for a single remote or all, if no remote is provided.
>> + pub async fn trigger_metric_collection(
>> + &self,
>> + remote: Option<&str>,
>> + ) -> Result<(), proxmox_client::Error> {
>> + let path = "/api2/extjs/metric-collection/trigger";
>> +
>> + #[derive(Serialize)]
>> + struct TriggerParams<'a> {
>> + #[serde(skip_serializing_if = "Option::is_none")]
>> + remote: Option<&'a str>,
>> + }
>> +
>> + self.0
>> + .post(path, &TriggerParams { remote })
>> + .await?
>> + .expect_json::<()>()?;
>
> Look like this should be `.nodata()`?
>
Thx, fixed for v2.
More information about the pdm-devel
mailing list