From: Francis Dupont Date: Sat, 29 Sep 2018 18:18:47 +0000 (+0200) Subject: [128-netconf-use-libprocess] Updated after CPL merge X-Git-Tag: 128-netconf-config_base~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf7e8d0c87afd6b0f4626a32da2b7d9a3f88d453;p=thirdparty%2Fkea.git [128-netconf-use-libprocess] Updated after CPL merge --- diff --git a/src/bin/netconf/netconf_cfg_mgr.cc b/src/bin/netconf/netconf_cfg_mgr.cc index c80b8a76a3..cfee2a759f 100644 --- a/src/bin/netconf/netconf_cfg_mgr.cc +++ b/src/bin/netconf/netconf_cfg_mgr.cc @@ -23,11 +23,11 @@ NetconfCfgContext::NetconfCfgContext() { } NetconfCfgContext::NetconfCfgContext(const NetconfCfgContext& orig) - : DCfgContextBase(), hooks_config_(orig.hooks_config_) { + : ConfigBase(), hooks_config_(orig.hooks_config_) { } NetconfCfgMgr::NetconfCfgMgr() - : DCfgMgrBase(DCfgContextBasePtr(new NetconfCfgContext())) { + : DCfgMgrBase(ConfigPtr(new NetconfCfgContext())) { } NetconfCfgMgr::~NetconfCfgMgr() { @@ -50,9 +50,9 @@ NetconfCfgMgr::getConfigSummary(const uint32_t /*selection*/) { return (s.str()); } -DCfgContextBasePtr +ConfigPtr NetconfCfgMgr::createNewContext() { - return (DCfgContextBasePtr(new NetconfCfgContext())); + return (ConfigPtr(new NetconfCfgContext())); } isc::data::ConstElementPtr diff --git a/src/bin/netconf/netconf_cfg_mgr.h b/src/bin/netconf/netconf_cfg_mgr.h index 796f118377..2d7939dfa3 100644 --- a/src/bin/netconf/netconf_cfg_mgr.h +++ b/src/bin/netconf/netconf_cfg_mgr.h @@ -27,8 +27,8 @@ typedef boost::shared_ptr NetconfCfgContextPtr; /// It provides a single enclosure for the storage of configuration parameters /// and any other Netconf specific information that needs to be accessible /// during configuration parsing as well as to the application as a whole. -/// It is derived from the context base class, DCfgContextBase. -class NetconfCfgContext : public process::DCfgContextBase { +/// It is derived from the context base class, ConfigBase. +class NetconfCfgContext : public process::ConfigBase { public: /// @brief Default constructor @@ -37,8 +37,8 @@ public: /// @brief Creates a clone of this context object. /// /// @return A pointer to the new clone. - virtual process::DCfgContextBasePtr clone() { - return (process::DCfgContextBasePtr(new NetconfCfgContext(*this))); + virtual process::ConfigPtr clone() { + return (process::ConfigPtr(new NetconfCfgContext(*this))); } /// @brief Returns non-const reference to configured hooks libraries. @@ -134,8 +134,8 @@ protected: /// existing context provided the configuration process completes without /// error. /// - /// @return Returns a DCfgContextBasePtr to the new context instance. - virtual process::DCfgContextBasePtr createNewContext(); + /// @return Returns a ConfigPtr to the new context instance. + virtual process::ConfigPtr createNewContext(); }; /// @brief Defines a shared pointer to NetconfCfgMgr. diff --git a/src/bin/netconf/netconf_process.cc b/src/bin/netconf/netconf_process.cc index b6e6e8feea..2170134b4a 100644 --- a/src/bin/netconf/netconf_process.cc +++ b/src/bin/netconf/netconf_process.cc @@ -93,7 +93,7 @@ NetconfProcess::configure(isc::data::ConstElementPtr config_set, ConstElementPtr answer = getCfgMgr()->simpleParseConfig(config_set, check_only, [this]() { - DCfgContextBasePtr base_ctx = getCfgMgr()->getContext(); + ConfigPtr base_ctx = getCfgMgr()->getContext(); NetconfCfgContextPtr ctx = boost::dynamic_pointer_cast(base_ctx); diff --git a/src/bin/netconf/tests/netconf_cfg_mgr_unittests.cc b/src/bin/netconf/tests/netconf_cfg_mgr_unittests.cc index a4946252cb..4158b19e61 100644 --- a/src/bin/netconf/tests/netconf_cfg_mgr_unittests.cc +++ b/src/bin/netconf/tests/netconf_cfg_mgr_unittests.cc @@ -19,7 +19,6 @@ using namespace std; using namespace isc::netconf; using namespace isc::data; -using namespace isc::dhcp; using namespace isc::hooks; using namespace isc::process; @@ -67,7 +66,7 @@ TEST(NetconfCfgMgr, contextCopy) { libs.add(exp_name, exp_param); // Make a copy. - DCfgContextBasePtr copy_base(ctx.clone()); + ConfigPtr copy_base(ctx.clone()); NetconfCfgContextPtr copy = boost::dynamic_pointer_cast(copy_base); ASSERT_TRUE(copy);