From: Piotrek Zadroga Date: Wed, 31 May 2023 15:07:40 +0000 (+0200) Subject: [#2855] Documentation update X-Git-Tag: Kea-2.4.0~211 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e4bea90c08500b9f0d1a690c8148e797bd2ae8b;p=thirdparty%2Fkea.git [#2855] Documentation update --- diff --git a/doc/sphinx/man/kea-admin.8.rst b/doc/sphinx/man/kea-admin.8.rst index 9de0a0f00d..ba2dd73c9f 100644 --- a/doc/sphinx/man/kea-admin.8.rst +++ b/doc/sphinx/man/kea-admin.8.rst @@ -55,11 +55,16 @@ Arguments The first line of the file contains the column names. This can be used as a way to switch from a database backend to a memfile backend. Alternatively, it can be used as a diagnostic tool, so it provides a - portable form of the lease data. + portable form of the lease data. There are other mandatory arguments + that must be used together with this command. Either ``-4`` or ``-6`` must + be specified. Also ``-o`` or ``--output`` must be provided. ``lease-upload`` Uploads leases from a CSV (comma-separated values) text file to a MySQL or a PostgreSQL lease database. The CSV file needs to be in memfile format. + There are other mandatory arguments that must be used together with this + command. Either ``-4`` or ``-6`` must be specified. + Also ``-i`` or ``--input`` must be provided. ``stats-recount`` Recounts lease statistics for a MySQL or PostgreSQL database. @@ -72,6 +77,10 @@ Arguments Specifies the hostname when connecting to a database. The default value is ``localhost``. +``-i|--input input_file`` + Specifies the CSV (comma-separated values) text file with leases to be uploaded. + Required for ``lease-upload``. + ``-P|--port port`` Specifies the port when connecting to a database. If not specified, the default value chosen by the database client is used. diff --git a/src/bin/admin/tests/admin_tests.sh.in b/src/bin/admin/tests/admin_tests.sh.in index 1f71b482f9..a5e3c9b189 100644 --- a/src/bin/admin/tests/admin_tests.sh.in +++ b/src/bin/admin/tests/admin_tests.sh.in @@ -86,16 +86,16 @@ kea_admin_error_reporting_tests() { assert_str_eq 'ERROR/kea-admin: -d or --directory requires a parameter' "$(printf '%s\n' "${OUTPUT}" | head -n 1)" test_finish ${?} - test_start 'kea_admin_error_reporting_test.lease_dump.mysql.i' + test_start 'kea_admin_error_reporting_test.lease_upload.mysql.i' run_command \ - "${kea_admin}" lease-dump mysql -i + "${kea_admin}" lease-upload mysql -i assert_eq 1 "${EXIT_CODE}" assert_str_eq 'ERROR/kea-admin: -i or --input requires a parameter' "$(printf '%s\n' "${OUTPUT}" | head -n 1)" test_finish ${?} - test_start 'kea_admin_error_reporting_test.lease_dump.mysql.input' + test_start 'kea_admin_error_reporting_test.lease_upload.mysql.input' run_command \ - "${kea_admin}" lease-dump mysql --input + "${kea_admin}" lease-upload mysql --input assert_eq 1 "${EXIT_CODE}" assert_str_eq 'ERROR/kea-admin: -i or --input requires a parameter' "$(printf '%s\n' "${OUTPUT}" | head -n 1)" test_finish ${?}