From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager 01/13] pdm-api-types: reuse APTUpdateInfo from proxmox_apt_api_types
Date: Thu, 27 Nov 2025 11:44:35 +0100 [thread overview]
Message-ID: <20251127104447.162951-7-l.wagner@proxmox.com> (raw)
In-Reply-To: <20251127104447.162951-1-l.wagner@proxmox.com>
... instead of defining of defining our own version locally.
Both structs are equivalent, with the exception of `change_log_url`,
which was present in the pdm-api-types version but not in the struct
definition in proxmox-apt-api-types. We never seem to use this member
(grepped PBS as well as PDM source), so it should be fine to use the
definition without it - it also still compiles fine.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
lib/pdm-api-types/Cargo.toml | 1 +
lib/pdm-api-types/src/lib.rs | 32 ++------------------------------
2 files changed, 3 insertions(+), 30 deletions(-)
diff --git a/lib/pdm-api-types/Cargo.toml b/lib/pdm-api-types/Cargo.toml
index ffc75cf3..67476271 100644
--- a/lib/pdm-api-types/Cargo.toml
+++ b/lib/pdm-api-types/Cargo.toml
@@ -16,6 +16,7 @@ serde_plain.workspace = true
proxmox-acme-api.workspace = true
proxmox-access-control.workspace = true
proxmox-auth-api = { workspace = true, features = ["api-types"] }
+proxmox-apt-api-types.workspace = true
proxmox-lang.workspace = true
proxmox-config-digest.workspace = true
proxmox-schema = { workspace = true, features = ["api-macro"] }
diff --git a/lib/pdm-api-types/src/lib.rs b/lib/pdm-api-types/src/lib.rs
index 666f89e1..5bce1b07 100644
--- a/lib/pdm-api-types/src/lib.rs
+++ b/lib/pdm-api-types/src/lib.rs
@@ -32,6 +32,8 @@ pub use proxy::HTTP_PROXY_SCHEMA;
mod translation;
pub use translation::Translation;
+pub use proxmox_apt_api_types::APTUpdateInfo;
+
pub use proxmox_auth_api::types::{Authid, Userid};
pub use proxmox_auth_api::types::{Realm, RealmRef};
pub use proxmox_auth_api::types::{Tokenname, TokennameRef};
@@ -200,36 +202,6 @@ pub const PASSWORD_HINT_SCHEMA: Schema = StringSchema::new("Password hint.")
.max_length(64)
.schema();
-#[api()]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(rename_all = "PascalCase")]
-/// Describes a package for which an update is available.
-pub struct APTUpdateInfo {
- /// Package name
- pub package: String,
- /// Package title
- pub title: String,
- /// Package architecture
- pub arch: String,
- /// Human readable package description
- pub description: String,
- /// New version to be updated to
- pub version: String,
- /// Old version currently installed
- pub old_version: String,
- /// Package origin
- pub origin: String,
- /// Package priority in human-readable form
- pub priority: String,
- /// Package section
- pub section: String,
- /// URL under which the package's changelog can be retrieved
- pub change_log_url: String,
- /// Custom extra field for additional package information
- #[serde(skip_serializing_if = "Option::is_none")]
- pub extra_info: Option<String>,
-}
-
#[api()]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-11-27 10:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 10:44 [pdm-devel] [PATCH datacenter-manager/proxmox{, -yew-comp} 00/18] remote update view: include product version and repository status Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH proxmox 1/4] add bindings for /nodes/{node}/apt/versions Lukas Wagner
2025-11-27 20:46 ` [pdm-devel] applied: " Thomas Lamprecht
2025-11-27 10:44 ` [pdm-devel] [PATCH proxmox 2/4] add bindings for /nodes/{node}/apt/repositories Lukas Wagner
2025-11-27 20:46 ` [pdm-devel] applied: " Thomas Lamprecht
2025-11-27 10:44 ` [pdm-devel] [PATCH proxmox 3/4] make refresh Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH proxmox 4/4] proxmox-apt-api-types: make APTStandardRepository compatible with PVE's serialization of the type Lukas Wagner
2025-11-27 20:46 ` [pdm-devel] applied: " Thomas Lamprecht
2025-11-27 10:44 ` [pdm-devel] [PATCH proxmox-yew-comp 1/1] apt repositories: add 'status_only' property Lukas Wagner
2025-11-27 21:26 ` [pdm-devel] applied: " Thomas Lamprecht
2025-11-27 10:44 ` Lukas Wagner [this message]
2025-11-27 10:44 ` [pdm-devel] [PATCH datacenter-manager 02/13] pbs-client: add bindings for /nodes/localhost/apt/versions Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH datacenter-manager 03/13] pbs-client: add bindings for /nodes/localhost/apt/repositories Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH datacenter-manager 04/13] remote-updates: include version information in node update summary Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH datacenter-manager 05/13] remote updates: include repository status in node summary Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH datacenter-manager 06/13] api: pve/pbs: add passthrough endpoint for APT repo configuration Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH datacenter-manager 07/13] ui: remote updates: show table header Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH datacenter-manager 08/13] ui: remote updates: show main product version in overview table Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH datacenter-manager 09/13] ui: remote updates: show repository status column Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH datacenter-manager 10/13] ui: remote updates: show repo status details when selecting a node Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH datacenter-manager 11/13] ui: remote updates: don't attempt to load current status for unavailable nodes Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH datacenter-manager 12/13] ui: remote updates: use 'building-o' icon for PBS nodes Lukas Wagner
2025-11-27 10:44 ` [pdm-devel] [PATCH datacenter-manager 13/13] ui: remote updates: use explicit indices for parameters in tr! macro Lukas Wagner
2025-11-27 10:47 ` [pdm-devel] [PATCH datacenter-manager/proxmox{, -yew-comp} 00/18] remote update view: include product version and repository status 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=20251127104447.162951-7-l.wagner@proxmox.com \
--to=l.wagner@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