]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#401,!254] Addressed more review comments.
authorThomas Markwalder <tmark@isc.org>
Mon, 18 Mar 2019 15:30:05 +0000 (11:30 -0400)
committerThomas Markwalder <tmark@isc.org>
Mon, 18 Mar 2019 15:30:05 +0000 (11:30 -0400)
src/lib/dhcpsrv/cfg_option.h
src/lib/dhcpsrv/tests/cfg_option_unittest.cc

index f6b2ee80cc061bce36d203458e8e532094344e95..060c940ea087ddf5f32164902157b23e242d3aaa 100644 (file)
@@ -333,6 +333,19 @@ public:
     /// @throw isc::BadValue if the option space is invalid.
     void add(const OptionDescriptor& desc, const std::string& option_space);
 
+    /// @brief Replaces the instance of an option within this collection
+    ///
+    /// This method locates the option within the given space and replaces
+    /// it with a copy of the given descriptor.  This effectively updates
+    /// the contents without altering the container indexing.
+    ///
+    /// @param desc Option descriptor holding option instance and other
+    /// parameters pertaining to the option.
+    /// @param option_space Option space name.
+    ///
+    /// @throw isc::BadValue if the descriptor's option instance is null,
+    /// if  space is invalid, or if the option does not already exist
+    /// in the given space.
     void replace(const OptionDescriptor& desc, const std::string& option_space);
 
     /// @brief Merges another option configuration into this one.
index d53ddb35b2282977e96cb89d9e8054e6d3341e0f..b820305bc7f662d2a374d66b564e8d2961116a79 100644 (file)
@@ -546,7 +546,6 @@ TEST_F(CfgOptionTest, createDescriptorOptionValid) {
 
     ASSERT_NO_THROW(updated = CfgOption::createDescriptorOption(defs, space, *desc));
     ASSERT_TRUE(updated);
-    std::cout << "option:" << desc->option_->toText() << std::endl;
     Option4AddrLstPtr opaddrs = boost::dynamic_pointer_cast<Option4AddrLst>(desc->option_);
     ASSERT_TRUE(opaddrs);
     EXPECT_EQ("type=002, len=008: 192.0.2.1 192.0.2.2", opaddrs->toText());