request->setBodyAsJson(command);
try {
request->finalize();
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
isc_throw(ControlSocketError, "failed to create request: "
<< ex.what());
}
try {
return (response->getBodyAsJson());
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
isc_throw(ControlSocketError, "unparsable response: " << ex.what());
}
}
using namespace isc::netconf;
using namespace isc::process;
+using namespace std;
+
int main(int argc, char* argv[]) {
int ret = EXIT_SUCCESS;
// 'false' value disables test mode.
controller->launch(argc, argv, false);
} catch (const VersionMessage& ex) {
- std::string msg(ex.what());
+ string msg(ex.what());
if (!msg.empty()) {
- std::cout << msg << std::endl;
+ cout << msg << endl;
}
} catch (const InvalidUsage& ex) {
- std::string msg(ex.what());
+ string msg(ex.what());
if (!msg.empty()) {
- std::cerr << msg << std::endl;
+ cerr << msg << endl;
}
ret = EXIT_FAILURE;
- } catch (const std::exception& ex) {
- std::cerr << "Service failed: " << ex.what() << std::endl;
+ } catch (exception const& ex) {
+ cerr << "Service failed: " << ex.what() << endl;
ret = EXIT_FAILURE;
} catch (...) {
- std::cerr << "Service failed" << std::endl;
+ cerr << "Service failed" << endl;
ret = EXIT_FAILURE;
}
ControlSocketBasePtr comm;
try {
comm = controlSocketFactory(ctrl_sock);
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
ostringstream msg;
msg << "createControlSocket failed with " << ex.what();
LOG_ERROR(netconf_logger, NETCONF_GET_CONFIG_FAILED)
try {
answer = comm->configGet(server);
config = parseAnswer(rcode, answer);
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
ostringstream msg;
msg << "config-get command failed with " << ex.what();
LOG_ERROR(netconf_logger, NETCONF_GET_CONFIG_FAILED)
running_sess_->switchDatastore(Datastore::Running);
startup_sess_ = Connection{}.sessionStart();
startup_sess_->switchDatastore(Datastore::Startup);
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
isc_throw(Unexpected, "Can't establish a sysrepo session: "
<< ex.what());
}
.arg(server)
.arg(prettyPrint(config));
}
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
ostringstream msg;
msg << "get YANG configuration for " << server
<< " failed with " << ex.what();
ControlSocketBasePtr comm;
try {
comm = controlSocketFactory(ctrl_sock);
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
ostringstream msg;
msg << "control socket creation failed with " << ex.what();
LOG_ERROR(netconf_logger, NETCONF_SET_CONFIG_FAILED)
try {
answer = comm->configSet(config, server);
parseAnswer(rcode, answer);
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
ostringstream msg;
msg << "config-set command failed with " << ex.what();
LOG_ERROR(netconf_logger, NETCONF_SET_CONFIG_FAILED)
options = options | SubscribeOptions::DoneOnly;
}
Subscription subscription(
- running_sess_->onModuleChange(model, callback, std::nullopt, 0, options));
+ running_sess_->onModuleChange(model, callback, nullopt, 0, options));
subscriptions_.emplace(server, forward<Subscription>(subscription));
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
ostringstream msg;
msg << "module change subscribe failed with " << ex.what();
msg << "change subscription for model " << model <<
try {
Subscription subscription(running_sess_->onNotification(model, callback));
subscriptions_.emplace(server, forward<Subscription>(subscription));
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
ostringstream msg;
msg << "event notification subscription for model " << model <<
" failed with: " << ex.what();
.arg(server)
.arg(prettyPrint(config));
}
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
ostringstream msg;
msg << "get YANG configuration for " << server
<< " failed with " << ex.what();
ControlSocketBasePtr comm;
try {
comm = controlSocketFactory(ctrl_sock);
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
ostringstream msg;
msg << "createControlSocket failed with " << ex.what();
LOG_ERROR(netconf_logger, NETCONF_VALIDATE_CONFIG_FAILED)
try {
answer = comm->configTest(config, server);
parseAnswer(rcode, answer);
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
stringstream msg;
msg << "configTest failed with " << ex.what();
LOG_ERROR(netconf_logger, NETCONF_VALIDATE_CONFIG_FAILED)
.arg(server)
.arg(prettyPrint(config));
}
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
ostringstream msg;
msg << "get YANG configuration for " << server
<< " failed with " << ex.what();
ControlSocketBasePtr comm;
try {
comm = controlSocketFactory(ctrl_sock);
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
ostringstream msg;
msg << "createControlSocket failed with " << ex.what();
LOG_ERROR(netconf_logger, NETCONF_UPDATE_CONFIG_FAILED)
try {
answer = comm->configSet(config, server);
parseAnswer(rcode, answer);
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
stringstream msg;
msg << "configSet failed with " << ex.what();
LOG_ERROR(netconf_logger, NETCONF_UPDATE_CONFIG_FAILED)
NetconfAgent::logChanges(Session sess, string_view const& model) {
ostringstream stream;
stream << "/" << model << ":*//.";
- std::string const xpath(stream.str());
+ string const xpath(stream.str());
ChangeCollection const changes(sess.getChanges(xpath));
for (Change const& change : changes) {
ostringstream msg;
using namespace isc::process;
using namespace isc::data;
+using namespace std;
+
namespace isc {
namespace netconf {
"extractConfiguredGlobals must be given a map element");
}
- const std::map<std::string, ConstElementPtr>& values = config->mapValue();
+ const map<string, ConstElementPtr>& values = config->mapValue();
for (auto value = values.begin(); value != values.end(); ++value) {
if (value->second->getType() != Element::list &&
value->second->getType() != Element::map) {
: DCfgMgrBase(ConfigPtr(new NetconfConfig())) {
}
-std::string
+string
NetconfCfgMgr::getConfigSummary(const uint32_t /*selection*/) {
NetconfConfigPtr ctx = getNetconfConfig();
// No globals to print.
- std::ostringstream s;
+ ostringstream s;
// Then print managed servers.
for (auto serv : *ctx->getCfgServersMap()) {
// And parse the configuration.
ConstElementPtr answer;
- std::string excuse;
+ string excuse;
try {
// Do the actual parsing
NetconfSimpleParser parser;
return (result);
}
-std::list<std::list<std::string>>
+list<list<string>>
NetconfCfgMgr::jsonPathsToRedact() const {
- static std::list<std::list<std::string>> const list({
+ static list<list<string>> const list({
{"hooks-libraries", "[]", "parameters", "*"},
});
return list;
CfgControlSocket::Type type;
try {
type = CfgControlSocket::stringToType(type_str);
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
isc_throw(ConfigError, ex.what() << " '" << type_str << "' ("
<< getPosition("socket-type", ctrl_sock_config) << ")");
}
// Create the control socket.
try {
result.reset(new CfgControlSocket(type, name, url));
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
isc_throw(ConfigError, ex.what() << " ("
<< ctrl_sock_config->getPosition() << ")");
}
}
try {
result.reset(new CfgServer(model, ctrl_sock));
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
isc_throw(ConfigError, ex.what() << " ("
<< server_config->getPosition() << ")");
}
}
isc::data::ConstElementPtr
-NetconfController::parseFile(const std::string& name) {
+NetconfController::parseFile(string const& name) {
ParserContext parser;
return (parser.parseFile(name, ParserContext::PARSER_NETCONF));
}
break;
case symbol_kind::S_STRING: // "constant string"
- value.YY_MOVE_OR_COPY< std::string > (YY_MOVE (that.value));
+ value.YY_MOVE_OR_COPY< string > (YY_MOVE (that.value));
break;
default:
break;
case symbol_kind::S_STRING: // "constant string"
- value.move< std::string > (YY_MOVE (that.value));
+ value.move< string > (YY_MOVE (that.value));
break;
default:
break;
case symbol_kind::S_STRING: // "constant string"
- value.copy< std::string > (that.value);
+ value.copy< string > (that.value);
break;
default:
break;
case symbol_kind::S_STRING: // "constant string"
- value.move< std::string > (that.value);
+ value.move< string > (that.value);
break;
default:
{
case symbol_kind::S_STRING: // "constant string"
#line 110 "netconf_parser.yy"
- { yyoutput << yysym.value.template as < std::string > (); }
+ { yyoutput << yysym.value.template as < string > (); }
#line 384 "netconf_parser.cc"
break;
break;
case symbol_kind::S_STRING: // "constant string"
- yylhs.value.emplace< std::string > ();
+ yylhs.value.emplace< string > ();
break;
default:
case 14: // value: "constant string"
#line 151 "netconf_parser.yy"
- { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location))); }
+ { yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as < string > (), ctx.loc2pos(yystack_[0].location))); }
#line 758 "netconf_parser.cc"
break;
#line 183 "netconf_parser.yy"
{
// map containing a single entry
- ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location));
- ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
+ ctx.unique(yystack_[2].value.as < string > (), ctx.loc2pos(yystack_[2].location));
+ ctx.stack_.back()->set(yystack_[2].value.as < string > (), yystack_[0].value.as < ElementPtr > ());
}
#line 813 "netconf_parser.cc"
break;
{
// map consisting of a shorter map followed by
// comma and string:value
- ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location));
- ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
+ ctx.unique(yystack_[2].value.as < string > (), ctx.loc2pos(yystack_[2].location));
+ ctx.stack_.back()->set(yystack_[2].value.as < string > (), yystack_[0].value.as < ElementPtr > ());
}
#line 824 "netconf_parser.cc"
break;
case 33: // unknown_map_entry: "constant string" ":"
#line 229 "netconf_parser.yy"
{
- const std::string& where = ctx.contextName();
- const std::string& keyword = yystack_[1].value.as < std::string > ();
+ const string& where = ctx.contextName();
+ const string& keyword = yystack_[1].value.as < string > ();
error(yystack_[1].location,
"got unexpected keyword \"" + keyword + "\" in " + where + " map.");
}
if (old) {
// Check if it was a comment or a duplicate
if ((old->size() != 1) || !old->contains("comment")) {
- std::stringstream msg;
+ stringstream msg;
msg << "duplicate user-context entries (previous at "
<< old->getPosition().str() << ")";
error(yystack_[3].location, msg.str());
{
ElementPtr parent = ctx.stack_.back();
ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location)));
- ElementPtr comment(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr comment(new StringElement(yystack_[0].value.as < string > (), ctx.loc2pos(yystack_[0].location)));
user_context->set("comment", comment);
// Handle already existing user context
if (old) {
// Check for duplicate comment
if (old->contains("comment")) {
- std::stringstream msg;
+ stringstream msg;
msg << "duplicate user-context/comment entries (previous at "
<< old->getPosition().str() << ")";
error(yystack_[3].location, msg.str());
case 77: // library: "library" $@13 ":" "constant string"
#line 415 "netconf_parser.yy"
{
- ElementPtr lib(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr lib(new StringElement(yystack_[0].value.as < string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("library", lib);
ctx.leave();
}
case 112: // model: "model" $@20 ":" "constant string"
#line 535 "netconf_parser.yy"
{
- ElementPtr model(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr model(new StringElement(yystack_[0].value.as < string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("model", model);
ctx.leave();
}
case 130: // socket_name: "socket-name" $@23 ":" "constant string"
#line 586 "netconf_parser.yy"
{
- ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr name(new StringElement(yystack_[0].value.as < string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("socket-name", name);
ctx.leave();
}
case 132: // socket_url: "socket-url" $@24 ":" "constant string"
#line 596 "netconf_parser.yy"
{
- ElementPtr url(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr url(new StringElement(yystack_[0].value.as < string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("socket-url", url);
ctx.leave();
}
case 151: // name: "name" $@27 ":" "constant string"
#line 654 "netconf_parser.yy"
{
- ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr name(new StringElement(yystack_[0].value.as < string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("name", name);
ctx.leave();
}
case 154: // severity: "severity" $@28 ":" "constant string"
#line 669 "netconf_parser.yy"
{
- ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr sev(new StringElement(yystack_[0].value.as < string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("severity", sev);
ctx.leave();
}
case 171: // output: "output" $@31 ":" "constant string"
#line 718 "netconf_parser.yy"
{
- ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr sev(new StringElement(yystack_[0].value.as < string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("output", sev);
ctx.leave();
}
case 176: // pattern: "pattern" $@32 ":" "constant string"
#line 745 "netconf_parser.yy"
{
- ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
+ ElementPtr sev(new StringElement(yystack_[0].value.as < string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("pattern", sev);
ctx.leave();
}
void
isc::netconf::NetconfParser::error(const location_type& loc,
- const std::string& what)
-{
+ const string& what) {
ctx.error(loc, what);
}
char dummy4[sizeof (int64_t)];
// "constant string"
- char dummy5[sizeof (std::string)];
+ char dummy5[sizeof (string)];
};
/// The size of the largest semantic type.
break;
case symbol_kind::S_STRING: // "constant string"
- value.move< std::string > (std::move (that.value));
+ value.move< string > (std::move (that.value));
break;
default:
#endif
#if 201103L <= YY_CPLUSPLUS
- basic_symbol (typename Base::kind_type t, std::string&& v, location_type&& l)
+ basic_symbol (typename Base::kind_type t, string&& v, location_type&& l)
: Base (t)
, value (std::move (v))
, location (std::move (l))
{}
#else
- basic_symbol (typename Base::kind_type t, const std::string& v, const location_type& l)
+ basic_symbol (typename Base::kind_type t, const string& v, const location_type& l)
: Base (t)
, value (v)
, location (l)
break;
case symbol_kind::S_STRING: // "constant string"
- value.template destroy< std::string > ();
+ value.template destroy< string > ();
break;
default:
#endif
}
#if 201103L <= YY_CPLUSPLUS
- symbol_type (int tok, std::string v, location_type l)
+ symbol_type (int tok, string v, location_type l)
: super_type (token_kind_type (tok), std::move (v), std::move (l))
#else
- symbol_type (int tok, const std::string& v, const location_type& l)
+ symbol_type (int tok, const string& v, const location_type& l)
: super_type (token_kind_type (tok), v, l)
#endif
{
#if 201103L <= YY_CPLUSPLUS
static
symbol_type
- make_STRING (std::string v, location_type l)
+ make_STRING (string v, location_type l)
{
return symbol_type (token::TOKEN_STRING, std::move (v), std::move (l));
}
#else
static
symbol_type
- make_STRING (const std::string& v, const location_type& l)
+ make_STRING (const string& v, const location_type& l)
{
return symbol_type (token::TOKEN_STRING, v, l);
}
break;
case symbol_kind::S_STRING: // "constant string"
- value.copy< std::string > (YY_MOVE (that.value));
+ value.copy< string > (YY_MOVE (that.value));
break;
default:
break;
case symbol_kind::S_STRING: // "constant string"
- value.move< std::string > (YY_MOVE (s.value));
+ value.move< string > (YY_MOVE (s.value));
break;
default:
START_SUB_NETCONF
;
-%token <std::string> STRING "constant string"
+%token <string> STRING "constant string"
%token <int64_t> INTEGER "integer"
%token <double> FLOAT "floating point"
%token <bool> BOOLEAN "boolean"
// if you want to have a nice expression printed when unknown (mistyped?)
// parameter is found.
unknown_map_entry: STRING COLON {
- const std::string& where = ctx.contextName();
- const std::string& keyword = $1;
+ const string& where = ctx.contextName();
+ const string& keyword = $1;
error(@1,
"got unexpected keyword \"" + keyword + "\" in " + where + " map.");
};
if (old) {
// Check if it was a comment or a duplicate
if ((old->size() != 1) || !old->contains("comment")) {
- std::stringstream msg;
+ stringstream msg;
msg << "duplicate user-context entries (previous at "
<< old->getPosition().str() << ")";
error(@1, msg.str());
if (old) {
// Check for duplicate comment
if (old->contains("comment")) {
- std::stringstream msg;
+ stringstream msg;
msg << "duplicate user-context/comment entries (previous at "
<< old->getPosition().str() << ")";
error(@1, msg.str());
void
isc::netconf::NetconfParser::error(const location_type& loc,
- const std::string& what)
-{
+ const string& what) {
ctx.error(loc, what);
}
}
isc::data::ElementPtr
-ParserContext::parseString(const std::string& str, ParserType parser_type)
+ParserContext::parseString(string const& str, ParserType parser_type)
{
scanStringBegin(str, parser_type);
return (parseCommon());
}
isc::data::ElementPtr
-ParserContext::parseFile(const std::string& filename, ParserType parser_type) {
+ParserContext::parseFile(string const& filename, ParserType parser_type) {
FILE* f = fopen(filename.c_str(), "r");
if (!f) {
isc_throw(ParseError, "Unable to open file " << filename);
void
ParserContext::error(const isc::netconf::location& loc,
- const std::string& what,
+ string const& what,
size_t pos)
{
if (pos == 0) {
}
void
-ParserContext::error(const std::string& what)
+ParserContext::error(string const& what)
{
isc_throw(ParseError, what);
}
void
-ParserContext::fatal(const std::string& what)
+ParserContext::fatal(string const& what)
{
isc_throw(ParseError, what);
}
isc::data::Element::Position
ParserContext::loc2pos(isc::netconf::location& loc)
{
- const std::string& file = *loc.begin.filename;
+ string const& file = *loc.begin.filename;
const uint32_t line = loc.begin.line;
const uint32_t pos = loc.begin.column;
return (isc::data::Element::Position(file, line, pos));
}
void
-ParserContext::require(const std::string& name,
+ParserContext::require(string const& name,
isc::data::Element::Position open_loc,
isc::data::Element::Position close_loc)
{
}
void
-ParserContext::unique(const std::string& name,
+ParserContext::unique(string const& name,
isc::data::Element::Position loc)
{
ConstElementPtr value = stack_.back()->get(name);
cstack_.pop_back();
}
-const std::string
+string const
ParserContext::contextName()
{
switch (ctx_) {
void
ParserContext::warning(const isc::netconf::location& loc,
- const std::string& what) {
- std::ostringstream msg;
+ string const& what) {
+ ostringstream msg;
msg << loc << ": " << what;
LOG_WARN(netconf_logger, NETCONF_CONFIG_SYNTAX_WARNING)
.arg(msg.str());
ConstElementPtr json = Element::fromJSON("{ \"want-partial\": true }");
// Warn this makes time.
- cout << "this test waits for 2 seconds" << endl;
+ cout << "Waiting 2s..." << endl;
// Try configSet: it should get a communication error,
try {
};
size_t cnt = 0;
test(sample_json, sample_json, cnt);
- cout << "checked " << cnt << " duplicated map entries\n";
+ cout << "Checked " << cnt << " duplicated map entries.\n";
}
/// @brief Test fixture for trailing commas.
try {
return (received_feed->toElement());
- } catch (const std::exception& ex) {
+ } catch (exception const& ex) {
isc_throw(ControlSocketError, "unparsable response: " << ex.what());
}
}
ConstElementPtr code = option->get("code");
string index = space->stringValue() + "@" + name->stringValue();
uint16_t val = static_cast<uint16_t>(code->intValue());
- codes.insert(std::pair<string, uint16_t>(index, val));
+ codes.insert(pair<string, uint16_t>(index, val));
}
}
size_t params_size) {
for (size_t i = 0; i < params_size; ++i) {
string index = space + "@" + params[i].name;
- codes.insert(std::pair<string, uint16_t>(index, params[i].code));
+ codes.insert(pair<string, uint16_t>(index, params[i].code));
}
}
for (string file : examples) {
resetSession();
string path = string(CFG_EXAMPLES) + "/kea4/" + file;
- cout << "Testing file " << path << endl;
+ SCOPED_TRACE("\n* Tested file: " + path);
ConstElementPtr json;
ASSERT_NO_THROW_LOG(json = loadFile(path));
json = isc::test::moveComments(json);
for (string file : examples) {
resetSession();
string path = string(CFG_EXAMPLES) + "/kea6/" + file;
- cout << "Testing file " << path << endl;
+ SCOPED_TRACE("\n* Tested file: " + path);
ConstElementPtr json;
ASSERT_NO_THROW_LOG(json = loadFile(path));
json = isc::test::moveComments(json);
}
void
-TranslatorBasic::deleteItem(const std::string& xpath) {
+TranslatorBasic::deleteItem(string const& xpath) {
/// @todo: Remove this if convenient. It is not strictly required and only done to detect
/// missing schema nodes and throw an exception to keep old behavior.
try {
// A null ElementPtr is how we signal that this item requires no value.
// Useful when setting YANG lists which is the only way to set their
// keys in sysrepo since setting the key itself results in an error.
- return std::nullopt;
+ return nullopt;
} else if (element->getType() == Element::map) {
/// @todo: implement
isc_throw(NotImplemented, "TranslatorBasic::value(): map element");
}
ElementPtr
-TranslatorDatabases::getDatabasesKea(DataNode const& data_node, std::string const& xpath) {
+TranslatorDatabases::getDatabasesKea(DataNode const& data_node, string const& xpath) {
return getList<TranslatorDatabase>(data_node, xpath, *this,
&TranslatorDatabase::getDatabase);
}
}
ElementPtr
-TranslatorHost::getHostFromAbsoluteXpath(std::string const& xpath) {
+TranslatorHost::getHostFromAbsoluteXpath(string const& xpath) {
try {
return getHost(findXPath(xpath));
} catch(NetconfError const&) {
}
ElementPtr
-TranslatorHosts::getHostsFromAbsoluteXpath(std::string const& xpath) {
+TranslatorHosts::getHostsFromAbsoluteXpath(string const& xpath) {
try {
return getHosts(findXPath(xpath));
} catch(NetconfError const&) {
ElementPtr
TranslatorSharedNetwork::getSharedNetworkKea(DataNode const& data_node,
- const std::string& subsel) {
+ string const& subsel) {
ElementPtr result = Element::createMap();
getMandatoryLeaf(result, data_node, "name");
void
TranslatorSharedNetwork::setSharedNetworkKea(string const& xpath,
ConstElementPtr elem,
- const std::string& subsel) {
+ string const& subsel) {
// Skip key "name".
checkAndSetLeaf(elem, xpath, "cache-max-age", LeafBaseType::Uint32);
ElementPtr
TranslatorSubnets::getSubnetsCommon(DataNode const& data_node,
- const std::string& subsel) {
+ string const& subsel) {
return getList<TranslatorSubnet>(data_node, subsel, *this,
&TranslatorSubnet::getSubnet);
}
void
TranslatorSubnets::setSubnetsKea(string const& xpath, ConstElementPtr elem,
- const std::string& subsel) {
+ string const& subsel) {
for (size_t i = 0; i < elem->size(); ++i) {
ConstElementPtr subnet = elem->get(i);
if (!subnet->contains("id")) {