Tomek Mrugalski [Thu, 25 Aug 2016 14:44:55 +0000 (16:44 +0200)]
[4626] Changes after review
- Dhcp4Srv::vendorClassSpecificProcessing removed
- User's Guide updated
- disabled obsolete test (will need to be rewritten to take advantage
of new classification code)
- classes definitions now use strings for server-name and filename
- unused configuration removed from unit-tests
- textFixedFields is now documented
- Unit-tests now have short descriptions
[4294] Changed Memfile stats recount to use existing per-address index
src/lib/dhcpsrv/memfile_lease_mgr.cc
MemfileLeaseStatsQuery4::start()
MemfileLeaseStatsQuery6::start() - both now rely on per-address index,
rather than adding per subnet_id index.
src/lib/dhcpsrv/memfile_lease_storage.h
Removed per subnet_id indexes
[4294] Refactored AddressStatsRow and AddressStatsQuery classes
src/lib/dhcpsrv/cfg_subnets4.cc
CfgSubnets4::updateStatistics() - replaced recountAddressStats4()
with recountLeaseStats4()
src/lib/dhcpsrv/cfg_subnets6.cc
CfgSubnets6::updateStatistics() - replaced recountAddressStats6()
with recountLeaseStats6()
src/lib/dhcpsrv/lease_mgr.cc
renamed LeaseMgr::recountAddressStats4() to recountLeaseStats4()
renamed LeaseMgr::recountAddressStats6() to recountLeaseStats6()
renamed LeaseMgr::startAddressStats4() to startLeaseStats4()
renamed LeaseMgr::startAddressStats6() to startLeaseStats6()
src/lib/dhcpsrv/lease_mgr.h
replaced AddressStatsRow4 and AddressStatsRow6 with single class,
LeaseStatsRow
replaced AddressStatsQuery4 and AddressStatsQuery6 with single class,
AddressStatsQuery
src/lib/dhcpsrv/memfile_lease_mgr.h
src/lib/dhcpsrv/memfile_lease_mgr.cc
Replaced this class heirarchy:
AddressStatsQuery4 <-- MemfileAddressStatsQuery4
AddressStatsQuery6 <-- MemfileAddressStatsQuery6
With this one:
LeaseStatsQuery
|
+--- MemfileLeaseStatsQuery
|
+--- MemfileLeaseStatsQuery4
|
+--- MemfileLeaseStatsQuery6
Replaced startAddressStatsQuery4() with startLeaseStatsQuery4()
Replaced startAddressStatsQuery6() with startLeaseStatsQuery6()
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
Renamed:
checkAddressStats() to checkLeaseStats()
testAddressLeaseStats4() to testRecountLeaseStats4()
testAddressLeaseStats6() to testRecountLeaseStats6()
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
Renamed tests to recountLeaseStats4 and recountLeaseStats6
Tomek Mrugalski [Tue, 23 Aug 2016 11:17:38 +0000 (13:17 +0200)]
[4483] Review comments addressed
- Implemented new test for checking integer boundaries
- checkTokenInteger documented
- indentation fixed in parser.yy
- integer check in lexer.ll extended from int to int64_t
- a bug fixed in EvalContext::convertUint32
- User's Guide now explicitly mentions network order
src/lib/dhcpsrv/tests/generic_host_data_source_unittest.cc
GenericHostDataSourceTest::compareClientClasses() - now uses
std::equal()
GenericHostDataSourceTest::testMultipleClientClasses4()
GenericHostDataSourceTest::testMultipleClientClasses6() - added
steps for each of the host getters defined in BaseHostDataSource
Marcin Siodelski [Wed, 17 Aug 2016 09:22:24 +0000 (11:22 +0200)]
[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.
[4294] Memfile now supports IPv6 lease stats recounting
src/lib/dhcpsrv/memfile_lease_mgr.h
src/lib/dhcpsrv/memfile_lease_mgr.cc
- MemfileAddressStatsQuery6 - new class, Memfile derivation of
the IPv6 statistical lease data query
- Memfile_LeaseMgr::startAddressStatsQuery6() - new virtual
method that creates and runs the IPv6 lease stats query
src/lib/dhcpsrv/memfile_lease_storage.h
- Added non-unique index on subnet ID to Lease6Storage
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
TEST_F(MemfileLeaseMgrTest, recountAddressStats6) - new test
[4294] PostgreSQL now supports IPv6 lease stats recounting
src/lib/dhcpsrv/pgsql_lease_mgr.h
src/lib/dhcpsrv/pgsql_lease_mgr.cc
- Added TaggedStatement RECOUNT_LEASE6_STATS
- PgSqlAddressStatsQuery6 - new class PgSql derivation of the IPv6
statistical lease data query
- PgSqlLeaseMgr::startAddressStatsQuery6() - new virtual method which
creates and runs the IPv6 lease stats query
src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
TEST_F(PgSqlLeaseMgrTest, recountAddressStats6) - new test
[4294] Unit tests and MySql now support IPv6 lease stat recounting
src/lib/dhcpsrv/cfg_subnets6.cc
- CfgSubnets6::removeStatistics() - added removal of declined stats
- CfgSubnets6::updateStatistics() - added call to recountAddressStats6()
src/lib/dhcpsrv/mysql_lease_mgr.h
src/lib/dhcpsrv/mysql_lease_mgr.cc
- Added TaggedStatement RECOUNT_LEASE6_STATS
- MySqlAddressStatsQuery6 - new MySql derivation of AddressStatsQuery6
- MySqlLeaseMgr::startAddressStatsQuery6() - new virtual method which
creates and starts a MySqlAddressStatsQuery6
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.h
src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.cc
- GenericLeaseMgrTest::checkAddressStats4 renamed to checkAddressStats as
it applies to either v4 or v6
- GenericLeaseMgrTest::makeLease6() - new method which creates a minimal
IPv6 lease and adds it to lease storage
- GenericLeaseMgrTest::testRecountAddressStats6() - new method which
checks IPv6 lease stats recounting
src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
- TEST_F(MySqlLeaseMgrTest, recountAddressStats6) - new test