Commit 4d56eac7 authored by Marcin Siodelski's avatar Marcin Siodelski

[#93,!35] Addressed minor and refectoring issues.

parent 554f6127
......@@ -47,6 +47,7 @@ libdhcp_mysql_cb_la_LIBADD = libmysqlcb.la
libdhcp_mysql_cb_la_LIBADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
libdhcp_mysql_cb_la_LIBADD += $(top_builddir)/src/lib/eval/libkea-eval.la
libdhcp_mysql_cb_la_LIBADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
libdhcp_mysql_cb_la_LIBADD += $(top_builddir)/src/lib/process/libkea-process.la
libdhcp_mysql_cb_la_LIBADD += $(top_builddir)/src/lib/stats/libkea-stats.la
libdhcp_mysql_cb_la_LIBADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
libdhcp_mysql_cb_la_LIBADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
......
This diff is collapsed.
......@@ -29,265 +29,265 @@ public:
/// @brief Retrieves a single subnet by subnet_prefix.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet_prefix Prefix of the subnet to be retrieved.
/// @return Pointer to the retrieved subnet or NULL if not found.
virtual Subnet4Ptr
getSubnet4(const db::ServerSelector& selector,
getSubnet4(const db::ServerSelector& server_selector,
const std::string& subnet_prefix) const;
/// @brief Retrieves a single subnet by subnet identifier.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet_id Identifier of a subnet to be retrieved.
/// @return Pointer to the retrieved subnet or NULL if not found.
virtual Subnet4Ptr
getSubnet4(const db::ServerSelector& selector, const SubnetID& subnet_id) const;
getSubnet4(const db::ServerSelector& server_selector, const SubnetID& subnet_id) const;
/// @brief Retrieves all subnets.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @return Collection of subnets or empty collection if no subnet found.
virtual Subnet4Collection
getAllSubnets4(const db::ServerSelector& selector) const;
getAllSubnets4(const db::ServerSelector& server_selector) const;
/// @brief Retrieves subnets modified after specified time.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param modification_time Lower bound subnet modification time.
/// @return Collection of subnets or empty collection if no subnet found.
virtual Subnet4Collection
getModifiedSubnets4(const db::ServerSelector& selector,
getModifiedSubnets4(const db::ServerSelector& server_selector,
const boost::posix_time::ptime& modification_time) const;
/// @brief Retrieves shared network by name.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the shared network to be retrieved.
/// @return Pointer to the shared network or NULL if not found.
virtual SharedNetwork4Ptr
getSharedNetwork4(const db::ServerSelector& selector,
getSharedNetwork4(const db::ServerSelector& server_selector,
const std::string& name) const;
/// @brief Retrieves all shared networks.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @return Collection of shared network or empty collection if
/// no shared network found.
virtual SharedNetwork4Collection
getAllSharedNetworks4(const db::ServerSelector& selector) const;
getAllSharedNetworks4(const db::ServerSelector& server_selector) const;
/// @brief Retrieves shared networks modified after specified time.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param modification_time Lower bound shared network modification time.
/// @return Collection of shared network or empty collection if
/// no shared network found.
virtual SharedNetwork4Collection
getModifiedSharedNetworks4(const db::ServerSelector& selector,
getModifiedSharedNetworks4(const db::ServerSelector& server_selector,
const boost::posix_time::ptime& modification_time) const;
/// @brief Retrieves single option definition by code and space.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param code Code of the option to be retrieved.
/// @param space Option space of the option to be retrieved.
/// @return Pointer to the option definition or NULL if not found.
virtual OptionDefinitionPtr
getOptionDef4(const db::ServerSelector& selector, const uint16_t code,
getOptionDef4(const db::ServerSelector& server_selector, const uint16_t code,
const std::string& space) const;
/// @brief Retrieves all option definitions.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @return Collection of option definitions or empty collection if
/// no option definition found.
virtual OptionDefContainer
getAllOptionDefs4(const db::ServerSelector& selector) const;
getAllOptionDefs4(const db::ServerSelector& server_selector) const;
/// @brief Retrieves option definitions modified after specified time.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param modification_time Lower bound option definition modification
/// time.
/// @return Collection of option definitions or empty collection if
/// no option definition found.
virtual OptionDefContainer
getModifiedOptionDefs4(const db::ServerSelector& selector,
getModifiedOptionDefs4(const db::ServerSelector& server_selector,
const boost::posix_time::ptime& modification_time) const;
/// @brief Retrieves global string parameter value.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the global parameter to be retrieved.
/// @return Value of the global string parameter.
virtual util::OptionalValue<std::string>
getGlobalStringParameter4(const db::ServerSelector& selector,
getGlobalStringParameter4(const db::ServerSelector& server_selector,
const std::string& name) const;
/// @brief Retrieves global number parameter.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the parameter to be retrieved.
virtual util::OptionalValue<int64_t>
getGlobalNumberParameter4(const db::ServerSelector& selector,
getGlobalNumberParameter4(const db::ServerSelector& server_selector,
const std::string& name) const;
/// @brief Retrieves all global parameters as strings.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
virtual std::map<std::string, std::string>
getAllGlobalParameters4(const db::ServerSelector& selector) const;
getAllGlobalParameters4(const db::ServerSelector& server_selector) const;
/// @brief Creates or updates a subnet.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet Subnet to be added or updated.
virtual void
createUpdateSubnet4(const db::ServerSelector& selector,
createUpdateSubnet4(const db::ServerSelector& server_selector,
const Subnet4Ptr& subnet);
/// @brief Creates or updates a shared network.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param shared_network Shared network to be added or updated.
virtual void
createUpdateSharedNetwork4(const db::ServerSelector& selector,
createUpdateSharedNetwork4(const db::ServerSelector& server_selector,
const SharedNetwork4Ptr& shared_network);
/// @brief Creates or updates an option definition.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param option_def Option definition to be added or updated.
virtual void
createUpdateOptionDef4(const db::ServerSelector& selector,
createUpdateOptionDef4(const db::ServerSelector& server_selector,
const OptionDefinitionPtr& option_def);
/// @brief Creates or updates global option.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param option Option to be added or updated.
virtual void
createUpdateOption4(const db::ServerSelector& selector,
createUpdateOption4(const db::ServerSelector& server_selector,
const OptionPtr& option);
/// @brief Creates or updates subnet level option.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet_id Identifier of a subnet to which option belongs.
/// @param option Option to be added or updated.
virtual void
createUpdateOption4(const db::ServerSelector& selector,
createUpdateOption4(const db::ServerSelector& server_selector,
const SubnetID& subnet_id,
const OptionPtr& option);
/// @brief Creates or updates pool level option.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param pool_start_address Lower bound address of the pool to which
/// the option belongs.
/// @param pool_end_address Upper bound address of the pool to which the
/// option belongs.
/// @param option Option to be added or updated.
virtual void
createUpdateOption4(const db::ServerSelector& selector,
createUpdateOption4(const db::ServerSelector& server_selector,
const asiolink::IOAddress& pool_start_address,
const asiolink::IOAddress& pool_end_address,
const OptionPtr& option);
/// @brief Creates or updates global string parameter.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the global parameter.
/// @param value Value of the global parameter.
virtual void
createUpdateGlobalParameter4(const db::ServerSelector& selector,
createUpdateGlobalParameter4(const db::ServerSelector& server_selector,
const std::string& name,
const std::string& value);
/// @brief Creates or updates global number parameter.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the global parameter.
/// @param value Value of the global parameter.
virtual void
createUpdateGlobalParameter4(const db::ServerSelector& selector,
createUpdateGlobalParameter4(const db::ServerSelector& server_selector,
const std::string& name,
const int64_t value);
/// @brief Deletes subnet by prefix.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet_prefix Prefix of the subnet to be deleted.
virtual void
deleteSubnet4(const db::ServerSelector& selector,
deleteSubnet4(const db::ServerSelector& server_selector,
const std::string& subnet_prefix);
/// @brief Deletes subnet by identifier.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet_id Identifier of the subnet to be deleted.
virtual void
deleteSubnet4(const db::ServerSelector& selector, const SubnetID& subnet_id);
deleteSubnet4(const db::ServerSelector& server_selector, const SubnetID& subnet_id);
/// @brief Deletes all subnets.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
virtual void
deleteAllSubnets4(const db::ServerSelector& selector);
deleteAllSubnets4(const db::ServerSelector& server_selector);
/// @brief Deletes shared network by name.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the shared network to be deleted.
virtual void
deleteSharedNetwork4(const db::ServerSelector& selector,
deleteSharedNetwork4(const db::ServerSelector& server_selector,
const std::string& name);
/// @brief Deletes all shared networks.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
virtual void
deleteAllSharedNetworks4(const db::ServerSelector& selector);
deleteAllSharedNetworks4(const db::ServerSelector& server_selector);
/// @brief Deletes option definition.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param code Code of the option to be deleted.
/// @param space Option space of the option to be deleted.
virtual void
deleteOptionDef4(const db::ServerSelector& selector, const uint16_t code,
deleteOptionDef4(const db::ServerSelector& server_selector, const uint16_t code,
const std::string& space);
/// @brief Deletes all option definitions.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
virtual void
deleteAllOptionDefs4(const db::ServerSelector& selector);
deleteAllOptionDefs4(const db::ServerSelector& server_selector);
/// @brief Deletes global option.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param code Code of the option to be deleted.
/// @param space Option space of the option to be deleted.
virtual void
deleteOption4(const db::ServerSelector& selector, const uint16_t code,
deleteOption4(const db::ServerSelector& server_selector, const uint16_t code,
const std::string& space);
/// @brief Deletes subnet level option.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet_id Identifier of the subnet to which deleted option
/// belongs.
/// @param code Code of the deleted option.
/// @param space Option space of the deleted option.
virtual void
deleteOption4(const db::ServerSelector& selector, const SubnetID& subnet_id,
deleteOption4(const db::ServerSelector& server_selector, const SubnetID& subnet_id,
const uint16_t code, const std::string& space);
/// @brief Deletes pool level option.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param pool_start_address Lower bound address of the pool to which
/// deleted option belongs.
/// @param pool_end_address Upper bound address of the pool to which the
......@@ -295,7 +295,7 @@ public:
/// @param code Code of the deleted option.
/// @param space Option space of the deleted option.
virtual void
deleteOption4(const db::ServerSelector& selector,
deleteOption4(const db::ServerSelector& server_selector,
const asiolink::IOAddress& pool_start_address,
const asiolink::IOAddress& pool_end_address,
const uint16_t code,
......@@ -303,17 +303,17 @@ public:
/// @brief Deletes global parameter.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the global parameter to be deleted.
virtual void
deleteGlobalParameter4(const db::ServerSelector& selector,
deleteGlobalParameter4(const db::ServerSelector& server_selector,
const std::string& name);
/// @brief Deletes all global parameters.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
virtual void
deleteAllGlobalParameters4(const db::ServerSelector& selector);
deleteAllGlobalParameters4(const db::ServerSelector& server_selector);
/// @brief Returns backend type in the textual format.
///
......
......@@ -36,6 +36,7 @@ mysql_cb_unittests_LDADD = $(top_builddir)/src/hooks/dhcp/mysql_cb/libmysqlcb.l
mysql_cb_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
mysql_cb_unittests_LDADD += $(top_builddir)/src/lib/eval/libkea-eval.la
mysql_cb_unittests_LDADD += $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
mysql_cb_unittests_LDADD += $(top_builddir)/src/lib/process/libkea-process.la
mysql_cb_unittests_LDADD += $(top_builddir)/src/lib/stats/libkea-stats.la
mysql_cb_unittests_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
mysql_cb_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
......
......@@ -99,7 +99,9 @@ public:
test_subnets_.push_back(subnet);
// Other subnets include mostly null values except for mandatory parameters.
// Adding another subnet with the same subnet id to test
// cases that this second instance can override existing
// subnet instance.
subnet.reset(new Subnet4(IOAddress("10.0.0.0"), 8, 20, 30, 40, 1024));
pool1.reset(new Pool4(IOAddress("10.0.0.10"), IOAddress("10.0.0.20")));
......@@ -138,9 +140,13 @@ public:
test_networks_.push_back(shared_network);
// Adding another shared network called "level1" to test
// cases that this second instance can override existing
// "level1" instance.
shared_network.reset(new SharedNetwork4("level1"));
test_networks_.push_back(shared_network);
// Add more shared networks.
shared_network.reset(new SharedNetwork4("level2"));
test_networks_.push_back(shared_network);
......@@ -407,7 +413,8 @@ TEST_F(MySqlConfigBackendDHCPv4Test, getModifiedSharedNetworks4) {
ASSERT_TRUE(networks.empty());
}
// Test that subnet can be inserted, fetched, updated and then fetched again.
// Test that option definition can be inserted, fetched, updated and then
// fetched again.
TEST_F(MySqlConfigBackendDHCPv4Test, getOptionDef4) {
// Insert new option definition.
OptionDefinitionPtr option_def = test_option_defs_[0];
......@@ -433,7 +440,7 @@ TEST_F(MySqlConfigBackendDHCPv4Test, getOptionDef4) {
EXPECT_TRUE(returned_option_def->equals(*option_def2));
}
// Test that all shared networks can be fetched.
// Test that all option definitions can be fetched.
TEST_F(MySqlConfigBackendDHCPv4Test, getAllOptionDefs4) {
// Insert test option definitions into the database. Note that the second
// option definition will overwrite the first option definition as they use
......
......@@ -30,265 +30,265 @@ public:
/// @brief Retrieves a single subnet by subnet_prefix.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet_prefix Prefix of the subnet to be retrieved.
/// @return Pointer to the retrieved subnet or NULL if not found.
virtual Subnet4Ptr
getSubnet4(const db::ServerSelector& selector,
getSubnet4(const db::ServerSelector& server_selector,
const std::string& subnet_prefix) const = 0;
/// @brief Retrieves a single subnet by subnet identifier.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet_id Identifier of a subnet to be retrieved.
/// @return Pointer to the retrieved subnet or NULL if not found.
virtual Subnet4Ptr
getSubnet4(const db::ServerSelector& selector, const SubnetID& subnet_id) const = 0;
getSubnet4(const db::ServerSelector& server_selector, const SubnetID& subnet_id) const = 0;
/// @brief Retrieves all subnets.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @return Collection of subnets or empty collection if no subnet found.
virtual Subnet4Collection
getAllSubnets4(const db::ServerSelector& selector) const = 0;
getAllSubnets4(const db::ServerSelector& server_selector) const = 0;
/// @brief Retrieves subnets modified after specified time.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param modification_time Lower bound subnet modification time.
/// @return Collection of subnets or empty collection if no subnet found.
virtual Subnet4Collection
getModifiedSubnets4(const db::ServerSelector& selector,
getModifiedSubnets4(const db::ServerSelector& server_selector,
const boost::posix_time::ptime& modification_time) const = 0;
/// @brief Retrieves shared network by name.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the shared network to be retrieved.
/// @return Pointer to the shared network or NULL if not found.
virtual SharedNetwork4Ptr
getSharedNetwork4(const db::ServerSelector& selector,
getSharedNetwork4(const db::ServerSelector& server_selector,
const std::string& name) const = 0;
/// @brief Retrieves all shared networks.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @return Collection of shared network or empty collection if
/// no shared network found.
virtual SharedNetwork4Collection
getAllSharedNetworks4(const db::ServerSelector& selector) const = 0;
getAllSharedNetworks4(const db::ServerSelector& server_selector) const = 0;
/// @brief Retrieves shared networks modified after specified time.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param modification_time Lower bound shared network modification time.
/// @return Collection of shared network or empty collection if
/// no shared network found.
virtual SharedNetwork4Collection
getModifiedSharedNetworks4(const db::ServerSelector& selector,
getModifiedSharedNetworks4(const db::ServerSelector& server_selector,
const boost::posix_time::ptime& modification_time) const = 0;
/// @brief Retrieves single option definition by code and space.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param code Code of the option to be retrieved.
/// @param space Option space of the option to be retrieved.
/// @return Pointer to the option definition or NULL if not found.
virtual OptionDefinitionPtr
getOptionDef4(const db::ServerSelector& selector, const uint16_t code,
getOptionDef4(const db::ServerSelector& server_selector, const uint16_t code,
const std::string& space) const = 0;
/// @brief Retrieves all option definitions.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @return Collection of option definitions or empty collection if
/// no option definition found.
virtual OptionDefContainer
getAllOptionDefs4(const db::ServerSelector& selector) const = 0;
getAllOptionDefs4(const db::ServerSelector& server_selector) const = 0;
/// @brief Retrieves option definitions modified after specified time.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param modification_time Lower bound option definition modification
/// time.
/// @return Collection of option definitions or empty collection if
/// no option definition found.
virtual OptionDefContainer
getModifiedOptionDefs4(const db::ServerSelector& selector,
getModifiedOptionDefs4(const db::ServerSelector& server_selector,
const boost::posix_time::ptime& modification_time) const = 0;
/// @brief Retrieves global string parameter value.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the global parameter to be retrieved.
/// @return Value of the global string parameter.
virtual util::OptionalValue<std::string>
getGlobalStringParameter4(const db::ServerSelector& selector,
getGlobalStringParameter4(const db::ServerSelector& server_selector,
const std::string& name) const = 0;
/// @brief Retrieves global number parameter.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the parameter to be retrieved.
virtual util::OptionalValue<int64_t>
getGlobalNumberParameter4(const db::ServerSelector& selector,
getGlobalNumberParameter4(const db::ServerSelector& server_selector,
const std::string& name) const = 0;
/// @brief Retrieves all global parameters as strings.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
virtual std::map<std::string, std::string>
getAllGlobalParameters4(const db::ServerSelector& selector) const = 0;
getAllGlobalParameters4(const db::ServerSelector& server_selector) const = 0;
/// @brief Creates or updates a subnet.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet Subnet to be added or updated.
virtual void
createUpdateSubnet4(const db::ServerSelector& selector,
createUpdateSubnet4(const db::ServerSelector& server_selector,
const Subnet4Ptr& subnet) = 0;
/// @brief Creates or updates a shared network.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param shared_network Shared network to be added or updated.
virtual void
createUpdateSharedNetwork4(const db::ServerSelector& selector,
createUpdateSharedNetwork4(const db::ServerSelector& server_selector,
const SharedNetwork4Ptr& shared_network) = 0;
/// @brief Creates or updates an option definition.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param option_def Option definition to be added or updated.
virtual void
createUpdateOptionDef4(const db::ServerSelector& selector,
createUpdateOptionDef4(const db::ServerSelector& server_selector,
const OptionDefinitionPtr& option_def) = 0;
/// @brief Creates or updates global option.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param option Option to be added or updated.
virtual void
createUpdateOption4(const db::ServerSelector& selector,
createUpdateOption4(const db::ServerSelector& server_selector,
const OptionPtr& option) = 0;
/// @brief Creates or updates subnet level option.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet_id Identifier of a subnet to which option belongs.
/// @param option Option to be added or updated.
virtual void
createUpdateOption4(const db::ServerSelector& selector,
createUpdateOption4(const db::ServerSelector& server_selector,
const SubnetID& subnet_id,
const OptionPtr& option) = 0;
/// @brief Creates or updates pool level option.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param pool_start_address Lower bound address of the pool to which
/// the option belongs.
/// @param pool_end_address Upper bound address of the pool to which the
/// option belongs.
/// @param option Option to be added or updated.
virtual void
createUpdateOption4(const db::ServerSelector& selector,
createUpdateOption4(const db::ServerSelector& server_selector,
const asiolink::IOAddress& pool_start_address,
const asiolink::IOAddress& pool_end_address,
const OptionPtr& option) = 0;
/// @brief Creates or updates global string parameter.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the global parameter.
/// @param value Value of the global parameter.
virtual void
createUpdateGlobalParameter4(const db::ServerSelector& selector,
createUpdateGlobalParameter4(const db::ServerSelector& server_selector,
const std::string& name,
const std::string& value) = 0;
/// @brief Creates or updates global number parameter.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param name Name of the global parameter.
/// @param value Value of the global parameter.
virtual void
createUpdateGlobalParameter4(const db::ServerSelector& selector,
createUpdateGlobalParameter4(const db::ServerSelector& server_selector,
const std::string& name,
const int64_t value) = 0;
/// @brief Deletes subnet by prefix.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet_prefix Prefix of the subnet to be deleted.
virtual void
deleteSubnet4(const db::ServerSelector& selector,
deleteSubnet4(const db::ServerSelector& server_selector,
const std::string& subnet_prefix) = 0;
/// @brief Deletes subnet by identifier.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
/// @param subnet_id Identifier of the subnet to be deleted.
virtual void
deleteSubnet4(const db::ServerSelector& selector, const SubnetID& subnet_id) = 0;
deleteSubnet4(const db::ServerSelector& server_selector, const SubnetID& subnet_id) = 0;
/// @brief Deletes all subnets.
///
/// @param selector Server selector.
/// @param server_selector Server selector.
virtual void
deleteAllSubnets4(const db::ServerSelector& selector) = 0;
deleteAllSubnets4(const db::ServerSelector& server_selector) = 0;