From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 0C4CDE5D4 for ; Fri, 9 Dec 2022 14:14:32 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D3C722457B for ; Fri, 9 Dec 2022 14:14:01 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 9 Dec 2022 14:14:01 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id C1D98415A2 for ; Fri, 9 Dec 2022 14:14:00 +0100 (CET) From: Lukas Wagner To: pbs-devel@lists.proxmox.com Date: Fri, 9 Dec 2022 14:13:49 +0100 Message-Id: <20221209131349.344429-1-l.wagner@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.218 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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 Subject: [pbs-devel] [PATCH proxmox-backup] manager: remove accidentally committed ldap.rs X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2022 13:14:32 -0000 Signed-off-by: Lukas Wagner --- This accidentally slipped in when reworking my previous patch series in step v2 -> v3. The file was not yet tracked in my LDAP branch and I was a bit too vigorous when `git add`ing files. Sorry about that. src/bin/proxmox_backup_manager/ldap.rs | 102 ------------------------- 1 file changed, 102 deletions(-) delete mode 100644 src/bin/proxmox_backup_manager/ldap.rs diff --git a/src/bin/proxmox_backup_manager/ldap.rs b/src/bin/proxmox_backup_manager/ldap.rs deleted file mode 100644 index a2f10f66..00000000 --- a/src/bin/proxmox_backup_manager/ldap.rs +++ /dev/null @@ -1,102 +0,0 @@ -use anyhow::Error; -use serde_json::Value; - -use proxmox_router::{cli::*, ApiHandler, RpcEnvironment}; -use proxmox_schema::api; - -use pbs_api_types::REALM_ID_SCHEMA; - -use proxmox_backup::api2; - -#[api( - input: { - properties: { - "output-format": { - schema: OUTPUT_FORMAT, - optional: true, - }, - } - } -)] -/// List configured LDAP realms -fn list_ldap_realms(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result { - let output_format = get_output_format(¶m); - - let info = &api2::config::access::ldap::API_METHOD_LIST_LDAP_REALMS; - let mut data = match info.handler { - ApiHandler::Sync(handler) => (handler)(param, info, rpcenv)?, - _ => unreachable!(), - }; - - let options = default_table_format_options() - .column(ColumnConfig::new("realm")) - // .column(ColumnConfig::new("issuer-url")) - .column(ColumnConfig::new("comment")); - - format_and_print_result_full(&mut data, &info.returns, &output_format, &options); - - Ok(Value::Null) -} -#[api( - input: { - properties: { - realm: { - schema: REALM_ID_SCHEMA, - }, - "output-format": { - schema: OUTPUT_FORMAT, - optional: true, - }, - } - } -)] - -/// Show LDAP realm configuration -fn show_ldap_realm(param: Value, rpcenv: &mut dyn RpcEnvironment) -> Result { - let output_format = get_output_format(¶m); - - let info = &api2::config::access::ldap::API_METHOD_READ_LDAP_REALM; - let mut data = match info.handler { - ApiHandler::Sync(handler) => (handler)(param, info, rpcenv)?, - _ => unreachable!(), - }; - - let options = default_table_format_options(); - format_and_print_result_full(&mut data, &info.returns, &output_format, &options); - - Ok(Value::Null) -} - -pub fn ldap_commands() -> CommandLineInterface { - let cmd_def = CliCommandMap::new() - .insert("list", CliCommand::new(&API_METHOD_LIST_LDAP_REALMS)) - .insert( - "show", - CliCommand::new(&API_METHOD_SHOW_LDAP_REALM) - .arg_param(&["realm"]) - .completion_cb("realm", pbs_config::domains::complete_ldap_realm_name), - ) - .insert( - "create", - CliCommand::new(&api2::config::access::ldap::API_METHOD_CREATE_LDAP_REALM) - .arg_param(&["realm"]) - .arg_param(&["realm"]) - .completion_cb("realm", pbs_config::domains::complete_ldap_realm_name), - ) - .insert( - "update", - CliCommand::new(&api2::config::access::ldap::API_METHOD_UPDATE_LDAP_REALM) - .arg_param(&["realm"]) - .arg_param(&["realm"]) - .completion_cb("realm", pbs_config::domains::complete_ldap_realm_name), - ) - .insert( - "delete", - CliCommand::new(&api2::config::access::ldap::API_METHOD_DELETE_LDAP_REALM) - .arg_param(&["realm"]) - .arg_param(&["realm"]) - .completion_cb("realm", pbs_config::domains::complete_ldap_realm_name), - ); - - cmd_def.into() -} -- 2.30.2