From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 6539E1FF14F for ; Fri, 08 May 2026 18:06:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 43BEF1D966; Fri, 8 May 2026 18:06:02 +0200 (CEST) From: Shannon Sterz To: yew-devel@lists.proxmox.com Subject: [PATCH yew-mobile-gui v2 20/21] api types: remove unused file Date: Fri, 8 May 2026 17:57:21 +0200 Message-ID: <20260508155722.464564-21-s.sterz@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260508155722.464564-1-s.sterz@proxmox.com> References: <20260508155722.464564-1-s.sterz@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778255736878 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.115 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 6YX6JEGVJ2UFDGIDB7HGC6UFEM3JGZVO X-Message-ID-Hash: 6YX6JEGVJ2UFDGIDB7HGC6UFEM3JGZVO X-MailFrom: s.sterz@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Yew framework devel list at Proxmox List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: the api types defined here are no longer used, remove them Signed-off-by: Shannon Sterz --- src/api_types.rs | 131 ----------------------------------------------- 1 file changed, 131 deletions(-) delete mode 100644 src/api_types.rs diff --git a/src/api_types.rs b/src/api_types.rs deleted file mode 100644 index d2bda9a..0000000 --- a/src/api_types.rs +++ /dev/null @@ -1,131 +0,0 @@ -use serde::{Deserialize, Serialize}; -use serde_json::Value; - -use proxmox_schema::{api, ApiStringFormat}; - -// fixme: define all those types in pve-api-types - -#[derive(Deserialize, Serialize, PartialEq, Clone)] -pub struct StorageEntry { - pub format: String, - pub content: String, - pub size: i64, - pub volid: String, -} - -#[derive(Deserialize, Serialize, PartialEq, Clone)] -#[serde(rename_all = "kebab-case")] -pub struct ServiceStatus { - pub state: String, - pub active_state: String, - pub unit_state: String, - pub name: String, - pub service: String, - pub desc: String, -} - -#[api { - default_key: "order", - properties: { - order: { - type: u32, - optional: true, - minimum: 0, - }, - up: { - type: u32, - optional: true, - minimum: 0, - }, - down: { - type: u32, - optional: true, - minimum: 0, - }, - } -}] -#[derive(Deserialize, Serialize, PartialEq, Clone)] -/// Qemu Startup ordering -pub struct QemuConfigStartup { - /// Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering - #[serde(skip_serializing_if = "Option::is_none")] - pub order: Option, - /// Delay (seconds) to wait before the next VM is started. - #[serde(skip_serializing_if = "Option::is_none")] - pub up: Option, - /// Delay (seconds) to wait before the next VM is stopped. - #[serde(skip_serializing_if = "Option::is_none")] - pub down: Option, -} - -#[api] -#[derive(Deserialize, Serialize, PartialEq, Clone)] -/// Qemu CPU model info (GET /api2/json/nodes/{node}/capabilities/qemu/cpu -pub struct QemuCpuModel { - /// True if this is a custom CPU model. - #[serde(deserialize_with = "proxmox_serde::perl::deserialize_bool")] - pub custom: bool, - /// Name of the CPU model. Identifies it for subsequent API calls. Prefixed with 'custom-' for custom models. - pub name: String, - /// CPU vendor visible to the guest when this model is selected. Vendor of 'reported-model' in case of custom models. - pub vendor: String, -} - -#[api] -/// Qemu Machine Type (q35 or pc) -#[derive(Clone, Copy, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize)] -pub enum QemuMachineType { - #[serde(rename = "q35")] - /// Q35 - Q35, - #[serde(rename = "i440fx")] - /// I440FX - I440fx, - #[serde(rename = "virt")] - /// Virt (Arm) - /// - /// Note: Not returned by the api for now. - Virt, -} -serde_plain::derive_display_from_serialize!(QemuMachineType); -serde_plain::derive_fromstr_from_deserialize!(QemuMachineType); - -#[api( - properties: { - type: { - format: &ApiStringFormat::PropertyString(&QemuMachineType::API_SCHEMA), - type: String, - } - } -)] -#[derive(Deserialize, Serialize, PartialEq, Clone)] -/// Machine type info (GET /api2/json/nodes/{node}/capabilities/qemu/machines -pub struct QemuMachineInfo { - /// Full name of machine type and version. - pub id: String, - /// Machine type - #[serde(rename = "type")] - pub ty: QemuMachineType, - /// The machine version. - pub version: String, - /// Notable changes of a version, currently only set for +pveX versions. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub changes: Option, -} - -#[derive(Deserialize, Serialize, PartialEq, Debug, Clone)] -/// Get the virtual machine configuration with both current and pending values. -/// -/// (`GET /api2/json/nodes/{node}/qemu/{vmid}/pending) -> Vec` -pub struct QemuPendingConfigValue { - /// Configuration option name. - pub key: String, - /// Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub delete: Option, - /// Current value. - pub value: Option, - /// Pending value. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub pending: Option, -} -- 2.47.3