mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[#401,!254] Addressed more review comments.
This commit is contained in:
@@ -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.
|
||||
|
@@ -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());
|
||||
|
Reference in New Issue
Block a user