2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-10-01 11:22:13 +00:00
Commit Graph

133 Commits

Author SHA1 Message Date
Razvan Becheriu
126579d1d4 [#1375] added IOService to mysql and postgresql connections 2020-12-09 19:12:46 +02:00
Marcin Siodelski
7041e0b50f [#1428] Final code cleanup
- Removed caching from getAllX functions in HostMgr
- Renamed setIPReservationUnique to setIPReservationsUnique
2020-10-05 13:14:58 +00:00
Marcin Siodelski
c6a3f83881 [#1428] Fixed read only tests in MySQL and PgSQL
Per review comments.
2020-10-05 13:14:58 +00:00
Marcin Siodelski
1ffba02c72 [#1428] Use SQL select 1 consistently
The new INSERT SELECT statements are also better described to explain why
SELECT 1 is used as a result of the review.
2020-10-05 13:14:58 +00:00
Marcin Siodelski
7f6f354c51 [#1428] Added comments in MySQL and PgSQL backends 2020-10-05 13:14:57 +00:00
Marcin Siodelski
1181298f2c [#1428] Delete multiple hosts by subnet/addr
Adjusted behavior of the del(subnet_id, addr) function in MySQL and
Postgres to delete multiple hosts having the same IPv4 or IPv6 address.
The MySQL schema had to be updated to use CASCADE action rather than
trigger to remove dependent options and IPv6 reservations.
2020-10-05 13:14:57 +00:00
Marcin Siodelski
c7e9763582 [#1428] Calls to fetch many hosts by id/address
The new calls have been added to the host backends to retrieve multiple
hosts by subnet_id and address.
2020-10-05 13:14:57 +00:00
Marcin Siodelski
99c44ffd31 [#1428] Allow non-unique IPs in MySQL and PgSQL
Introduced new host API function which allows for configuring selected
backends to accept non-unique IP reservations for multiple hosts. Support
for it was added in MySQL, Postgres and Kea config file. It is not
supported in Cassandra. New migrations for MySQL and Postgres have been
created.
2020-10-05 13:14:57 +00:00
Francis Dupont
f3e8356a41 [#1163] Checkpoint: updated API 2020-09-22 10:13:23 +02:00
Razvan Becheriu
c8bd5a4693 [#1380] call mysql_autocommit on openDatabase 2020-08-14 12:34:01 +03:00
Francis Dupont
01e10ceba1 [#1007] Replaced some option spaces 2020-08-05 13:58:29 +02:00
Francis Dupont
a41eacaa12 [#1147] Checkpoint: began resources 2020-05-26 11:51:57 +02:00
Francis Dupont
b064001b5a [#1160] Added a retryer template for MySQL execute functions 2020-04-23 13:13:12 +02:00
Razvan Becheriu
9bcc1e819a [#1071] always cast to target type 2020-02-21 09:15:14 +01:00
Michal Nowikowski
ba41c187b5 [#1098] updated more copyright dates 2020-01-27 19:52:58 +01:00
Razvan Becheriu
c752f28b2b [#1073] addressed review 2020-01-27 16:59:48 +02:00
Razvan Becheriu
73c36cf1ca [#1073] addressed review 2020-01-27 16:57:36 +02:00
Razvan Becheriu
430cefea69 [#1073] addressed review 2020-01-27 16:57:36 +02:00
Tomek Mrugalski
3061507cb9 [#1073] Added minor comments 2020-01-27 16:57:36 +02:00
Razvan Becheriu
99b0521968 [#1073] minor changes 2020-01-27 16:57:36 +02:00
Razvan Becheriu
84dd2039ff [#1073] minor changes 2020-01-27 16:57:36 +02:00
Razvan Becheriu
f5403c7f51 [#1073] minor changes 2020-01-27 16:57:36 +02:00
Razvan Becheriu
b6850b3005 [#1073] fixed rebase 2020-01-27 16:57:36 +02:00
Razvan Becheriu
bfca2dbd15 [#1073] minor changes 2020-01-27 16:57:36 +02:00
Razvan Becheriu
61ffb5eab7 [#1073] minor changes 2020-01-27 16:57:36 +02:00
Razvan Becheriu
76d0b1dc1e [#1073] minor changes 2020-01-27 16:57:36 +02:00
Razvan Becheriu
e09f24cd97 [#1073] minor changes 2020-01-27 16:57:36 +02:00
Razvan Becheriu
0d59372c73 [#1073] minor changes 2020-01-27 16:57:36 +02:00
Razvan Becheriu
2d323180d9 [#1073] implemented connection pool for mysql host mgr 2020-01-27 16:57:36 +02:00
Francis Dupont
c131e65e82 [1008-move-database-schema-version-check-to-database-libraries] Moved getVersion codes to databases 2019-12-04 14:33:09 +01:00
Francis Dupont
f5ce317a12 [392-search-of-reservations-by-hostname] Checkpoint: did tests, todo doc and hook 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
Marcin Siodelski
a877be126b [#851,!24-p] Make sure that string is null terminated after strncpy. 2019-08-22 20:40:27 +02:00
Marcin Siodelski
8e9b4b312b [#851,!24-p] Address issue in use of strcpy. 2019-08-22 17:48:39 +02:00
Marcin Siodelski
1c23dba39c [#851,!24-p] Avoid referencing out of bounds element of binding array.
MySQL host manager issue.
2019-08-21 21:33:20 +02:00
Francis Dupont
f45511f044 [550-authentication-key-to-text-method-miss-spelled] Addressed comments 2019-07-02 17:33:39 +02:00
Francis Dupont
d8276f1036 [550-authentication-key-to-text-method-miss-spelled] AuthKey is binary 2019-07-02 17:33:39 +02:00
Francis Dupont
d3806efc3c [558-some-host-retrieval-operations-can-not-be-executed-in-read-only-database] Moved RO statements before INSERT_HOST 2019-04-15 06:39:35 -04:00
Marcin Siodelski
f51d01aeca [#487,!242] Moved optional_value.h to optional.h 2019-02-28 08:38:18 -05:00
Marcin Siodelski
6975d0af58 [#487,!242] Adjusted OptionalValue to Triplet and renamed to Optional. 2019-02-28 08:38:18 -05:00
Francis Dupont
7f4847e9a4 [354-compilation-with-mysql-fails-on-fedora-29] Solved other issues 2019-02-07 17:02:22 -05:00
Thomas Markwalder
67f0b745d4 [#447,!222] Fixed tagged_statement name collision in mysql_cb
src/hooks/dhcp/mysql_cb/mysql_cb_dhcp4.cc
src/lib/dhcpsrv/mysql_host_data_source.cc
    Enclosed tagged_statments declarations within
    anonymous namespace to avoid collisions.
2019-02-05 11:41:11 -05:00
Francis Dupont
12a3d0b2af [313-return-a-list-of-all-reservations-by-subnet-id] Addressed more comments 2019-01-29 04:49:05 -05:00
Tomek Mrugalski
60531aa972 [#313,!199] Several wording changes after review 2019-01-29 04:49:05 -05:00
Francis Dupont
55b0c7c131 [313-return-a-list-of-all-reservations-by-subnet-id] Finished getPage[46] 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
Tomek Mrugalski
63dc9ec8cf [#180,!93] More doxygen warnings fixed. 2018-11-05 14:09:07 +07:00
Marcin Siodelski
012a97a87c [#92,!13] Refactored libkea-dhcpsrv to use libkea-database 2018-09-03 03:31:33 -04:00
Thomas Markwalder
f1b3b3c76d [5704] host backends and kea-dhcp4/6 support global HR storage
- Added constants for special SubnetIDs:
    SUBNET_ID_GLOBAL, SUBNET_ID_MAX, SUBNET_ID_UNUSED

- Modified code throughout to use these constants, rather than hard-coded
  values.   Note, MySQL and PostgreSQL host backends convert from NULL to
  UNUSED and back.

- kea-dhcp4/6 servers will now parse a "reservations" element at the global
  level.

src/lib/dhcpsrv/subnet_id.h
    Added constants SubnetID SUBNET_ID_GLOBAL, SUBNET_ID_MAX, SUBNET_ID_UNUSED

src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/json_config_parser.cc
    kea-dhcp4 parsing now handles reservations as a global element

src/bin/dhcp4/tests/config_parser_unittest.cc
    TEST_F(Dhcp4ParserTest, globalReservations) - new test to
    verify global HR parsing

src/bin/dhcp4/tests/dora_unittest.cc
src/lib/dhcpsrv/cfg_hosts.cc
src/lib/dhcpsrv/host.cc
src/lib/dhcpsrv/host_mgr.cc
src/lib/dhcpsrv/mysql_host_data_source.cc
src/lib/dhcpsrv/parsers/host_reservation_parser.cc
src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
src/lib/dhcpsrv/tests/alloc_engine_utils.cc
src/lib/dhcpsrv/tests/host_mgr_unittest.cc
src/lib/dhcpsrv/tests/host_reservation_parser_unittest.cc
src/lib/dhcpsrv/tests/host_reservations_list_parser_unittest.cc
src/lib/dhcpsrv/tests/host_unittest.cc
    Replaced SubnetID 0 with SUBNET_ID_UNUSED

src/lib/dhcpsrv/srv_config.cc
    SrvConfig::toElement() - added global reservations output

src/lib/dhcpsrv/tests/cfg_hosts_unittest.cc
    TEST_F(CfgHostsTest, globalSubnetIDs)
    TEST_F(CfgHostsTest, unusedSubnetIDs) - new tests

src/lib/dhcpsrv/tests/host_unittest.cc
    Replaced SubnetID 0 with SUBNET_ID_UNUSED
    TEST_F(HostTest, toText)  - updated to verify global ID output

src/lib/dhcpsrv/tests/mysql_host_data_source_unittest.cc
    TEST_F(MySqlHostDataSourceTest, globalSubnetId4)
    TEST_F(MySqlHostDataSourceTest, globalSubnetId6) - new tests

src/lib/dhcpsrv/tests/srv_config_unittest.cc
    TEST_F(SrvConfigTest, unparseHR) - added global HRs

src/lib/dhcpsrv/testutils/generic_host_data_source_unittest.*
    GenericHostDataSourceTest::testGlobalSubnetId4()
    GenericHostDataSourceTest::testGlobalSubnetId6()

src/bin/dhcp6/dhcp6_lexer.ll
src/bin/dhcp6/dhcp6_parser.yy
src/bin/dhcp6/json_config_parser.cc
    kea-dhcp6 now parses reservations as a global element

src/bin/dhcp6/tests/config_parser_unittest.cc
    TEST_F(Dhcp6ParserTest, globalReservations) - new test
2018-08-07 06:46:30 -04:00