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