Skip to content

kea-admin lease-dump pgsql

Andrei Pavel requested to merge 2038-kea-admin-lease-dump-pgsql into master

Closes #2038 (closed).

  • 2321e4e2 [#2038 (closed)] kea-admin lease-dump pgsql outputs a memfile-ready CSV
  • 8bf45436 [#2038 (closed)] kea-admin lease-dump pgsql tests
    • Since *sql.*dump_test.reference.csv files need to be the same now i.e. in memfile format, I've fused MySQL and PostgreSQL versions into a single set of files.
    • Moved away from the SELECT timestampz method because it modified the reference CSV file and this is both inelegant and more difficult to do with the common CSV explained above.
  • 1b8d1df3 [#2038 (closed)] allow passing of extra parameters to sql_execute in while keeping credentials
    • In one test, --field-separator=',' is passed to pgsql_execute instead of manually transforming postgres's | separators into commas, so that the test is as close to what kea-admin does as possible. Passing extra parameters was not possible before because you would have to choose between passing no parameters or providing your own user and password. Since I did not have the user and password in the test file, I thought hardcoding keatest would be a hack so I did this change instead which allows you to pass any parameter to pgsql_execute while still keeping credentials. I then changed the MySQL functions for consistency. A quick search will show that there are no other uses of any *sql_execute* call with parameters so that's why I consider this change to be safe and in the spirit of dead code cleanup. It must have had historic use. If you do not feel comfortable with this change, we can very well revert it and do the separator change manually.
Edited by Andrei Pavel

Merge request reports