1. 14 Jul, 2016 2 commits
    • Thomas Markwalder's avatar
      [4277] Fixed tagged_statements name collision · cac472f5
      Thomas Markwalder authored
      Wrapped declaration of tagged_statements[] in pgsql_host_data_source.cc
      and mysql_host_data_source.cc in anonymous namespace.  They collide
      otherwise.
      cac472f5
    • Thomas Markwalder's avatar
      [4277] Addressed bulk of review comments · 15b51b62
      Thomas Markwalder authored
      src/lib/dhcpsrv/tests/pgsql_exchange_unittest.cc
          - Added PgSqlBasicsTest test fixture class and tests which exercise all of
          the PostgreSQL data types we currently use with round-trip database writes
          and reads
      
      src/lib/dhcpsrv/pgsql_connection.cc
      src/lib/dhcpsrv/pgsql_connection.h
          - Moved PgSqlResult function impls from .h
          - Added exception safe implementation of getColumnLabel() to PgSqlResult
      
      src/lib/dhcpsrv/pgsql_exchange.cc
      src/lib/dhcpsrv/pgsql_exchange.h
          - PsqlBindArray::add() variants which accept raw pointers now throw
          if the pointer is NULL
          - PgSqlExchange::getColumnLabel() is now a wrapper around PgSqlResult method
      
      src/lib/dhcpsrv/pgsql_host_data_source.h
      src/lib/dhcpsrv/pgsql_host_data_source.cc
           - Commentary clean up
      
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
           - Commentary clean up
      15b51b62
  2. 27 Jun, 2016 1 commit
  3. 24 Jun, 2016 3 commits
    • Thomas Markwalder's avatar
      [4277] Rollback test passes · 3c221983
      Thomas Markwalder authored
      tests/pgsql_host_data_source_unittest.cc
          TEST_F(PgSqlHostDataSourceTest, testAddRollback) now
          functions and passes
      3c221983
    • 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
  4. 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
  5. 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
  6. 01 Jun, 2016 1 commit
  7. 30 May, 2016 1 commit
  8. 25 May, 2016 3 commits
  9. 17 May, 2016 2 commits
  10. 16 May, 2016 1 commit
  11. 13 May, 2016 1 commit
  12. 12 May, 2016 1 commit
  13. 10 May, 2016 1 commit
  14. 05 Apr, 2016 1 commit
  15. 04 Apr, 2016 1 commit
  16. 01 Apr, 2016 1 commit
  17. 31 Mar, 2016 2 commits
  18. 24 Mar, 2016 2 commits
  19. 23 Mar, 2016 1 commit
  20. 22 Mar, 2016 1 commit
  21. 09 Mar, 2016 1 commit
  22. 08 Mar, 2016 1 commit
  23. 02 Mar, 2016 1 commit
  24. 01 Mar, 2016 2 commits
  25. 08 Feb, 2016 1 commit
  26. 27 Jan, 2016 1 commit
  27. 23 Dec, 2015 1 commit
    • Jiri Popelka's avatar
      Use unsigned long for dhcp_identifier_length · 8548d1b5
      Jiri Popelka authored
      fixes:
      mysql_host_data_source.cc:236:33: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
                       bind_[1].length = &dhcp_identifier_length_;
                                       ^
      mysql_host_data_source.cc:243:33: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
                       bind_[1].length = &dhcp_identifier_length_;
                                       ^
      mysql_host_data_source.cc:344:25: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
               bind_[1].length = &dhcp_identifier_length_;
      8548d1b5
  28. 16 Dec, 2015 1 commit
  29. 09 Dec, 2015 1 commit
  30. 04 Dec, 2015 1 commit
  31. 03 Dec, 2015 1 commit