/// @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.
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());