2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[#1196] Renamed new command

This commit is contained in:
Francis Dupont
2020-07-09 12:51:13 +02:00
parent 0d5c4cc41e
commit 00e4a569f2
6 changed files with 13 additions and 9 deletions

View File

@@ -1,3 +1,7 @@
1771. [func] fdupont
Added a stats-recount command to kea-admin tool, which recounts
cached statistics in MySQL and PostgreSQL lease databases.
1770. [func] fdupont
Added kea-admin lease-stat-recount command which recounts cached
statistics in MySQL and PostgreSQL lease databases.

View File

@@ -50,7 +50,7 @@ Arguments
to be used as a diagnostic tool, so it provides a portable,
human-readable form of the lease data.
**lease-stat-recount**
**stats-recount**
Recounts lease statistics for MySQL or PostgreSQL database.
``backend``

View File

@@ -60,7 +60,7 @@ usage() {
printf " - for checking databaseB version when preparing for an upgrade.\n"
printf " - db-upgrade: Upgrades your database scheme\n"
printf " - lease-dump: Dumps current leases to a CSV file\n"
printf " - lease-stat-recount: Recounts lease statistics\n"
printf " - stats-recount: Recounts lease statistics\n"
printf "\n"
printf "BACKEND - one of the supported backends: memfile|mysql|pgsql|cql\n"
printf "\n"
@@ -681,7 +681,7 @@ if test "${command}" = "-v" || test "${command}" = "--version" ; then
exit 0
fi
is_in_list "${command}" "db-init db-version db-upgrade lease-dump lease-stat-recount"
is_in_list "${command}" "db-init db-version db-upgrade lease-dump stats-recount"
if [ ${_inlist} -eq 0 ]; then
log_error "invalid command: ${command}"
usage
@@ -860,7 +860,7 @@ case ${command} in
;;
esac
;;
lease-stat-recount)
stats-recount)
case ${backend} in
memfile)
log_info "memfile does not keep lease statistics"

View File

@@ -54,7 +54,7 @@ OPTIONS
meant to be used as a diagnostic tool, so it provides a portable,
human-readable form of the lease data.
lease-stat-recount
stats-recount
Recounts lease statistics for MySQL or PostgreSQL database.
``backend``

View File

@@ -1194,10 +1194,10 @@ mysql_lease_stat_recount_test() {
run_statement "change v6 stats" "$qry"
# Recount all statistics from scratch.
${keaadmin} lease-stat-recount mysql -u $db_user -p $db_password -n $db_name
${keaadmin} stats-recount mysql -u $db_user -p $db_password -n $db_name
ERRCODE=$?
assert_eq 0 $ERRCODE "kea-admin lease-stat-recount mysql returned non-zero status code %d, expected %d"
assert_eq 0 $ERRCODE "kea-admin stats-recount mysql returned non-zero status code %d, expected %d"
#
# First we'll verify lease4_stats are correct after recount.

View File

@@ -835,10 +835,10 @@ pgsql_lease_stat_recount_test() {
run_statement "change v6 stats" "$qry"
# Recount all statistics from scratch.
${keaadmin} lease-stat-recount pgsql -u $db_user -p $db_password -n $db_name
${keaadmin} stats-recount pgsql -u $db_user -p $db_password -n $db_name
ERRCODE=$?
assert_eq 0 $ERRCODE "kea-admin lease-stat-recount pgsql returned non-zero status code %d, expected %d"
assert_eq 0 $ERRCODE "kea-admin stats-recount pgsql returned non-zero status code %d, expected %d"
#
# First we'll verify lease4_stats are correct after recount.