]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3536] move lease and host backends
authorRazvan Becheriu <razvan@isc.org>
Wed, 11 Sep 2024 15:14:09 +0000 (18:14 +0300)
committerRazvan Becheriu <razvan@isc.org>
Mon, 16 Sep 2024 13:31:01 +0000 (13:31 +0000)
31 files changed:
configure.ac
src/hooks/dhcp/mysql_hb/Makefile.am [new file with mode: 0644]
src/hooks/dhcp/mysql_hb/libloadtests/Makefile.am [new file with mode: 0644]
src/hooks/dhcp/mysql_hb/tests/Makefile.am [new file with mode: 0644]
src/hooks/dhcp/mysql_lb/Makefile.am [new file with mode: 0644]
src/hooks/dhcp/mysql_lb/libloadtests/Makefile.am [new file with mode: 0644]
src/hooks/dhcp/mysql_lb/tests/Makefile.am [new file with mode: 0644]
src/hooks/dhcp/pgsql_hb/Makefile.am [new file with mode: 0644]
src/hooks/dhcp/pgsql_hb/libloadtests/Makefile.am [new file with mode: 0644]
src/hooks/dhcp/pgsql_hb/tests/Makefile.am [new file with mode: 0644]
src/hooks/dhcp/pgsql_lb/Makefile.am [new file with mode: 0644]
src/hooks/dhcp/pgsql_lb/libloadtests/Makefile.am [new file with mode: 0644]
src/hooks/dhcp/pgsql_lb/tests/Makefile.am [new file with mode: 0644]
src/lib/Makefile.am
src/lib/dhcpsrv/Makefile.am
src/lib/mysql_host_backend/Makefile.am [new file with mode: 0644]
src/lib/mysql_host_backend/mysql_host_data_source.cc [moved from src/lib/dhcpsrv/mysql_host_data_source.cc with 100% similarity]
src/lib/mysql_host_backend/mysql_host_data_source.h [moved from src/lib/dhcpsrv/mysql_host_data_source.h with 100% similarity]
src/lib/mysql_host_backend/tests/Makefile.am [new file with mode: 0644]
src/lib/mysql_lease_backend/Makefile.am [new file with mode: 0644]
src/lib/mysql_lease_backend/mysql_lease_mgr.cc [moved from src/lib/dhcpsrv/mysql_lease_mgr.cc with 100% similarity]
src/lib/mysql_lease_backend/mysql_lease_mgr.h [moved from src/lib/dhcpsrv/mysql_lease_mgr.h with 100% similarity]
src/lib/mysql_lease_backend/tests/Makefile.am [new file with mode: 0644]
src/lib/pgsql_host_backend/Makefile.am [new file with mode: 0644]
src/lib/pgsql_host_backend/pgsql_host_data_source.cc [moved from src/lib/dhcpsrv/pgsql_host_data_source.cc with 100% similarity]
src/lib/pgsql_host_backend/pgsql_host_data_source.h [moved from src/lib/dhcpsrv/pgsql_host_data_source.h with 100% similarity]
src/lib/pgsql_host_backend/tests/Makefile.am [new file with mode: 0644]
src/lib/pgsql_lease_backend/Makefile.am [new file with mode: 0644]
src/lib/pgsql_lease_backend/pgsql_lease_mgr.cc [moved from src/lib/dhcpsrv/pgsql_lease_mgr.cc with 100% similarity]
src/lib/pgsql_lease_backend/pgsql_lease_mgr.h [moved from src/lib/dhcpsrv/pgsql_lease_mgr.h with 100% similarity]
src/lib/pgsql_lease_backend/tests/Makefile.am [new file with mode: 0644]

index b3b5031c3ca3636e08564cc711abda360b12e134..f4d84bf11c5871d572dbc8e84438d6d8f991238f 100644 (file)
@@ -1582,9 +1582,21 @@ AC_CONFIG_FILES([src/hooks/dhcp/high_availability/tests/Makefile])
 AC_CONFIG_FILES([src/hooks/dhcp/lease_cmds/Makefile])
 AC_CONFIG_FILES([src/hooks/dhcp/lease_cmds/libloadtests/Makefile])
 AC_CONFIG_FILES([src/hooks/dhcp/lease_cmds/tests/Makefile])
+AC_CONFIG_FILES([src/hooks/dhcp/mysql_lb/Makefile])
+AC_CONFIG_FILES([src/hooks/dhcp/mysql_lb/libloadtests/Makefile])
+AC_CONFIG_FILES([src/hooks/dhcp/mysql_lb/tests/Makefile])
+AC_CONFIG_FILES([src/hooks/dhcp/mysql_hb/Makefile])
+AC_CONFIG_FILES([src/hooks/dhcp/mysql_hb/libloadtests/Makefile])
+AC_CONFIG_FILES([src/hooks/dhcp/mysql_hb/tests/Makefile])
 AC_CONFIG_FILES([src/hooks/dhcp/mysql_cb/Makefile])
 AC_CONFIG_FILES([src/hooks/dhcp/mysql_cb/libloadtests/Makefile])
 AC_CONFIG_FILES([src/hooks/dhcp/mysql_cb/tests/Makefile])
+AC_CONFIG_FILES([src/hooks/dhcp/pgsql_lb/Makefile])
+AC_CONFIG_FILES([src/hooks/dhcp/pgsql_lb/libloadtests/Makefile])
+AC_CONFIG_FILES([src/hooks/dhcp/pgsql_lb/tests/Makefile])
+AC_CONFIG_FILES([src/hooks/dhcp/pgsql_hb/Makefile])
+AC_CONFIG_FILES([src/hooks/dhcp/pgsql_hb/libloadtests/Makefile])
+AC_CONFIG_FILES([src/hooks/dhcp/pgsql_hb/tests/Makefile])
 AC_CONFIG_FILES([src/hooks/dhcp/pgsql_cb/Makefile])
 AC_CONFIG_FILES([src/hooks/dhcp/pgsql_cb/libloadtests/Makefile])
 AC_CONFIG_FILES([src/hooks/dhcp/pgsql_cb/tests/Makefile])
@@ -1672,9 +1684,17 @@ AC_CONFIG_FILES([src/lib/log/tests/tempdir.h])
 AC_CONFIG_FILES([src/lib/mysql/Makefile])
 AC_CONFIG_FILES([src/lib/mysql/testutils/Makefile])
 AC_CONFIG_FILES([src/lib/mysql/tests/Makefile])
+AC_CONFIG_FILES([src/lib/mysql_lease_backend/Makefile])
+AC_CONFIG_FILES([src/lib/mysql_lease_backend/tests/Makefile])
+AC_CONFIG_FILES([src/lib/mysql_host_backend/Makefile])
+AC_CONFIG_FILES([src/lib/mysql_host_backend/tests/Makefile])
 AC_CONFIG_FILES([src/lib/pgsql/Makefile])
 AC_CONFIG_FILES([src/lib/pgsql/tests/Makefile])
 AC_CONFIG_FILES([src/lib/pgsql/testutils/Makefile])
+AC_CONFIG_FILES([src/lib/pgsql_lease_backend/Makefile])
+AC_CONFIG_FILES([src/lib/pgsql_lease_backend/tests/Makefile])
+AC_CONFIG_FILES([src/lib/pgsql_host_backend/Makefile])
+AC_CONFIG_FILES([src/lib/pgsql_host_backend/tests/Makefile])
 AC_CONFIG_FILES([src/lib/process/Makefile])
 AC_CONFIG_FILES([src/lib/process/cfgrpt/Makefile])
 AC_CONFIG_FILES([src/lib/process/cfgrpt/tests/Makefile])
diff --git a/src/hooks/dhcp/mysql_hb/Makefile.am b/src/hooks/dhcp/mysql_hb/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/hooks/dhcp/mysql_hb/libloadtests/Makefile.am b/src/hooks/dhcp/mysql_hb/libloadtests/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/hooks/dhcp/mysql_hb/tests/Makefile.am b/src/hooks/dhcp/mysql_hb/tests/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/hooks/dhcp/mysql_lb/Makefile.am b/src/hooks/dhcp/mysql_lb/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/hooks/dhcp/mysql_lb/libloadtests/Makefile.am b/src/hooks/dhcp/mysql_lb/libloadtests/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/hooks/dhcp/mysql_lb/tests/Makefile.am b/src/hooks/dhcp/mysql_lb/tests/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/hooks/dhcp/pgsql_hb/Makefile.am b/src/hooks/dhcp/pgsql_hb/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/hooks/dhcp/pgsql_hb/libloadtests/Makefile.am b/src/hooks/dhcp/pgsql_hb/libloadtests/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/hooks/dhcp/pgsql_hb/tests/Makefile.am b/src/hooks/dhcp/pgsql_hb/tests/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/hooks/dhcp/pgsql_lb/Makefile.am b/src/hooks/dhcp/pgsql_lb/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/hooks/dhcp/pgsql_lb/libloadtests/Makefile.am b/src/hooks/dhcp/pgsql_lb/libloadtests/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/hooks/dhcp/pgsql_lb/tests/Makefile.am b/src/hooks/dhcp/pgsql_lb/tests/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
index f69bf37d1840ddcf23a1a49706e80579395ec6ea..0f77fc48dac53fb49585ccffd7d55d4d8400ab8a 100644 (file)
@@ -22,3 +22,14 @@ SUBDIRS += yang
 endif
 
 SUBDIRS += asiodns dhcp_ddns eval process dhcpsrv d2srv
+
+if HAVE_MYSQL
+SUBDIRS += mysql_lease_backend
+SUBDIRS += mysql_host_backend
+endif
+
+if HAVE_PGSQL
+SUBDIRS += pgsql_lease_backend
+SUBDIRS += pgsql_host_backend
+endif
+
index e56ed12bced196b60390a0e2c3420a9f7130ec67..1c2f5d8e0332be083f81616de19dec94ccd41181 100644 (file)
@@ -128,21 +128,9 @@ libkea_dhcpsrv_la_SOURCES += lease_mgr_factory.cc lease_mgr_factory.h
 libkea_dhcpsrv_la_SOURCES += memfile_lease_limits.cc memfile_lease_limits.h
 libkea_dhcpsrv_la_SOURCES += memfile_lease_mgr.cc memfile_lease_mgr.h
 libkea_dhcpsrv_la_SOURCES += memfile_lease_storage.h
-
-if HAVE_MYSQL
-libkea_dhcpsrv_la_SOURCES += mysql_lease_mgr.cc mysql_lease_mgr.h
-libkea_dhcpsrv_la_SOURCES += mysql_host_data_source.cc mysql_host_data_source.h
-endif
-
 libkea_dhcpsrv_la_SOURCES += ncr_generator.cc ncr_generator.h
 libkea_dhcpsrv_la_SOURCES += network.cc network.h
 libkea_dhcpsrv_la_SOURCES += network_state.cc network_state.h
-
-if HAVE_PGSQL
-libkea_dhcpsrv_la_SOURCES += pgsql_host_data_source.cc pgsql_host_data_source.h
-libkea_dhcpsrv_la_SOURCES += pgsql_lease_mgr.cc pgsql_lease_mgr.h
-endif
-
 libkea_dhcpsrv_la_SOURCES += pool.cc pool.h
 libkea_dhcpsrv_la_SOURCES += random_allocation_state.cc random_allocation_state.h
 libkea_dhcpsrv_la_SOURCES += random_allocator.cc random_allocator.h
@@ -206,14 +194,6 @@ libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
 libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/http/libkea-http.la
 libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
 libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
-
-if HAVE_MYSQL
-libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/mysql/libkea-mysql.la
-endif
-if HAVE_PGSQL
-libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/pgsql/libkea-pgsql.la
-endif
-
 libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/database/libkea-database.la
 libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/cc/libkea-cc.la
 libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
@@ -226,12 +206,6 @@ libkea_dhcpsrv_la_LIBADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS) $(BOOST_LIBS)
 
 libkea_dhcpsrv_la_LDFLAGS  = -no-undefined -version-info 121:0:0
 libkea_dhcpsrv_la_LDFLAGS += $(CRYPTO_LDFLAGS)
-if HAVE_MYSQL
-libkea_dhcpsrv_la_LDFLAGS += $(MYSQL_LIBS)
-endif
-if HAVE_PGSQL
-libkea_dhcpsrv_la_LDFLAGS += $(PGSQL_LIBS)
-endif
 
 # The message file should be in the distribution
 EXTRA_DIST += alloc_engine_messages.mes
@@ -382,18 +356,6 @@ libkea_dhcpsrv_include_HEADERS = \
        utils.h \
        writable_host_data_source.h
 
-if HAVE_MYSQL
-libkea_dhcpsrv_include_HEADERS += \
-       mysql_host_data_source.h \
-       mysql_lease_mgr.h
-endif
-
-if HAVE_PGSQL
-libkea_dhcpsrv_include_HEADERS += \
-       pgsql_host_data_source.h \
-       pgsql_lease_mgr.h
-endif
-
 if ENABLE_AFL
 libkea_dhcpsrv_include_HEADERS += \
        fuzz.h \
diff --git a/src/lib/mysql_host_backend/Makefile.am b/src/lib/mysql_host_backend/Makefile.am
new file mode 100644 (file)
index 0000000..2469a38
--- /dev/null
@@ -0,0 +1,19 @@
+SUBDIRS = . tests
+
+AM_CXXFLAGS = $(KEA_CXXFLAGS)
+
+CLEANFILES = *.gcno *.gcda
+
+lib_LTLIBRARIES = libkea-mysql-host-backend.la
+
+libkea_mysql_host_backend_la_SOURCES = mysql_host_data_source.cc mysql_host_data_source.h
+
+libkea_mysql_host_backend_la_LIBADD = $(top_builddir)/src/lib/mysql/libkea-mysql.la
+
+libkea_mysql_host_backend_la_LDFLAGS = $(MYSQL_LIBS)
+
+# Specify the headers for copying into the installation directory tree.
+libkea_mysql_host_backend_includedir = $(pkgincludedir)/mysql_host_backend
+
+libkea_mysql_host_backend_include_HEADERS = \
+        mysql_host_data_source.h
diff --git a/src/lib/mysql_host_backend/tests/Makefile.am b/src/lib/mysql_host_backend/tests/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/lib/mysql_lease_backend/Makefile.am b/src/lib/mysql_lease_backend/Makefile.am
new file mode 100644 (file)
index 0000000..85d9412
--- /dev/null
@@ -0,0 +1,19 @@
+SUBDIRS = . tests
+
+AM_CXXFLAGS = $(KEA_CXXFLAGS)
+
+CLEANFILES = *.gcno *.gcda
+
+lib_LTLIBRARIES = libkea-mysql-lease-backend.la
+
+libkea_mysql_lease_backend_la_SOURCES = mysql_lease_mgr.cc mysql_lease_mgr.h
+
+libkea_mysql_lease_backend_la_LIBADD = $(top_builddir)/src/lib/mysql/libkea-mysql.la
+
+libkea_mysql_lease_backend_la_LDFLAGS = $(MYSQL_LIBS)
+
+# Specify the headers for copying into the installation directory tree.
+libkea_mysql_lease_backend_includedir = $(pkgincludedir)/mysql_lease_backend
+
+libkea_mysql_lease_backend_include_HEADERS = \
+        mysql_lease_mgr.h
diff --git a/src/lib/mysql_lease_backend/tests/Makefile.am b/src/lib/mysql_lease_backend/tests/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/lib/pgsql_host_backend/Makefile.am b/src/lib/pgsql_host_backend/Makefile.am
new file mode 100644 (file)
index 0000000..ac788ea
--- /dev/null
@@ -0,0 +1,19 @@
+SUBDIRS = . tests
+
+AM_CXXFLAGS = $(KEA_CXXFLAGS)
+
+CLEANFILES = *.gcno *.gcda
+
+lib_LTLIBRARIES = libkea-pgsql-host-backend.la
+
+libkea_pgsql_host_backend_la_SOURCES = pgsql_host_data_source.cc pgsql_host_data_source.h
+
+libkea_pgsql_host_backend_la_LIBADD = $(top_builddir)/src/lib/pgsql/libkea-pgsql.la
+
+libkea_pgsql_host_backend_la_LDFLAGS = $(PGSQL_LIBS)
+
+# Specify the headers for copying into the installation directory tree.
+libkea_pgsql_host_backend_includedir = $(pkgincludedir)/pgsql_host_backend
+
+libkea_pgsql_host_backend_include_HEADERS = \
+        pgsql_host_data_source.h
diff --git a/src/lib/pgsql_host_backend/tests/Makefile.am b/src/lib/pgsql_host_backend/tests/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/lib/pgsql_lease_backend/Makefile.am b/src/lib/pgsql_lease_backend/Makefile.am
new file mode 100644 (file)
index 0000000..87b33d9
--- /dev/null
@@ -0,0 +1,19 @@
+SUBDIRS = . tests
+
+AM_CXXFLAGS = $(KEA_CXXFLAGS)
+
+CLEANFILES = *.gcno *.gcda
+
+lib_LTLIBRARIES = libkea-pgsql-lease-backend.la
+
+libkea_pgsql_lease_backend_la_SOURCES = pgsql_lease_mgr.cc pgsql_lease_mgr.h
+
+libkea_pgsql_lease_backend_la_LIBADD = $(top_builddir)/src/lib/pgsql/libkea-pgsql.la
+
+libkea_pgsql_lease_backend_la_LDFLAGS = $(PGSQL_LIBS)
+
+# Specify the headers for copying into the installation directory tree.
+libkea_pgsql_lease_backend_includedir = $(pkgincludedir)/pgsql_lease_backend
+
+libkea_pgsql_lease_backend_include_HEADERS = \
+        pgsql_lease_mgr.h
diff --git a/src/lib/pgsql_lease_backend/tests/Makefile.am b/src/lib/pgsql_lease_backend/tests/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29