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 DFA091FF141 for ; Mon, 13 Apr 2026 15:26:22 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id F1707263E0; Mon, 13 Apr 2026 15:27:05 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 13 Apr 2026 15:26:32 +0200 Message-Id: Subject: Re: [PATCH proxmox-backup 5/7] manager: add instance-id subcommand To: "Lukas Wagner" , , X-Mailer: aerc 0.20.0 References: <20260413121057.371772-1-l.wagner@proxmox.com> <20260413121057.371772-6-l.wagner@proxmox.com> In-Reply-To: <20260413121057.371772-6-l.wagner@proxmox.com> From: "Shannon Sterz" X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1776086718806 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.124 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: S266MVSYHDCJW6PG42MIPK67Z3RNNP4W X-Message-ID-Hash: S266MVSYHDCJW6PG42MIPK67Z3RNNP4W 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: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon Apr 13, 2026 at 2:10 PM CEST, Lukas Wagner wrote: > For the sake of completeness also allow to query the instance ID from > the proxmox-backup-manager admin tool. > > Signed-off-by: Lukas Wagner > --- > src/bin/proxmox_backup_manager/node.rs | 27 ++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > > diff --git a/src/bin/proxmox_backup_manager/node.rs b/src/bin/proxmox_bac= kup_manager/node.rs > index 4da61690f..34c481587 100644 > --- a/src/bin/proxmox_backup_manager/node.rs > +++ b/src/bin/proxmox_backup_manager/node.rs > @@ -32,9 +32,36 @@ fn get_node_config(param: Value, rpcenv: &mut dyn RpcE= nvironment) -> Result Ok(Value::Null) > } > > +#[api( > + input: { > + properties: { > + "output-format": { > + schema: OUTPUT_FORMAT, > + optional: true, > + }, > + } > + } > +)] > +/// Show node configuration nit: this description should probably also be something like "Get the instance ID of the current PBS instance." or similar. > +fn get_instance_id(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Res= ult { > + let output_format =3D get_output_format(¶m); > + > + let info =3D &api2::node::API_METHOD_GET_INSTANCE_ID; > + let mut data =3D match info.handler { > + ApiHandler::Sync(handler) =3D> (handler)(param, info, rpcenv)?, > + _ =3D> unreachable!(), > + }; > + > + let options =3D default_table_format_options(); > + format_and_print_result_full(&mut data, &info.returns, &output_forma= t, &options); > + > + Ok(Value::Null) > +} > + > pub fn node_commands() -> CommandLineInterface { > let cmd_def =3D CliCommandMap::new() > .insert("show", CliCommand::new(&API_METHOD_GET_NODE_CONFIG)) > + .insert("instance-id", CliCommand::new(&API_METHOD_GET_INSTANCE_= ID)) > .insert( > "update", > CliCommand::new(&api2::node::config::API_METHOD_UPDATE_NODE_= CONFIG)