BIND 10 #2634: The DhcpConfigParser::getParam should be abstracted to a separate class.
BIND 10 Development
do-not-reply at isc.org
Mon Apr 1 15:24:23 UTC 2013
#2634: The DhcpConfigParser::getParam should be abstracted to a separate class.
-------------------------------------+-------------------------------------
Reporter: marcin | Owner:
Type: enhancement | UnAssigned
Priority: low | Status:
Component: dhcpconf | reviewing
Keywords: | Milestone:
Sensitive: 0 | Sprint-DHCP-20130411
Sub-Project: DHCP | Resolution:
Estimated Difficulty: 0 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Changes (by tmark):
* owner: => UnAssigned
* status: new => reviewing
Comment:
Replaced the static template method, getParam, with a new template class:
ValueStorarge<typename ValueType>
which provides the following methods:
void setParam(const std::string name, const ValueType value);
ValueType getParam(const std::string& name);
void delParam(const std::string name);
void clear();
in lib/dhcpsrc/dhcp_config_parser.h. This class replaces the use of
std:map
in the typedefs for BooleanStorage, Uint32Storage, and StringStorage.
These
typedefs are now defined in dhcp_config_parser.h.
Unit tests were added to dhcpsrv/tests/cfgmgr_tests.cc to verify proper
functioning
of the new stores.
Modified bin/dhcp4, bin/dhcp6, and unit tests to use the new forms of
storage.
All unit tests pass (see attached test logs except two tests in dhcpsrv
due to
unrelated issue trac# 2837).
Also attached binctl output demonstrating the ability to load/view
configuration for both
dhcp4 and dhcp6.
While the code for BooleanParser,Uint32Parser,and StringParser which all
uses the
new class, ValueStore, is virtually identical in dhcp4 and dhcp6,
refactoring these
classes will be done under 2355.
--
Ticket URL: <https://bind10.isc.org/ticket/2634#comment:2>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list