18 #include <boost/foreach.hpp>
19 #include <boost/lexical_cast.hpp>
20 #include <boost/algorithm/string.hpp>
42 DCfgMgrBase::~DCfgMgrBase() {
46 DCfgMgrBase::resetContext() {
63 for (std::list<std::string>& json_path : jsonPathsToRedact()) {
69 list<list<string>> DCfgMgrBase::jsonPathsToRedact()
const {
70 static list<list<string>>
const list;
77 const std::function<
void()>& post_config_cb) {
80 std::string(
"Can't parse NULL config")));
93 bool rollback =
false;
100 Daemon::configureLogger(config_set, context_);
103 answer = parse(config_set, check_only);
113 if (post_config_cb) {
118 auto now = boost::posix_time::second_clock::universal_time();
119 context_->setLastCommitTime(now);
128 .arg(getConfigSummary(0))
132 }
catch (
const std::exception& ex) {
141 context_ = original_context;
146 context_ = original_context;
const isc::log::MessageID DCTL_PARSER_FAIL
#define LOG_INFO(LOGGER, MESSAGE)
Macro to conveniently test info output and log it.
ConstElementPtr createAnswer(const int status_code, const std::string &text, const ConstElementPtr &arg)
ConstElementPtr redactConfig(ConstElementPtr const &element, list< string > const &json_path)
Redact a configuration.
#define LOG_ERROR(LOGGER, MESSAGE)
Macro to conveniently test error output and log it.
isc::log::Logger dctl_logger("dctl")
Defines the logger used within libkea-process library.
boost::shared_ptr< Element > ElementPtr
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
std::string answerToText(const ConstElementPtr &msg)
const isc::log::MessageID DCTL_CONFIG_CHECK_COMPLETE
Exception thrown if the configuration manager encounters an error.
boost::shared_ptr< const Element > ConstElementPtr
ConstElementPtr parseAnswer(int &rcode, const ConstElementPtr &msg)
Defines the logger used by the top-level component of kea-dhcp-ddns.
This file contains several functions and constants that are used for handling commands and responses ...
const int DBGLVL_COMMAND
This debug level is reserved for logging the exchange of messages/commands between processes...
#define LOG_DEBUG(LOGGER, LEVEL, MESSAGE)
Macro to conveniently test debug output and log it.
const isc::log::MessageID DCTL_CONFIG_COMPLETE
const isc::log::MessageID DCTL_CONFIG_START
boost::shared_ptr< ConfigBase > ConfigPtr
Non-const pointer to the ConfigBase.