From 662f93ab89ea090d11dc52802692cee0c0a48a3f Mon Sep 17 00:00:00 2001 From: Razvan Becheriu Date: Thu, 1 Feb 2018 11:55:04 +0200 Subject: [PATCH] sync with isc kea master --- configure.ac | 12 +++++----- doc/devel/contribute.dox | 2 +- doc/guide/install.xml | 22 +++++++++---------- .../dhcp4/tests/kea_controller_unittest.cc | 2 +- src/bin/dhcp6/ctrl_dhcp6_srv.cc | 8 +++---- .../dhcp6/tests/kea_controller_unittest.cc | 2 +- src/lib/dhcpsrv/cql_lease_mgr.cc | 16 +++++++------- src/lib/dhcpsrv/database_backends.dox | 4 ++-- 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/configure.ac b/configure.ac index 34a134a59e..40dd9a2301 100644 --- a/configure.ac +++ b/configure.ac @@ -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` diff --git a/doc/devel/contribute.dox b/doc/devel/contribute.dox index 7d80518686..477f0d2639 100644 --- a/doc/devel/contribute.dox +++ b/doc/devel/contribute.dox @@ -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 diff --git a/doc/guide/install.xml b/doc/guide/install.xml index 219562dbd3..a3f8c33e97 100644 --- a/doc/guide/install.xml +++ b/doc/guide/install.xml @@ -157,7 +157,7 @@ Debian and Ubuntu: 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: 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: - --with-mysql + --with-dhcp-mysql Build Kea with code to allow it to store leases (and access @@ -325,7 +325,7 @@ Debian and Ubuntu: - --with-pgsql + --with-dhcp-pgsql Build Kea with code to allow it to store leases (and access @@ -386,7 +386,7 @@ Debian and Ubuntu: $ ./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 @@ -518,12 +518,12 @@ Debian and Ubuntu: Build and install Kea as described in , with the following modification. To enable the MySQL database code, at the - "configure" step (see ), the --with-mysql switch + "configure" step (see ), the --with-dhcp-mysql switch should be specified: - ./configure [other-options] --with-mysql + ./configure [other-options] --with-dhcp-mysql 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. - ./configure [other-options] --with-mysql=path-to-mysql_config + ./configure [other-options] --with-dhcp-mysql=path-to-mysql_config See for details regarding @@ -540,12 +540,12 @@ Debian and Ubuntu: Build and install Kea as described in , with the following modification. To enable the PostgreSQL database code, at the - "configure" step (see ), the --with-pgsql switch + "configure" step (see ), the --with-dhcp-pgsql switch should be specified: - ./configure [other-options] --with-pgsql + ./configure [other-options] --with-dhcp-pgsql 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. - ./configure [other-options] --with-pgsql=path-to-pg_config + ./configure [other-options] --with-dhcp-pgsql=path-to-pg_config See for details regarding diff --git a/src/bin/dhcp4/tests/kea_controller_unittest.cc b/src/bin/dhcp4/tests/kea_controller_unittest.cc index 8f72c24710..88a24f7a56 100644 --- a/src/bin/dhcp4/tests/kea_controller_unittest.cc +++ b/src/bin/dhcp4/tests/kea_controller_unittest.cc @@ -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 diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc index 6b5aed2055..dceb6367fb 100644 --- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc +++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc @@ -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. diff --git a/src/bin/dhcp6/tests/kea_controller_unittest.cc b/src/bin/dhcp6/tests/kea_controller_unittest.cc index f737051307..9856f5da11 100644 --- a/src/bin/dhcp6/tests/kea_controller_unittest.cc +++ b/src/bin/dhcp6/tests/kea_controller_unittest.cc @@ -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 diff --git a/src/lib/dhcpsrv/cql_lease_mgr.cc b/src/lib/dhcpsrv/cql_lease_mgr.cc index 04b88115b1..8f3c351b7f 100644 --- a/src/lib/dhcpsrv/cql_lease_mgr.cc +++ b/src/lib/dhcpsrv/cql_lease_mgr.cc @@ -1512,7 +1512,7 @@ CqlLeaseMgr::getLease4(const IOAddress &addr) const { std::unique_ptr 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 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 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 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 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 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 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 exchange6(new CqlLease6Exchange(dbconn_)); exchange6->getLeaseCollection(CqlLease6Exchange::GET_LEASE6_DUID_IAID_SUBID, data, result); - return result; + return (result); } void diff --git a/src/lib/dhcpsrv/database_backends.dox b/src/lib/dhcpsrv/database_backends.dox index fa9ae65f4d..704557d324 100644 --- a/src/lib/dhcpsrv/database_backends.dox +++ b/src/lib/dhcpsrv/database_backends.dox @@ -23,12 +23,12 @@ - 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 -- 2.47.2