]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2855] Documentation update
authorPiotrek Zadroga <piotrek@isc.org>
Wed, 31 May 2023 15:07:40 +0000 (17:07 +0200)
committerPiotrek Zadroga <piotrek@isc.org>
Wed, 31 May 2023 15:07:40 +0000 (17:07 +0200)
doc/sphinx/man/kea-admin.8.rst
src/bin/admin/tests/admin_tests.sh.in

index 9de0a0f00d94bb50be2dbf59a4b62d24d2149af9..ba2dd73c9f40e7758a61d4e3a2adc209d6eae8db 100644 (file)
@@ -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.
index 1f71b482f9835bb3bbf654163bc9d7e1479542b9..a5e3c9b1898c55938449d3a6454cdebd1bc00214 100644 (file)
@@ -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 ${?}