[pbs-devel] [PATCH proxmox-backup] manager: remove accidentally committed ldap.rs

Lukas Wagner l.wagner at proxmox.com
Fri Dec 9 14:13:49 CET 2022


Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---

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<Value, Error> {
-    let output_format = get_output_format(&param);
-
-    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<Value, Error> {
-    let output_format = get_output_format(&param);
-
-    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






More information about the pbs-devel mailing list