1. 24 Jun, 2016 2 commits
    • Thomas Markwalder's avatar
      [4277] IPv6 Reservations now functional · 8f21305b
      Thomas Markwalder authored
      src/lib/dhcpsrv/pgsql_exchange.h
      src/lib/dhcpsrv/pgsql_exchange.cc
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
          Moved getIPv6Value() from PgSqlLease6Exchange to
          PgSqlExchange and made it static
      
          PgSqlExchange::dumpRow() gets number of columns
          from result set, not parameter
      
      src/lib/dhcpsrv/pgsql_host_data_source.cc
           PgSqlIPv6ReservationExchange
           PgSqlHostIPv6Exchange - now functional
      
      src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc
          TEST_F(PgSqlHostDataSourceTest, get6AddrWithDuid)
          TEST_F(PgSqlHostDataSourceTest, addDuplicate6WithHWAddr)
          TEST_F(PgSqlHostDataSourceTest, optionsReservations6)
          TEST_F(PgSqlHostDataSourceTest, optionsReservations46)
          TEST_F(PgSqlHostDataSourceTest, formattedOptionsReservations6)
          TEST_F(PgSqlHostDataSourceTest, formattedOptionsReservations46)
          - All included and passing.
      8f21305b
    • Thomas Markwalder's avatar
      [4277] PgSqlHostWithOptionsExchange, PgSqlOptionExchange now functional · 3c01633e
      Thomas Markwalder authored
      src/lib/dhcpsrv/pgsql_connection.h
          Added OID_TEXT
      
      src/lib/dhcpsrv/pgsql_exchange.cc
          PsqlBindArray::addNull()
      
          class PgSqlExchange
              - getColumnLabel() - now gets column name from result set
              - getColumnValue variants are now static methods
              - rename column_labels_ to columns_
              - isColumnNull() new method tests if column in row is null
              - dumpRow() - debug method dumps row as text
      
      src/lib/dhcpsrv/pgsql_host_data_source.cc
          PgSqlHostWithOptionsExchange
          PgSqlOptionExchange  now functional
      
      src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc
          TEST_F(PgSqlHostDataSourceTest, addDuplicate4)
          TEST_F(PgSqlHostDataSourceTest, formattedOptionsReservations4)
          - Enabled and passing.
      3c01633e
  2. 22 Jun, 2016 1 commit
    • Thomas Markwalder's avatar
      [4277] Insert and fetch IPv4 Hosts plus tests work (without options) · 8047f978
      Thomas Markwalder authored
      src/lib/dhcpsrv/host_data_source_factory.cc
          HostDataSourceFactory::create() - now instantiates PgSqlHostDataSource
      
      src/lib/dhcpsrv/pgsql_host_data_source.cc
          Enabled basic IPv4 host statements and methods
      
      src/lib/dhcpsrv/tests
          New file: pgsql_host_data_source_unittest.cc
      
      src/lib/dhcpsrv/tests/Makefile.am
          Added pgsql_host_data_source_unittest.cc
      8047f978
  3. 21 Jun, 2016 1 commit
    • Thomas Markwalder's avatar
      [4277] Bare bones implementation of PgSqlHostDataSource · 33428957
      Thomas Markwalder authored
      src/lib/dhcpsrv
          pgsql_host_data_source.c
          pgsql_host_data_source.h  - new files, preliminary implementation
      
      src/lib/dhcpsrv/Makefile.am
          Added new files pgsql_host_data_source.cc, pgsql_host_data_source.h
      
      src/lib/dhcpsrv/dhcpsrv_messages.mes
          Added log messages DHCPSRV_PGSQL_HOST_DB_GET_VERSION, DHCPSRV_PGSQL_START_TRANSACTION
      
      src/lib/dhcpsrv/pgsql_connection.cc
      src/lib/dhcpsrv/pgsql_connection.h
          Added PgSqlTransaction
          Added PgSqlConnection::startTransaction()
      
      src/lib/dhcpsrv/pgsql_exchange.cc
      src/lib/dhcpsrv/pgsql_exchange.h
          PsqlBindArray
          - Added storage of conversion strings used for bound values
          - Added add() variants for uint8_t, IOAddress, uint8_t buffer
          - Added templated variant for miscellaneous types
      
          PgSqlExchange
          - Removed getColumnValue variants for various integers, replaced
          with templated version for miscellaneous types
      
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
          Added todo comment to remember to account for hwaddr columns added to lease6
      
      src/lib/dhcpsrv/tests/pgsql_exchange_unittest.cc
          TEST(PsqlBindArray, basicOperation) - new test to exercise bind functions
      33428957
  4. 16 Jun, 2016 1 commit
  5. 15 Jun, 2016 2 commits
  6. 14 Jun, 2016 1 commit
    • Thomas Markwalder's avatar
      [4275] Brought Postgresql schema up to MySQL 4.1 content · 67e12a02
      Thomas Markwalder authored
      Postresql schema now supports host reservations with options,
      and lease6 table now includes hardware address and source
      
      src/share/database/scripts/pgsql/dhcpdb_create.pgsql
          Added Schema 3.0 upgrade section:
          - new tables: hosts, dhcp4_options, dhcp6_options,
            ipv6_reservations, lease_hwaddr_source
      
          - lease4Dumpdata() - results now sorted by lease address
      
          - lease6 table - added columns hwaddr, hwtype, hwaddr_source
      
          - lease6DumpHeader() - added labels for new columns
          - lease6DumpData() - added new columns, results now sorted by
            lease address
      
          - schema_vesion - bumped version to 3
      
      src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
          Added drops of new tables
      
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
          - PgSqlLeaseMgr::PgSqlLeaseMgr() - added logic to detect schema
          mismatch between the code and configured database
      
      src/lib/dhcpsrv/pgsql_lease_mgr.h
          - Bumped PG_CURRENT_VERSION from 2 to 3
      
      src/bin/admin/tests/data/pgsql.lease6_dump_test.reference.csv
          - Reordered entries to account for dump function sort order
          - Added values for new columns on lease6 table
      
      src/bin/admin/tests/pgsql_tests.sh.in
          - pgsql_lease_version_test() - changed expected version to 3.0
          - pgsql_lease6_dump_test() - added new column values to inserted rows
      67e12a02
  7. 13 Jun, 2016 2 commits
  8. 10 Jun, 2016 2 commits
  9. 09 Jun, 2016 3 commits
  10. 08 Jun, 2016 6 commits
  11. 06 Jun, 2016 8 commits
  12. 04 Jun, 2016 1 commit
  13. 03 Jun, 2016 3 commits
  14. 01 Jun, 2016 4 commits
  15. 30 May, 2016 1 commit
  16. 27 May, 2016 1 commit
    • Shawn Routhier's avatar
      [trac4480] Update per review comments · cf62ec17
      Shawn Routhier authored
      Create a LogContentTest class and move the functions to manipulate
      a test to check on the log output there.  This will make it available
      for other tests in the future.  As part of this bundle a bit more
      work into the class to minimze the calls in the test routines.
      
      Where reasonable remove extra copys of the values being pushed
      onto the stack - instead of generating a copy just for the logging
      simply use the value from the top of the stack directly.
      
      Swtich to using single quotes around text values.
      
      Added some more description in the classify document
      cf62ec17
  17. 25 May, 2016 1 commit