diff --git a/cmdline/CtaAdminCmdParse.hpp b/cmdline/CtaAdminCmdParse.hpp index 10eaaaf55213e89b9d99918e7966bb8c01c90475..6ac36600b97a42b5177e9f91b3056cf8f53b2903 100644 --- a/cmdline/CtaAdminCmdParse.hpp +++ b/cmdline/CtaAdminCmdParse.hpp @@ -489,7 +489,8 @@ const std::map<cmd_key_t, cmd_val_t> cmdOptions = { /*----------------------------------------------------------------------------------------------------*/ {{ 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_CH }, + { opt_logicallibrary_alias, opt_disabled.optional(), opt_comment.optional() }}, {{ 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 d6a1aaca7f254ab26d376dcdea260ccf3c3a7fbc..a1ae61835e9fcf2c7ae9bc8f65f41a16abc6c800 100644 --- a/xroot_plugins/XrdSsiCtaRequestMessage.cpp +++ b/xroot_plugins/XrdSsiCtaRequestMessage.cpp @@ -1216,10 +1216,16 @@ void RequestMessage::processLogicalLibrary_Ch(const cta::admin::AdminCmd &adminc { using namespace cta::admin; - auto &name = getRequired(OptionString::LOGICAL_LIBRARY); - auto &comment = getRequired(OptionString::COMMENT); + auto &name = getRequired(OptionString::LOGICAL_LIBRARY); + auto disabled = getOptional(OptionBoolean::DISABLED); + auto comment = getOptional(OptionString::COMMENT); - m_catalogue.modifyLogicalLibraryComment(m_cliIdentity, name, comment); + if(disabled) { + m_catalogue.setLogicalLibraryDisabled(m_cliIdentity, name, disabled.value()); + } + if(comment) { + m_catalogue.modifyLogicalLibraryComment(m_cliIdentity, name, comment.value()); + } response.set_type(cta::xrd::Response::RSP_SUCCESS); }