From 515b8fbe0b4bc1566ec057718cc23bc4a36d3573 Mon Sep 17 00:00:00 2001
From: Steven Murray <Steven.Murray@cern.ch>
Date: Wed, 22 May 2019 20:39:29 +0200
Subject: [PATCH] Added isDisabled parameter to
 Catalogue::createLogicalLibrary()

---
 catalogue/Catalogue.hpp                       |   2 +-
 catalogue/CatalogueRetryWrapper.hpp           |   4 +-
 catalogue/CatalogueTest.cpp                   | 229 +++++++++++++-----
 catalogue/DummyCatalogue.hpp                  |   2 +-
 catalogue/RdbmsCatalogue.cpp                  |   6 +
 catalogue/RdbmsCatalogue.hpp                  |   2 +-
 scheduler/SchedulerTest.cpp                   |  24 +-
 .../daemon/DataTransferSessionTest.cpp        |  30 ++-
 .../daemon/MigrationReportPackerTest.cpp      |   6 +-
 xroot_plugins/XrdSsiCtaRequestMessage.cpp     |   3 +-
 10 files changed, 219 insertions(+), 89 deletions(-)

diff --git a/catalogue/Catalogue.hpp b/catalogue/Catalogue.hpp
index 1294bdf63c..2c9e736487 100644
--- a/catalogue/Catalogue.hpp
+++ b/catalogue/Catalogue.hpp
@@ -274,7 +274,7 @@ public:
   virtual void modifyArchiveRouteTapePoolName(const common::dataStructures::SecurityIdentity &admin, const std::string &instanceName, const std::string &storageClassName, const uint32_t copyNb, const std::string &tapePoolName) = 0;
   virtual void modifyArchiveRouteComment(const common::dataStructures::SecurityIdentity &admin, const std::string &instanceName, const std::string &storageClassName, const uint32_t copyNb, const std::string &comment) = 0;
 
-  virtual void createLogicalLibrary(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const std::string &comment) = 0;
+  virtual void createLogicalLibrary(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const bool isDisabled, const std::string &comment) = 0;
   virtual void deleteLogicalLibrary(const std::string &name) = 0;
   virtual std::list<common::dataStructures::LogicalLibrary> getLogicalLibraries() const = 0;
   virtual void modifyLogicalLibraryComment(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const std::string &comment) = 0;
diff --git a/catalogue/CatalogueRetryWrapper.hpp b/catalogue/CatalogueRetryWrapper.hpp
index 9441b90b45..d157ee11e5 100644
--- a/catalogue/CatalogueRetryWrapper.hpp
+++ b/catalogue/CatalogueRetryWrapper.hpp
@@ -189,8 +189,8 @@ public:
     return retryOnLostConnection(m_log, [&]{return m_catalogue->modifyArchiveRouteComment(admin, instanceName, storageClassName, copyNb, comment);}, m_maxTriesToConnect);
   }
 
-  void createLogicalLibrary(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const std::string &comment) override {
-    return retryOnLostConnection(m_log, [&]{return m_catalogue->createLogicalLibrary(admin, name, comment);}, m_maxTriesToConnect);
+  void createLogicalLibrary(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const bool isDisabled, const std::string &comment) override {
+    return retryOnLostConnection(m_log, [&]{return m_catalogue->createLogicalLibrary(admin, name, isDisabled, comment);}, m_maxTriesToConnect);
   }
 
   void deleteLogicalLibrary(const std::string &name) override {
diff --git a/catalogue/CatalogueTest.cpp b/catalogue/CatalogueTest.cpp
index c4ee97d352..cb102d0804 100644
--- a/catalogue/CatalogueTest.cpp
+++ b/catalogue/CatalogueTest.cpp
@@ -941,6 +941,7 @@ TEST_P(cta_catalogue_CatalogueTest, deleteTapePool_notEmpty) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -951,7 +952,7 @@ TEST_P(cta_catalogue_CatalogueTest, deleteTapePool_notEmpty) {
   const cta::optional<std::string> supply("value for the supply pool mechanism");
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName,
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled,
     "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
@@ -2213,7 +2214,8 @@ TEST_P(cta_catalogue_CatalogueTest, createLogicalLibrary) {
       
   const std::string logicalLibraryName = "logical_library";
   const std::string comment = "Create logical library";
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, comment);
+  const bool logicalLibraryIsDisabled= false;
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, comment);
       
   const std::list<common::dataStructures::LogicalLibrary> libs =
     m_catalogue->getLogicalLibraries();
@@ -2222,6 +2224,65 @@ TEST_P(cta_catalogue_CatalogueTest, createLogicalLibrary) {
       
   const common::dataStructures::LogicalLibrary lib = libs.front();
   ASSERT_EQ(logicalLibraryName, lib.name);
+  ASSERT_FALSE(lib.isDisabled);
+  ASSERT_EQ(comment, lib.comment);
+
+  const common::dataStructures::EntryLog creationLog = lib.creationLog;
+  ASSERT_EQ(m_admin.username, creationLog.username);
+  ASSERT_EQ(m_admin.host, creationLog.host);
+  
+  const common::dataStructures::EntryLog lastModificationLog =
+    lib.lastModificationLog;
+  ASSERT_EQ(creationLog, lastModificationLog);
+}
+
+TEST_P(cta_catalogue_CatalogueTest, createLogicalLibrary_disabled_true) {
+  using namespace cta;
+      
+  ASSERT_TRUE(m_catalogue->getLogicalLibraries().empty());
+      
+  const std::string logicalLibraryName = "logical_library";
+  const std::string comment = "Create logical library";
+  const bool logicalLibraryIsDisabled(true);
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, comment);
+      
+  const std::list<common::dataStructures::LogicalLibrary> libs =
+    m_catalogue->getLogicalLibraries();
+      
+  ASSERT_EQ(1, libs.size());
+      
+  const common::dataStructures::LogicalLibrary lib = libs.front();
+  ASSERT_EQ(logicalLibraryName, lib.name);
+  ASSERT_TRUE(lib.isDisabled);
+  ASSERT_EQ(comment, lib.comment);
+
+  const common::dataStructures::EntryLog creationLog = lib.creationLog;
+  ASSERT_EQ(m_admin.username, creationLog.username);
+  ASSERT_EQ(m_admin.host, creationLog.host);
+  
+  const common::dataStructures::EntryLog lastModificationLog =
+    lib.lastModificationLog;
+  ASSERT_EQ(creationLog, lastModificationLog);
+}
+
+TEST_P(cta_catalogue_CatalogueTest, createLogicalLibrary_disabled_false) {
+  using namespace cta;
+      
+  ASSERT_TRUE(m_catalogue->getLogicalLibraries().empty());
+      
+  const std::string logicalLibraryName = "logical_library";
+  const std::string comment = "Create logical library";
+  const bool logicalLibraryIsDisabled(false);
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, comment);
+      
+  const std::list<common::dataStructures::LogicalLibrary> libs =
+    m_catalogue->getLogicalLibraries();
+      
+  ASSERT_EQ(1, libs.size());
+      
+  const common::dataStructures::LogicalLibrary lib = libs.front();
+  ASSERT_EQ(logicalLibraryName, lib.name);
+  ASSERT_FALSE(lib.isDisabled);
   ASSERT_EQ(comment, lib.comment);
 
   const common::dataStructures::EntryLog creationLog = lib.creationLog;
@@ -2238,8 +2299,9 @@ TEST_P(cta_catalogue_CatalogueTest, createLogicalLibrary_same_twice) {
   
   const std::string logicalLibraryName = "logical_library";
   const std::string comment = "Create logical library";
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, comment);
-  ASSERT_THROW(m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, comment), exception::UserError);
+  const bool logicalLibraryIsDisabled= false;
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, comment);
+  ASSERT_THROW(m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, comment), exception::UserError);
 }
 
 TEST_P(cta_catalogue_CatalogueTest, deleteLogicalLibrary) {
@@ -2249,7 +2311,8 @@ TEST_P(cta_catalogue_CatalogueTest, deleteLogicalLibrary) {
       
   const std::string logicalLibraryName = "logical_library";
   const std::string comment = "Create logical library";
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, comment);
+  const bool logicalLibraryIsDisabled= false;
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, comment);
       
   const std::list<common::dataStructures::LogicalLibrary> libs =
     m_catalogue->getLogicalLibraries();
@@ -2286,7 +2349,8 @@ TEST_P(cta_catalogue_CatalogueTest, modifyLogicalLibraryComment) {
       
   const std::string logicalLibraryName = "logical_library";
   const std::string comment = "Create logical library";
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, comment);
+  const bool logicalLibraryIsDisabled= false;
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, comment);
 
   {
     const std::list<common::dataStructures::LogicalLibrary> libs = m_catalogue->getLogicalLibraries();
@@ -2357,6 +2421,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -2367,8 +2432,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName,
-    "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   {
@@ -2441,6 +2505,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_emptyStringVid) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -2451,8 +2516,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_emptyStringVid) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName,
-    "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   {
@@ -2604,6 +2668,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_emptyStringTapePoolName) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "";
   const std::string vo = "vo";
   const uint64_t capacityInBytes = (uint64_t)10 * 1000 * 1000 * 1000 * 1000;
@@ -2611,8 +2676,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_emptyStringTapePoolName) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName,
-    "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   ASSERT_THROW(m_catalogue->createTape(m_admin, vid, mediaType, vendor, logicalLibraryName, tapePoolName,
     capacityInBytes, disabledValue, fullValue, comment), catalogue::UserSpecifiedAnEmptyStringTapePoolName);
@@ -2630,6 +2694,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_zeroCapacity) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -2640,8 +2705,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_zeroCapacity) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName,
-    "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   {
@@ -2673,6 +2737,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_emptyStringComment) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -2683,8 +2748,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_emptyStringComment) {
   const bool fullValue = false;
   const std::string comment = "";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName,
-    "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   {
@@ -2737,14 +2801,14 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_non_existent_tape_pool) {
   const std::string vendor = "vendor";
   const std::string vid = "vid";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const uint64_t capacityInBytes = (uint64_t)10 * 1000 * 1000 * 1000 * 1000;
   const bool disabledValue = true;
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName,
-    "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   ASSERT_THROW(m_catalogue->createTape(m_admin, vid, mediaType, vendor, logicalLibraryName, tapePoolName,
     capacityInBytes, disabledValue, fullValue, comment), exception::UserError);
 }
@@ -2758,6 +2822,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_9_exabytes_capacity) {
   const std::string vendor = "vendor";
   const std::string vid = "vid";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -2769,7 +2834,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_9_exabytes_capacity) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   {
@@ -2837,6 +2902,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_same_twice) {
   const std::string vendor = "vendor";
   const std::string vid = "vid";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -2847,8 +2913,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_same_twice) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName,
-    "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   {
@@ -2904,6 +2969,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_many_tapes) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibrary = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -2915,7 +2981,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_many_tapes) {
   const std::string comment = "Create tape";
 
   ASSERT_TRUE(m_catalogue->getLogicalLibraries().empty());
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibrary, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibrary, logicalLibraryIsDisabled, "Create logical library");
 
   ASSERT_TRUE(m_catalogue->getTapePools().empty());
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
@@ -3171,6 +3237,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_1_tape_with_write_log_1_tape_with
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -3181,7 +3248,7 @@ TEST_P(cta_catalogue_CatalogueTest, createTape_1_tape_with_write_log_1_tape_with
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
 
   {
@@ -3337,6 +3404,7 @@ TEST_P(cta_catalogue_CatalogueTest, deleteTape) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -3347,8 +3415,7 @@ TEST_P(cta_catalogue_CatalogueTest, deleteTape) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName,
-    "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid, mediaType, vendor, logicalLibraryName, tapePoolName,
     capacityInBytes, disabledValue, fullValue,
@@ -3402,6 +3469,7 @@ TEST_P(cta_catalogue_CatalogueTest, deleteNonEmptyTape) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -3412,8 +3480,7 @@ TEST_P(cta_catalogue_CatalogueTest, deleteNonEmptyTape) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName,
-    "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes, disabledValue, fullValue,
     comment);
@@ -3524,6 +3591,7 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeMediaType) {
   const std::string anotherMediaType = "another_media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -3534,7 +3602,7 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeMediaType) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
@@ -3605,6 +3673,7 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeVendor) {
   const std::string vendor = "vendor";
   const std::string anotherVendor = "another_vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -3615,7 +3684,7 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeVendor) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
@@ -3686,6 +3755,7 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeLogicalLibraryName) {
   const std::string mediaType = "mediaType";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string anotherLogicalLibraryName = "another_logical_library_name";
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
@@ -3697,8 +3767,9 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeLogicalLibraryName) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
-  m_catalogue->createLogicalLibrary(m_admin, anotherLogicalLibraryName, "Create another logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, anotherLogicalLibraryName, logicalLibraryIsDisabled,
+    "Create another logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
@@ -3767,8 +3838,9 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeLogicalLibraryName_nonExistentTape
 
   const std::string vid = "vid";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   ASSERT_THROW(m_catalogue->modifyTapeLogicalLibraryName(m_admin, vid, logicalLibraryName), exception::UserError);
 }
@@ -3782,6 +3854,7 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeTapePoolName) {
   const std::string mediaType = "mediaType";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -3793,7 +3866,7 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeTapePoolName) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTapePool(m_admin, anotherTapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create another tape pool");
@@ -3864,13 +3937,14 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeTapePoolName_nonExistentTape) {
 
   const std::string vid = "vid";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
   const bool isEncrypted = true;
   const cta::optional<std::string> supply("value for the supply pool mechanism");
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
 
   ASSERT_THROW(m_catalogue->modifyTapeTapePoolName(m_admin, vid, tapePoolName), exception::UserError);
@@ -3885,6 +3959,7 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeCapacityInBytes) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -3895,7 +3970,7 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeCapacityInBytes) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
 
@@ -3979,6 +4054,7 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeEncryptionKey) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -3989,7 +4065,7 @@ TEST_P(cta_catalogue_CatalogueTest, modifyTapeEncryptionKey) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
 
@@ -4074,6 +4150,7 @@ TEST_P(cta_catalogue_CatalogueTest, tapeLabelled) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -4084,7 +4161,7 @@ TEST_P(cta_catalogue_CatalogueTest, tapeLabelled) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
 
@@ -4169,6 +4246,7 @@ TEST_P(cta_catalogue_CatalogueTest, tapeMountedForArchive) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -4179,7 +4257,7 @@ TEST_P(cta_catalogue_CatalogueTest, tapeMountedForArchive) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
 
@@ -4264,6 +4342,7 @@ TEST_P(cta_catalogue_CatalogueTest, tapeMountedForRetrieve) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -4274,7 +4353,7 @@ TEST_P(cta_catalogue_CatalogueTest, tapeMountedForRetrieve) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
 
@@ -4359,6 +4438,7 @@ TEST_P(cta_catalogue_CatalogueTest, setTapeFull) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -4369,7 +4449,7 @@ TEST_P(cta_catalogue_CatalogueTest, setTapeFull) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
 
@@ -4451,6 +4531,7 @@ TEST_P(cta_catalogue_CatalogueTest, noSpaceLeftOnTape) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -4461,7 +4542,7 @@ TEST_P(cta_catalogue_CatalogueTest, noSpaceLeftOnTape) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
 
@@ -4543,6 +4624,7 @@ TEST_P(cta_catalogue_CatalogueTest, setTapeDisabled) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -4553,7 +4635,7 @@ TEST_P(cta_catalogue_CatalogueTest, setTapeDisabled) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
 
@@ -4635,6 +4717,7 @@ TEST_P(cta_catalogue_CatalogueTest, getTapesForWriting) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -4645,7 +4728,7 @@ TEST_P(cta_catalogue_CatalogueTest, getTapesForWriting) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
    disabledValue, fullValue, comment);
@@ -4675,6 +4758,7 @@ TEST_P(cta_catalogue_CatalogueTest, DISABLED_getTapesForWriting_no_labelled_tape
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -4685,7 +4769,7 @@ TEST_P(cta_catalogue_CatalogueTest, DISABLED_getTapesForWriting_no_labelled_tape
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
    disabledValue, fullValue, comment);
@@ -6716,6 +6800,7 @@ TEST_P(cta_catalogue_CatalogueTest, prepareToRetrieveFileUsingArchiveFileId) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -6726,7 +6811,7 @@ TEST_P(cta_catalogue_CatalogueTest, prepareToRetrieveFileUsingArchiveFileId) {
   const bool fullValue = false;
   const std::string createTapeComment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, createTapeComment);
@@ -6977,6 +7062,7 @@ TEST_P(cta_catalogue_CatalogueTest, prepareToRetrieveFileUsingArchiveFileId_disa
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -6987,7 +7073,7 @@ TEST_P(cta_catalogue_CatalogueTest, prepareToRetrieveFileUsingArchiveFileId_disa
   const bool fullValue = false;
   const std::string createTapeComment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, createTapeComment);
@@ -7455,6 +7541,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_many_archive_files) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName1 = "tape_pool_name_1";
   const std::string tapePoolName2 = "tape_pool_name_2";
   const std::string vo = "vo";
@@ -7466,7 +7553,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_many_archive_files) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName1, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   {
@@ -8443,6 +8530,7 @@ TEST_P(cta_catalogue_CatalogueTest, DISABLED_concurrent_filesWrittenToTape_many_
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName1 = "tape_pool_name_1";
   const std::string tapePoolName2 = "tape_pool_name_2";
   const std::string vo = "vo";
@@ -8454,7 +8542,7 @@ TEST_P(cta_catalogue_CatalogueTest, DISABLED_concurrent_filesWrittenToTape_many_
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
 
   m_catalogue->createTapePool(m_admin, tapePoolName1, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   {
@@ -9267,6 +9355,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_2_tape_cop
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -9277,7 +9366,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_2_tape_cop
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, comment);
@@ -9499,6 +9588,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_2_tape_cop
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -9509,7 +9599,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_2_tape_cop
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, comment);
@@ -9727,6 +9817,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_2_tape_cop
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -9737,7 +9828,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_2_tape_cop
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, comment);
@@ -9929,6 +10020,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_2_tape_cop
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -9939,7 +10031,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_2_tape_cop
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, comment);
@@ -10114,6 +10206,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_2_tape_cop
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -10124,7 +10217,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_2_tape_cop
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, comment);
@@ -10299,6 +10392,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_2_tape_cop
   const std::string mediaType = "mediaType";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -10309,7 +10403,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_2_tape_cop
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, comment);
@@ -10484,6 +10578,7 @@ TEST_P(cta_catalogue_CatalogueTest, deleteArchiveFile) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -10494,7 +10589,7 @@ TEST_P(cta_catalogue_CatalogueTest, deleteArchiveFile) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, comment);
@@ -10804,6 +10899,7 @@ TEST_P(cta_catalogue_CatalogueTest, deleteArchiveFile_by_archive_file_id_of_anot
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -10814,7 +10910,7 @@ TEST_P(cta_catalogue_CatalogueTest, deleteArchiveFile_by_archive_file_id_of_anot
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, comment);
@@ -11152,6 +11248,7 @@ TEST_P(cta_catalogue_CatalogueTest, getAllTapes_many_tapes) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -11161,7 +11258,7 @@ TEST_P(cta_catalogue_CatalogueTest, getAllTapes_many_tapes) {
   const bool disabledValue = true;
   const bool fullValue = false;
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
 
   const uint32_t nbTapes = 10;
@@ -11207,6 +11304,7 @@ TEST_P(cta_catalogue_CatalogueTest, reclaimTape_full_lastFSeq_0_no_tape_files) {
   const std::string vendor = "vendor";
   const std::string vid = "vid";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -11217,7 +11315,7 @@ TEST_P(cta_catalogue_CatalogueTest, reclaimTape_full_lastFSeq_0_no_tape_files) {
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, comment);
@@ -11291,6 +11389,7 @@ TEST_P(cta_catalogue_CatalogueTest, reclaimTape_not_full_lastFSeq_0_no_tape_file
   const std::string vendor = "vendor";
   const std::string vid = "vid";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -11301,7 +11400,7 @@ TEST_P(cta_catalogue_CatalogueTest, reclaimTape_not_full_lastFSeq_0_no_tape_file
   const bool fullValue = false;
   const std::string comment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, comment);
@@ -11350,6 +11449,7 @@ TEST_P(cta_catalogue_CatalogueTest, reclaimTape_full_lastFSeq_1_no_tape_files) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -11360,7 +11460,7 @@ TEST_P(cta_catalogue_CatalogueTest, reclaimTape_full_lastFSeq_1_no_tape_files) {
   const bool fullValue = false;
   const std::string createTapeComment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, createTapeComment);
@@ -11576,6 +11676,7 @@ TEST_P(cta_catalogue_CatalogueTest, reclaimTape_full_lastFSeq_1_one_tape_file) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -11586,7 +11687,7 @@ TEST_P(cta_catalogue_CatalogueTest, reclaimTape_full_lastFSeq_1_one_tape_file) {
   const bool fullValue = false;
   const std::string createTapeComment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, createTapeComment);
@@ -11739,6 +11840,7 @@ TEST_P(cta_catalogue_CatalogueTest, reclaimTape_full_lastFSeq_1_one_tape_file_su
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -11749,7 +11851,7 @@ TEST_P(cta_catalogue_CatalogueTest, reclaimTape_full_lastFSeq_1_one_tape_file_su
   const bool fullValue = false;
   const std::string createTapeComment = "Create tape";
 
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, createTapeComment);
@@ -11961,6 +12063,7 @@ TEST_P(cta_catalogue_CatalogueTest, exist_non_superseded_files_after_fseq) {
   const std::string mediaType = "media_type";
   const std::string vendor = "vendor";
   const std::string logicalLibraryName = "logical_library_name";
+  const bool logicalLibraryIsDisabled= false;
   const std::string tapePoolName = "tape_pool_name";
   const std::string vo = "vo";
   const uint64_t nbPartialTapes = 2;
@@ -11971,7 +12074,7 @@ TEST_P(cta_catalogue_CatalogueTest, exist_non_superseded_files_after_fseq) {
   const bool fullValue = false;
   const std::string createTapeComment = "Create tape";
   
-  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, "Create logical library");
+  m_catalogue->createLogicalLibrary(m_admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
   m_catalogue->createTapePool(m_admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
   m_catalogue->createTape(m_admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
     disabledValue, fullValue, createTapeComment);
diff --git a/catalogue/DummyCatalogue.hpp b/catalogue/DummyCatalogue.hpp
index 289454feac..572867c1ef 100644
--- a/catalogue/DummyCatalogue.hpp
+++ b/catalogue/DummyCatalogue.hpp
@@ -36,7 +36,7 @@ public:
 
   void createAdminUser(const common::dataStructures::SecurityIdentity& admin, const std::string& username, const std::string& comment) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); }
   void createArchiveRoute(const common::dataStructures::SecurityIdentity& admin, const std::string& diskInstanceName, const std::string& storageClassName, const uint32_t copyNb, const std::string& tapePoolName, const std::string& comment) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); }
-  void createLogicalLibrary(const common::dataStructures::SecurityIdentity& admin, const std::string& name, const std::string& comment) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); }
+  void createLogicalLibrary(const common::dataStructures::SecurityIdentity& admin, const std::string& name, const bool isDisabled, const std::string& comment) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); }
   void createMountPolicy(const common::dataStructures::SecurityIdentity& admin, const std::string& name, const uint64_t archivePriority, const uint64_t minArchiveRequestAge, const uint64_t retrievePriority, const uint64_t minRetrieveRequestAge, const uint64_t maxDrivesAllowed, const std::string& comment) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); }
   void createRequesterGroupMountRule(const common::dataStructures::SecurityIdentity& admin, const std::string& mountPolicyName, const std::string& diskInstanceName, const std::string& requesterGroupName, const std::string& comment) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); }
   void createRequesterMountRule(const common::dataStructures::SecurityIdentity& admin, const std::string& mountPolicyName, const std::string& diskInstance, const std::string& requesterName, const std::string& comment) override { throw exception::Exception(std::string("In ")+__PRETTY_FUNCTION__+": not implemented"); }
diff --git a/catalogue/RdbmsCatalogue.cpp b/catalogue/RdbmsCatalogue.cpp
index 92bb7b1b8b..85b711e1b8 100644
--- a/catalogue/RdbmsCatalogue.cpp
+++ b/catalogue/RdbmsCatalogue.cpp
@@ -1491,6 +1491,7 @@ void RdbmsCatalogue::modifyArchiveRouteComment(const common::dataStructures::Sec
 void RdbmsCatalogue::createLogicalLibrary(
   const common::dataStructures::SecurityIdentity &admin,
   const std::string &name,
+  const bool isDisabled,
   const std::string &comment) {
   try {
     auto conn = m_connPool.getConn();
@@ -1502,6 +1503,7 @@ void RdbmsCatalogue::createLogicalLibrary(
     const char *const sql =
       "INSERT INTO LOGICAL_LIBRARY("
         "LOGICAL_LIBRARY_NAME,"
+        "IS_DISABLED,"
 
         "USER_COMMENT,"
 
@@ -1514,6 +1516,7 @@ void RdbmsCatalogue::createLogicalLibrary(
         "LAST_UPDATE_TIME)"
       "VALUES("
         ":LOGICAL_LIBRARY_NAME,"
+        ":IS_DISABLED,"
 
         ":USER_COMMENT,"
 
@@ -1527,6 +1530,7 @@ void RdbmsCatalogue::createLogicalLibrary(
     auto stmt = conn.createStmt(sql);
 
     stmt.bindString(":LOGICAL_LIBRARY_NAME", name);
+    stmt.bindBool(":IS_DISABLED", isDisabled);
 
     stmt.bindString(":USER_COMMENT", comment);
 
@@ -1602,6 +1606,7 @@ std::list<common::dataStructures::LogicalLibrary> RdbmsCatalogue::getLogicalLibr
     const char *const sql =
       "SELECT "
         "LOGICAL_LIBRARY_NAME AS LOGICAL_LIBRARY_NAME,"
+        "IS_DISABLED AS IS_DISABLED,"
 
         "USER_COMMENT AS USER_COMMENT,"
 
@@ -1623,6 +1628,7 @@ std::list<common::dataStructures::LogicalLibrary> RdbmsCatalogue::getLogicalLibr
       common::dataStructures::LogicalLibrary lib;
 
       lib.name = rset.columnString("LOGICAL_LIBRARY_NAME");
+      lib.isDisabled = rset.columnBool("IS_DISABLED");
       lib.comment = rset.columnString("USER_COMMENT");
       lib.creationLog.username = rset.columnString("CREATION_LOG_USER_NAME");
       lib.creationLog.host = rset.columnString("CREATION_LOG_HOST_NAME");
diff --git a/catalogue/RdbmsCatalogue.hpp b/catalogue/RdbmsCatalogue.hpp
index d9d8d924cf..1aa84a5c0c 100644
--- a/catalogue/RdbmsCatalogue.hpp
+++ b/catalogue/RdbmsCatalogue.hpp
@@ -269,7 +269,7 @@ public:
   void modifyArchiveRouteTapePoolName(const common::dataStructures::SecurityIdentity &admin, const std::string &instanceName, const std::string &storageClassName, const uint32_t copyNb, const std::string &tapePoolName) override;
   void modifyArchiveRouteComment(const common::dataStructures::SecurityIdentity &admin, const std::string &instanceName, const std::string &storageClassName, const uint32_t copyNb, const std::string &comment) override;
 
-  void createLogicalLibrary(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const std::string &comment) override;
+  void createLogicalLibrary(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const bool isDisabled, const std::string &comment) override;
   void deleteLogicalLibrary(const std::string &name) override;
   std::list<common::dataStructures::LogicalLibrary> getLogicalLibraries() const override;
   void modifyLogicalLibraryComment(const common::dataStructures::SecurityIdentity &admin, const std::string &name, const std::string &comment) override;
diff --git a/scheduler/SchedulerTest.cpp b/scheduler/SchedulerTest.cpp
index 1bea129933..ec96dfdc8c 100644
--- a/scheduler/SchedulerTest.cpp
+++ b/scheduler/SchedulerTest.cpp
@@ -435,8 +435,9 @@ TEST_P(SchedulerTest, archive_report_and_retrieve_new_file) {
 
   // Create the environment for the migration to happen (library + tape) 
   const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -634,8 +635,9 @@ TEST_P(SchedulerTest, archive_and_retrieve_failure) {
 
   // Create the environment for the migration to happen (library + tape) 
   const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -884,8 +886,9 @@ TEST_P(SchedulerTest, archive_and_retrieve_report_failure) {
 
   // Create the environment for the migration to happen (library + tape) 
   const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -1128,8 +1131,9 @@ TEST_P(SchedulerTest, retry_archive_until_max_reached) {
   
   // Create the environment for the migration to happen (library + tape) 
     const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -1366,7 +1370,8 @@ TEST_P(SchedulerTest, expandRepackRequest) {
   const std::string diskFileGroup = "public_disk_group";
   
   //Create a logical library in the catalogue
-  catalogue.createLogicalLibrary(admin, s_libraryName, "Create logical library");
+  const bool libraryIsDisabled = false;
+  catalogue.createLogicalLibrary(admin, s_libraryName, libraryIsDisabled, "Create logical library");
   
   uint64_t nbTapesToRepack = 10;
   uint64_t nbTapesForTest = 2; //corresponds to the targetAvailableRequests variable in the Scheduler::promoteRepackRequestsToToExpand() method
@@ -1701,7 +1706,8 @@ TEST_P(SchedulerTest, expandRepackRequestRetrieveFailed) {
   const std::string diskFileGroup = "public_disk_group";
   
   //Create a logical library in the catalogue
-  catalogue.createLogicalLibrary(admin, s_libraryName, "Create logical library");
+  const bool libraryIsDisabled = false;
+  catalogue.createLogicalLibrary(admin, s_libraryName, libraryIsDisabled, "Create logical library");
   
   std::ostringstream ossVid;
   ossVid << s_vid << "_" << 1;
@@ -1940,7 +1946,8 @@ TEST_P(SchedulerTest, expandRepackRequestArchiveSuccess) {
   const std::string diskFileGroup = "public_disk_group";
   
   //Create a logical library in the catalogue
-  catalogue.createLogicalLibrary(admin, s_libraryName, "Create logical library");
+  const bool libraryIsDisabled = false;
+  catalogue.createLogicalLibrary(admin, s_libraryName, libraryIsDisabled, "Create logical library");
   
   std::ostringstream ossVid;
   ossVid << s_vid << "_" << 1;
@@ -2186,7 +2193,8 @@ TEST_P(SchedulerTest, expandRepackRequestArchiveFailed) {
   const std::string diskFileGroup = "public_disk_group";
   
   //Create a logical library in the catalogue
-  catalogue.createLogicalLibrary(admin, s_libraryName, "Create logical library");
+  const bool libraryIsDisabled = false;
+  catalogue.createLogicalLibrary(admin, s_libraryName, libraryIsDisabled, "Create logical library");
   
   std::ostringstream ossVid;
   ossVid << s_vid << "_" << 1;
diff --git a/tapeserver/castor/tape/tapeserver/daemon/DataTransferSessionTest.cpp b/tapeserver/castor/tape/tapeserver/daemon/DataTransferSessionTest.cpp
index 49e4dcacd5..4bd976026c 100644
--- a/tapeserver/castor/tape/tapeserver/daemon/DataTransferSessionTest.cpp
+++ b/tapeserver/castor/tape/tapeserver/daemon/DataTransferSessionTest.cpp
@@ -374,8 +374,9 @@ TEST_P(DataTransferSessionTest, DataTransferSessionGooddayRecall) {
   
   // 5) Create the environment for the migration to happen (library + tape) 
     const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -554,8 +555,9 @@ TEST_P(DataTransferSessionTest, DataTransferSessionWrongRecall) {
   
   // 5) Create the environment for the migration to happen (library + tape) 
     const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -748,8 +750,9 @@ TEST_P(DataTransferSessionTest, DataTransferSessionRAORecall) {
   
   // 5) Create the environment for the migration to happen (library + tape) 
     const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -965,8 +968,9 @@ TEST_P(DataTransferSessionTest, DataTransferSessionNoSuchDrive) {
   
   // 5) Create the environment for the migration to happen (library + tape) 
     const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -1112,8 +1116,9 @@ TEST_P(DataTransferSessionTest, DataTransferSessionFailtoMount) {
   
   // 5) Create the environment for the migration to happen (library + tape) 
     const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -1269,8 +1274,9 @@ TEST_P(DataTransferSessionTest, DataTransferSessionGooddayMigration) {
   
   // 5) Create the environment for the migration to happen (library + tape) 
     const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -1411,8 +1417,9 @@ TEST_P(DataTransferSessionTest, DataTransferSessionMissingFilesMigration) {
   
   // 5) Create the environment for the migration to happen (library + tape) 
     const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -1569,8 +1576,9 @@ TEST_P(DataTransferSessionTest, DataTransferSessionTapeFullMigration) {
   
   // 5) Create the environment for the migration to happen (library + tape) 
     const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -1725,8 +1733,9 @@ TEST_P(DataTransferSessionTest, DataTransferSessionTapeFullOnFlushMigration) {
   
   // 5) Create the environment for the migration to happen (library + tape) 
     const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
@@ -1879,8 +1888,9 @@ TEST_P(DataTransferSessionTest, WriteDataInTapeWithNonSupersededFilesOnIt) {
   
   // 5) Create the environment for the migration to happen (library + tape) 
     const std::string libraryComment = "Library comment";
+  const bool libraryIsDisabled = false;
   catalogue.createLogicalLibrary(s_adminOnAdminHost, s_libraryName,
-    libraryComment);
+    libraryIsDisabled, libraryComment);
   {
     auto libraries = catalogue.getLogicalLibraries();
     ASSERT_EQ(1, libraries.size());
diff --git a/tapeserver/castor/tape/tapeserver/daemon/MigrationReportPackerTest.cpp b/tapeserver/castor/tape/tapeserver/daemon/MigrationReportPackerTest.cpp
index a233c8d7f0..9b7f502861 100644
--- a/tapeserver/castor/tape/tapeserver/daemon/MigrationReportPackerTest.cpp
+++ b/tapeserver/castor/tape/tapeserver/daemon/MigrationReportPackerTest.cpp
@@ -116,6 +116,7 @@ namespace unitTests {
     const std::string mediaType = "media_type";
     const std::string vendor = "vendor";
     const std::string logicalLibraryName = "logical_library_name";
+    const bool logicalLibraryIsDisabled = false;
     const std::string tapePoolName = "tape_pool_name";
     const std::string vo = "vo";
     const cta::optional<std::string> supply("value for the supply pool mechanism");
@@ -125,7 +126,7 @@ namespace unitTests {
     const std::string createTapeComment = "Create tape";
     cta::common::dataStructures::SecurityIdentity admin = cta::common::dataStructures::SecurityIdentity("admin","localhost");
 
-    m_catalogue->createLogicalLibrary(admin, logicalLibraryName, "Create logical library");
+    m_catalogue->createLogicalLibrary(admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
     m_catalogue->createTapePool(admin, tapePoolName, vo, 2, true, supply, "Create tape pool");
     m_catalogue->createTape(admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
       disabledValue, fullValue, createTapeComment);
@@ -263,6 +264,7 @@ namespace unitTests {
     const std::string mediaType = "media_type";
     const std::string vendor = "vendor";
     const std::string logicalLibraryName = "logical_library_name";
+    const bool logicalLibraryIsDisabled = false;
     const std::string tapePoolName = "tape_pool_name";
     const std::string vo = "vo";
     const uint64_t nbPartialTapes = 2;
@@ -274,7 +276,7 @@ namespace unitTests {
     const std::string createTapeComment = "Create tape";
     cta::common::dataStructures::SecurityIdentity admin = cta::common::dataStructures::SecurityIdentity("admin","localhost");
 
-    m_catalogue->createLogicalLibrary(admin, logicalLibraryName, "Create logical library");
+    m_catalogue->createLogicalLibrary(admin, logicalLibraryName, logicalLibraryIsDisabled, "Create logical library");
     m_catalogue->createTapePool(admin, tapePoolName, vo, nbPartialTapes, isEncrypted, supply, "Create tape pool");
     m_catalogue->createTape(admin, vid1, mediaType, vendor, logicalLibraryName, tapePoolName, capacityInBytes,
       disabledValue, fullValue, createTapeComment);
diff --git a/xroot_plugins/XrdSsiCtaRequestMessage.cpp b/xroot_plugins/XrdSsiCtaRequestMessage.cpp
index 0ad339d893..eb6bb68aad 100644
--- a/xroot_plugins/XrdSsiCtaRequestMessage.cpp
+++ b/xroot_plugins/XrdSsiCtaRequestMessage.cpp
@@ -1203,8 +1203,9 @@ void RequestMessage::processLogicalLibrary_Add(const cta::admin::AdminCmd &admin
 
    auto &name    = getRequired(OptionString::LOGICAL_LIBRARY);
    auto &comment = getRequired(OptionString::COMMENT);
+   const bool isDisabled = false; // TBD
 
-   m_catalogue.createLogicalLibrary(m_cliIdentity, name, comment);
+   m_catalogue.createLogicalLibrary(m_cliIdentity, name, isDisabled, comment);
 
    response.set_type(cta::xrd::Response::RSP_SUCCESS);
 }
-- 
GitLab