2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

sync with isc kea master

This commit is contained in:
Razvan Becheriu
2018-02-01 11:55:04 +02:00
parent 0962273261
commit 662f93ab89
8 changed files with 34 additions and 34 deletions

View 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`

View 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

View 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

View 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

View 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.

View 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

View 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

View File

@@ -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