Parcourir la source

[3664] Minor changes as a result of the review.

- Fixed identation in configure.ac
- Added kea-lfc to Doxygen
- Corrected some little typos in the kea-lfc man page
- Removed unnecessary headers and libraries
- lfc.h updated - one comment, one method made const
- added anonymous namespace for lfc_controller_unittests.cc
Marcin Siodelski il y a 10 ans
Parent
commit
ca04fa1184

+ 2 - 2
configure.ac

@@ -1393,8 +1393,8 @@ AC_CONFIG_FILES([compatcheck/Makefile
                  src/bin/keactrl/keactrl.conf
                  src/bin/keactrl/tests/Makefile
                  src/bin/keactrl/tests/keactrl_tests.sh
-		 src/bin/lfc/Makefile
-		 src/bin/lfc/tests/Makefile
+                 src/bin/lfc/Makefile
+                 src/bin/lfc/tests/Makefile
                  src/bin/perfdhcp/Makefile
                  src/bin/perfdhcp/tests/Makefile
                  src/bin/perfdhcp/tests/testdata/Makefile

+ 1 - 0
doc/Doxyfile

@@ -650,6 +650,7 @@ INPUT                  = ../src/bin/d2 \
                          ../src/bin/dhcp6 \
                          ../src/bin/perfdhcp \
                          ../src/bin/sockcreator \
+                         ../src/bin/lfc \
                          ../src/hooks/dhcp/user_chk \
                          ../src/lib/asiolink \
                          ../src/lib/cc \

+ 0 - 6
src/bin/lfc/Makefile.am

@@ -60,15 +60,9 @@ kea_lfc_SOURCES  = main.cc
 kea_lfc_LDADD  = liblfc.la
 kea_lfc_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
 kea_lfc_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
-kea_lfc_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
-kea_lfc_LDADD += $(top_builddir)/src/lib/asiodns/libkea-asiodns.la
 kea_lfc_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
-kea_lfc_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
-kea_lfc_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
 kea_lfc_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
 kea_lfc_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
-kea_lfc_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la
 kea_lfc_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
-kea_lfc_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
 
 kea_lfcdir = $(pkgdatadir)

+ 2 - 10
src/bin/lfc/kea-lfc.xml

@@ -61,7 +61,7 @@
     <para>
       The <command>kea-lfc</command> service process removes redundant
       information for the files used to provide persistent storage for
-      the memfile data base back end.  The service is written to run as
+      the memfile data base backend.  The service is written to run as
       a stand alone process.  While it can be started externally it
       should be started by the Kea DHCP servers as desired and required.
     </para>
@@ -123,7 +123,7 @@
       <varlistentry>
         <term><option>-i</option></term>
         <listitem><para>
-          Input or copy of lease file - Before the DHCP serves invokes LFC it will move
+          Input or copy of lease file - Before the DHCP server invokes LFC it will move
 	  the current lease file to this file and then call LFC with the new file.
         </para></listitem>
       </varlistentry>
@@ -145,14 +145,6 @@
           this file to previous lease file.
         </para></listitem>
       </varlistentry>
-
-      <varlistentry>
-        <term><option>-c</option></term>
-        <listitem><para>
-          
-        </para></listitem>
-      </varlistentry>
-
     </variablelist>
   </refsect1>
 

+ 0 - 2
src/bin/lfc/lfc.cc

@@ -14,8 +14,6 @@
 
 #include <lfc/lfc.h>
 #include <exceptions/exceptions.h>
-#include <log/logger_support.h>
-#include <log/logger_manager.h>
 #include <config.h>
 #include <iostream>
 

+ 8 - 8
src/bin/lfc/lfc.h

@@ -50,12 +50,12 @@ public:
     /// @brief Acts as the primary entry point to start execution
     /// of the process.  Provides the control logic:
     ///
-    /// 1. parse command line arguments
-    /// 2. verifies that it is the only instance
-    /// 3. creates pid file (TBD)
-    /// .... TBD
-    /// 4. remove pid file (TBD)
-    /// 5. exit to the caller
+    /// -# parse command line arguments
+    /// -# verifies that it is the only instance
+    /// -# creates pid file (TBD)
+    /// -# .... TBD
+    /// -# remove pid file (TBD)
+    /// -# exit to the caller
     void launch(int argc, char* argv[], const bool test_mode);
 
     /// @brief Process the command line arguments.  It is the first
@@ -80,7 +80,7 @@ public:
     /// @brief Gets the protocol version of the leaes files
     ///
     /// @return Returns the value of the protocol version
-    int getProtocolVersion() {
+    int getProtocolVersion() const {
       return (protocol_version_);
     }
 
@@ -137,7 +137,7 @@ private:
     std::string pid_file_;
 };
 
-}; // namespace isc:lfc
+}; // namespace isc::lfc
 }; // namespace isc
 
 #endif

+ 0 - 7
src/bin/lfc/tests/Makefile.am

@@ -53,17 +53,10 @@ lfc_unittests_LDADD = $(GTEST_LDADD)
 lfc_unittests_LDADD += $(top_builddir)/src/bin/lfc/liblfc.la
 lfc_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
 lfc_unittests_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
-lfc_unittests_LDADD += $(top_builddir)/src/lib/asiodns/libkea-asiodns.la
 lfc_unittests_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
-lfc_unittests_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
-lfc_unittests_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
-lfc_unittests_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
 lfc_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
 lfc_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
-lfc_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/testutils/libdhcpsrvtest.la
-lfc_unittests_LDADD += $(top_builddir)/src/lib/dns/libkea-dns++.la
 lfc_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
-lfc_unittests_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
 
 endif
 

+ 4 - 1
src/bin/lfc/tests/lfc_controller_unittests.cc

@@ -13,12 +13,13 @@
 // PERFORMANCE OF THIS SOFTWARE.
 
 #include <lfc/lfc.h>
-#include <log/logger_support.h>
 #include <gtest/gtest.h>
 
 using namespace isc::lfc;
 using namespace std;
 
+namespace {
+
 TEST(lfcControllerTest, initialValues) {
     lfcController lfcController;
 
@@ -154,3 +155,5 @@ TEST(lfcControllerTest, someBadData) {
 
     EXPECT_THROW(lfcController.parseArgs(argc, argv), InvalidUsage);
 }
+
+} // end of anonymous namespace