]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
sync with isc kea master 62/head
authorRazvan Becheriu <razvan.becheriu@qualitance.com>
Thu, 1 Feb 2018 09:55:04 +0000 (11:55 +0200)
committerRazvan Becheriu <razvan.becheriu@qualitance.com>
Thu, 1 Feb 2018 09:55:04 +0000 (11:55 +0200)
configure.ac
doc/devel/contribute.dox
doc/guide/install.xml
src/bin/dhcp4/tests/kea_controller_unittest.cc
src/bin/dhcp6/ctrl_dhcp6_srv.cc
src/bin/dhcp6/tests/kea_controller_unittest.cc
src/lib/dhcpsrv/cql_lease_mgr.cc
src/lib/dhcpsrv/database_backends.dox

index 34a134a59eb69871522789ef5aca932fdcb5fbfd..40dd9a2301a481c0acde4b1255a1e6e43f7bf181 100644 (file)
@@ -609,8 +609,8 @@ AX_CRYPTO
 # the --with-mysql-config (default to /usr/bin/mysql-config).  By default,
 # the software is not built with MySQL support enabled.
 mysql_config="no"
-AC_ARG_WITH([mysql],
-  AC_HELP_STRING([--with-mysql=PATH],
+AC_ARG_WITH([dhcp-mysql],
+  AC_HELP_STRING([--with-dhcp-mysql=PATH],
     [path to the MySQL 'mysql_config' script (MySQL is used for the DHCP database)]),
     [mysql_config="$withval"])
 
@@ -622,7 +622,7 @@ fi
 
 if test "$MYSQL_CONFIG" != "" ; then
     if test -d "$MYSQL_CONFIG" -o ! -x "$MYSQL_CONFIG" ; then
-        AC_MSG_ERROR([--with-mysql should point to a mysql_config program])
+        AC_MSG_ERROR([--with-dhcp-mysql should point to a mysql_config program])
     fi
 
     MYSQL_CPPFLAGS=`$MYSQL_CONFIG --cflags`
@@ -663,8 +663,8 @@ AC_CHECK_HEADERS(sys/filio.h,,,)
 AM_CONDITIONAL(HAVE_MYSQL, test "$MYSQL_CONFIG" != "")
 
 pg_config="no"
-AC_ARG_WITH([pgsql],
-  AC_HELP_STRING([--with-pgsql=PATH],
+AC_ARG_WITH([dhcp-pgsql],
+  AC_HELP_STRING([--with-dhcp-pgsql=PATH],
     [path to the PostgreSQL 'pg_config' script]),
     [pg_config="$withval"])
 
@@ -676,7 +676,7 @@ fi
 
 if test "$PG_CONFIG" != "" ; then
     if test -d "$PG_CONFIG" -o ! -x "$PG_CONFIG" ; then
-        AC_MSG_ERROR([--with-pgsql should point to a pg_config program])
+        AC_MSG_ERROR([--with-dhcp-pgsql should point to a pg_config program])
     fi
 
     PGSQL_CPPFLAGS=`$PG_CONFIG --cppflags`
index 7d805186868656d4d04d7b4849d4476aef16b55c..477f0d2639149d028b09dcdaa304314edc7fadb7 100644 (file)
@@ -122,7 +122,7 @@ documentation, use \c --enable-generate-docs. If you are modifying DHCP
 code, you are likely to be interested in enabling a non-default database
 backends for DHCP. Note that if the backend is not enabled,
 the database-specific unit-tests are skipped. To enable the MySQL backend,
-use the switch \c --with-mysql; for PostgreSQL, use \c --with-pgsql.
+use the switch \c --with-dhcp-mysql; for PostgreSQL, use \c --with-dhcp-pgsql.
 A complete list of all switches can be obtained with the command:
 
 @code
index 219562dbd36da79d60b0100f0f79b0e36b1d90fe..a3f8c33e9785c7258290ffbcf55bdb555a9028bd 100644 (file)
@@ -157,7 +157,7 @@ Debian and Ubuntu:
         <listitem>
         <para>
           The MySQL client and the client development libraries, when using
-          the --with-mysql configuration flag to build the Kea MySQL
+          the --with-dhcp-mysql configuration flag to build the Kea MySQL
           database backend. In this case an instance of the MySQL server
           running locally or on a machine reachable over a network
           is required. Note that
@@ -168,7 +168,7 @@ Debian and Ubuntu:
         <listitem>
         <para>
           The PostgreSQL client and the client development libraries, when
-          using the --with-pgsql configuration flag to build the Kea
+          using the --with-dhcp-pgsql configuration flag to build the Kea
           PostgreSQL database backend. In this case an instance of the
           PostgreSQL server running locally or on some other machine,
           reachable over the network from the machine running Kea, is
@@ -315,7 +315,7 @@ Debian and Ubuntu:
           </varlistentry>
 
           <varlistentry>
-            <term>--with-mysql</term>
+            <term>--with-dhcp-mysql</term>
             <listitem>
               <simpara>
                 Build Kea with code to allow it to store leases (and access
@@ -325,7 +325,7 @@ Debian and Ubuntu:
           </varlistentry>
 
           <varlistentry>
-            <term>--with-pgsql</term>
+            <term>--with-dhcp-pgsql</term>
             <listitem>
               <simpara>
                 Build Kea with code to allow it to store leases (and access
@@ -386,7 +386,7 @@ Debian and Ubuntu:
 
           <screen>$ <userinput>./configure \
       --with-boost-include=/usr/pkg/include \
-      --with-pgsql=/usr/local/bin/pg_config \
+      --with-dhcp-pgsql=/usr/local/bin/pg_config \
       --prefix=/opt/kea</userinput></screen>
         </para>
 
@@ -518,12 +518,12 @@ Debian and Ubuntu:
         <para>
           Build and install Kea as described in <xref linkend="installation"/>, with
           the following modification. To enable the MySQL database code, at the
-          "configure" step (see <xref linkend="configure"/>), the --with-mysql switch
+          "configure" step (see <xref linkend="configure"/>), the --with-dhcp-mysql switch
           should be specified:
-          <screen><userinput>./configure [other-options] --with-mysql</userinput></screen>
+          <screen><userinput>./configure [other-options] --with-dhcp-mysql</userinput></screen>
              If MySQL was not installed in the default location, the location of the MySQL
           configuration program "mysql_config" should be included with the switch, i.e.
-          <screen><userinput>./configure [other-options] --with-mysql=<replaceable>path-to-mysql_config</replaceable></userinput></screen>
+          <screen><userinput>./configure [other-options] --with-dhcp-mysql=<replaceable>path-to-mysql_config</replaceable></userinput></screen>
         </para>
         <para>
           See <xref linkend="mysql-database-create"/> for details regarding
@@ -540,12 +540,12 @@ Debian and Ubuntu:
         <para>
           Build and install Kea as described in <xref linkend="installation"/>, with
           the following modification. To enable the PostgreSQL database code, at the
-          "configure" step (see <xref linkend="configure"/>), the --with-pgsql switch
+          "configure" step (see <xref linkend="configure"/>), the --with-dhcp-pgsql switch
           should be specified:
-          <screen><userinput>./configure [other-options] --with-pgsql</userinput></screen>
+          <screen><userinput>./configure [other-options] --with-dhcp-pgsql</userinput></screen>
              If PostgreSQL was not installed in the default location, the location of the PostgreSQL
           configuration program "pg_config" should be included with the switch, i.e.
-          <screen><userinput>./configure [other-options] --with-pgsql=<replaceable>path-to-pg_config</replaceable></userinput></screen>
+          <screen><userinput>./configure [other-options] --with-dhcp-pgsql=<replaceable>path-to-pg_config</replaceable></userinput></screen>
         </para>
         <para>
           See <xref linkend="pgsql-database-create"/> for details regarding
index 8f72c247100d1d7ced6e9f983fe45ada45b8ee22..88a24f7a567e857bf91b3e93ff3096c6cb62e84a 100644 (file)
@@ -641,7 +641,7 @@ TEST_F(JSONFileBackendTest, defaultLeaseDbBackend) {
 
 // Starting tests which require MySQL backend availability. Those tests
 // will not be executed if Kea has been compiled without the
-// --with-mysql.
+// --with-dhcp-mysql.
 #ifdef HAVE_MYSQL
 
 /// @brief Test fixture class for the tests utilizing MySQL database
index 6b5aed20559ef16c502ecd8d9db1d6b4aae21c69..dceb6367fbd5474bcc1627afccd23ee1d17a0ea6 100644 (file)
@@ -571,8 +571,8 @@ ControlledDhcpv6Srv::processConfig(isc::data::ConstElementPtr config) {
             return (answer);
         }
     } catch (const std::exception& ex) {
-        return (isc::config::createAnswer(1, "Failed to process configuration:" +
-                                          string(ex.what())));
+        return (isc::config::createAnswer(1, "Failed to process configuration:"
+                                          string(ex.what())));
     }
 
     // Re-open lease and host database with new parameters.
@@ -582,8 +582,8 @@ ControlledDhcpv6Srv::processConfig(isc::data::ConstElementPtr config) {
         cfg_db->createManagers();
 
     } catch (const std::exception& ex) {
-        return (isc::config::createAnswer(1, "Unable to open database: " +
-                                          std::string(ex.what())));
+        return (isc::config::createAnswer(1, "Unable to open database: "
+                                          std::string(ex.what())));
     }
 
     // Regenerate server identifier if needed.
index f737051307a5ae8a1025076e247e157bf6a4b61e..9856f5da11ebdd8e0858ae33e695c24a8fd446d6 100644 (file)
@@ -628,7 +628,7 @@ TEST_F(JSONFileBackendTest, defaultLeaseDbBackend) {
 
 // Starting tests which require MySQL backend availability. Those tests
 // will not be executed if Kea has been compiled without the
-// --with-mysql.
+// --with-dhcp-mysql.
 #ifdef HAVE_MYSQL
 
 /// @brief Test fixture class for the tests utilizing MySQL database
index 04b88115b1c0bc2434b76ce3fb002aa0beb963c7..8f3c351b7ffd33a99857a559187cd6f927b93f0e 100644 (file)
@@ -1512,7 +1512,7 @@ CqlLeaseMgr::getLease4(const IOAddress &addr) const {
     std::unique_ptr<CqlLease4Exchange> exchange4(new CqlLease4Exchange(dbconn_));
     exchange4->getLease(CqlLease4Exchange::GET_LEASE4_ADDR, data, result);
 
-    return result;
+    return (result);
 }
 
 Lease4Collection
@@ -1531,7 +1531,7 @@ CqlLeaseMgr::getLease4(const HWAddr &hwaddr) const {
     std::unique_ptr<CqlLease4Exchange> exchange4(new CqlLease4Exchange(dbconn_));
     exchange4->getLeaseCollection(CqlLease4Exchange::GET_LEASE4_HWADDR, data, result);
 
-    return result;
+    return (result);
 }
 
 Lease4Ptr
@@ -1555,7 +1555,7 @@ CqlLeaseMgr::getLease4(const HWAddr &hwaddr, SubnetID subnet_id) const {
     std::unique_ptr<CqlLease4Exchange> exchange4(new CqlLease4Exchange(dbconn_));
     exchange4->getLease(CqlLease4Exchange::GET_LEASE4_HWADDR_SUBID, data, result);
 
-    return result;
+    return (result);
 }
 
 Lease4Collection
@@ -1574,7 +1574,7 @@ CqlLeaseMgr::getLease4(const ClientId &clientid) const {
     std::unique_ptr<CqlLease4Exchange> exchange4(new CqlLease4Exchange(dbconn_));
     exchange4->getLeaseCollection(CqlLease4Exchange::GET_LEASE4_CLIENTID, data, result);
 
-    return result;
+    return (result);
 }
 
 Lease4Ptr
@@ -1613,7 +1613,7 @@ CqlLeaseMgr::getLease4(const ClientId &clientid, SubnetID subnet_id) const {
     std::unique_ptr<CqlLease4Exchange> exchange4(new CqlLease4Exchange(dbconn_));
     exchange4->getLease(CqlLease4Exchange::GET_LEASE4_CLIENTID_SUBID, data, result);
 
-    return result;
+    return (result);
 }
 
 Lease4Collection
@@ -1653,7 +1653,7 @@ CqlLeaseMgr::getLease6(Lease::Type lease_type, const IOAddress &addr) const {
     std::unique_ptr<CqlLease6Exchange> exchange6(new CqlLease6Exchange(dbconn_));
     exchange6->getLease(CqlLease6Exchange::GET_LEASE6_ADDR, data, result);
 
-    return result;
+    return (result);
 }
 
 Lease6Collection
@@ -1680,7 +1680,7 @@ CqlLeaseMgr::getLeases6(Lease::Type lease_type, const DUID &duid, uint32_t iaid)
     std::unique_ptr<CqlLease6Exchange> exchange6(new CqlLease6Exchange(dbconn_));
     exchange6->getLeaseCollection(CqlLease6Exchange::GET_LEASE6_DUID_IAID, data, result);
 
-    return result;
+    return (result);
 }
 
 Lease6Collection
@@ -1712,7 +1712,7 @@ CqlLeaseMgr::getLeases6(Lease::Type lease_type, const DUID &duid, uint32_t iaid,
     std::unique_ptr<CqlLease6Exchange> exchange6(new CqlLease6Exchange(dbconn_));
     exchange6->getLeaseCollection(CqlLease6Exchange::GET_LEASE6_DUID_IAID_SUBID, data, result);
 
-    return result;
+    return (result);
 }
 
 void
index fa9ae65f4dd167d47efc52381060727b2a105253..704557d32484e342625cece3b91abf379c16ec93 100644 (file)
 
   - The MySQL lease manager uses the freely available MySQL as its backend
   database.  This is not included in Kea DHCP by default:
-  the \--with-mysql switch must be supplied to "configure" for support
+  the \--with-dhcp-mysql switch must be supplied to "configure" for support
   to be compiled into the software.
 
   - The PostgreSQL lease manager uses the freely available PostgreSQL as its
   backend database.  This is not included in Kea DHCP by default:
-  the \--with-pgsql switch must be supplied to "configure" for
+  the \--with-dhcp-pgsql switch must be supplied to "configure" for
   support to be compiled into the software.
 
   @section dhcpdb-instantiation Instantiation of Lease Managers