Commit 2716808a authored by Francis Dupont's avatar Francis Dupont
Browse files

[5532] Reported master build fixes

parent 9095ca3d
......@@ -143,7 +143,7 @@ public:
///
/// Specifies table columns.
/// @param connection specifies the connection to conduct this exchange on
CqlHostExchange(CqlConnection& connection);
CqlHostExchange();
/// @brief Virtual destructor.
virtual ~CqlHostExchange();
......@@ -272,9 +272,6 @@ private:
/// Pointer to Host object holding information being inserted into database.
HostPtr host_;
/// @brief Connection to the Cassandra database
CqlConnection& connection_;
/// @brief Primary key. Aggregates: host_identifier, host_identifier_type,
/// reserved_ipv6_prefix_address, reserved_ipv6_prefix_length, option_code,
/// option_space.
......@@ -602,9 +599,9 @@ StatementMap CqlHostExchange::tagged_statements_ = {
};
CqlHostExchange::CqlHostExchange(CqlConnection& connection)
: host_(NULL), connection_(connection), id_(0), host_identifier_type_(0),
host_ipv4_subnet_id_(0), host_ipv6_subnet_id_(0), host_ipv4_address_(0),
CqlHostExchange::CqlHostExchange()
: host_(NULL), id_(0), host_identifier_type_(0), host_ipv4_subnet_id_(0),
host_ipv6_subnet_id_(0), host_ipv4_address_(0),
reserved_ipv6_prefix_length_(NULL_RESERVED_IPV6_PREFIX_LENGTH),
reserved_ipv6_prefix_address_type_(NULL_RESERVED_IPV6_PREFIX_ADDRESS_TYPE),
iaid_(NULL_IAID), option_universe_(NULL_OPTION_UNIVERSE),
......@@ -1733,7 +1730,7 @@ CqlHostDataSourceImpl::getHostCollection(StatementTag statement_tag,
AnyArray& where_values) const {
// Run statement.
std::unique_ptr<CqlHostExchange> host_exchange(new CqlHostExchange(dbconn_));
std::unique_ptr<CqlHostExchange> host_exchange(new CqlHostExchange());
AnyArray collection = host_exchange->executeSelect(dbconn_, where_values,
statement_tag, false);
......@@ -1774,7 +1771,7 @@ CqlHostDataSourceImpl::insertHost(const HostPtr& host,
const OptionDescriptor& option_descriptor) {
AnyArray assigned_values;
std::unique_ptr<CqlHostExchange> host_exchange(new CqlHostExchange(dbconn_));
std::unique_ptr<CqlHostExchange> host_exchange(new CqlHostExchange());
try {
host_exchange->createBindForMutation(
......
......@@ -275,7 +275,7 @@ public:
/// there.
/// @throw various exceptions in case of errors
virtual bool del(const SubnetID& subnet_id,
const asiolink::IOAddress& addr);
const asiolink::IOAddress& addr) override;
/// @brief Attempts to delete a host by (subnet-id4, identifier-type,
/// identifier).
......@@ -293,7 +293,7 @@ public:
virtual bool del4(const SubnetID& subnet_id,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len);
const size_t identifier_len) override;
/// @brief Attempts to delete a host by (subnet-id6, identifier-type,
/// identifier).
......@@ -311,7 +311,7 @@ public:
virtual bool del6(const SubnetID& subnet_id,
const Host::IdentifierType& identifier_type,
const uint8_t* identifier_begin,
const size_t identifier_len);
const size_t identifier_len) override;
/// @brief Returns textual description of the backend.
///
......
......@@ -203,12 +203,12 @@ public:
/// @param subnet_id subnet identifier.
///
/// @return Lease collection (may be empty if no IPv4 lease found).
virtual Lease4Collection getLeases4(SubnetID subnet_id) const;
virtual Lease4Collection getLeases4(SubnetID subnet_id) const override;
/// @brief Returns all IPv4 leases.
///
/// @return Lease collection (may be empty if no IPv4 lease found).
virtual Lease4Collection getLeases4() const;
virtual Lease4Collection getLeases4() const override;
/// @brief Returns existing IPv6 lease for a given IPv6 address.
///
......
......@@ -143,7 +143,7 @@ struct MySqlHostDataSourceInit {
};
// Database backend will be registered at object initialization
MySqlHostDataSourceInit mysql_init;
MySqlHostDataSourceInit mysql_init_;
#endif
#ifdef HAVE_PGSQL
......@@ -168,7 +168,7 @@ struct PgSqlHostDataSourceInit {
};
// Database backend will be registered at object initialization
PgSqlHostDataSourceInit mysql_init;
PgSqlHostDataSourceInit pgsql_init_;
#endif
#ifdef HAVE_CQL
......@@ -193,7 +193,7 @@ struct CqlHostDataSourceInit {
};
// Database backend will be registered at object initialization
CqlHostDataSourceInit mysql_init;
CqlHostDataSourceInit cql_init_;
#endif
} // end of anonymous namespace
......@@ -162,8 +162,8 @@ TEST_F(CfgMySQLDbAccessTest, createManagers) {
});
ASSERT_NO_THROW({
HostDataSourcePtr& host_data_source =
HostDataSourceFactory::getHostDataSourcePtr();
const HostDataSourcePtr& host_data_source =
HostMgr::instance().getHostDataSource();
ASSERT_TRUE(host_data_source);
EXPECT_EQ("mysql", host_data_source->getType());
});
......@@ -175,8 +175,8 @@ TEST_F(CfgMySQLDbAccessTest, createManagers) {
ASSERT_NO_THROW(HostMgr::instance());
ASSERT_NO_THROW({
HostDataSourcePtr& host_data_source =
HostDataSourceFactory::getHostDataSourcePtr();
const HostDataSourcePtr& host_data_source =
HostMgr::instance().getHostDataSource();
ASSERT_TRUE(host_data_source);
EXPECT_EQ("mysql", host_data_source->getType());
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment