Commit 162742b4 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

renamed dscsql to cql

parent 11aedc9c
......@@ -995,57 +995,57 @@ fi
# ... and at the shell level, so Makefile.am can take action depending on this.
AM_CONDITIONAL(HAVE_PGSQL, test "$PG_CONFIG" != "")
dsc_config="no"
AC_ARG_WITH([dhcp-dscsql],
AC_HELP_STRING([--with-dhcp-dscsql=PATH],
[path to the DataStaxCassandraSQL 'dsc_config' script]),
[dsc_config="$withval"])
if test "${dsc_config}" = "yes" ; then
DSC_CONFIG="/usr/bin/dsc_config"
elif test "${dsc_config}" != "no" ; then
DSC_CONFIG="${withval}"
cql_config="no"
AC_ARG_WITH([cql],
AC_HELP_STRING([--with-cql=PATH],
[path to the Cassandra CQL 'cql_config' script]),
[cql_config="$withval"])
if test "${cql_config}" = "yes" ; then
cql_config="/usr/bin/cql_config"
elif test "${cql_config}" != "no" ; then
CQL_CONFIG="${withval}"
fi
if test "$DSC_CONFIG" != "" ; then
if test -d "$DSC_CONFIG" -o ! -x "$DSC_CONFIG" ; then
AC_MSG_ERROR([--with-dhcp-dscsql should point to a dsc_config program])
if test "$CQL_CONFIG" != "" ; then
if test -d "$CQL_CONFIG" -o ! -x "$CQL_CONFIG" ; then
AC_MSG_ERROR([--with-cql should point to a cql_config program])
fi
DSCSQL_CPPFLAGS=`$DSC_CONFIG --cppflags`
DSCSQL_INCLUDEDIR=`$DSC_CONFIG --includedir`
DSCSQL_CPPFLAGS="$DSCSQL_CPPFLAGS -I$DSCSQL_INCLUDEDIR"
DSCSQL_LIBS=`$DSC_CONFIG --libdir`
DSCSQL_LIBS="-L$DSCSQL_LIBS -lcassandra_static -luv"
DSCSQL_VERSION=`$DSC_CONFIG --version`
CQL_CPPFLAGS=`$CQL_CONFIG --cppflags`
CQL_INCLUDEDIR=`$CQL_CONFIG --includedir`
CQL_CPPFLAGS="$CQL_CPPFLAGS -I$CQL_INCLUDEDIR"
CQL_LIBS=`$CQL_CONFIG --libdir`
CQL_LIBS="-L$CQL_LIBS -lcassandra_static -luv"
CQL_VERSION=`$CQL_CONFIG --version`
AC_SUBST(DSCSQL_CPPFLAGS)
AC_SUBST(DSCSQL_LIBS)
AC_SUBST(CQL_CPPFLAGS)
AC_SUBST(CQL_LIBS)
# Check that a simple program using DSCSQL functions can compile and link.
# Check that a simple program using CQL functions can compile and link.
CPPFLAGS_SAVED="$CPPFLAGS"
LIBS_SAVED="$LIBS"
CPPFLAGS="$DSCSQL_CPPFLAGS $CPPFLAGS"
LIBS="$DSCSQL_LIBS $LIBS"
CPPFLAGS="$CQL_CPPFLAGS $CPPFLAGS"
LIBS="$CQL_LIBS $LIBS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <cassandra.h>],
[CassCluster* cluster = cass_cluster_new();
cass_cluster_free(cluster);])],
[AC_MSG_RESULT([checking for DataStax Cassandra SQL headers and library... yes])],
[AC_MSG_RESULT([checking for DataStax Cassandra SQL headers and library... no])
AC_MSG_ERROR([Needs DataStax Cassandra SQL library])]
[AC_MSG_RESULT([checking for Cassandra CQL headers and library... yes])],
[AC_MSG_RESULT([checking for Cassandra CQL headers and library... no])
AC_MSG_ERROR([Needs Cassandra CQL library])]
)
CPPFLAGS=$CPPFLAGS_SAVED
LIBS=$LIBS_SAVED
# Note that DSCSQL is present in the config.h file
AC_DEFINE([HAVE_DSCSQL], [1], [DSCSQL is present])
# Note that CQL is present in the config.h file
AC_DEFINE([HAVE_CQL], [1], [CQL is present])
fi
# ... and at the shell level, so Makefile.am can take action depending on this.
AM_CONDITIONAL(HAVE_DSCSQL, test "$DSC_CONFIG" != "")
AM_CONDITIONAL(HAVE_CQL, test "$CQL_CONFIG" != "")
# Check for log4cplus
log4cplus_path="yes"
......@@ -1461,7 +1461,7 @@ AC_CONFIG_FILES([compatcheck/Makefile
src/bin/admin/tests/memfile_tests.sh
src/bin/admin/tests/mysql_tests.sh
src/bin/admin/tests/pgsql_tests.sh
src/bin/admin/tests/dscsql_tests.sh
src/bin/admin/tests/cql_tests.sh
src/hooks/Makefile
src/hooks/dhcp/Makefile
src/hooks/dhcp/user_chk/Makefile
......@@ -1539,7 +1539,7 @@ AC_CONFIG_FILES([compatcheck/Makefile
src/share/database/scripts/pgsql/Makefile
src/share/database/scripts/pgsql/upgrade_1.0_to_2.0.sh
src/share/database/scripts/pgsql/upgrade_2.0_to_3.0.sh
src/share/database/scripts/dscsql/Makefile
src/share/database/scripts/cql/Makefile
tools/Makefile
tools/path_replacer.sh
])
......@@ -1673,18 +1673,18 @@ PostgreSQL:
END
fi
if test "$DSCSQL_CPPFLAGS" != "" ; then
if test "$CQL_CPPFLAGS" != "" ; then
cat >> config.report << END
DataStax Cassandra SQL:
DSCSQL_VERSION: ${DSCSQL_VERSION}
DSCSQL_CPPFLAGS: ${DSCSQL_CPPFLAGS}
DSCSQL_LIBS: ${DSCSQL_LIBS}
Cassandra CQL:
CQL_VERSION: ${CQL_VERSION}
CQL_CPPFLAGS: ${CQL_CPPFLAGS}
CQL_LIBS: ${CQL_LIBS}
END
else
cat >> config.report << END
DataStax Cassandra SQL:
Cassandra CQL:
no
END
fi
......
......@@ -87,7 +87,7 @@ pgsql_version() {
return $?
}
dscsql_execute() {
cql_execute() {
QUERY=$1
shift
if [ $# -gt 1 ]; then
......@@ -101,8 +101,8 @@ dscsql_execute() {
return $retcode
}
dscsql_version() {
version=`dscsql_execute "SELECT version, minor FROM schema_version" "$@"`
cql_version() {
version=`cql_execute "SELECT version, minor FROM schema_version" "$@"`
version=`echo "$version" | grep -A 1 "+" | grep -v "+" | tr -d ' ' | cut -d "|" -f 1-2 --output-delimiter="."`
echo $version
return $?
......
......@@ -55,7 +55,7 @@ usage() {
printf " - lease-upgrade: Upgrades your lease database scheme\n"
printf " - lease-dump: Dump current leases to a CSV file\n"
printf "\n"
printf "BACKEND - one of the supported backends: memfile|mysql|pgsql|dscsql\n"
printf "BACKEND - one of the supported backends: memfile|mysql|pgsql|cql\n"
printf "\n"
printf "PARAMETERS: Parameters are optional in general, but may be required\n"
printf " for specific operation.\n"
......@@ -200,12 +200,12 @@ pgsql_init() {
exit 0
}
dscsql_init() {
cql_init() {
printf "Checking if there is a database initialized already. Please ignore errors.\n"
# Let's try to count the number of tables. Anything above 0 means that there
# is some database in place. If there is anything, we abort. Note that
# dsc sql may spit out connection or access errors to stderr, we ignore those.
# cql may spit out connection or access errors to stderr, we ignore those.
# We should not hide them as they may give hints to user what is wrong with
# his setup.
#
......@@ -213,7 +213,7 @@ dscsql_init() {
ERRCODE=$?
if [ $ERRCODE -ne 0 ]
then
log_error "dscsql_init table query failed, cqlsh status = $ERRCODE"
log_error "cql_init table query failed, cqlsh status = $ERRCODE"
exit 1
fi
......@@ -225,16 +225,16 @@ dscsql_init() {
exit 1
fi
printf "Initializing database using script %s\n" $scripts_dir/dscsql/dhcpdb_create.cql
printf "Initializing database using script %s\n" $scripts_dir/cql/dhcpdb_create.cql
cqlsh -u $db_user -p $db_password -e "CREATE KEYSPACE $db_name WITH replication = {'class' : 'SimpleStrategy','replication_factor' : 1};"
cqlsh -u $db_user -p $db_password -k $db_name -f $scripts_dir/dscsql/dhcpdb_create.cql
cqlsh -u $db_user -p $db_password -k $db_name -f $scripts_dir/cql/dhcpdb_create.cql
ERRCODE=$?
printf "cqlsh returned status code $ERRCODE\n"
if [ "$ERRCODE" -eq 0 ]; then
printf "Lease DB version reported after initialization: "
dscsql_version
cql_version
printf "\n"
fi
......@@ -323,30 +323,30 @@ pgsql_upgrade() {
exit 0
}
dscsql_upgrade() {
version=`dscsql_version`
cql_upgrade() {
version=`cql_version`
printf "Lease DB version reported before upgrade: $version\n"
# Check if the scripts directory exists at all.
if [ ! -d ${scripts_dir}/dscsql ]; then
log_error "Invalid scripts directory: ${scripts_dir}/dscsql"
if [ ! -d ${scripts_dir}/cql ]; then
log_error "Invalid scripts directory: ${scripts_dir}/cql"
exit 1
fi
# Check if there are any files in it
num_files=$(find ${scripts_dir}/dscsql/upgrade*.sh -type f | wc -l)
num_files=$(find ${scripts_dir}/cql/upgrade*.sh -type f | wc -l)
if [ $num_files -eq 0 ]; then
log_error "No scripts in ${scripts_dir}/dscsql or the directory is not readable or does not have any upgrade* scripts."
log_error "No scripts in ${scripts_dir}/cql or the directory is not readable or does not have any upgrade* scripts."
exit 1
fi
for script in ${scripts_dir}/dscsql/upgrade*.sh
for script in ${scripts_dir}/cql/upgrade*.sh
do
echo "Processing $script file..."
sh ${script} -u ${db_user} -p ${db_password} -k ${db_name}
done
version=`dscsql_version`
version=`cql_version`
printf "Lease DB version reported after upgrade: $version\n"
exit 0
}
......@@ -384,7 +384,7 @@ get_dump_query() {
pgsql)
invoke="select * from"
;;
dscsql)
cql)
invoke="select * from"
;;
*)
......@@ -491,14 +491,14 @@ pgsql_dump() {
exit 0
}
dscsql_dump() {
cql_dump() {
# get the correct dump query
version=`dscsql_version`
version=`cql_version`
retcode=$?
if [ $retcode -ne 0 ]
then
log_error "lease-dump: dscsql_version failed, exit code $retcode"
log_error "lease-dump: cql_version failed, exit code $retcode"
exit 1;
fi
......@@ -526,10 +526,10 @@ dscsql_dump() {
# 'tr' to translate tabs to commas. We do not use MySQL's output
# to file as that requires linux superuser privileges to execute
# the select.
dscsql_execute "${dump_qry}" > $tmp_file
cql_execute "${dump_qry}" > $tmp_file
retcode=$?
if [ $retcode -ne 0 ]; then
log_error "lease-dump: dscsql_execute failed, exit code $retcode";
log_error "lease-dump: cql_execute failed, exit code $retcode";
exit 1
fi
......@@ -569,7 +569,7 @@ if [ -z ${backend} ]; then
usage
exit 1
fi
is_in_list "${backend}" "memfile mysql pgsql dscsql"
is_in_list "${backend}" "memfile mysql pgsql cql"
if [ ${_inlist} -eq 0 ]; then
log_error "invalid backend: ${backend}"
exit 1
......@@ -669,8 +669,8 @@ case ${command} in
pgsql)
pgsql_init
;;
dscsql)
dscsql_init
cql)
cql_init
;;
esac
;;
......@@ -686,8 +686,8 @@ case ${command} in
pgsql)
pgsql_version
;;
dscsql)
dscsql_version
cql)
cql_version
;;
esac
;;
......@@ -702,8 +702,8 @@ case ${command} in
pgsql)
pgsql_upgrade
;;
dscsql)
dscsql_upgrade
cql)
cql_upgrade
;;
esac
;;
......@@ -718,8 +718,8 @@ case ${command} in
pgsql)
pgsql_dump
;;
dscsql)
dscsql_dump
cql)
cql_dump
;;
esac
;;
......
......@@ -10,8 +10,8 @@ if HAVE_PGSQL
SHTESTS += pgsql_tests.sh
endif
if HAVE_DSCSQL
SHTESTS += dscsql_tests.sh
if HAVE_CQL
SHTESTS += cql_tests.sh
endif
noinst_SCRIPTS = $(SHTESTS)
......@@ -20,7 +20,7 @@ EXTRA_DIST += dhcpdb_create_1.0.pgsql
EXTRA_DIST += dhcpdb_create_1.0.cql
CLEANFILES = *.log
DISTCLEANFILES = memfile_tests.sh mysql_tests.sh pgsql_tests.sh dscsql_tests.sh
DISTCLEANFILES = memfile_tests.sh mysql_tests.sh pgsql_tests.sh cql_tests.sh
# Execute all test scripts.
check-local:
......
#!/bin/sh
# Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Include common test library.
. /home/andrei/work/git/isc-kea-integration/kea/src/lib/testutils/dhcp_test_lib.sh
cql_init_test() {
test_start "cql.init"
# @todo: Implement this
test_finish 0
}
cql_version_test() {
test_start "cql.version"
# @todo: Implement this
test_finish 0
}
cql_upgrade_test() {
test_start "cql.upgrade"
# @todo: Implement this
test_finish 0
}
cql_init_test
cql_version_test
cql_upgrade_test
......@@ -9,30 +9,30 @@
# Include common test library.
. @abs_top_builddir@/src/lib/testutils/dhcp_test_lib.sh
dscsql_init_test() {
test_start "dscsql.init"
cql_init_test() {
test_start "cql.init"
# @todo: Implement this
test_finish 0
}
dscsql_version_test() {
test_start "dscsql.version"
cql_version_test() {
test_start "cql.version"
# @todo: Implement this
test_finish 0
}
dscsql_upgrade_test() {
test_start "dscsql.upgrade"
cql_upgrade_test() {
test_start "cql.upgrade"
# @todo: Implement this
test_finish 0
}
dscsql_init_test
dscsql_version_test
dscsql_upgrade_test
cql_init_test
cql_version_test
cql_upgrade_test
......@@ -2,5 +2,5 @@ EXTRA_DIST = mysql.lease4_dump_test.reference.csv \
mysql.lease6_dump_test.reference.csv \
pgsql.lease4_dump_test.reference.csv \
pgsql.lease6_dump_test.reference.csv \
dscsql.lease4_dump_test.reference.csv \
dscsql.lease6_dump_test.reference.csv
cql.lease4_dump_test.reference.csv \
cql.lease6_dump_test.reference.csv
......@@ -14,24 +14,24 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- This is the Kea schema 1.0 specification for DataStax Cassandra SQL.
-- This is the Kea schema 1.0 specification for Cassandra CQL.
-- Note: this is outdated version on purpose and it used to test upgrade
-- process. Do not update this file to 2.0 or any later.
-- The schema is reasonably portable (with the exception of the engine
-- specification, which is Datastax Cassandra SQL-specific). Minor changes might be needed for
-- specification, which is Cassandra CQL-specific). Minor changes might be needed for
-- other databases.
-- To create the schema, either type the command:
-- cqlsh -u <user> -p <password> -k <database> -f dhcpdb_create.cql
-- ... at the command prompt, or log in to the DSC SQL database and at the "cqlsh>"
-- ... at the command prompt, or log in to the CQL database and at the "cqlsh>"
-- prompt, issue the command:
-- SOURCE dhcpdb_create.cql
-- This script is also called from kea-admin, see kea-admin init dscsql
-- This script is also called from kea-admin, see kea-admin init cql
-- Over time, Kea database schema will evolve. Each version is marked with
-- major.minor version. This file is organized sequentially, i.e. database
......
......@@ -9,8 +9,8 @@ endif
if HAVE_PGSQL
AM_CPPFLAGS += $(PGSQL_CPPFLAGS)
endif
if HAVE_DSCSQL
AM_CPPFLAGS += $(DSCSQL_CPPFLAGS)
if HAVE_CQL
AM_CPPFLAGS += $(CQL_CPPFLAGS)
endif
AM_CXXFLAGS = $(KEA_CXXFLAGS)
......@@ -122,8 +122,8 @@ endif
if HAVE_PGSQL
kea_dhcp_ddns_LDFLAGS += $(PGSQL_LIBS)
endif
if HAVE_DSCSQL
kea_dhcp_ddns_LDFLAGS += $(DSCSQL_LIBS)
if HAVE_CQL
kea_dhcp_ddns_LDFLAGS += $(CQL_LIBS)
endif
kea_dhcp_ddnsdir = $(pkgdatadir)
......
......@@ -21,8 +21,8 @@
#ifdef HAVE_PGSQL
#include <dhcpsrv/pgsql_lease_mgr.h>
#endif
#ifdef HAVE_DSCSQL
#include <dhcpsrv/dscsql_lease_mgr.h>
#ifdef HAVE_CQL
#include <dhcpsrv/cql_lease_mgr.h>
#endif
#include <dhcpsrv/memfile_lease_mgr.h>
......@@ -488,8 +488,8 @@ DControllerBase::getVersion(bool extended) {
#ifdef HAVE_PGSQL
tmp << isc::dhcp::PgSqlLeaseMgr::getDBVersion() << std::endl;
#endif
#ifdef HAVE_DSCSQL
tmp << isc::dhcp::DSCSqlLeaseMgr::getDBVersion() << std::endl;
#ifdef HAVE_CQL
tmp << isc::dhcp::CqlLeaseMgr::getDBVersion() << std::endl;
#endif
tmp << isc::dhcp::Memfile_LeaseMgr::getDBVersion();
......
......@@ -75,8 +75,8 @@ endif
if HAVE_PGSQL
d2_unittests_LDFLAGS += $(PGSQL_LIBS)
endif
if HAVE_DSCSQL
d2_unittests_LDFLAGS += $(DSCSQL_LIBS)
if HAVE_CQL
d2_unittests_LDFLAGS += $(CQL_LIBS)
endif
d2_unittests_LDFLAGS += $(GTEST_LDFLAGS)
......
......@@ -10,8 +10,8 @@ endif
if HAVE_PGSQL
AM_CPPFLAGS += $(PGSQL_CPPFLAGS)
endif
if HAVE_DSCSQL
AM_CPPFLAGS += $(DSCSQL_CPPFLAGS)
if HAVE_CQL
AM_CPPFLAGS += $(CQL_CPPFLAGS)
endif
AM_CXXFLAGS = $(KEA_CXXFLAGS)
......@@ -102,8 +102,8 @@ endif
if HAVE_PGSQL
kea_dhcp4_LDFLAGS += $(PGSQL_LIBS)
endif
if HAVE_DSCSQL
kea_dhcp4_LDFLAGS += $(DSCSQL_LIBS)
if HAVE_CQL
kea_dhcp4_LDFLAGS += $(CQL_LIBS)
endif
kea_dhcp4dir = $(pkgdatadir)
......
......@@ -49,8 +49,8 @@
#ifdef HAVE_PGSQL
#include <dhcpsrv/pgsql_lease_mgr.h>
#endif
#ifdef HAVE_DSCSQL
#include <dhcpsrv/dscsql_lease_mgr.h>
#ifdef HAVE_CQL
#include <dhcpsrv/cql_lease_mgr.h>
#endif
#include <dhcpsrv/memfile_lease_mgr.h>
......@@ -2538,8 +2538,8 @@ Dhcpv4Srv::getVersion(bool extended) {
#ifdef HAVE_PGSQL
tmp << PgSqlLeaseMgr::getDBVersion() << endl;
#endif
#ifdef HAVE_DSCSQL
tmp << DSCSqlLeaseMgr::getDBVersion() << endl;
#ifdef HAVE_CQL
tmp << CqlLeaseMgr::getDBVersion() << endl;
#endif
tmp << Memfile_LeaseMgr::getDBVersion();
......
......@@ -106,8 +106,8 @@ endif
if HAVE_PGSQL
dhcp4_unittests_LDFLAGS += $(PGSQL_LIBS)
endif
if HAVE_DSCSQL
dhcp4_unittests_LDFLAGS += $(DSCSQL_LIBS)
if HAVE_CQL
dhcp4_unittests_LDFLAGS += $(CQL_LIBS)
endif
dhcp4_unittests_LDFLAGS += $(GTEST_LDFLAGS)
......
......@@ -10,8 +10,8 @@ endif
if HAVE_PGSQL
AM_CPPFLAGS += $(PGSQL_CPPFLAGS)
endif
if HAVE_DSCSQL
AM_CPPFLAGS += $(DSCSQL_CPPFLAGS)
if HAVE_CQL
AM_CPPFLAGS += $(CQL_CPPFLAGS)
endif
AM_CXXFLAGS = $(KEA_CXXFLAGS)
......@@ -103,8 +103,8 @@ endif
if HAVE_PGSQL
kea_dhcp6_LDFLAGS += $(PGSQL_LIBS)
endif
if HAVE_DSCSQL
kea_dhcp6_LDFLAGS += $(DSCSQL_LIBS)
if HAVE_CQL
kea_dhcp6_LDFLAGS += $(CQL_LIBS)
endif
kea_dhcp6dir = $(pkgdatadir)
......
......@@ -58,8 +58,8 @@
#ifdef HAVE_PGSQL
#include <dhcpsrv/pgsql_lease_mgr.h>
#endif
#ifdef HAVE_DSCSQL
#include <dhcpsrv/dscsql_lease_mgr.h>
#ifdef HAVE_CQL
#include <dhcpsrv/cql_lease_mgr.h>
#endif
#include <dhcpsrv/memfile_lease_mgr.h>
......@@ -2986,8 +2986,8 @@ Dhcpv6Srv::getVersion(bool extended) {
#ifdef HAVE_PGSQL
tmp << PgSqlLeaseMgr::getDBVersion() << endl;
#endif
#ifdef HAVE_DSCSQL
tmp << DSCSqlLeaseMgr::getDBVersion() << endl;
#ifdef HAVE_CQL
tmp << CqlLeaseMgr::getDBVersion() << endl;
#endif
tmp << Memfile_LeaseMgr::getDBVersion();
......
......@@ -107,8 +107,8 @@ endif
if HAVE_PGSQL
dhcp6_unittests_LDFLAGS += $(PGSQL_LIBS)
endif
if HAVE_DSCSQL
dhcp6_unittests_LDFLAGS += $(DSCSQL_LIBS)
if HAVE_CQL
dhcp6_unittests_LDFLAGS += $(CQL_LIBS)
endif
dhcp6_unittests_LDFLAGS += $(GTEST_LDFLAGS)
......
......@@ -83,8 +83,8 @@ endif
if HAVE_PGSQL
kea_lfc_LDFLAGS += $(PGSQL_LIBS)
endif
if HAVE_DSCSQL
kea_lfc_LDFLAGS += $(DSCSQL_LIBS)
if HAVE_CQL
kea_lfc_LDFLAGS += $(CQL_LIBS)
endif
kea_lfcdir = $(pkgdatadir)
......@@ -52,8 +52,8 @@ endif
if HAVE_PGSQL
lfc_unittests_LDFLAGS += $(PGSQL_LIBS)
endif
if HAVE_DSCSQL
lfc_unittests_LDFLAGS += $(DSCSQL_LIBS)
if HAVE_CQL
lfc_unittests_LDFLAGS += $(CQL_LIBS)
endif
lfc_unittests_LDFLAGS += $(GTEST_LDFLAGS)
......
......@@ -16,8 +16,8 @@ endif
if HAVE_PGSQL
AM_CPPFLAGS += $(PGSQL_CPPFLAGS)
endif
if HAVE_DSCSQL
AM_CPPFLAGS += $(DSCSQL_CPPFLAGS)
if HAVE_CQL
AM_CPPFLAGS += $(CQL_CPPFLAGS)
endif
AM_CXXFLAGS = $(KEA_CXXFLAGS)
......@@ -141,9 +141,9 @@ libkea_dhcpsrv_la_SOURCES += pgsql_connection.cc pgsql_connection.h
libkea_dhcpsrv_la_SOURCES += pgsql_exchange.cc pgsql_exchange.h
libkea_dhcpsrv_la_SOURCES += pgsql_lease_mgr.cc pgsql_lease_mgr.h
endif
if HAVE_DSCSQL
libkea_dhcpsrv_la_SOURCES += dscsql_lease_mgr.cc dscsql_lease_mgr.h
libkea_dhcpsrv_la_SOURCES += dscsql_connection.cc dscsql_connection.h
if HAVE_CQL
libkea_dhcpsrv_la_SOURCES += cql_lease_mgr.cc cql_lease_mgr.h
libkea_dhcpsrv_la_SOURCES += cql_connection.cc cql_connection.h
endif
libkea_dhcpsrv_la_SOURCES += pool.cc pool.h
libkea_dhcpsrv_la_SOURCES += srv_config.cc srv_config.h
......@@ -204,8 +204,8 @@ endif
if HAVE_PGSQL
libkea_dhcpsrv_la_LDFLAGS += $(PGSQL_LIBS)
endif
if HAVE_DSCSQL
libkea_dhcpsrv_la_LDFLAGS += $(DSCSQL_LIBS)
if HAVE_CQL
libkea_dhcpsrv_la_LDFLAGS += $(CQL_LIBS)
endif
if USE_CLANGPP
......
......@@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <dhcpsrv/dscsql_connection.h>
#include <dhcpsrv/cql_connection.h>
#include <string>
using namespace std;
......@@ -22,11 +22,11 @@ using namespace std;
namespace isc {
namespace dhcp {
DSCSqlConnection::DSCSqlConnection(const ParameterMap& parameters) : DatabaseConnection(parameters),
CqlConnection::CqlConnection(const ParameterMap& parameters) : DatabaseConnection(parameters),
cluster_(NULL), session_(NULL), tagged_statements_(NULL) {
}
DSCSqlConnection::~DSCSqlConnection() {
CqlConnection::~CqlConnection() {
CassError rc;
for (int i = 0; i < statements_.size(); i++)
{
......@@ -51,7 +51,7 @@ DSCSqlConnection::~DSCSqlConnection() {
}
void
DSCSqlConnection::openDatabase() {
CqlConnection::openDatabase() {
CassError rc;
// Set up the values of the parameters
const char* contact_points = "127.0.0.1";
......@@ -135,7 +135,7 @@ DSCSqlConnection::openDatabase() {
}
void
DSCSqlConnection::prepareStatements(DSCSqlTaggedStatement *statements) {
CqlConnection::prepareStatements(CqlTaggedStatement *statements) {
CassError rc = CASS_OK;
CassFuture* future = NULL;
uint32_t size = 0;
......@@ -163,7 +163,7 @@ DSCSqlConnection::prepareStatements(DSCSqlTaggedStatement *statements) {