2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-25 19:27:33 +00:00

34 Commits

Author SHA1 Message Date
Razvan Becheriu
f15035adf8 [#1074] minor changes 2020-02-05 23:00:32 +02:00
Razvan Becheriu
def2e03f87 [#1074] implemented connection pool for pgsql host mgr 2020-02-05 23:00:32 +02:00
Francis Dupont
fbaa30d93d [392-search-of-reservations-by-hostname] Addressed some comments 2019-10-15 11:45:32 +02:00
Francis Dupont
34ed167195 [392-search-of-reservations-by-hostname] Checkpont: add new methods - tests to write 2019-10-15 11:45:32 +02:00
Francis Dupont
b0b3b8469b [313-return-a-list-of-all-reservations-by-subnet-id] Addressed some comments 2019-01-29 04:49:05 -05:00
Francis Dupont
3d94a41a77 [313-return-a-list-of-all-reservations-by-subnet-id] Added getPage[46] 2019-01-29 04:49:05 -05:00
Francis Dupont
55e2828cf2 [313-return-a-list-of-all-reservations-by-subnet-id] Finished the getAll[46] implementation 2019-01-29 04:49:05 -05:00
Francis Dupont
2a5750c931 [313-return-a-list-of-all-reservations-by-subnet-id] Added getAll[46] by subnet - checkpoint of the day 2019-01-29 04:49:05 -05:00
Marcin Siodelski
b82d365bcd [#92,!13] Moved PgSqlConnection and PgSqlExchange to libkea-pgsql. 2018-09-03 03:31:34 -04:00
Marcin Siodelski
012a97a87c [#92,!13] Refactored libkea-dhcpsrv to use libkea-database 2018-09-03 03:31:33 -04:00
Thomas Markwalder
15c34afdba [master] Lease and host back ends now validate schema version during open
Merge branch 'trac5629'
2018-06-01 08:25:25 -04:00
Thomas Markwalder
3a4e989317 [5629] MySQL and PostgreSQL host backends now verify schema version
src/lib/dhcpsrv/mysql_host_data_source.cc
    MySqlHostDataSourceImpl::getVersion() - new function to
    fetch version accessible to impl constructor

    MySqlHostDataSourceImpl() - added schema validation after
    connecting

    MySqlHostDataSource::getVersion() - new uses impl method

src/lib/dhcpsrv/pgsql_host_data_source.cc
    PgSqlHostDataSourceImpl()) - added schema validation after
    connecting

    PgSqlHostDataSourceImpl::getVersion() - no longer uses
    pre-prepared statement
2018-05-31 11:51:19 -04:00
Francis Dupont
e018f8e6c9 [5563] Changes done and compile 2018-05-24 16:51:07 +02:00
Francis Dupont
78ef07b019 [kea5574] Checkpoint: dhcpsrv lib first attempt 2018-03-22 19:41:58 +01:00
Thomas Markwalder
a5cb18b0b4 [master] Fixed db_lost_callback default to NULL build issue
Replaced = NULL with = 0 in dhcpsrv header files altered for 5477.
2018-03-13 09:01:32 -04:00
Tomek Mrugalski
8cd0c1ae41 [master] Merge branch 'github70' (missing CQL backend features)
- host delete
 - user-contexts
 - DHCPv4 fixed fields
 - also PostgreSQL now stores hwaddr type and hwaddr source

# Conflicts:
#	src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc
2018-03-12 18:02:29 +00:00
Thomas Markwalder
8f5ce70600 [5477] Addressed review comments
src/bin/dhcp4/ctrl_dhcp4_srv.*
src/bin/dhcp6/ctrl_dhcp6_srv.*
    Changed dbReconnect() to accept ReconnectCtlPtr
    Added commentary for dbReconnect and dbLostCallback

src/lib/dhcpsrv/database_connection.h
    Removed extraneous typedef

many files:
    Changed DatabaseConnection::Callback to ::DbLostCallback

src/lib/dhcpsrv/tests/database_connection_unittest.cc
    Added commentary to text fixture and tests
2018-03-07 11:10:34 -05:00
Marcin Siodelski
8e55883c27 [5477] Corrected some typos and updated copyrights as a result of review. 2018-03-02 18:03:50 +01:00
Thomas Markwalder
249219f1fc [5477] dhcpsrv/postgres and kea-dhcp4 now support db reconnect
kea-dhcp4
    added support for max-reconnect-tries and reconnect-wait-time
    to lease and host db parsers

    Added a callback for when DB backends detect loss of connectivity

    Added a self-rescheduling method to attempt to reconnect to the
    backends if retries are enabled

dhcpsrv
    Added a callback that DatabaseConnection derivations should invoke
    when they lose connectivity.

    Added an optional callback parameter from CfgDbAccess::createManagers()
    all the way down to DatabaseConnection ctor.

    pgsql_connection.cc
        PgSqlConnection::~PgSqlConnection() - Added logic to close the
        connection only when the connect state is still OK.
        Otherwise it likes to core dump.

        PgSqlConnection::checkStatementError() - Modified to invoke the
        connectivity lost callback on "fatal" errors

    pgsql_lease_mgr_unittest.cc
    pgsql_host_data_source_unittest.cc
        Added tests to verify that the lost callback is NOT invoked on an
        open failure
2018-02-28 15:29:23 -05:00
Razvan Becheriu
e409c164a6 added missing tables, columns and values in cql schema, ordered declarations and definitions in lease and host managers 2018-02-13 18:28:40 +02:00
Francis Dupont
fe2de23357 [5371] Fixed doxygen errors 2017-10-07 18:28:56 +02:00
Josh Soref
19bcf4dc22 spelling: identifier 2017-07-23 13:26:58 -04:00
Tomek Mrugalski
313d980ed0 [5208a] return comments updated 2017-04-24 19:56:47 +02:00
Tomek Mrugalski
8b561ef854 [5208a] delete methods implemented in host data sources 2017-04-22 21:56:33 +02:00
Wlodek Wencel
9e3ca83d07 [v_1_2_0] copy right dates updated 2017-04-12 15:47:26 +02:00
Andrei Pavel
9082500187 Corrected typos 2016-12-14 16:57:44 +02:00
Marcin Siodelski
8cce1aa713 [5009] Implemented get6(subnet_id, address) function for SQL backends.
Also removed uint32_t cast operator from IOAddress to remove
ambiguity when calling this new function.
2016-09-20 09:29:06 +02:00
Marcin Siodelski
bfb36f3d0c [4489] Removed RestrictedConstPtr class. 2016-07-28 21:13:01 +02:00
Marcin Siodelski
4e0e41f060 [4489] Added support for read only mode in PostgreSQL HR backend. 2016-07-28 16:21:42 +02:00
Thomas Markwalder
018e92a042 [4277] Addressed review comments
src/lib/dhcpsrv/pgsql_host_data_source.h
    - added comment about v6 Duplicate constraint when added host reservations
2016-07-26 08:01:09 -04:00
Tomek Mrugalski
7e2d2f21c6 [4277] Added several @todos and fixed formatting. 2016-07-25 20:04:20 +02:00
Thomas Markwalder
15b51b6229 [4277] Addressed bulk of review comments
src/lib/dhcpsrv/tests/pgsql_exchange_unittest.cc
    - Added PgSqlBasicsTest test fixture class and tests which exercise all of
    the PostgreSQL data types we currently use with round-trip database writes
    and reads

src/lib/dhcpsrv/pgsql_connection.cc
src/lib/dhcpsrv/pgsql_connection.h
    - Moved PgSqlResult function impls from .h
    - Added exception safe implementation of getColumnLabel() to PgSqlResult

src/lib/dhcpsrv/pgsql_exchange.cc
src/lib/dhcpsrv/pgsql_exchange.h
    - PsqlBindArray::add() variants which accept raw pointers now throw
    if the pointer is NULL
    - PgSqlExchange::getColumnLabel() is now a wrapper around PgSqlResult method

src/lib/dhcpsrv/pgsql_host_data_source.h
src/lib/dhcpsrv/pgsql_host_data_source.cc
     - Commentary clean up

src/lib/dhcpsrv/pgsql_lease_mgr.cc
     - Commentary clean up
2016-07-14 07:34:06 -04:00
Thomas Markwalder
3d40522867 [4277] Cleanup and commentary 2016-06-27 16:00:38 -04:00
Thomas Markwalder
334289573e [4277] Bare bones implementation of PgSqlHostDataSource
src/lib/dhcpsrv
    pgsql_host_data_source.c
    pgsql_host_data_source.h  - new files, preliminary implementation

src/lib/dhcpsrv/Makefile.am
    Added new files pgsql_host_data_source.cc, pgsql_host_data_source.h

src/lib/dhcpsrv/dhcpsrv_messages.mes
    Added log messages DHCPSRV_PGSQL_HOST_DB_GET_VERSION, DHCPSRV_PGSQL_START_TRANSACTION

src/lib/dhcpsrv/pgsql_connection.cc
src/lib/dhcpsrv/pgsql_connection.h
    Added PgSqlTransaction
    Added PgSqlConnection::startTransaction()

src/lib/dhcpsrv/pgsql_exchange.cc
src/lib/dhcpsrv/pgsql_exchange.h
    PsqlBindArray
    - Added storage of conversion strings used for bound values
    - Added add() variants for uint8_t, IOAddress, uint8_t buffer
    - Added templated variant for miscellaneous types

    PgSqlExchange
    - Removed getColumnValue variants for various integers, replaced
    with templated version for miscellaneous types

src/lib/dhcpsrv/pgsql_lease_mgr.cc
    Added todo comment to remember to account for hwaddr columns added to lease6

src/lib/dhcpsrv/tests/pgsql_exchange_unittest.cc
    TEST(PsqlBindArray, basicOperation) - new test to exercise bind functions
2016-06-21 13:21:40 -04:00