1. 08 Jul, 2019 2 commits
  2. 02 Jul, 2019 3 commits
  3. 05 Sep, 2018 1 commit
  4. 24 Aug, 2018 1 commit
    • Thomas Markwalder's avatar
      [#15,!11] Schema upgrades for Kea 1.5, now update subnet ids in existing host reservations · 8d04ad0a
      Thomas Markwalder authored
      src/bin/admin/tests/pgsql_tests.sh.in
      src/bin/admin/tests/cql_tests.sh.in
      src/bin/admin/tests/mysql_tests.sh.in
          Added functions that verify subnet id values are updated
      
      src/share/database/scripts/cql/upgrade_2.0_to_3.0.sh.in
      src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in
      src/share/database/scripts/pgsql/upgrade_4.0_to_5.0.sh.in
          Added logic to update subnet id values in existing reservations
          and options
      8d04ad0a
  5. 23 Jul, 2018 1 commit
  6. 07 Jul, 2018 1 commit
  7. 21 Jun, 2018 1 commit
  8. 11 May, 2018 1 commit
  9. 09 May, 2018 1 commit
    • Thomas Markwalder's avatar
      [5587] PostgreSQL support for shared lease stats implementation · b0bea19c
      Thomas Markwalder authored
      src/share/database/scripts/pgsql/dhcpdb_create.pgsql
          Adds lease<4/6>_stat tables and triggers
      src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
          Added drops for lease<4/6>_stat tables and triggers
      
      src/share/database/scripts/pgsql/upgrade_3.3_to_4.0.sh.in
          Adds lease<4/6>_stat tables and triggers
          Populates stat tables from existing lease table content
      src/bin/admin/tests/mysql_tests.sh.in
          mysql_lease6_stat_per_type() - fixed typo in test
      
      src/bin/admin/tests/pgsql_tests.sh.in
          run_statement() - new convenience fucntion for
          running statement with option expected outcome
      
          pgsql_upgrade_schema_to_version() - new function
          which converts the existing schema to a target version
      
          pgsql_lease4_stat_test() - tests v4 stat table and
          triggers in an new database
      
          pgsql_lease6_stat_test() - tests v6 stat table and
          triggers in an new database.
      
          pgsql_lease6_stat_per_type() - helper function which
          tests v6 stat table and triggers using a given address
          and lease type
      
          pgsql_lease_stat_upgrade_test() - tests data migration,
          stat table and trigger operations on an upgraded database
      
      src/lib/dhcpsrv/pgsql_lease_mgr.*
          Added new SQL statements for lease stats queries
      
          PgSqlLeaseStatsQuery
              Constructors - added variants to support where clause params
              start() - modified to support query variants based
              on where clause params
      
          PgSqlLeaseMgr
              Added start variants:
              - startSubnetLeaseStatsQuery4(const SubnetID& subnet_id)
              - startSubnetRangeLeaseStatsQuery4(const SubnetID& first_subnet_id,
                                               const SubnetID& last_subnet_id)
      
      src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
          New unit tests:
          - TEST_F(PgSqlLeaseMgrTest, leaseStatsQuery4)
          - TEST_F(PgSqlLeaseMgrTest, leaseStatsQuery6)
      b0bea19c
  10. 17 Dec, 2017 1 commit
  11. 07 Nov, 2017 1 commit
  12. 23 Jul, 2017 3 commits
  13. 14 Apr, 2017 1 commit
  14. 04 Apr, 2017 1 commit
  15. 14 Dec, 2016 1 commit
  16. 26 Aug, 2016 1 commit
  17. 23 Jun, 2016 1 commit
  18. 21 Jun, 2016 1 commit
    • Thomas Markwalder's avatar
      [4275] Addressed review comments · 0433e62c
      Thomas Markwalder authored
      bin/admin/tests/pgsql_tests.sh.in
          Typos
      share/database/scripts/pgsql/.gitignore
          Added upgrade_2.0_to_3.0.sh
      
      share/database/scripts/pgsql/dhcpdb_create.pgsql
          Added entry for client_id to hosts_identifier
          Added commentrary for dhcp_option_scope
          Added periods to the ends of sentences.
      0433e62c
  19. 15 Jun, 2016 1 commit
    • Thomas Markwalder's avatar
      [4275] Postgresql schema 3.0 now matches MySql schema 4.2 · a7db3554
      Thomas Markwalder authored
      Added 4.1 to 4.2 updates from MySQL and created upgrade
      script for 2.0 to 3.0
      
      src/share/database/scripts/pgsql/dhcpdb_create.pgsql
          - Enclosed the entire script in a single transaction
          - Removed DROP TABLE statements
          - Added host_identifier_type table and data
          - Added dhcp_option_scope table and data
          - Updated unqiue constraints for hosts table
          - Added scope_id and foreign key constraint to dhcp4_options table
          - Added scope_id and foreign key constraint to dhcp6_options table
          - Added unique contraint to ipv6_reservations table
          - Changed 'HWADDR_SOURCE_DOCSIS' to 'HWADDR_SOURCE_DOCSIS_CMTS'
          - Inserted row for 'HWADDR_SOURCE_UKNOWN'
      
      src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
          Added drops for host_identifier_type and  dhcp_option_scope
      
      src/share/database/scripts/pgsql/upgrade_2.0_to_3.0.sh.in
          New file for upgrading Postgresql from 2.0 to 3.0
      
      configure.ac
          Added src/share/database/scripts/pgsql/upgrade_2.0_to_3.0.sh
      
      src/bin/admin/tests/pgsql_tests.sh.in
          - pgsql_upgrade_1_0_to_2_0 - new function which contains all the checks used
          to verify 1.0 to 2.0 upgrade (extracted from pgsql_upgrade_test)
          - pgsql_upgrade_2_0_to_3_0 - new function which contains all the checks used
          to verify 2.0 to 3.0 upgrade
          - pgsql_upgrade_test() - modified use new upgrade check fucntions
      
      src/share/database/scripts/pgsql/Makefile.am
          Added entry for upgrade_2.0_to_3.0.sh
      a7db3554
  20. 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
  21. 12 Apr, 2016 1 commit
  22. 11 Apr, 2016 1 commit
    • Thomas Markwalder's avatar
      [4239] Added drop scripts for both MySQL and Postgresql · 5b978dab
      Thomas Markwalder authored
      Rather than use hard-coded lists or query logic for dropping the
      database all MySQL and Posgresql tests use new drop scripts
      added to src/bind/admin/scripts.
      
      src/bin/admin/scripts/mysql/dhcpdb_drop.mysql
          - New SQL script to drop a MySQL database
      
      src/bin/admin/scripts/pgsql/dhcpdb_drop.pgsql
          - New SQL script to drop a Postgresql database
      
      src/bin/admin/tests/mysql_tests.sh.in
          - mysql_wipe() - modified to use new drop script
      
      src/bin/admin/tests/pgsql_tests.sh.in
          - pgsql_wipe() modified to use new drop script
      
      src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
          - TEST(MySqlOpenTest, OpenDatabase) - added show_err=true
          to destroyMySQLSchema() calls
      
      src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
          - TEST(PgSqlOpenTest, OpenDatabase) - added show_err=true
          to destroyMySQLSchema() calls
      
      src/lib/dhcpsrv/testutils/mysql_schema.cc
          - destroyMySQLSchema(bool show_err) - modified to use the new
          drop script and accept show_err parameter
      
      src/lib/dhcpsrv/testutils/pgsql_schema.cc
          - destroyPgSQLSchema(bool show_err) - modified to use the new
          drop script and accept show_err parameter
      5b978dab
  23. 16 Dec, 2015 1 commit
  24. 21 Oct, 2015 1 commit
  25. 20 Oct, 2015 1 commit
    • Thomas Markwalder's avatar
      [3969] Added upgrade support from Postgres schema 1.0 to 2.0 · 49b0bac2
      Thomas Markwalder authored
      Upgrade adds state column to both lease tables, the state table,
      and the lease dump functions.
      
      src/bin/admin/scripts/pgsql/upgrade_1.0_to_2.0.sh -
          new script for upgrading postgres schema
      
      src/bin/admin/tests/dhcpdb_create_1.0.pgsql
          new sql script for creating 1.0 schema db
      
      configure.ac
          added entry for new upgrade script
      
      src/bin/admin/kea-admin.in
          pgsql_upgrade() - modified to set Postgres password env variable
          and pass in remaining args as psql expects them
      
      src/bin/admin/scripts/pgsql/Makefile.am
          added entry for new upgrade script
      
      src/bin/admin/tests/Makefile.am
          added entry for 1.0 schema script
      
      src/bin/admin/tests/pgsql_tests.sh.in
          pgsql_upgrade_test()  - revamped now that Postgres actually
          has its first upgrade script.
      49b0bac2
  26. 13 Oct, 2015 1 commit
  27. 29 Jun, 2015 1 commit
  28. 15 Jun, 2015 2 commits
  29. 12 Jun, 2015 2 commits
    • Thomas Markwalder's avatar
      [3884] Added unit tests for PostgreSQL lease-dump · 0a9e9d29
      Thomas Markwalder authored
      src/bin/admin/tests/mysql_tests.sh.in
          added missing assert_eq placeholders
      
      src/bin/admin/tests/pgsql_tests.sh.in
          pgsql_lease4_dump_test() - new function which tests dumping v4 leases
          pgsql_lease4_dump_test() - new function which tests dumping v6 leases
      
      Added the following test reference data files:
      src/bin/admin/tests/data/pgsql.lease4_dump_test.reference.csv
      src/bin/admin/tests/data/pgsql.lease6_dump_test.reference.csv
      0a9e9d29
    • Thomas Markwalder's avatar
      [3884] Clean up PostgreSQL admin functions · f34101ec
      Thomas Markwalder authored
      src/bin/admin/admin-utils.sh
          Revamped the PostgreSQL functions to mirror changes made to MySQL
          functions. Primarily, no longer capturing psql output in an environment
          variable.  This provides greater flexibility in the caller.
      f34101ec
  30. 09 Jun, 2015 1 commit
  31. 08 Jun, 2015 1 commit
  32. 28 May, 2015 1 commit
    • Thomas Markwalder's avatar
      [3883] Added support for PostgreSQL to kea-admin · 094d49f6
      Thomas Markwalder authored
      configure.ac
          - added src/bin/admin/tests/pgsql_tests.sh to list of config
          generated files (i.e AC_CONFIG_FILES)
      
      src/bin/admin/tests/pgsql_tests.sh.in
          - new file containing unit tests of for kea-admin PostgreSQL support
      
      src/bin/admin/tests/Makefile.am
          - added pgsql_tests.sh
      
      src/bin/admin/admin-utils.sh
          - added PosgreSQL support functions:
          pgsql_execute()
          pgsql_execute_script()
          pgsql_version()
          pgsql_version_print()
      
      src/bin/admin/kea-admin.in
          - implemented pgsql_init()
          - removed pgsql_version(), kea-admin uses function in
          admin-utils.sh directly
          - implemented pgsql_upgrade() - note that it fails with exit 1
          as there are not yet any upgrades available
      094d49f6