2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-18 14:00:15 +00:00
Commit Graph

102 Commits

Author SHA1 Message Date
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
mayya
2ff46b2dd5 [extend_host_struct] Fix review comments 2018-07-23 13:40:31 +02:00
mayya
3606c3ba9c fixed minor issues 2018-07-23 13:39:16 +02:00
mayya
f30ca44685 review comments 2
review comments 2

test1

fixed unit tests

fixed cassandra

fixed cassandra2
2018-07-23 13:37:01 +02:00
mayya
beeadf3d59 [lib] Address review comments for #83
See  #88 for review comments

modified upgrade files

modified tests
2018-07-23 13:35:50 +02:00
mayya
2090af48c1 [lib] Extend host structure to support auth keys for reconfiguration.
See issue #83
2018-07-23 13:31:03 +02: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
868996c8c5 [5629] Cql lease and host now validate schema version
src/lib/dhcpsrv/cql_host_data_source.cc
    CqlHostDataSourceImpl::CqlHostDataSourceImpl() - added schema
    version validation

src/lib/dhcpsrv/cql_lease_mgr.cc
    CqlLeaseMgr::CqlLeaseMgr() - added schema version validation
2018-05-31 14:30:49 -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
Wlodek Wencel
4a26b2fe27 [master] Copyright update to 2018 2018-05-24 13:17:10 +02:00
Razvan Becheriu
1d36c1ea46 minor changes 2018-02-14 19:45:23 +02: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
Tomek Mrugalski
e37606fd2d [master] Merge branch 'github37' (Cassandra host reservations)
# Conflicts:
#	src/lib/dhcpsrv/tests/generic_host_data_source_unittest.cc
2018-01-11 15:43:59 +01:00
Francis Dupont
a22b7af0bf [5351] Addressed nearly all comments 2017-12-17 19:48:04 +01:00
Tomek Mrugalski
5d57d4e387 [5351] Several changes after review 2017-12-16 15:27:31 +01:00
Razvan Becheriu
5fd9677be6 Merge remote-tracking branch 'andrei-remote/cassandra-update' into HEAD 2017-12-12 13:41:58 +02:00
Francis Dupont
f898544564 [5351] Checkpoint: todo host DB tests 2017-12-03 19:23:00 +01:00
Francis Dupont
869ab1ed57 [5351] Checkpoint: added user context in options stored in DBs, todo add tests 2017-12-01 09:35:18 +01:00
Thomas Markwalder
fd38dc84f3 [5416] Minor wordsmithing. 2017-11-27 10:12:23 -05:00
Marcin Siodelski
19aaa0e0cc [5416] Allow null or 0 values in unique indexes within hosts table.
Also, updated MySQL backend to convert 0 values to null to make sure that
multiple reservations are possible when IPv4 address is unspecified.
2017-11-07 10:27:05 +01:00
Andrei Pavel
e37a6c29bb Merge branch 'isc-master' into cassandra-host-data-source 2017-08-17 20:30:41 +03:00
Josh Soref
000d5653df spelling: setting 2017-07-23 16:25:04 -04:00
Josh Soref
185a9147be spelling: overridden 2017-07-23 15:19:44 -04:00
Marcin Siodelski
20d70ed0b3 [5208] Multiple fixes as a result of review.
The most notable change is the update of the MySQL trigger which
deletes options as a consequence of deletion of the host.
2017-04-24 16:19:37 +02:00
Tomek Mrugalski
8b561ef854 [5208a] delete methods implemented in host data sources 2017-04-22 21:56:33 +02:00
Marcin Siodelski
a24cd8be97 [5102] Allow retrieving host reservations by 'client-id' from SQL dbs. 2017-04-15 15:19:00 +02:00
Wlodek Wencel
9e3ca83d07 [v_1_2_0] copy right dates updated 2017-04-12 15:47:26 +02:00
Marcin Siodelski
9035d06ec3 [5107] Avoid static cast from NULL to uint32_t. 2017-02-28 17:25:20 +01:00
Andrei Pavel
f3598e76ca Cassandra Host Data Source
Added src/share/database/scripts/cql/upgrade_1.0_to_2.0.sh to include host_reservations table in Cassandra.
Updated documentation to indicate that Cassandra now supports host reservations.
Added src/lib/dhcpsrv/cql_host_data_source.cc and cql_host_data_source.h.
Fixed a bug in CfgOption::mergeInternal() where formatted_value_ was not taken into consideration when merging, this is needed for merging the denormalized results on host retrieval in Cassandra. The method is not used elsewhere so there is no regression impact.
Added Cassandra support in HostDataSourceFactory.
Implemented a todo in mysql_host_data_source.cc
Added cql_host_data_source_unittest.cc
Functionality that Cassandra is not capable of like ORDER BY clause is
adjusted in generic_host_data_source_unittest.cc.
2016-12-14 17:11:04 +02:00
Andrei Pavel
9082500187 Corrected typos 2016-12-14 16:57:44 +02:00
Marcin Siodelski
0c0ca2fde7 [5016] Merged pull request #24 from github24 and squashed it.
This change includes the code implemented by the pull request
submitter as well as Marcin's fixes/changes on top of it, but
without a review.
2016-10-26 08:25:53 +02:00