diff --git a/cmdline/CtaAdminCmdParse.hpp b/cmdline/CtaAdminCmdParse.hpp index 53d812efa79f3576a14c55cd77aa7bfa78123c3e..10eaaaf55213e89b9d99918e7966bb8c01c90475 100644 --- a/cmdline/CtaAdminCmdParse.hpp +++ b/cmdline/CtaAdminCmdParse.hpp @@ -487,7 +487,8 @@ const std::map<cmd_key_t, cmd_val_t> cmdOptions = { {{ AdminCmd::CMD_LISTPENDINGRETRIEVES, AdminCmd::SUBCMD_NONE }, { opt_header.optional(), opt_vid.optional(), opt_extended.optional() }}, /*----------------------------------------------------------------------------------------------------*/ - {{ AdminCmd::CMD_LOGICALLIBRARY, AdminCmd::SUBCMD_ADD }, { opt_logicallibrary_alias, opt_comment }}, + {{ AdminCmd::CMD_LOGICALLIBRARY, AdminCmd::SUBCMD_ADD }, + { opt_logicallibrary_alias, opt_disabled.optional(), opt_comment }}, {{ AdminCmd::CMD_LOGICALLIBRARY, AdminCmd::SUBCMD_CH }, { opt_logicallibrary_alias, opt_comment }}, {{ AdminCmd::CMD_LOGICALLIBRARY, AdminCmd::SUBCMD_RM }, { opt_logicallibrary_alias }}, {{ AdminCmd::CMD_LOGICALLIBRARY, AdminCmd::SUBCMD_LS }, { opt_header.optional() }}, diff --git a/xroot_plugins/XrdSsiCtaRequestMessage.cpp b/xroot_plugins/XrdSsiCtaRequestMessage.cpp index fc7e704a6b0bf8a6b3b9d2ac5c6f543ffbe827af..d6a1aaca7f254ab26d376dcdea260ccf3c3a7fbc 100644 --- a/xroot_plugins/XrdSsiCtaRequestMessage.cpp +++ b/xroot_plugins/XrdSsiCtaRequestMessage.cpp @@ -1201,11 +1201,11 @@ void RequestMessage::processLogicalLibrary_Add(const cta::admin::AdminCmd &admin { using namespace cta::admin; - auto &name = getRequired(OptionString::LOGICAL_LIBRARY); - auto &comment = getRequired(OptionString::COMMENT); - const bool isDisabled = false; // TBD + auto &name = getRequired(OptionString::LOGICAL_LIBRARY); + auto isDisabled = getOptional(OptionBoolean::DISABLED); + auto &comment = getRequired(OptionString::COMMENT); - m_catalogue.createLogicalLibrary(m_cliIdentity, name, isDisabled, comment); + m_catalogue.createLogicalLibrary(m_cliIdentity, name, isDisabled ? isDisabled.value() : false, comment); response.set_type(cta::xrd::Response::RSP_SUCCESS); }