1. 07 Nov, 2018 1 commit
  2. 31 Dec, 2017 1 commit
  3. 28 Apr, 2017 1 commit
  4. 31 Mar, 2017 1 commit
    • Marvin Frick's avatar
      adds support for databse hosts · cee9882a
      Marvin Frick authored
      The `-h` parameter can now be used to specify a database host to use
      instead of implicitely localhost.
      
      Conflicts in rebase to current master:
      	src/bin/admin/admin-utils.sh
      	src/bin/admin/kea-admin.in
      cee9882a
  5. 11 Jan, 2017 2 commits
    • Andrei Pavel's avatar
      Added mysql_execute_script · e4d6c5f5
      Andrei Pavel authored
      Doxygen documentation
      other minor changes
      e4d6c5f5
    • Andrei Pavel's avatar
      Cassandra Host Data Source stress test · 6efa71b9
      Andrei Pavel authored
      It is part of the generic_host_data_source_unittest.cc, able to be
      implemented for other HDS as well. It executes INSERT statements and
      a certain SELECT statement which Cassandra struggles in performance
      with since it has to do two queries instead of a join. All statement
      executions are timed and repeated on an increasingly number of hosts.
      It is placed last and DISABLED_ as you don't want to run this during
      a usual make check.
      6efa71b9
  6. 23 Dec, 2016 1 commit
  7. 14 Dec, 2016 1 commit
    • Andrei Pavel's avatar
      Cassandra update · 50fd7903
      Andrei Pavel authored
      Replaced unrecommended backticks with $() in cql_version() in bash scripts.
      
      *_execute() and *_execute_script() functions from src/bin/admin/admin-utils.sh now pass the parameters to the underlying backend binary whenever they are given rather than when there are 2 or more.
      
      Corrected cql_version() return error in src/bin/admin/admin-utils.sh.
      
      Removed redundant "USE" from cql_init() in src/bin/admin/kea-admin.in.
      
      Inserted a newline in src/bin/admin/tests/Makefile.am to separate unrelated targets.
      
      Style changes in cql_*_test() functions in src/bin/admin/tests/cql_tests.sh.in.
      
      src/bin/admin/tests/dhcpdb_create_1.0.cql:
          "perfromance" typo
          Added comment headers
          Added index on expire since it is used in WHERE clauses (further performance testing may be required)
          Removed dhcp4_options and dhcp6_options table since they are not required for Cassandra
      
      Added DROP INDEX in src/share/database/scripts/cql/dhcpdb_drop.cql.
      
      Added sql_common.h
      Added cql_exchange.h and cql_exchange.cc which mediate communication with Cassandra.
      Added cql_lease_mgr.h and cql_lease_mgr.cc
      
      Parameterized reconnect-wait-time, connect-timeout, request-timeout, tcp-keepalive, tcp-nodelay for Cassandra in kea.conf. Changes are in src/lib/dhcpsrv/cql_connection.cc and src/lib/dhcpsrv/parsers/dbaccess_parser.cc.
      
      Reformated x != NULL into !x as specified in the Kea style guidelines
      
      src/lib/dhcpsrv/cql_connection.cc:
          Added range check for port
          Added CqlConnection:setConsistency
          Added CqlConnection::startTransaction  which is a noop
          Added CqlTransaction method implementations.
          Corrected ending brace of namespace declaration, it doesn't need semicolon.
      
      src/lib/dhcpsrv/cql_connection.h:
          Added explicit on CqlConnection constructor. Unlikely that this class will ever be derived, but it's good practice.
          Changed some comments.
          Added CqlTransaction class definition.
      
      src/lib/dhcpsrv/cql_lease_mgr.cc:
          Formatted the entire code.
          Changed data types to cass_ types.
      
      Added some log messages.
      
      Moved structs, enums and typedefs from src/lib/dhcpsrv/lease_mgr.h to src/lib/dhcpsrv/sql_common.h
      
      Added some missing tests in src/lib/dhcpsrv/tests/cql_lease_mgr_unittest.cc
      50fd7903
  8. 15 Sep, 2016 1 commit
  9. 28 Aug, 2016 1 commit
  10. 23 Jun, 2016 5 commits
  11. 16 Dec, 2015 1 commit
  12. 15 Jun, 2015 2 commits
  13. 12 Jun, 2015 1 commit
    • 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
  14. 10 Jun, 2015 1 commit
    • Thomas Markwalder's avatar
      [3802] Addressed review comments · 19221f4a
      Thomas Markwalder authored
      Primarily, SQL text for lease-dump now comes from a file and the use of
      PIPESTATUS has been eliminated:
      
      src/bin/admin/admin-utils.sh
      
          mysql_execute() - altered the function to not catch the mysql output in
          in an environment variable.  This removes the risk of large result sets
          crashing the shell and allows callers more flexibility.
      
          mysql_version() - now returns exit value of its call to mysql_execute.
      
          mysql_version_printf() - deleted this function.
      
      src/bin/admin/kea-admin.in
      
          Removed the use of $_RESULT env variable formerly set by mysql_execute
      
          Replaced use of mysql_version_printf with appropriately structured
          calls to mysql_version
      
          Check_file_overwrite () - utility function for prompting the user that
          a given file will be overwritten
      
          get_dump_qry()  - new function which fetches the lease dump  SQL text
          specific to a given backend, version, and protocol from a file
      
          mysql_dump()
              - Updated to use get_dump_qry() to fetch the needed SQL
              - Restructured to use a temp file rather than pipe to eliminate
              use of PIPESTATUS
      
          pgsql_dump()
              Updated to get_dump_qry() to fetch the needed SQL
              Removed use of PIPESTATUS (didn't need it anyway)
      
      src/bin/admin/scripts/mysql/upgrade_1.0_to_2.0.sh.in
          Updated calls to mysql_version
      
      Added the following files which contain lease-dump SQL text:
          src/bin/admin/scripts/mysql/lease_dump_1.0.sh
          src/bin/admin/scripts/mysql/lease_dump_2.0.sh
          src/bin/admin/scripts/pgsql/lease_dump_1.0.sh
      19221f4a
  15. 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
  16. 26 May, 2015 1 commit
    • Thomas Markwalder's avatar
      [trac3802] Added unit tests for mysql lease_dump · c2ca51d9
      Thomas Markwalder authored
      src/bin/admin/admin-utils.sh
          modified mysql_execute to return mysql's exit status
      
      src/bin/admin/tests/mysql_tests.sh.in
          added new tests: mysql_lease4_dump_test and mysql_lease4_dump_test
      
      Added two data files used by the new tests for checking lease dump correctness:
          src/bin/admin/tests/data/mysql.lease4_dump_test.reference.csv
          src/bin/admin/tests/data/mysql.lease6_dump_test.reference.csv
      
      NOTE that lease-dump for Postgresql has been implemented but lacks unit tests.
      The unit tests will be completed once admin-utils.sh and kea-admin fully
      support Postgres see #3883 and #3884.
      c2ca51d9
  17. 08 Dec, 2014 1 commit
    • Marcin Siodelski's avatar
      [3599] Fixed issues with the kea-admin script portability. · 8502a73c
      Marcin Siodelski authored
      The following issues causing failures on the FreeBSD were corrected:
      - Don't use sed to replace tabulations from the returned kea version.
      Instead the CONCAT mysql function is used.
      - Replace &>dev/null with the >/dev/null 2>&1
      
      Additional changes:
      - Added a new line before printing existing tables in the mysql.
      - Added .gitignore for new files.
      8502a73c
  18. 05 Dec, 2014 1 commit
    • Tomek Mrugalski's avatar
      [3599] Changes after review · 35357a30
      Tomek Mrugalski authored
       - mysql/upgrade_1.0_to_2.0.sh renamed to .in
       - header added to admin-utils.sh, revoked exec bit
       - kea-admin clarified (db => lease db)
       - kea-admin manpage corrected
       - lease6_hwaddr_source renamed to lease_hwaddr_source
       - mysql_tests are now working without installation
      35357a30
  19. 05 Nov, 2014 2 commits