GET_OPTION_DEF4_CODE_SPACE,
GET_ALL_OPTION_DEFS4,
GET_MODIFIED_OPTION_DEFS4,
+ GET_OPTION4_CODE_SPACE,
+ GET_ALL_OPTIONS4,
+ GET_MODIFIED_OPTIONS4,
GET_OPTION4_SUBNET_ID_CODE_SPACE,
GET_OPTION4_SHARED_NETWORK_CODE_SPACE,
INSERT_SUBNET4,
UPDATE_SUBNET4,
UPDATE_SHARED_NETWORK4,
UPDATE_OPTION_DEF4,
+ UPDATE_OPTION4,
UPDATE_OPTION4_SUBNET_ID,
UPDATE_OPTION4_SHARED_NETWORK,
DELETE_SUBNET4_ID,
DELETE_ALL_SHARED_NETWORKS4,
DELETE_OPTION_DEF4_CODE_NAME,
DELETE_ALL_OPTION_DEFS4,
+ DELETE_OPTION4,
DELETE_OPTION4_SUBNET_ID,
DELETE_OPTION4_SHARED_NETWORK,
DELETE_OPTIONS4_SUBNET_ID,
transaction.commit();
}
+ /// @brief Sends query to insert or update global DHCP option.
+ ///
+ /// @param selector Server selector.
+ /// @param option Pointer to the option descriptor encapsulating the option.
+ void createUpdateOption4(const ServerSelector& selector,
+ const OptionDescriptorPtr& option) {
+
+ MySqlBindingCollection in_bindings = {
+ MySqlBinding::createInteger<uint8_t>(option->option_->getType()),
+ createOptionValueBinding(option),
+ MySqlBinding::condCreateString(option->formatted_value_),
+ MySqlBinding::condCreateString(option->space_name_),
+ MySqlBinding::createInteger<uint8_t>(static_cast<uint8_t>(option->persistent_)),
+ MySqlBinding::createNull(),
+ MySqlBinding::createNull(),
+ MySqlBinding::createInteger<uint8_t>(0),
+ createInputContextBinding(option),
+ MySqlBinding::createNull(),
+ MySqlBinding::createNull(),
+ MySqlBinding::createTimestamp(option->getModificationTime())
+ };
+
+ OptionDescriptorPtr existing_option = getOption4(selector,
+ option->option_->getType(),
+ option->space_name_);
+ if (existing_option) {
+ in_bindings.push_back(MySqlBinding::createInteger<uint8_t>(option->option_->getType()));
+ in_bindings.push_back(MySqlBinding::condCreateString(option->space_name_));
+ conn_.updateDeleteQuery(MySqlConfigBackendDHCPv4Impl::UPDATE_OPTION4,
+ in_bindings);
+
+ } else {
+ conn_.insertQuery(MySqlConfigBackendDHCPv4Impl::INSERT_OPTION4,
+ in_bindings);
+ }
+ }
+
/// @brief Sends query to insert or update DHCP option in a subnet.
///
/// @param selector Server selector.
return (option_defs);
}
+ /// @brief Sends query to retrieve single global option by code and
+ /// option space.
+ ///
+ /// @param selector Server selector.
+ /// @param code Option code.
+ /// @param space Option space name.
+ ///
+ /// @return Pointer to the returned option or NULL if such option
+ /// doesn't exist.
+ OptionDescriptorPtr
+ getOption4(const ServerSelector& selector, const uint16_t code,
+ const std::string& space) {
+ OptionContainer options;
+ MySqlBindingCollection in_bindings = {
+ MySqlBinding::createInteger<uint8_t>(static_cast<uint8_t>(code)),
+ MySqlBinding::createString(space)
+ };
+ getOptions(GET_OPTION4_CODE_SPACE, in_bindings, Option::V4, options);
+ return (options.empty() ? OptionDescriptorPtr() :
+ OptionDescriptorPtr(new OptionDescriptor(*options.begin())));
+ }
+
+ /// @brief Sends query to retrieve all global options.
+ ///
+ /// @param selector Server selector.
+ /// @return Container holding returned options.
+ OptionContainer
+ getAllOptions4(const ServerSelector& selector) {
+ OptionContainer options;
+ MySqlBindingCollection in_bindings;
+ getOptions(MySqlConfigBackendDHCPv4Impl::GET_ALL_OPTIONS4,
+ in_bindings, Option::V4, options);
+ return (options);
+ }
+
+ /// @brief Sends query to retrieve global options with modification
+ /// time later than specified timestamp.
+ ///
+ /// @param selector Server selector.
+ /// @return Container holding returned options.
+ OptionContainer
+ getModifiedOptions4(const ServerSelector& selector,
+ const boost::posix_time::ptime& modification_time) {
+ OptionContainer options;
+ MySqlBindingCollection in_bindings = {
+ MySqlBinding::createTimestamp(modification_time)
+ };
+ getOptions(MySqlConfigBackendDHCPv4Impl::GET_MODIFIED_OPTIONS4,
+ in_bindings, Option::V4, options);
+ return (options);
+ }
+
/// @brief Sends query to retrieve single option by code and option space
/// for a giben subnet id.
///
return (conn_.updateDeleteQuery(DELETE_OPTION_DEF4_CODE_NAME, in_bindings));
}
+ /// @brief Deletes global option.
+ ///
+ /// @param selector Server selector.
+ /// @param code Code of the deleted option.
+ /// @param space Option space of the deleted option.
+ void deleteOption4(const db::ServerSelector& /* selector */,
+ const uint16_t code,
+ const std::string& space) {
+ MySqlBindingCollection in_bindings = {
+ MySqlBinding::createInteger<uint8_t>(code),
+ MySqlBinding::createString(space)
+ };
+
+ // Run DELETE.
+ conn_.updateDeleteQuery(DELETE_OPTION4, in_bindings);
+ }
+
/// @brief Deletes subnet level option.
///
/// @param selector Server selector.
"WHERE modification_ts > ? "
"ORDER BY d.id" },
+ // Retrieves global option by code and space.
+ { MySqlConfigBackendDHCPv4Impl::GET_OPTION4_CODE_SPACE,
+ "SELECT"
+ " option_id,"
+ " code,"
+ " value,"
+ " formatted_value,"
+ " space,"
+ " persistent,"
+ " dhcp4_subnet_id,"
+ " scope_id,"
+ " user_context,"
+ " shared_network_name,"
+ " pool_id,"
+ " modification_ts "
+ "FROM dhcp4_options "
+ "WHERE scope_id = 0 AND code = ? AND space = ? "
+ "ORDER BY option_id"
+ },
+
+ // Retrieves all global options.
+ { MySqlConfigBackendDHCPv4Impl::GET_ALL_OPTIONS4,
+ "SELECT"
+ " option_id,"
+ " code,"
+ " value,"
+ " formatted_value,"
+ " space,"
+ " persistent,"
+ " dhcp4_subnet_id,"
+ " scope_id,"
+ " user_context,"
+ " shared_network_name,"
+ " pool_id,"
+ " modification_ts "
+ "FROM dhcp4_options "
+ "WHERE scope_id = 0 "
+ "ORDER BY option_id"
+ },
+
+ // Retrieves modified options.
+ { MySqlConfigBackendDHCPv4Impl::GET_MODIFIED_OPTIONS4,
+ "SELECT"
+ " option_id,"
+ " code,"
+ " value,"
+ " formatted_value,"
+ " space,"
+ " persistent,"
+ " dhcp4_subnet_id,"
+ " scope_id,"
+ " user_context,"
+ " shared_network_name,"
+ " pool_id,"
+ " modification_ts "
+ "FROM dhcp4_options "
+ "WHERE scope_id = 0 AND modification_ts > ? "
+ "ORDER BY option_id"
+ },
+
// Retrieves an option for a given subnet, option code and space.
{ MySqlConfigBackendDHCPv4Impl::GET_OPTION4_SUBNET_ID_CODE_SPACE,
"SELECT"
" user_context = ? "
"WHERE code = ? AND space = ?" },
+ // Update existing global option.
+ { MySqlConfigBackendDHCPv4Impl::UPDATE_OPTION4,
+ "UPDATE dhcp4_options SET"
+ " code = ?,"
+ " value = ?,"
+ " formatted_value = ?,"
+ " space = ?,"
+ " persistent = ?,"
+ " dhcp_client_class = ?,"
+ " dhcp4_subnet_id = ?,"
+ " scope_id = ?,"
+ " user_context = ?,"
+ " shared_network_name = ?,"
+ " pool_id = ?,"
+ " modification_ts = ? "
+ "WHERE scope_id = 0 AND code = ? AND space = ?"
+ },
+
// Update existing subnet level option.
{ MySqlConfigBackendDHCPv4Impl::UPDATE_OPTION4_SUBNET_ID,
"UPDATE dhcp4_options SET"
{ MySqlConfigBackendDHCPv4Impl::DELETE_ALL_OPTION_DEFS4,
"DELETE FROM dhcp4_option_def" },
+ // Delete single global option.
+ { MySqlConfigBackendDHCPv4Impl::DELETE_OPTION4,
+ "DELETE FROM dhcp4_options "
+ "WHERE scope_id = 0 AND code = ? AND space = ?" },
+
// Delete single option from a subnet.
{ MySqlConfigBackendDHCPv4Impl::DELETE_OPTION4_SUBNET_ID,
"DELETE FROM dhcp4_options "
return (impl_->getModifiedOptionDefs4(server_selector, modification_time));
}
+OptionDescriptorPtr
+MySqlConfigBackendDHCPv4::getOption4(const ServerSelector& selector,
+ const uint16_t code,
+ const std::string& space) const {
+ return (impl_->getOption4(selector, code, space));
+}
+
+OptionContainer
+MySqlConfigBackendDHCPv4::getAllOptions4(const ServerSelector& selector) const {
+ return (impl_->getAllOptions4(selector));
+}
+
+OptionContainer
+MySqlConfigBackendDHCPv4::
+getModifiedOptions4(const ServerSelector& selector,
+ const boost::posix_time::ptime& modification_time) const {
+ return (impl_->getModifiedOptions4(selector, modification_time));
+}
+
util::OptionalValue<std::string>
MySqlConfigBackendDHCPv4::getGlobalStringParameter4(const ServerSelector& /* server_selector */,
const std::string& /* name */) const {
}
void
-MySqlConfigBackendDHCPv4::createUpdateOption4(const ServerSelector& /* server_selector */,
- const OptionDescriptorPtr& /* option */) {
+MySqlConfigBackendDHCPv4::createUpdateOption4(const ServerSelector& selector,
+ const OptionDescriptorPtr& option) {
+ impl_->createUpdateOption4(selector, option);
}
void
}
uint64_t
-MySqlConfigBackendDHCPv4::deleteOption4(const ServerSelector& /* server_selector */,
- const uint16_t /* code */,
- const std::string& /* space */) {
- return (0);
+MySqlConfigBackendDHCPv4::deleteOption4(const ServerSelector& selector,
+ const uint16_t code,
+ const std::string& space) {
+ impl_->deleteOption4(selector, code, space);
}
uint64_t
}
// Test that option definitions modified after given time can be fetched.
-TEST_F(MySqlConfigBackendDHCPv4Test, getModifiedOptionDefinitions4) {
+TEST_F(MySqlConfigBackendDHCPv4Test, getModifiedOptionDefs4) {
// Explicitly set timestamps of option definitions. First option
// definition has a timestamp pointing to the future. Second option
// definition has timestamp pointing to the past (yesterday).
ASSERT_TRUE(option_defs.empty());
}
+// This test verifies that global option can be added, updated and deleted.
+TEST_F(MySqlConfigBackendDHCPv4Test, createUpdateDeleteOption4) {
+ // Add option to the database.
+ OptionDescriptorPtr opt_boot_file_name = test_options_[0];
+ cbptr_->createUpdateOption4(ServerSelector::UNASSIGNED(),
+ opt_boot_file_name);
+
+ // Make sure we can retrieve this option and that it is equal to the
+ // option we have inserted into the database.
+ OptionDescriptorPtr returned_opt_boot_file_name =
+ cbptr_->getOption4(ServerSelector::UNASSIGNED(),
+ opt_boot_file_name->option_->getType(),
+ opt_boot_file_name->space_name_);
+ ASSERT_TRUE(returned_opt_boot_file_name);
+ EXPECT_TRUE(returned_opt_boot_file_name->equals(*opt_boot_file_name));
+
+ // Modify option and update it in the database.
+ opt_boot_file_name->persistent_ = !opt_boot_file_name->persistent_;
+ cbptr_->createUpdateOption4(ServerSelector::UNASSIGNED(),
+ opt_boot_file_name);
+
+ // Retrieve the option again and make sure that updates were
+ // properly propagated to the database.
+ returned_opt_boot_file_name = cbptr_->getOption4(ServerSelector::UNASSIGNED(),
+ opt_boot_file_name->option_->getType(),
+ opt_boot_file_name->space_name_);
+ ASSERT_TRUE(returned_opt_boot_file_name);
+ EXPECT_TRUE(returned_opt_boot_file_name->equals(*opt_boot_file_name));
+
+ // Delete option from the database and make sure it is gone.
+ cbptr_->deleteOption4(ServerSelector::UNASSIGNED(),
+ opt_boot_file_name->option_->getType(),
+ opt_boot_file_name->space_name_);
+ EXPECT_FALSE(cbptr_->getOption4(ServerSelector::UNASSIGNED(),
+ opt_boot_file_name->option_->getType(),
+ opt_boot_file_name->space_name_));
+}
+
+// This test verifies that all global options can be retrieved.
+TEST_F(MySqlConfigBackendDHCPv4Test, getAllOptions4) {
+ // Add three global options to the database.
+ cbptr_->createUpdateOption4(ServerSelector::UNASSIGNED(),
+ test_options_[0]);
+ cbptr_->createUpdateOption4(ServerSelector::UNASSIGNED(),
+ test_options_[1]);
+ cbptr_->createUpdateOption4(ServerSelector::UNASSIGNED(),
+ test_options_[5]);
+
+ // Retrieve all these options.
+ OptionContainer returned_options = cbptr_->getAllOptions4(ServerSelector::UNASSIGNED());
+ ASSERT_EQ(3, returned_options.size());
+
+ // Get the container index used to search options by option code.
+ const OptionContainerTypeIndex& index = returned_options.get<1>();
+
+ // Verify that all options we put into the database were
+ // returned.
+ auto option0 = index.find(test_options_[0]->option_->getType());
+ ASSERT_FALSE(option0 == index.end());
+ EXPECT_TRUE(option0->equals(*test_options_[0]));
+
+ auto option1 = index.find(test_options_[1]->option_->getType());
+ ASSERT_FALSE(option1 == index.end());
+ EXPECT_TRUE(option1->equals(*test_options_[1]));
+
+ auto option5 = index.find(test_options_[5]->option_->getType());
+ ASSERT_FALSE(option5 == index.end());
+ EXPECT_TRUE(option5->equals(*test_options_[5]));
+}
+
+// This test verifies that modified global options can be retrieved.
+TEST_F(MySqlConfigBackendDHCPv4Test, getModifiedOptions4) {
+ // Assign timestamps to the options we're going to store in the
+ // database.
+ test_options_[0]->setModificationTime(timestamps_["tomorrow"]);
+ test_options_[1]->setModificationTime(timestamps_["yesterday"]);
+ test_options_[5]->setModificationTime(timestamps_["today"]);
+
+ // Put options into the database.
+ cbptr_->createUpdateOption4(ServerSelector::UNASSIGNED(),
+ test_options_[0]);
+ cbptr_->createUpdateOption4(ServerSelector::UNASSIGNED(),
+ test_options_[1]);
+ cbptr_->createUpdateOption4(ServerSelector::UNASSIGNED(),
+ test_options_[5]);
+
+ // Get options with the timestamp later than today. Only
+ // one option should be returned.
+ OptionContainer returned_options =
+ cbptr_->getModifiedOptions4(ServerSelector::UNASSIGNED(),
+ timestamps_["today"]);
+ ASSERT_EQ(1, returned_options.size());
+
+ // The returned option should be the one with the timestamp
+ // set to tomorrow.
+ const OptionContainerTypeIndex& index = returned_options.get<1>();
+ auto option0 = index.find(test_options_[0]->option_->getType());
+ ASSERT_FALSE(option0 == index.end());
+ EXPECT_TRUE(option0->equals(*test_options_[0]));
+}
+
// This test verifies that subnet level option can be added, updated and
// deleted.
TEST_F(MySqlConfigBackendDHCPv4Test, createUpdateDeleteSubnetOption4) {
namespace dhcp {
Subnet4Ptr
-ConfigBackendPoolDHCPv4::getSubnet4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::getSubnet4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const std::string& subnet_prefix) const {
Subnet4Ptr subnet;
getPropertyPtrConst<Subnet4Ptr, const std::string&>
}
Subnet4Ptr
-ConfigBackendPoolDHCPv4::getSubnet4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::getSubnet4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const SubnetID& subnet_id) const {
Subnet4Ptr subnet;
getPropertyPtrConst<Subnet4Ptr, const SubnetID&>
}
Subnet4Collection
-ConfigBackendPoolDHCPv4::getAllSubnets4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector) const {
+ConfigBackendPoolDHCPv4::getAllSubnets4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector) const {
Subnet4Collection subnets;
getAllPropertiesConst<Subnet4Collection>
(&ConfigBackendDHCPv4::getAllSubnets4, backend_selector, server_selector,
}
Subnet4Collection
-ConfigBackendPoolDHCPv4::getModifiedSubnets4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::getModifiedSubnets4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const boost::posix_time::ptime& modification_time) const {
Subnet4Collection subnets;
getMultiplePropertiesConst<Subnet4Collection, const boost::posix_time::ptime&>
}
SharedNetwork4Ptr
-ConfigBackendPoolDHCPv4::getSharedNetwork4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::getSharedNetwork4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const std::string& name) const {
SharedNetwork4Ptr shared_network;
getPropertyPtrConst<SharedNetwork4Ptr, const std::string&>
}
SharedNetwork4Collection
-ConfigBackendPoolDHCPv4::getAllSharedNetworks4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector) const {
+ConfigBackendPoolDHCPv4::getAllSharedNetworks4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector) const {
SharedNetwork4Collection shared_networks;
getAllPropertiesConst<SharedNetwork4Collection>
(&ConfigBackendDHCPv4::getAllSharedNetworks4, backend_selector, server_selector,
SharedNetwork4Collection
ConfigBackendPoolDHCPv4::
-getModifiedSharedNetworks4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+getModifiedSharedNetworks4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const boost::posix_time::ptime& modification_time) const {
SharedNetwork4Collection shared_networks;
getMultiplePropertiesConst<SharedNetwork4Collection, const boost::posix_time::ptime&>
}
OptionDefinitionPtr
-ConfigBackendPoolDHCPv4::getOptionDef4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::getOptionDef4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const uint16_t code,
const std::string& space) const {
OptionDefinitionPtr option_def;
}
OptionDefContainer
-ConfigBackendPoolDHCPv4::getAllOptionDefs4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector) const {
+ConfigBackendPoolDHCPv4::getAllOptionDefs4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector) const {
OptionDefContainer option_defs;
getAllPropertiesConst<OptionDefContainer>
(&ConfigBackendDHCPv4::getAllOptionDefs4, backend_selector, server_selector,
}
OptionDefContainer
-ConfigBackendPoolDHCPv4::getModifiedOptionDefs4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::getModifiedOptionDefs4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const boost::posix_time::ptime& modification_time) const {
OptionDefContainer option_defs;
getMultiplePropertiesConst<OptionDefContainer, const boost::posix_time::ptime&>
return (option_defs);
}
+OptionDescriptorPtr
+ConfigBackendPoolDHCPv4::getOption4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
+ const uint16_t code,
+ const std::string& space) const {
+ OptionDescriptorPtr option;
+ getPropertyPtrConst<OptionDescriptorPtr, uint16_t, const std::string&>
+ (&ConfigBackendDHCPv4::getOption4, backend_selector, server_selector,
+ option, code, space);
+ return (option);
+}
+
+OptionContainer
+ConfigBackendPoolDHCPv4::getAllOptions4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector) const {
+ OptionContainer options;
+ getAllPropertiesConst<OptionContainer>
+ (&ConfigBackendDHCPv4::getAllOptions4, backend_selector, server_selector,
+ options);
+ return (options);
+}
+
+OptionContainer
+ConfigBackendPoolDHCPv4::getModifiedOptions4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
+ const boost::posix_time::ptime& modification_time) const {
+ OptionContainer options;
+ getMultiplePropertiesConst<OptionContainer, const boost::posix_time::ptime&>
+ (&ConfigBackendDHCPv4::getModifiedOptions4, backend_selector, server_selector,
+ options, modification_time);
+ return (options);
+}
+
util::OptionalValue<std::string>
-ConfigBackendPoolDHCPv4::getGlobalStringParameter4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::getGlobalStringParameter4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const std::string& name) const {
OptionalValue<std::string> parameter;
getOptionalPropertyConst<std::string, const std::string&>
}
util::OptionalValue<int64_t>
-ConfigBackendPoolDHCPv4::getGlobalNumberParameter4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::getGlobalNumberParameter4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const std::string& name) const {
OptionalValue<int64_t> parameter;
getOptionalPropertyConst<int64_t, const std::string&>
}
std::map<std::string, std::string>
-ConfigBackendPoolDHCPv4::getAllGlobalParameters4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector) const {
+ConfigBackendPoolDHCPv4::getAllGlobalParameters4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector) const {
std::map<std::string, std::string> parameters;
getAllPropertiesConst<std::map<std::string, std::string> >
(&ConfigBackendDHCPv4::getAllGlobalParameters4, backend_selector,
}
void
-ConfigBackendPoolDHCPv4::createUpdateSubnet4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::createUpdateSubnet4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const Subnet4Ptr& subnet) {
createUpdateDeleteProperty<void, const Subnet4Ptr&>
(&ConfigBackendDHCPv4::createUpdateSubnet4, backend_selector,
}
void
-ConfigBackendPoolDHCPv4::createUpdateSharedNetwork4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::createUpdateSharedNetwork4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const SharedNetwork4Ptr& shared_network) {
createUpdateDeleteProperty<void, const SharedNetwork4Ptr&>
(&ConfigBackendDHCPv4::createUpdateSharedNetwork4, backend_selector,
}
void
-ConfigBackendPoolDHCPv4::createUpdateOptionDef4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::createUpdateOptionDef4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const OptionDefinitionPtr& option_def) {
createUpdateDeleteProperty<void, const OptionDefinitionPtr&>
(&ConfigBackendDHCPv4::createUpdateOptionDef4, backend_selector,
}
void
-ConfigBackendPoolDHCPv4::createUpdateOption4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::createUpdateOption4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const OptionDescriptorPtr& option) {
createUpdateDeleteProperty<void, const OptionPtr&>
(&ConfigBackendDHCPv4::createUpdateOption4, backend_selector,
}
void
-ConfigBackendPoolDHCPv4::createUpdateOption4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::createUpdateOption4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const std::string& shared_network_name,
const OptionDescriptorPtr& option) {
createUpdateDeleteProperty<const std::string&, const OptionDescriptorPtr&>
void
-ConfigBackendPoolDHCPv4::createUpdateOption4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::createUpdateOption4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const SubnetID& subnet_id,
const OptionDescriptorPtr& option) {
createUpdateDeleteProperty<void, const SubnetID&, const OptionPtr&>
}
void
-ConfigBackendPoolDHCPv4::createUpdateOption4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::createUpdateOption4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const IOAddress& pool_start_address,
const IOAddress& pool_end_address,
const OptionDescriptorPtr& option) {
}
void
-ConfigBackendPoolDHCPv4::createUpdateGlobalParameter4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::createUpdateGlobalParameter4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const std::string& name,
const std::string& value) {
createUpdateDeleteProperty<void, const std::string&, const std::string&>
}
void
-ConfigBackendPoolDHCPv4::createUpdateGlobalParameter4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::createUpdateGlobalParameter4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const std::string& name,
const int64_t value) {
createUpdateDeleteProperty<void, const std::string&, int64_t>
}
uint64_t
-ConfigBackendPoolDHCPv4::deleteSubnet4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::deleteSubnet4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const std::string& subnet_prefix) {
return (createUpdateDeleteProperty<uint64_t, const std::string&>
(&ConfigBackendDHCPv4::deleteSubnet4, backend_selector, server_selector,
}
uint64_t
-ConfigBackendPoolDHCPv4::deleteSubnet4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::deleteSubnet4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const SubnetID& subnet_id) {
return (createUpdateDeleteProperty<uint64_t, const SubnetID&>
(&ConfigBackendDHCPv4::deleteSubnet4, backend_selector, server_selector,
}
uint64_t
-ConfigBackendPoolDHCPv4::deleteAllSubnets4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector) {
+ConfigBackendPoolDHCPv4::deleteAllSubnets4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector) {
return (createUpdateDeleteProperty<uint64_t>
(&ConfigBackendDHCPv4::deleteAllSubnets4, backend_selector, server_selector));
}
uint64_t
-ConfigBackendPoolDHCPv4::deleteSharedNetwork4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::deleteSharedNetwork4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const std::string& name) {
return (createUpdateDeleteProperty<uint64_t, const std::string&>
(&ConfigBackendDHCPv4::deleteSharedNetwork4, backend_selector,
}
uint64_t
-ConfigBackendPoolDHCPv4::deleteAllSharedNetworks4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector) {
+ConfigBackendPoolDHCPv4::deleteAllSharedNetworks4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector) {
return (createUpdateDeleteProperty<uint64_t>
(&ConfigBackendDHCPv4::deleteAllSharedNetworks4, backend_selector, server_selector));
}
uint64_t
-ConfigBackendPoolDHCPv4::deleteOptionDef4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::deleteOptionDef4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const uint16_t code,
const std::string& space) {
return (createUpdateDeleteProperty<uint64_t, uint16_t, const std::string&>
}
uint64_t
-ConfigBackendPoolDHCPv4::deleteAllOptionDefs4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector) {
+ConfigBackendPoolDHCPv4::deleteAllOptionDefs4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector) {
return (createUpdateDeleteProperty<uint64_t>
(&ConfigBackendDHCPv4::deleteAllOptionDefs4, backend_selector, server_selector));
}
uint64_t
-ConfigBackendPoolDHCPv4::deleteOption4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::deleteOption4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const uint16_t code,
const std::string& space) {
return (createUpdateDeleteProperty<uint64_t, uint16_t, const std::string&>
}
void
-ConfigBackendPoolDHCPv4::deleteOption4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::deleteOption4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const std::string& shared_network_name,
const uint16_t code,
const std::string& space) {
}
uint64_t
-ConfigBackendPoolDHCPv4::deleteOption4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::deleteOption4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const SubnetID& subnet_id,
const uint16_t code,
const std::string& space) {
}
uint64_t
-ConfigBackendPoolDHCPv4::deleteOption4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::deleteOption4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const asiolink::IOAddress& pool_start_address,
const asiolink::IOAddress& pool_end_address,
const uint16_t code,
}
uint64_t
-ConfigBackendPoolDHCPv4::deleteGlobalParameter4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector,
+ConfigBackendPoolDHCPv4::deleteGlobalParameter4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector,
const std::string& name) {
return (createUpdateDeleteProperty<uint64_t, const std::string&>
(&ConfigBackendDHCPv4::deleteGlobalParameter4, backend_selector,
}
uint64_t
-ConfigBackendPoolDHCPv4::deleteAllGlobalParameters4(const db::BackendSelector& backend_selector,
- const db::ServerSelector& server_selector) {
+ConfigBackendPoolDHCPv4::deleteAllGlobalParameters4(const BackendSelector& backend_selector,
+ const ServerSelector& server_selector) {
return (createUpdateDeleteProperty<uint64_t>
(&ConfigBackendDHCPv4::deleteAllGlobalParameters4, backend_selector,
server_selector));