From: Lukas Wagner <l.wagner@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] manager: remove accidentally committed ldap.rs
Date: Fri, 9 Dec 2022 14:13:49 +0100 [thread overview]
Message-ID: <20221209131349.344429-1-l.wagner@proxmox.com> (raw)
Signed-off-by: Lukas Wagner <l.wagner@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(¶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<Value, Error> {
- 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
next reply other threads:[~2022-12-09 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 13:13 Lukas Wagner [this message]
2022-12-09 13:59 ` [pbs-devel] applied: " Wolfgang Bumiller
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=20221209131349.344429-1-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pbs-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 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.