diff options
author | Andrei Pavel <andrei@isc.org> | 2024-03-22 13:25:14 +0100 |
---|---|---|
committer | Andrei Pavel <andrei@isc.org> | 2024-04-24 14:23:48 +0200 |
commit | a764025dfd8daf4f4e626c631a8594565bf9f820 (patch) | |
tree | ac210b3491ee5c0dd153082b5b0b4ecde63dc9ce | |
parent | [#3254] show premium source in config report (diff) | |
download | kea-a764025dfd8daf4f4e626c631a8594565bf9f820.tar.xz kea-a764025dfd8daf4f4e626c631a8594565bf9f820.zip |
[#3254] show premium source in extended version
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | kea_version.h.in | 1 | ||||
-rw-r--r-- | src/bin/dhcp4/dhcp4_srv.cc | 13 | ||||
-rw-r--r-- | src/bin/dhcp6/dhcp6_srv.cc | 13 | ||||
-rw-r--r-- | src/bin/lfc/lfc_controller.cc | 8 | ||||
-rw-r--r-- | src/lib/process/d_controller.cc | 3 |
6 files changed, 24 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index 7f90906791..c7ad92d8c9 100644 --- a/configure.ac +++ b/configure.ac @@ -147,6 +147,9 @@ AC_SUBST(PREMIUM_DIR) AC_SUBST(DISTCHECK_PREMIUM_CONFIGURE_FLAG) AX_PREMIUM +# Export PREMIUM to kea_version.h. +AC_SUBST(PREMIUM) + # Include contrib configuration # (currently only a provision copied from premium support) CONTRIB_DIR= diff --git a/kea_version.h.in b/kea_version.h.in index c0857f56cb..cb86e32187 100644 --- a/kea_version.h.in +++ b/kea_version.h.in @@ -1,2 +1,3 @@ #define EXTENDED_VERSION "@KEA_SRCID@" +#define PREMIUM_EXTENDED_VERSION "@PREMIUM@" #define PACKAGE_VERSION_TYPE "@PACKAGE_VERSION_TYPE@" diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index be0e78c532..f504f4cbfc 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -4833,17 +4833,18 @@ Dhcpv4Srv::getVersion(bool extended) { tmp << VERSION; if (extended) { tmp << endl << EXTENDED_VERSION << endl; + tmp << "premium: " << PREMIUM_EXTENDED_VERSION << endl; tmp << "linked with:" << endl; - tmp << Logger::getVersion() << endl; - tmp << CryptoLink::getVersion() << endl; - tmp << "database:" << endl; + tmp << "- " << Logger::getVersion() << endl; + tmp << "- " << CryptoLink::getVersion() << endl; + tmp << "backends:" << endl; #ifdef HAVE_MYSQL - tmp << MySqlLeaseMgr::getDBVersion() << endl; + tmp << "- " << MySqlLeaseMgr::getDBVersion() << endl; #endif #ifdef HAVE_PGSQL - tmp << PgSqlLeaseMgr::getDBVersion() << endl; + tmp << "- " << PgSqlLeaseMgr::getDBVersion() << endl; #endif - tmp << Memfile_LeaseMgr::getDBVersion(Memfile_LeaseMgr::V4); + tmp << "- " << Memfile_LeaseMgr::getDBVersion(Memfile_LeaseMgr::V4); // @todo: more details about database runtime } diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 49fe1a1865..bef647b151 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -4654,17 +4654,18 @@ Dhcpv6Srv::getVersion(bool extended) { tmp << VERSION; if (extended) { tmp << endl << EXTENDED_VERSION << endl; + tmp << "premium: " << PREMIUM_EXTENDED_VERSION << endl; tmp << "linked with:" << endl; - tmp << Logger::getVersion() << endl; - tmp << CryptoLink::getVersion() << endl; - tmp << "database:" << endl; + tmp << "- " << Logger::getVersion() << endl; + tmp << "- " << CryptoLink::getVersion() << endl; + tmp << "backends:" << endl; #ifdef HAVE_MYSQL - tmp << MySqlLeaseMgr::getDBVersion() << endl; + tmp << "- " << MySqlLeaseMgr::getDBVersion() << endl; #endif #ifdef HAVE_PGSQL - tmp << PgSqlLeaseMgr::getDBVersion() << endl; + tmp << "- " << PgSqlLeaseMgr::getDBVersion() << endl; #endif - tmp << Memfile_LeaseMgr::getDBVersion(Memfile_LeaseMgr::V6); + tmp << "- " << Memfile_LeaseMgr::getDBVersion(Memfile_LeaseMgr::V6); // @todo: more details about database runtime } diff --git a/src/bin/lfc/lfc_controller.cc b/src/bin/lfc/lfc_controller.cc index 1327e50e67..d73e8baec4 100644 --- a/src/bin/lfc/lfc_controller.cc +++ b/src/bin/lfc/lfc_controller.cc @@ -328,12 +328,12 @@ LFCController::getVersion(const bool extended) const{ } else if (protocol_version_ == 6) { db_version = Memfile_LeaseMgr::getDBVersion(Memfile_LeaseMgr::V6); } + + version_stream << std::endl << EXTENDED_VERSION; if (!db_version.empty()) { - db_version = "database: " + db_version; + db_version = "backend: " + db_version; + version_stream << std::endl << db_version; } - version_stream << std::endl - << EXTENDED_VERSION << std::endl - << db_version; } return (version_stream.str()); diff --git a/src/lib/process/d_controller.cc b/src/lib/process/d_controller.cc index 023b58103a..0bfc353f9d 100644 --- a/src/lib/process/d_controller.cc +++ b/src/lib/process/d_controller.cc @@ -864,8 +864,9 @@ DControllerBase::getVersion(bool extended) { tmp << VERSION; if (extended) { tmp << std::endl << EXTENDED_VERSION << std::endl; + tmp << "premium: " << PREMIUM_EXTENDED_VERSION << std::endl; tmp << "linked with:" << std::endl; - tmp << isc::log::Logger::getVersion() << std::endl; + tmp << "- " << isc::log::Logger::getVersion() << std::endl; tmp << getVersionAddendum(); } |