mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 14:05:33 +00:00
[github70] Changes after review:
- comments added - line wraps tweaked a bit
This commit is contained in:
@@ -1621,9 +1621,9 @@ if test "$CQL_CPPFLAGS" != "" ; then
|
||||
cat >> config.report << END
|
||||
|
||||
Cassandra CQL:
|
||||
CQL_VERSION: ${CQL_VERSION}
|
||||
CQL_CPPFLAGS: ${CQL_CPPFLAGS}
|
||||
CQL_LIBS: ${CQL_LIBS}
|
||||
CQL_VERSION: ${CQL_VERSION}
|
||||
CQL_CPPFLAGS: ${CQL_CPPFLAGS}
|
||||
CQL_LIBS: ${CQL_LIBS}
|
||||
END
|
||||
else
|
||||
cat >> config.report << END
|
||||
|
@@ -1339,7 +1339,7 @@ public:
|
||||
/// See @ref CqlHostDataSource::add() for parameter details.
|
||||
///
|
||||
/// @param host host to be added or deleted
|
||||
/// @param insert insert or delete the host
|
||||
/// @param insert insert (true) or delete (false) the host
|
||||
virtual bool insertOrDelete(const HostPtr& host, bool insert);
|
||||
|
||||
/// @brief Implementation of @ref CqlHostDataSource::get4()
|
||||
@@ -1974,7 +1974,8 @@ CqlHostDataSourceImpl::insertOrDeleteHostWithOptions(bool insert,
|
||||
}
|
||||
option_found = true;
|
||||
/// @todo: Assign actual value to subnet id.
|
||||
result = insertOrDeleteHost(insert, host, OptionalValue<SubnetID>(), reservation, space, option);
|
||||
result = insertOrDeleteHost(insert, host, OptionalValue<SubnetID>(), reservation,
|
||||
space, option);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2082,17 +2083,14 @@ CqlHostDataSourceImpl::insertOrDeleteHost(bool insert,
|
||||
|
||||
try {
|
||||
if (insert) {
|
||||
host_exchange->createBindForMutation(
|
||||
host, subnet_id, reservation, option_space, option_descriptor,
|
||||
CqlHostExchange::INSERT_HOST, assigned_values);
|
||||
host_exchange->createBindForMutation(host, subnet_id, reservation, option_space,
|
||||
option_descriptor, CqlHostExchange::INSERT_HOST, assigned_values);
|
||||
|
||||
|
||||
host_exchange->executeMutation(dbconn_, assigned_values, CqlHostExchange::INSERT_HOST);
|
||||
} else {
|
||||
host_exchange->createBindForDelete(
|
||||
host, subnet_id, reservation, option_space, option_descriptor,
|
||||
CqlHostExchange::DELETE_HOST, assigned_values);
|
||||
|
||||
host_exchange->createBindForDelete(host, subnet_id, reservation, option_space,
|
||||
option_descriptor, CqlHostExchange::DELETE_HOST, assigned_values);
|
||||
|
||||
host_exchange->executeMutation(dbconn_, assigned_values, CqlHostExchange::DELETE_HOST);
|
||||
}
|
||||
@@ -2155,8 +2153,8 @@ CqlHostDataSource::del(const SubnetID& subnet_id, const asiolink::IOAddress& add
|
||||
bool
|
||||
CqlHostDataSource::del4(const SubnetID& subnet_id, const Host::IdentifierType& identifier_type,
|
||||
const uint8_t* identifier_begin, const size_t identifier_len) {
|
||||
HostPtr host = boost::const_pointer_cast<Host>(impl_->get4(
|
||||
subnet_id, identifier_type, identifier_begin, identifier_len));
|
||||
HostPtr host = boost::const_pointer_cast<Host>(impl_->get4(subnet_id, identifier_type,
|
||||
identifier_begin, identifier_len));
|
||||
|
||||
return (impl_->insertOrDelete(host, false));
|
||||
}
|
||||
@@ -2164,8 +2162,8 @@ CqlHostDataSource::del4(const SubnetID& subnet_id, const Host::IdentifierType& i
|
||||
bool
|
||||
CqlHostDataSource::del6(const SubnetID& subnet_id, const Host::IdentifierType& identifier_type,
|
||||
const uint8_t* identifier_begin, const size_t identifier_len) {
|
||||
HostPtr host = boost::const_pointer_cast<Host>(impl_->get6(
|
||||
subnet_id, identifier_type, identifier_begin, identifier_len));
|
||||
HostPtr host = boost::const_pointer_cast<Host>(impl_->get6(subnet_id, identifier_type,
|
||||
identifier_begin, identifier_len));
|
||||
|
||||
return (impl_->insertOrDelete(host, false));
|
||||
}
|
||||
|
@@ -314,7 +314,9 @@ public:
|
||||
|
||||
/// @brief Returns a collection of all the hosts.
|
||||
///
|
||||
/// This method may return multiple @ref Host objects.
|
||||
/// This method may return multiple @ref Host objects. It is only used in
|
||||
/// testing. It may be very slow when running on a production server with
|
||||
/// lots of hosts.
|
||||
///
|
||||
/// @return Collection of const @ref Host objects.
|
||||
virtual ConstHostCollection
|
||||
|
@@ -281,6 +281,7 @@ TEST(CqlConnection, checkTimeConversion) {
|
||||
}
|
||||
|
||||
// This test verifies that database backend can operate in Read-Only mode.
|
||||
// We currently don't test Cassandra in read-only mode.
|
||||
TEST_F(CqlHostDataSourceTest, DISABLED_testReadOnlyDatabase) {
|
||||
testReadOnlyDatabase(CQL_VALID_TYPE);
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2012-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
// Copyright (C) 2016-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
// Copyright (C) 2015-2017 Deutsche Telekom AG.
|
||||
//
|
||||
// Authors: Razvan Becheriu <razvan.becheriu@qualitance.com>
|
||||
|
@@ -442,12 +442,12 @@ TEST_F(PgSqlLeaseMgrTest, nullDuid) {
|
||||
testNullDuid();
|
||||
}
|
||||
|
||||
/// @brief Tests whether memfile can store and retrieve hardware addresses
|
||||
/// @brief Tests whether Postgres can store and retrieve hardware addresses
|
||||
TEST_F(PgSqlLeaseMgrTest, testLease6Mac) {
|
||||
testLease6MAC();
|
||||
}
|
||||
|
||||
/// @brief Tests whether memfile can store and retrieve hardware addresses
|
||||
/// @brief Tests whether Postgres can store and retrieve hardware addresses
|
||||
TEST_F(PgSqlLeaseMgrTest, testLease6HWTypeAndSource) {
|
||||
testLease6HWTypeAndSource();
|
||||
}
|
||||
|
Reference in New Issue
Block a user