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
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
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