2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-10-05 13:26:03 +00:00
Commit Graph

109 Commits

Author SHA1 Message Date
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
Marcin Siodelski
07fbb6e142 [5009] Addressed review comments. 2016-09-20 15:37:11 +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
9b79fe005d [master] Merge branch 'trac4552' 2016-08-25 18:18:07 +02:00
Marcin Siodelski
0d8dc7affb [master] Merge branch 'trac4489' 2016-08-25 12:41:28 +02:00
Marcin Siodelski
8a23588bfe [4552] MySQL backend now supports storing siaddr, sname and file.
In addition, added a generic unit test for MySQL and Postgres, which
tests inertion and retrieval of these values.
2016-08-23 17:43:50 +02:00
Marcin Siodelski
fa40765e93 [4552] Updated MySQL to insert/retrieve DHCP4 msg fields.
These fields are: siaddr, sname and file.
2016-08-23 12:09:36 +02:00
Marcin Siodelski
4a8efcb45a [4489] Addressed review comments.
The only review item not addressed with this commit is the
implementation of unit test that operates on the read only
database, i.e. the database containing tables on which the
given user only has SELECT privileges.
2016-08-17 11:22:24 +02:00
Stephen Morris
e7c4240dd8 [4489] Correct error in the declaration of MySqlHostIpv6Exchange::iaid_ 2016-08-12 17:41:24 +01:00
Stephen Morris
e6936baabe [4489] Altered "size_t" to "unsigned long" to overcome compiler objections 2016-08-12 11:57:22 +01:00
Thomas Markwalder
41e69be383 [4279] Completed support for HR client classes in PostgreSQL and MySQL
src/lib/dhcpsrv/mysql_host_data_source.cc
    MySqlHostExchange::createBindForSend() - removed extraneous buffer length
    assignment for client class text.

src/lib/dhcpsrv/tests/generic_host_data_source_unittest.cc
    - Added implementations for:
        GenericHostDataSourceTest::compareClientClasses()
        GenericHostDataSourceTest::testMultipleClientClasses4()
        GenericHostDataSourceTest::testMultipleClientClasses6()
        GenericHostDataSourceTest::testMultipleClientClassesBoth()

src/lib/dhcpsrv/tests/mysql_host_data_source_unittest.cc
    - Added implementations for:
        TEST_F(MySqlHostDataSourceTest, multipleClientClasses4)
        TEST_F(MySqlHostDataSourceTest, multipleClientClasses6)
        TEST_F(MySqlHostDataSourceTest, multipleClientClassesBoth)

src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc
    - Added implementations for:
        TEST_F(PgSqlHostDataSourceTest, multipleClientClasses4) {
        TEST_F(PgSqlHostDataSourceTest, multipleClientClasses6) {
        TEST_F(PgSqlHostDataSourceTest, multipleClientClassesBoth) {
2016-08-08 08:04:21 -04:00
Marcin Siodelski
d9a2d3637a [4489] Added log statements when host database is read-only. 2016-07-29 09:55:40 +02:00
Marcin Siodelski
bfb36f3d0c [4489] Removed RestrictedConstPtr class. 2016-07-28 21:13:01 +02:00
Marcin Siodelski
ef05ff339c [4489] Added 'readonly' parameter to DbAccessParser. 2016-07-28 13:46:57 +02:00
Marcin Siodelski
4c07c122b2 [4489] Added unit test for read only mode in PgSQL backend. 2016-07-28 13:46:30 +02:00
Marcin Siodelski
65d3817db8 [4489] Added support for read only mode in MySQL HR backend. 2016-07-28 12:56:58 +02:00
Tomek Mrugalski
7e2d2f21c6 [4277] Added several @todos and fixed formatting. 2016-07-25 20:04:20 +02:00
Thomas Markwalder
cac472f52a [4277] Fixed tagged_statements name collision
Wrapped declaration of tagged_statements[] in pgsql_host_data_source.cc
and mysql_host_data_source.cc in anonymous namespace.  They collide
otherwise.
2016-07-14 16:35:12 -04:00
Marcin Siodelski
b8a306a27d [master] Merge branch 'trac4281' 2016-06-02 10:08:58 +02:00
Marcin Siodelski
b76f35a9a2 [4281] Fixed trivial doxygen errors. 2016-06-01 17:35:44 +02:00
Marcin Siodelski
61ca023498 [4281] Addressed further review comments.
- Always invoke mysql_insert_id to retrieve host_id value
- exit if connection with  MySql database is lost
2016-05-30 11:30:26 +02:00
Marcin Siodelski
6efa4faf3a [4281] Added scope_id to the MySQL tables holding options. 2016-05-25 17:52:03 +02:00
Marcin Siodelski
abfb2c7c1f [4281] Moved MySQL host data source statements to impl class. 2016-05-25 16:48:31 +02:00
Marcin Siodelski
0e9d93b91f [4281] Addressed review comments. 2016-05-25 15:28:41 +02:00
Marcin Siodelski
960a636152 [4281] Renamed MySqlHostExchangeOpts to MySqlHostWithOptionsExchange. 2016-05-17 16:23:51 +02:00
Marcin Siodelski
9a2847d55e [4281] Updated recently modified files with proper commentary.
Also, fixed a couple of minor issues.
2016-05-17 15:23:27 +02:00
Marcin Siodelski
60192f6630 [4281] Creation of a new host in MySQL is wrapped in transaction. 2016-05-16 16:44:09 +02:00
Marcin Siodelski
29bfd06c38 [4281] It is allowed to use formatted option values in the host database. 2016-05-13 10:43:43 +02:00
Marcin Siodelski
718643a83a [4281] Extended MySQL host data source with DHCPv4 and DHCPv6 options.
Missing things:
- proper commentary
- formatted values for options
- rollback host insertion when failing to add reservation or option
2016-05-12 18:31:07 +02:00
Stephen Morris
1d3dac9de3 [4485] Change type of variables to overcome compiler objections
One compiler was objecting to placing the address of a size_t variable
into a variable declared as "unsigned long*".  Changing the
declaration from "size_t" to "unsigned long" fixes the problem.
2016-05-10 15:03:02 +01:00
Marcin Siodelski
7741ab8ce8 [4300] Addressed review comments. 2016-04-05 13:30:37 +02:00
Marcin Siodelski
e4a879e3e2 [4300] Host class holds identifier rather than HW address or DUID. 2016-04-04 10:57:33 +02:00
Marcin Siodelski
634cf7a2d4 [4302] Address further review comments.
- cppcheck issues
- Unique index for prefix and prefix length.
2016-04-01 17:44:32 +02:00
Marcin Siodelski
9900e40c3a [4302] MySQL database upgraded to version 4.2.
- Added new table host_identifier_type
- Added foreign key on hosts table referencing
  host_identifier_type
- Indexes on hosts table are now unique
2016-03-31 20:29:20 +02:00
Marcin Siodelski
356f261e36 [4302] Addressed review comments.
- Rename GET_HOST_HWADDR_DUID to GET_HOST_DHCPID
- Fixes and clarifications in doxygen documentation
2016-03-31 13:45:44 +02:00
Marcin Siodelski
f551e0e480 [4302] Refactored host data source classes.
The updated API exposes functions which retrieve hosts
by any identifier and identifier type, rather than DUID
or HW address.
2016-03-24 14:56:36 +01:00
Marcin Siodelski
14cc8ad664 [master] Eliminate doxygen warnings after #4212 and #3696.
Committing on my discretion and with no objections on jabber.
2016-03-24 12:34:43 +01:00
Marcin Siodelski
7948104393 [master] Merge branch 'trac4212' 2016-03-23 13:51:55 +01:00
Marcin Siodelski
34d21432a4 [4212] Addressed review comments. 2016-03-23 12:29:15 +01:00
Francis Dupont
9f47b6511d [4326] untabified 2016-03-22 17:31:30 +01:00
Tomek Mrugalski
82becf56b0 [4212] Compilation fix 2016-03-09 15:50:21 +01:00
Marcin Siodelski
7284e68744 [4212] Restructured MySQL Exchange classes in host data source. 2016-03-08 12:14:44 +01:00
Marcin Siodelski
eca64697cb [4212] Using single query to retrieve hosts and IPv6 reservations. 2016-03-02 12:18:04 +01:00
Marcin Siodelski
c89e1b38fe [4212] Renamed two variables to adhere to our coding guidelines.
Also, use new constant for checking fetch failure in MySQL.
2016-03-02 00:05:11 +01:00