* [PATCH datacenter-manager] api: autoinstaller: token: enforce token schema constraints
@ 2026-05-26 13:30 Lukas Wagner
2026-05-26 13:50 ` applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Wagner @ 2026-05-26 13:30 UTC (permalink / raw)
To: pdm-devel
The PROXMOX_TOKEN_NAME schema is already used internally in the id
property of the AnswerToken type, so it makes sense to propagate the
schema to the API handler as well.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
---
server/src/api/auto_installer/mod.rs | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/server/src/api/auto_installer/mod.rs b/server/src/api/auto_installer/mod.rs
index 11054963..8c40c82e 100644
--- a/server/src/api/auto_installer/mod.rs
+++ b/server/src/api/auto_installer/mod.rs
@@ -4,6 +4,7 @@ use anyhow::{anyhow, Context, Result};
use http::StatusCode;
use std::collections::{BTreeMap, HashMap};
+use pdm_api_types::PROXMOX_TOKEN_NAME_SCHEMA;
use pdm_api_types::{
auto_installer::{
AnswerToken, AnswerTokenCreateResult, AnswerTokenUpdateResult, AnswerTokenUpdater,
@@ -870,8 +871,7 @@ async fn list_tokens(rpcenv: &mut dyn RpcEnvironment) -> Result<Vec<AnswerToken>
input: {
properties: {
id: {
- type: String,
- description: "Token ID.",
+ schema: PROXMOX_TOKEN_NAME_SCHEMA,
},
comment: {
schema: COMMENT_SCHEMA,
@@ -939,8 +939,7 @@ fn create_token(
input: {
properties: {
id: {
- type: String,
- description: "Token ID.",
+ schema: PROXMOX_TOKEN_NAME_SCHEMA,
},
update: {
type: AnswerTokenUpdater,
@@ -1047,8 +1046,7 @@ async fn update_token(
input: {
properties: {
id: {
- type: String,
- description: "Token ID.",
+ schema: PROXMOX_TOKEN_NAME_SCHEMA,
},
},
},
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* applied: [PATCH datacenter-manager] api: autoinstaller: token: enforce token schema constraints
2026-05-26 13:30 [PATCH datacenter-manager] api: autoinstaller: token: enforce token schema constraints Lukas Wagner
@ 2026-05-26 13:50 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-05-26 13:50 UTC (permalink / raw)
To: pdm-devel, Lukas Wagner
On Tue, 26 May 2026 15:30:56 +0200, Lukas Wagner wrote:
> The PROXMOX_TOKEN_NAME schema is already used internally in the id
> property of the AnswerToken type, so it makes sense to propagate the
> schema to the API handler as well.
Applied, thanks!
[1/1] api: autoinstaller: token: enforce token schema constraints
commit: 9c10578b262c54ad20ca53525cc5f9a16506f50b
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-26 13:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 13:30 [PATCH datacenter-manager] api: autoinstaller: token: enforce token schema constraints Lukas Wagner
2026-05-26 13:50 ` applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.