]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[128-netconf-use-libprocess] Updated after CPL merge
authorFrancis Dupont <fdupont@isc.org>
Sat, 29 Sep 2018 18:18:47 +0000 (20:18 +0200)
committerFrancis Dupont <fdupont@isc.org>
Sat, 29 Sep 2018 18:18:47 +0000 (20:18 +0200)
src/bin/netconf/netconf_cfg_mgr.cc
src/bin/netconf/netconf_cfg_mgr.h
src/bin/netconf/netconf_process.cc
src/bin/netconf/tests/netconf_cfg_mgr_unittests.cc

index c80b8a76a3f1d9aabfca321d228dcac208f54cb0..cfee2a759fc6df4f6db6f31a285e4ca180026eff 100644 (file)
@@ -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
index 796f118377da2121f401ac191b35896b6f0eed89..2d7939dfa388ac6cfb6238a071f60ec2425a43e4 100644 (file)
@@ -27,8 +27,8 @@ typedef boost::shared_ptr<NetconfCfgContext> 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.
index b6e6e8feea7e36612e2a3c52740e5d6193091a70..2170134b4a5779ab9707c0d0a41b9a9221557ff1 100644 (file)
@@ -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<NetconfCfgContext>(base_ctx);
 
index a4946252cb33af0b3c4718597a53a4eb79218e63..4158b19e61dd99656239e32f7f0baa567516fef6 100644 (file)
@@ -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<NetconfCfgContext>(copy_base);
     ASSERT_TRUE(copy);