boost::scoped_ptr<TranslatorOptionDefList> todl_obj;
// Use the ad hoc model.
- const string& model = "kea-dhcp4";
+ const string& model = "kea-dhcp4-server";
EXPECT_NO_THROW(todl_obj.reset(new TranslatorOptionDefList(sess, model)));
// Get the option definition list and checks it is empty.
- const string& xpath = "/kea-dhcp4:config/option-def-list";
+ const string& xpath = "/kea-dhcp4-server:config/option-def-list";
ConstElementPtr options;
EXPECT_NO_THROW(options = todl_obj->getOptionDefList(xpath));
ASSERT_TRUE(options);
boost::scoped_ptr<TranslatorOptionDefList> todl_obj;
// Use the ad hoc model.
- const string& model = "kea-dhcp6";
+ const string& model = "kea-dhcp6-server";
EXPECT_NO_THROW(todl_obj.reset(new TranslatorOptionDefList(sess, model)));
// Create the option code 100.
- const string& xpath = "/kea-dhcp6:config/option-def-list";
+ const string& xpath = "/kea-dhcp6-server:config/option-def-list";
const string& xdef = xpath + "/option-def[code='100'][space='isc']";
const string& xname = xdef + "/name";
const string& xtype = xdef + "/type";
boost::scoped_ptr<TranslatorOptionDefList> todl_obj;
// Use the ad hoc model.
- const string& model = "kea-dhcp4";
+ const string& model = "kea-dhcp4-server";
EXPECT_NO_THROW(todl_obj.reset(new TranslatorOptionDefList(sess, model)));
// Set empty list.
- const string& xpath = "/kea-dhcp4:config/option-def-list";
+ const string& xpath = "/kea-dhcp4-server:config/option-def-list";
ConstElementPtr defs = Element::createList();
EXPECT_NO_THROW(todl_obj->setOptionDefList(xpath, defs));
boost::scoped_ptr<TranslatorOptionDefList> todl_obj;
// Use the ad hoc model.
- const string& model = "kea-dhcp6";
+ const string& model = "kea-dhcp6-server";
EXPECT_NO_THROW(todl_obj.reset(new TranslatorOptionDefList(sess, model)));
// Set one option def.
- const string& xpath = "/kea-dhcp6:config/option-def-list";
+ const string& xpath = "/kea-dhcp6-server:config/option-def-list";
ElementPtr defs = Element::createList();
ElementPtr def = Element::createMap();
def->set("code", Element::create(100));
// Check the tree representation.
S_Tree tree;
- EXPECT_NO_THROW(tree = sess->get_subtree("/kea-dhcp6:config"));
+ EXPECT_NO_THROW(tree = sess->get_subtree("/kea-dhcp6-server:config"));
ASSERT_TRUE(tree);
string expected =
- "kea-dhcp6:config (container)\n"
+ "kea-dhcp6-server:config (container)\n"
" |\n"
" -- option-def-list (container)\n"
" |\n"
ElementPtr
TranslatorOptionDef::getOptionDef(const string& xpath) {
try {
- if ((model_ == "kea-dhcp4") || (model_ == "kea-dhcp6")) {
+ if ((model_ == "kea-dhcp4-server") ||
+ (model_ == "kea-dhcp6-server")) {
return (getOptionDefKea(xpath));
}
} catch (const sysrepo_exception& ex) {
void
TranslatorOptionDef::setOptionDef(const string& xpath, ConstElementPtr elem) {
try {
- if ((model_ == "kea-dhcp4") || (model_ == "kea-dhcp6")) {
+ if ((model_ == "kea-dhcp4-server") ||
+ (model_ == "kea-dhcp6-server")) {
setOptionDefKea(xpath, elem);
} else {
isc_throw(NotImplemented,
ConstElementPtr
TranslatorOptionDefList::getOptionDefList(const string& xpath) {
try {
- if ((model_ == "kea-dhcp4") || (model_ == "kea-dhcp6")) {
+ if ((model_ == "kea-dhcp4-server") ||
+ (model_ == "kea-dhcp6-server")) {
return (getOptionDefListKea(xpath));
}
} catch (const sysrepo_exception& ex) {
TranslatorOptionDefList::setOptionDefList(const string& xpath,
ConstElementPtr elem) {
try {
- if ((model_ == "kea-dhcp4") || (model_ == "kea-dhcp6")) {
+ if ((model_ == "kea-dhcp4-server") ||
+ (model_ == "kea-dhcp6-server")) {
setOptionDefListKea(xpath, elem);
} else {
isc_throw(NotImplemented,