- 11 Nov, 2015 1 commit
-
-
Thomas Markwalder authored
doc/guide/admin.xml src/lib/dhcpsrv/dhcpsrv_messages.mes src/lib/dhcpsrv/lease_file_loader.h minor clean up, typos src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc src/lib/dhcpsrv/tests/csv_lease_file6_unittest.cc removed unnecessary use of scoped_ptr src/lib/util/csv_file.cc CSVRow::trim() - replaced use of std::vector<>::erase with resise src/lib/util/versioned_csv_file.h src/lib/util/versioned_csv_file.cc VersionedCSVFile::next() - reorganized to use input_schema_state_ VersionedCSVFile::columnCountError() - new convenience method minor cleanups
-
- 10 Nov, 2015 1 commit
-
-
Thomas Markwalder authored
Several minor cleanup items based on review comments. Implemented support for downgrading files from newer schema versions: doc/guide/admin.xml amended text on upgrading memfile to discuss downgrading src/lib/dhcpsrv/dhcpsrv_messages.mes src/lib/dhcpsrv/lease_file_loader.h revamped log messages to accomodate downgrading src/lib/dhcpsrv/memfile_lease_mgr.cc src/lib/dhcpsrv/memfile_lease_mgr.h added commentary to MemfileLeaseMgr ctor automatic conversion logic accomdates both upgrading and downgrading src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc src/lib/dhcpsrv/tests/csv_lease_file6_unittest.cc replaced tooManyHeaderColumns test with downGrade test src/lib/util/csv_file.h src/lib/util/csv_file.cc added CSVRow::trim() src/lib/util/tests/csv_file_unittest.cc added CSVRow.trim test src/lib/util/tests/versioned_csv_file_unittest.cc added VersionedCSVFileTest.currentSchemaTest test replaced tooManyHeaderColumns test with downGrading test revamped tests to check getInputSchemaState() and needsConversion() src/lib/util/versioned_csv_file.h Updated commentary to describe downgrade support src/lib/util/versioned_csv_file.cc enum InputSchemaState input_schema_state_ input_header_count_ getInputHeaderCount() getInputSchemaState() needsConversion() next(CSVRow& row) - now supports downgrading rows validateHeder() - now throws if called when no schema has been defined, and supports downgrading rows
-
- 03 Nov, 2015 4 commits
-
-
Thomas Markwalder authored
-
Thomas Markwalder authored
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc Added two new unit tests to verify lease file upgrade via automatic LFC invocation: TEST_F(MemfileLeaseMgrTest, leaseUpgrade4) TEST_F(MemfileLeaseMgrTest, leaseUpgrade6)
-
Thomas Markwalder authored
Memfile_LeaseMgr loads the lease files during instantiation. If it detects that any of the files loaded are out of date, it will invoke LFC directly, whether or not LFC is enabled. src/lib/dhcpsrv/dhcpsrv_messages.mes added two new log messages: DHCPRSV_MEMFILE_UPGRADING_LEASE_FILES DHCPSRV_MEMFILE_NEEDS_UPGRADING src/lib/dhcpsrv/lease_file_loader.h LeaseFileLoader::load() - emits DHCPSRV_MEMFILE_NEEDS_UPGRADING log when an out of date file is detected src/lib/dhcpsrv/memfile_lease_mgr.cc LFCSetup::setup() - added run_once_now parameter, which causes the method to invoke the LFC callback immediately, regardless of the value of LFC interval. Memfile_LeaseMgr::Memfile_LeaseMgr() - added logic to track if files loaded need upgrading and pass that into lfcSetup() Memfile_LeaseMgr::loadLeasesFromFiles() - change to return a boolean true if any of the files loaded need upgrading. Memfile_LeaseMgr::lfcSetup() - added upgrade_needed parameter, which is passed through to LFCSetup::setup() as "run_once_now"
-
Thomas Markwalder authored
src/lib/util/csv_file.h Made recreate() virtual src/lib/util/versioned_csv_file.h src/lib/util/versioned_csv_file.cc Added several methods to VersionedCSVFile: getValidColumnCount() - returns number of valid columns in header recreate() - wraps base class method, ensuring valid column count gets set to number of defined columns for new files needsUpgrading() - returns bool true if file schema is out of date getInputSchemaVersion() - returns schema version found in file getSchemaVersion() - returns current schema version getVersionedColumn() - returns the column definition for a given index src/lib/util/tests/versioned_csv_file_unittest.cc Added checks for new methods to existing tests
-
- 02 Nov, 2015 2 commits
-
-
Thomas Markwalder authored
src/lib/dhcpsrv/csv_lease_file4.h src/lib/dhcpsrv/csv_lease_file4.cc - CSVLeaseFile4 now derives from VersionedCSVFile - initializes schema metadata not just column names - uses VersionedCSVFile methods rather than CSVFile methods src/lib/dhcpsrv/csv_lease_file6.h src/lib/dhcpsrv/csv_lease_file6.cc - CSVLeaseFile6 now derives from VersionedCSVFile - initializes schema metadata not just column names - uses VersionedCSVFile methods rather than CSVFile methods src/lib/dhcpsrv/tests/csv_lease_file4_unittest.cc - Added new unit tests: TEST_F(CSVLeaseFile4Test, mixedSchemaload) TEST_F(CSVLeaseFile4Test, tooFewHeaderColumns) TEST_F(CSVLeaseFile4Test, invalidHeaderColumn) TEST_F(CSVLeaseFile4Test, tooManyHeaderColumns) src/lib/dhcpsrv/tests/csv_lease_file6_unittest.cc - Added new unit tests: TEST_F(CSVLeaseFile6Test, mixedSchemaLoad) TEST_F(CSVLeaseFile6Test, tooFewHeaderColumns) TEST_F(CSVLeaseFile6Test, invalidHeaderColumn) TEST_F(CSVLeaseFile6Test, tooManyHeaderColumns)
-
Thomas Markwalder authored
src/lib/util/versioned_csv_file.h src/lib/util/versioned_csv_file.cc New files which implement VersionedCSVFile, CSV file which can support mulitple schema versions src/lib/util/tests/versioned_csv_file_unittest.h src/lib/util/tests/versioned_csv_file_unittest.cc new files for Unit tests for VersionedCSVFile src/lib/util/Makefile.am added new files src/lib/util/csv_file.cc includes read error message if header fails to validate src/lib/util/csv_file.h removed @todo for 3626, no longer applicable src/lib/util/tests/Makefile.am added versioned_csv_file_unittest.cc
-
- 28 Oct, 2015 1 commit
-
-
Francis Dupont authored
-
- 27 Oct, 2015 12 commits
-
-
Thomas Markwalder authored
-
Thomas Markwalder authored
Merge branch 'trac3780'
-
Thomas Markwalder authored
Fixed misspelling in log message.
-
Marcin Siodelski authored
-
Marcin Siodelski authored
-
Marcin Siodelski authored
-
Marcin Siodelski authored
This is a result of the review. This change was suggested so as the order of lease expiration specific parameters follows the order in which they are described.
-
Thomas Markwalder authored
-
Thomas Markwalder authored
-
Marcin Siodelski authored
-
Marcin Siodelski authored
-
Shawn Routhier authored
-
- 26 Oct, 2015 11 commits
-
-
Marcin Siodelski authored
-
Marcin Siodelski authored
-
Marcin Siodelski authored
-
Marcin Siodelski authored
-
Marcin Siodelski authored
-
Francis Dupont authored
-
Francis Dupont authored
-
Francis Dupont authored
-
Francis Dupont authored
-
Marcin Siodelski authored
-
Shawn Routhier authored
-
- 23 Oct, 2015 3 commits
-
-
Thomas Markwalder authored
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()
-
Marcin Siodelski authored
-
Francis Dupont authored
-
- 21 Oct, 2015 5 commits
-
-
-
Francis Dupont authored
-
Thomas Markwalder authored
-
Thomas Markwalder authored
Merged in branch 'trac3969'
-
Thomas Markwalder authored
-