2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 13:07:50 +00:00

45 Commits

Author SHA1 Message Date
Marcin Siodelski
00186aa513 [master] Include <mysql.h> rather than <mysql/mysql.h>
This prevents compilation failure on OS-X. Reviewed and approved
on jabber.
2015-12-01 09:50:22 +01:00
Tomek Mrugalski
65efc0da7f [3682_rebase] Merge branch 'trac3682' into trac3682_rebase
# Conflicts:
#	src/lib/dhcpsrv/mysql_lease_mgr.cc
#	src/lib/dhcpsrv/mysql_lease_mgr.h
2015-11-30 21:26:25 +01:00
Thomas Markwalder
be964a2b42 [3780] MySQL and Postgres lease managers now exit on fatal error detection
src/lib/dhcpsrv/dhcpsrv_messages.mes
    added messages DHCPSRV_MYSQL_FATAL_ERROR, DHCPSRV_PGSQL_FATAL_ERROR

src/lib/dhcpsrv/mysql_lease_mgr.cc
    added MySQL client error code include

    MySqlLeaseMgr::checkError() - method is no longer inlined in
    the header.  Expanded to detect unrecoverable errors, log
    them and call exit().

src/lib/dhcpsrv/mysql_lease_mgr.h
    Removed inline implemenation of MySqlLeaseMgr::checkError(),
    and expanded commentary

src/lib/dhcpsrv/pgsql_lease_mgr.cc
    PgSqlLeaseMgr::addLeaseCommon() - now uses checkStatementError()

    PgSqlLeaseMgr::checkStatementError() - Expanded to detect
    unrecoverable errors, log them and call exit().

src/lib/dhcpsrv/pgsql_lease_mgr.h
    Expanded commentary for PgSqlLeaseMgr::checkStatementError()
2015-10-23 16:41:27 -04:00
Tomek Mrugalski
884d8bb4a5 [master] Merge branch 'trac3681_rebase' (Common MySQL Connection class)
Conflicts:
	src/lib/dhcpsrv/lease_mgr.h
	src/lib/dhcpsrv/memfile_lease_mgr.cc
	src/lib/dhcpsrv/mysql_lease_mgr.cc
	src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
	src/lib/dhcpsrv/tests/schema_mysql_copy.h
2015-10-09 23:28:19 +02:00
Marcin Siodelski
f127bed4fb [3966] Implemented deletion of the reclaimed leases in MySQL. 2015-09-07 13:58:22 +02:00
Marcin Siodelski
54a90126ec [3966] Implemented methods to retrieve expired leases in MySQL. 2015-09-07 13:29:17 +02:00
Marcin Siodelski
31c483f123 [3965] deleteExpiredReclaimed returns number of deleted leases. 2015-09-03 11:35:25 +02:00
Tomek Mrugalski
278a4e3117 [3681_rebase] Changes after review
- Indent fixed
 - Missing parameter descriptions added
2015-08-24 15:18:49 +02:00
Tomek Mrugalski
e626cf0d38 [3681_rebase] MySQLLeaseMgr uses, but does not derive from MySqlConnection. 2015-08-21 18:27:41 +02:00
Marcin Siodelski
984712536c [3965] Added stub methods for getting and removing expired leases. 2015-08-20 19:25:38 +02:00
Tomek Mrugalski
373aa0a40e [3681] DataSource class added.
- code refactoring after last commit, clean-up, compilation fixes
 - Makefile updates
 - Added new unit-tests for DataSource (mostly moved from LeaseMgr
   unit-tests)
2015-06-25 20:55:12 +02:00
Tomek Mrugalski
2a3ac3ef7d [3681] MySQLConnection class implemented
- patch as sent by Adam Kalmus
2015-06-25 20:55:12 +02:00
Francis Dupont
52fe5e23eb [3882a] Added new getDBVersion() class method 2015-06-19 14:30:51 +02:00
Shawn Routhier
4ba876edc5 [3673] Fix typo 2015-03-10 21:23:46 -07:00
Marcin Siodelski
ccf7e110c2 [3673] The time conversion method in PgSQL calculates expiry time itself.
This is to prevent the negative overflows when valid_lft is substracted
from the time_t value. It is also consistent with the MySQL implementation.
2015-03-04 16:19:36 +01:00
Marcin Siodelski
c96df51663 [3556] Updated copyright headers. 2014-12-04 14:47:21 +01:00
Tomek Mrugalski
ab0365c68d [3556] HWAddr support in MySQL implemented. 2014-11-06 19:36:46 +01:00
Marcin Siodelski
672d49074e [2940] Moved the Memfile backend tests to a generic class. 2013-11-15 12:03:21 +01:00
Tomek Mrugalski
a26a75c948 [3149] Lease6::LeaseType and Pool::PoolType unified. 2013-09-18 15:44:48 +02:00
Tomek Mrugalski
0b0bb4a278 [3146] getLease6() renamed to getLeases6() 2013-09-06 19:30:35 +02:00
Tomek Mrugalski
681def2806 [3146] getLease6 renamed to getLeases6(), single lease getLease6() added 2013-09-06 18:16:50 +02:00
Tomek Mrugalski
95729b096e [3146] getLease6() methods now have extra param: LeaseType 2013-09-06 14:51:59 +02:00
Thomas Markwalder
4813e06cf4 [2825] Removed "mysql" directory prefix from #include statements.
The include path for MySQL includes is accurately set by mysql_config.
2013-03-14 08:50:20 -04:00
Jelte Jansen
9f0f84c089 [master] Merge branch 'trac2821' 2013-03-08 14:52:06 +01:00
Jelte Jansen
17c0037b8a [2821] Move library_end to holder
and use the holder in the unit tests as well
2013-03-08 12:01:03 +01:00
Stephen Morris
b11b84e52d [2821] Updated documentation related to MySqlHolder class. 2013-03-07 23:00:23 +00:00
Jelte Jansen
e58c2fd32c [2821] Move MySqlHolder to header, and use as member
Half-related change, if available, call mysql_library_end() at the end of the unit test run
2013-03-07 15:48:51 +01:00
Jeremy C. Reed
6ae0d625f0 [master] many misspelling and typo fixes
reviewed by jelte via jabber.

Changes some log message descriptions and some
function arguments and some output.
2013-03-06 08:41:51 -06:00
Tomek Mrugalski
6278daf2fc [master] Merge branch 'trac2320' (DHCPv4 allocation engine)
Conflicts:
	ChangeLog
	src/bin/dhcp4/config_parser.cc
	src/bin/dhcp6/config_parser.cc
	src/lib/dhcpsrv/lease_mgr.cc
	src/lib/dhcpsrv/lease_mgr.h
	src/lib/dhcpsrv/memfile_lease_mgr.cc
	src/lib/dhcpsrv/subnet.cc
	src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
2013-01-10 16:32:24 +01:00
Stephen Morris
593eacf16f [2524] Add logging messages to memory file database code
Also make the hardware address to string function common to both
database modules.
2012-12-18 12:28:39 +00:00
Stephen Morris
03b92733bf [2546] Unify deleteLease4() and deleteLease6() into a single deleteLease() 2012-12-10 11:21:24 +00:00
Stephen Morris
084a166845 [2546] Remove LeaseMgr::getLease4(address, subnetid)
As the address is th eprimary key of the table, there can only ever
be at most one lease in the database with a given address.  Additional
selection by subnet ID is not needed.
2012-12-10 10:13:53 +00:00
Stephen Morris
fca3132940 [2404] Minor changes as a result of review 2012-12-07 11:18:47 +00:00
Stephen Morris
495d4e2f69 [2404] More changes as a result of review
Including:
* Updates to comments etc.
* Addition of Lease4::operator==() (and associated unit tests)
2012-12-03 15:35:36 +00:00
Stephen Morris
ef364ccb84 [2404] First set of changes as a result of review
* Corrections of miscellaneous typos in comments
* Update database version to 1.0
* Handling of truncation while fetching data from the database
2012-11-30 15:49:42 +00:00
Stephen Morris
46cfa07792 [2404] Further refactoring and a bit of simplification.
Also, included dhcpsrv in the list of directories searched by Doxygen.
2012-11-26 19:17:27 +00:00
Stephen Morris
5b1850bbc2 [2404] Tidying up and refactoring the code 2012-11-23 18:23:21 +00:00
Stephen Morris
3b2c2c14fb [2404] Add ability to update an IPv4 lease 2012-11-23 14:08:00 +00:00
Stephen Morris
a08894f451 [2404] Add method to get lease4 by client ID and subnet ID 2012-11-23 13:48:42 +00:00
Stephen Morris
7e6602a873 [2404] Add get lease4 by client ID 2012-11-23 12:47:40 +00:00
Stephen Morris
3eab2458f1 [2404] Add method to get lease4 by hardware address & subnet ID 2012-11-23 12:23:17 +00:00
Stephen Morris
59c65b476b [2404] Now able to get IPv4 leases by hardware address 2012-11-23 12:05:55 +00:00
Stephen Morris
6107151348 [2404] Basic Lease4 functionality working 2012-11-21 12:44:18 +00:00
Stephen Morris
3ba0299ad2 [2475] Put #include directives in correct order
Also fix some issues from the review.
2012-11-16 14:15:45 +00:00
Stephen Morris
d2551c3b2b [2475] Split dhcp files into dhcp and dhcpsrv directories 2012-11-16 11:19:19 +00:00