1. 11 Nov, 2015 7 commits
  2. 10 Nov, 2015 2 commits
    • Thomas Markwalder's avatar
      [4095] Implemented new classes for storing client class definitions · f3e7cffe
      Thomas Markwalder authored
      src/lib/dhcpsrv/client_class_def.cc
      src/lib/dhcpsrv/client_class_def.h
      src/lib/dhcpsrv/tests/client_class_def_unittest.cc
          New files that define client class storage classes and tests
      
      src/lib/dhcp/classify.h
          Amended commentary to reflect how these classes are now being used.
      
      src/lib/dhcp/option.h
          Added typedefs:
              boost::shared_ptr<Option> OptionPtr;
              boost::shared_ptr<OptionCollection> OptionCollectionPtr;
      
      src/lib/dhcpsrv/Makefile.am
          Added entries for new files
      
      src/lib/dhcpsrv/tests/Makefile.am
          Added entries for new file
      
      src/lib/eval/token.h b/src/lib/eval/token.h
          Added typedef:
              boost::shared_ptr<Expression> ExpressionPtr;
      f3e7cffe
    • Thomas Markwalder's avatar
      [3601] Addressed review comments, added ability to downgrade · 91a4978e
      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
      91a4978e
  3. 09 Nov, 2015 1 commit
    • Stephen Morris's avatar
      [3259] Changes after review · 68f02acc
      Stephen Morris authored
      1. Updated Kea guide to note that removing the hooks-libraries
         configuration element does not always have the expected effect.
      2. Moved some documentation from the dhcp_parsers.cc file to the .h file.
      3. Expanded checking of the contents of the hooks-libraries configuration
         element.
      68f02acc
  4. 05 Nov, 2015 1 commit
  5. 04 Nov, 2015 2 commits
  6. 03 Nov, 2015 2 commits
    • Thomas Markwalder's avatar
      [3601] Added unit tests for automatic LFC upgrade · e60cbf1d
      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)
      e60cbf1d
    • Thomas Markwalder's avatar
      [3601] Memfile_LeaseMgr now runs LFC automatically if lease files need upgrading · 64a51b84
      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"
      64a51b84
  7. 02 Nov, 2015 1 commit
    • Thomas Markwalder's avatar
      [3601] CSVLeaseFile4 and CSVLeaseFile6 now derive from VersionedCSVFile · d85076b0
      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)
      d85076b0
  8. 01 Nov, 2015 3 commits
  9. 31 Oct, 2015 3 commits
  10. 29 Oct, 2015 1 commit
  11. 28 Oct, 2015 2 commits
  12. 27 Oct, 2015 5 commits
  13. 26 Oct, 2015 3 commits
  14. 23 Oct, 2015 1 commit
    • Thomas Markwalder's avatar
      [3780] MySQL and Postgres lease managers now exit on fatal error detection · be964a2b
      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()
      be964a2b
  15. 21 Oct, 2015 3 commits
  16. 20 Oct, 2015 1 commit
    • Marcin Siodelski's avatar
      [3977] Name change requests are now generated when lease is reused. · 5de74693
      Marcin Siodelski authored
      This change triggered a lot of code refactoring for generating the
      NameChangeRequests. Long story short is that the functions responsible
      for generating NCRs from the lease information have been moved to
      the libdhcpsrv where they better fit and where they may be used
      by both allocation engine and the servers.
      5de74693
  17. 19 Oct, 2015 2 commits