Commit 3b2c3ac0 authored by Marcin Siodelski's avatar Marcin Siodelski

[3534] Removed CfgMgr::getConfiguration.

parent 2f7c21ec
......@@ -653,7 +653,7 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
}
LOG_INFO(dhcp4_logger, DHCP4_CONFIG_COMPLETE)
.arg(CfgMgr::instance().getConfiguration()->
.arg(CfgMgr::instance().getCurrent()->
getConfigSummary(Configuration::CFGSEL_ALL4));
// Everything was fine. Configuration is successful.
......
......@@ -144,7 +144,7 @@ ControlledDhcpv6Srv::processConfig(isc::data::ConstElementPtr config) {
// safe and we really don't want to emit exceptions to the callback caller.
// Instead, catch an exception and create appropriate answer.
try {
CfgMgr::instance().getConfiguration()->getCfgIface()
CfgMgr::instance().getCurrent()->getCfgIface()
.openSockets(CfgIface::V6, srv->getPort());
} catch (const std::exception& ex) {
......
......@@ -854,7 +854,7 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set) {
}
LOG_INFO(dhcp6_logger, DHCP6_CONFIG_COMPLETE)
.arg(CfgMgr::instance().getConfiguration()->
.arg(CfgMgr::instance().getCurrent()->
getConfigSummary(Configuration::CFGSEL_ALL6));
// Everything was fine. Configuration is successful.
......
......@@ -74,7 +74,7 @@ void configure(const std::string& file_name) {
// If there's no logging element, we'll just pass NULL pointer,
// which will be handled by configureLogger().
Daemon::configureLogger(json->get("Logging"),
CfgMgr::instance().getConfiguration(),
CfgMgr::instance().getStaging(),
ControlledDhcpv6Srv::getInstance()->getVerbose());
// Get Dhcp6 component from the config
......
......@@ -387,11 +387,6 @@ CfgMgr::rollback() {
}
}
ConfigurationPtr
CfgMgr::getConfiguration() {
return (configuration_);
}
ConstConfigurationPtr
CfgMgr::getCurrent() {
ensureCurrentAllocated();
......
......@@ -415,11 +415,6 @@ public:
/// This function is exception safe.
void rollback();
/// @brief Returns the current configuration.
///
/// @return a pointer to the current configuration.
ConfigurationPtr getConfiguration();
/// @brief Returns a pointer to the current configuration.
///
/// This function returns pointer to the current configuration. If the
......
......@@ -295,9 +295,12 @@ public:
// it is empty by default.
TEST_F(CfgMgrTest, configuration) {
ConfigurationPtr configuration = CfgMgr::instance().getConfiguration();
ConstConfigurationPtr configuration = CfgMgr::instance().getCurrent();
ASSERT_TRUE(configuration);
EXPECT_TRUE(configuration->getLoggingInfo().empty());
configuration = CfgMgr::instance().getStaging();
ASSERT_TRUE(configuration);
EXPECT_TRUE(configuration->getLoggingInfo().empty());
}
......
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