ConfigurableClientList(RRClass::IN()),
real_(real_list),
config_(Element::fromJSON("{}")),
- ztable_segment_(ZoneTableSegment::create(*config_))
+ ztable_segment_(ZoneTableSegment::create(*config_, RRClass::IN()))
{
BOOST_FOREACH(const DataSourceInfo& info, real_->getDataSources()) {
const isc::datasrc::DataSourceClientPtr
try {
vector<DataSourceInfo> new_data_sources;
shared_ptr<ZoneTableSegment> ztable_segment(
- ZoneTableSegment::create(*config));
+ ZoneTableSegment::create(*config, rrclass_));
for (; i < config->size(); ++i) {
// Extract the parameters
const ConstElementPtr dconf(config->get(i));
#include <datasrc/memory/zone_table_segment.h>
#include <datasrc/memory/zone_table_segment_local.h>
+using namespace isc::dns;
+
namespace isc {
namespace datasrc {
namespace memory {
ZoneTableSegment*
-ZoneTableSegment::create(const isc::data::Element&) {
+ZoneTableSegment::create(const isc::data::Element&, RRClass rrclass) {
/// FIXME: For now, we always return ZoneTableSegmentLocal. This
/// should be updated eventually to parse the passed Element
/// argument and construct a corresponding ZoneTableSegment
/// implementation.
- /// FIXME: For now, we always use RRClass::IN(). This
- /// should be updated eventually to parse the passed Element
- /// argument and pick the appropriate RRClass.
-
- return (new ZoneTableSegmentLocal(isc::dns::RRClass::IN()));
+ return (new ZoneTableSegmentLocal(rrclass));
}
void
/// \param config The configuration based on which a derived object
/// is returned.
/// \return Returns a ZoneTableSegment object
- static ZoneTableSegment* create(const isc::data::Element& config);
+ static ZoneTableSegment* create(const isc::data::Element& config,
+ isc::dns::RRClass rrclass);
/// \brief Destroy a ZoneTableSegment
///
" \"noiter.org\", \"null.org\"]"
"}]")),
config_(Element::fromJSON("{}")),
- ztable_segment_(ZoneTableSegment::create(*config_))
+ ztable_segment_(ZoneTableSegment::create(*config_, rrclass_))
{
for (size_t i(0); i < ds_count; ++ i) {
shared_ptr<MockDataSourceClient>
{
const ElementPtr config(Element::fromJSON("{}"));
shared_ptr<ZoneTableSegment> ztable_segment(
- ZoneTableSegment::create(*config));
+ ZoneTableSegment::create(*config, zclass));
shared_ptr<InMemoryClient> client(new InMemoryClient(ztable_segment,
zclass));
client->load(zname, TEST_ZONE_FILE);