-// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2019 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
constexpr unsigned long GLOBAL_PARAMETER_VALUE_BUF_LENGTH = 65536;
+constexpr unsigned long AUDIT_ENTRY_OBJECT_TYPE_BUF_LENGTH = 256;
+
+constexpr unsigned long AUDIT_ENTRY_LOG_MESSAGE_BUF_LENGTH = 65536;
+
//*}
} // end of namespace isc::cb
#include <cc/stamped_value.h>
#include <config_backend/base_config_backend.h>
+#include <database/audit_entry.h>
#include <database/server_selector.h>
#include <dhcp/option.h>
#include <dhcp/option_definition.h>
getModifiedGlobalParameters4(const db::ServerSelector& selector,
const boost::posix_time::ptime& modification_time) const = 0;
+ /// @brief Retrieves the most recent audit entries.
+ ///
+ /// @param selector Server selector.
+ /// @param modification_time Timestamp being a lower limit for the returned
+ /// result set, i.e. entries later than specified time are returned.
+ /// @return Collection of audit entries.
+ virtual db::AuditEntryCollection
+ getRecentAuditEntries4(const db::ServerSelector& server_selector,
+ const boost::posix_time::ptime& modification_time) const = 0;
+
/// @brief Creates or updates a subnet.
///
/// @param server_selector Server selector.
return (parameters);
}
+AuditEntryCollection
+ConfigBackendPoolDHCPv4::
+getRecentAuditEntries4(const db::BackendSelector& backend_selector,
+ const db::ServerSelector& server_selector,
+ const boost::posix_time::ptime& modification_time) const {
+ AuditEntryCollection audit_entries;
+ getMultiplePropertiesConst<AuditEntryCollection, const boost::posix_time::ptime&>
+ (&ConfigBackendDHCPv4::getRecentAuditEntries4, backend_selector,
+ server_selector, audit_entries, modification_time);
+ return (audit_entries);
+}
+
void
ConfigBackendPoolDHCPv4::createUpdateSubnet4(const BackendSelector& backend_selector,
const ServerSelector& server_selector,
const db::ServerSelector& server_selector,
const boost::posix_time::ptime& modification_time) const;
+ /// @brief Retrieves the most recent audit entries.
+ ///
+ /// @param backend_selector Backend selector.
+ /// @param server_selector Server selector.
+ /// @param modification_time Timestamp being a lower limit for the returned
+ /// result set, i.e. entries later than specified time are returned.
+ /// @return Collection of audit entries.
+ virtual db::AuditEntryCollection
+ getRecentAuditEntries4(const db::BackendSelector& backend_selector,
+ const db::ServerSelector& server_selector,
+ const boost::posix_time::ptime& modification_time) const;
+
/// @brief Creates or updates a subnet.
///
/// @param backend_selector Backend selector.
-// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2019 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
#include <test_config_backend_dhcp4.h>
using namespace isc::data;
+using namespace isc::db;
namespace isc {
namespace dhcp {
return (globals);
}
+AuditEntryCollection
+TestConfigBackendDHCPv4::getRecentAuditEntries4(const db::ServerSelector&,
+ const boost::posix_time::ptime&) const {
+ return (AuditEntryCollection());
+}
+
void
TestConfigBackendDHCPv4::createUpdateSubnet4(const db::ServerSelector& /* server_selector */,
const Subnet4Ptr& subnet) {
-// Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2018-2019 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
getModifiedGlobalParameters4(const db::ServerSelector& server_selector,
const boost::posix_time::ptime& modification_time) const;
+ /// @brief Retrieves the most recent audit entries.
+ ///
+ /// @param server_selector Server selector.
+ /// @param modification_time Timestamp being a lower limit for the returned
+ /// result set, i.e. entries later than specified time are returned.
+ /// @return Collection of audit entries.
+ virtual db::AuditEntryCollection
+ getRecentAuditEntries4(const db::ServerSelector& server_selector,
+ const boost::posix_time::ptime& modification_time) const;
+
/// @brief Creates or updates a subnet.
///
/// @param server_selector Server selector.