]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#25,!14] Removed setVerbose() from CfgMgr (now available in Daemon)
authorTomek Mrugalski <tomasz@isc.org>
Thu, 6 Sep 2018 13:40:43 +0000 (15:40 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Fri, 7 Sep 2018 14:42:08 +0000 (16:42 +0200)
src/lib/dhcpsrv/cfgmgr.cc
src/lib/dhcpsrv/cfgmgr.h
src/lib/dhcpsrv/tests/cfgmgr_unittest.cc

index 2896b8bc4a1fa1ce80800a1e077e450d91b6aebf..813895f239f0f9b5b45cf4853339ed2dad3cb93f 100644 (file)
@@ -167,8 +167,7 @@ CfgMgr::getStagingCfg() {
 }
 
 CfgMgr::CfgMgr()
-    : datadir_(DHCP_DATA_DIR), d2_client_mgr_(),
-      verbose_mode_(false), family_(AF_INET) {
+    : datadir_(DHCP_DATA_DIR), d2_client_mgr_(), family_(AF_INET) {
     // DHCP_DATA_DIR must be set set with -DDHCP_DATA_DIR="..." in Makefile.am
     // Note: the definition of DHCP_DATA_DIR needs to include quotation marks
     // See AM_CPPFLAGS definition in Makefile.am
index 2afccb15b80aeef34b6b4e2af392d93feeeb6e1b..ad0e8a606eb0338159125cee0da1ba6e6fa0fb9f 100644 (file)
@@ -233,37 +233,6 @@ public:
 
     //@}
 
-    /// @name Methods setting/accessing global configuration for the process.
-    ///
-    //@{
-    /// @brief Sets verbose mode.
-    ///
-    /// @param verbose A boolean value indicating if the process should run
-    /// in verbose (true) or non-verbose mode.
-    void setVerbose(const bool verbose) {
-        verbose_mode_ = verbose;
-    }
-
-    /// @brief Checks if the process has been run in verbose mode.
-    ///
-    /// @return true if verbose mode enabled, false otherwise.
-    bool isVerbose() const {
-        return (verbose_mode_);
-    }
-
-    /// @brief Sets the default logger name.
-    ///
-    /// This name is used in cases when a user doesn't provide a configuration
-    /// for logger in the Kea configuration file.
-    void setDefaultLoggerName(const std::string& name) {
-        default_logger_name_ = name;
-    }
-
-    /// @brief Returns default logger name.
-    std::string getDefaultLoggerName() const {
-        return (default_logger_name_);
-    }
-
     /// @brief Sets address family (AF_INET or AF_INET6)
     void setFamily(uint16_t family) {
         family_ = family == AF_INET ? AF_INET : AF_INET6;
@@ -320,12 +289,6 @@ private:
     SrvConfigList configs_;
     //@}
 
-    /// @brief Indicates if a process has been ran in the verbose mode.
-    bool verbose_mode_;
-
-    /// @brief Default logger name.
-    std::string default_logger_name_;
-
     /// @brief Address family.
     uint16_t family_;
 };
index ba62eb56edc9ae5ca38c32f98fc50927690afcff..96a87821c8b773a076ecf70f34624a7fdc32c521 100644 (file)
@@ -281,7 +281,6 @@ public:
     }
 
     void clear() {
-        CfgMgr::instance().setVerbose(false);
         CfgMgr::instance().setFamily(AF_INET);
         CfgMgr::instance().clear();
         LeaseMgrFactory::destroy();
@@ -496,18 +495,6 @@ TEST_F(CfgMgrTest, revert) {
     EXPECT_EQ(12, cfg_mgr.getCurrentCfg()->getLoggingInfo()[0].debuglevel_);
 }
 
-// This test verifies that the verbosity can be set and obtained from the
-// configuration manager.
-TEST_F(CfgMgrTest, verbosity) {
-    ASSERT_FALSE(CfgMgr::instance().isVerbose());
-
-    CfgMgr::instance().setVerbose(true);
-    ASSERT_TRUE(CfgMgr::instance().isVerbose());
-
-    CfgMgr::instance().setVerbose(false);
-    EXPECT_FALSE(CfgMgr::instance().isVerbose());
-}
-
 // This test verifies that the address family can be set and obtained
 // from the configuration manager.
 TEST_F(CfgMgrTest, family) {