OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
test_xml.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
3  */
4 #include "base/os.h"
5 #include <iostream>
6 #include <fstream>
7 #include <pugixml/pugixml.hpp>
8 #include <boost/filesystem.hpp>
9 #include <boost/uuid/uuid.hpp>
10 
11 #include <test/test_cmn_util.h>
12 #include <pkt/test/test_pkt_util.h>
13 #include <pkt/flow_mgmt.h>
14 #include <oper/global_vrouter.h>
15 #include "test_xml.h"
16 #include "test_xml_validate.h"
17 #include "test_xml_packet.h"
18 
19 using namespace std;
20 using namespace pugi;
21 using namespace boost::uuids;
22 using namespace AgentUtXmlUtils;
23 
24 namespace AgentUtXmlUtils {
25 bool GetStringAttribute(const xml_node &node, const string &name,
26  string *value) {
27  xml_attribute attr = node.attribute(name.c_str());
28  if (!attr) {
29  return false;;
30  }
31 
32  *value = attr.as_string();
33 
34  return true;
35 }
36 
37 bool GetUintAttribute(const xml_node &node, const string &name,
38  uint16_t *value) {
39  xml_attribute attr = node.attribute(name.c_str());
40  if (!attr) {
41  return false;;
42  }
43 
44  *value = attr.as_uint();
45 
46  return true;
47 }
48 
49 bool GetIntAttribute(const xml_node &node, const string &name, int *value) {
50  xml_attribute attr = node.attribute(name.c_str());
51  if (!attr) {
52  return false;;
53  }
54 
55  *value = attr.as_int();
56 
57  return true;
58 }
59 
60 bool GetBoolAttribute(const xml_node &node, const string &name,
61  bool *value) {
62  xml_attribute attr = node.attribute(name.c_str());
63  if (!attr) {
64  return false;;
65  }
66 
67  string str = attr.as_string();
68  if (str == "true" || str == "yes")
69  *value = true;
70  else
71  *value = false;
72  return true;
73 }
74 
75 void NovaIntfAdd(bool op_delete, const uuid &id, const Ip4Address &ip,
76  const uuid &vm_uuid, const uuid vn_uuid, const string &name,
77  const string &mac, const string vm_name) {
78  if (op_delete) {
79  PortUnSubscribe(id);
80  cout << "Nova Del Interface Message " << endl;
81  return;
82  }
83 
84  PortSubscribe(name, id, vm_uuid, vm_name, vn_uuid, MakeUuid(1), ip,
85  Ip6Address::v4_compatible(ip), mac);
86  cout << "Nova Add Interface Message " << endl;
87  return;
88 }
89 
90 void LinkXmlNode(xml_node *parent, const string &ltype, const string lname,
91  const string &rtype, const string rname) {
92  xml_node n = parent->append_child("link");
93 
94  xml_node n1 = n.append_child("node");
95  n1.append_attribute("type") = ltype.c_str();
96 
97  xml_node n2 = n1.append_child("name");
98  n2.append_child(pugi::node_pcdata).set_value(lname.c_str());
99 
100  n1 = n.append_child("node");
101  n1.append_attribute("type") = rtype.c_str();
102 
103  n2 = n1.append_child("name");
104  n2.append_child(pugi::node_pcdata).set_value(rname.c_str());
105 
106  string mdata = GetMetadata(ltype.c_str(), rtype.c_str());
107  xml_node n3 = n.append_child("metadata");
108  n3.append_attribute("type") = mdata.c_str();
109  return;
110 }
111 
112 xml_node AddXmlNodeWithAttr(xml_node *parent, const char *attr) {
113  xml_node n = parent->append_child("node");
114  n.append_attribute("type") = attr;
115  return n;
116 }
117 
118 xml_node AddXmlNodeWithValue(xml_node *parent, const char *name,
119  const string &value) {
120  xml_node n = parent->append_child(name);
121  n.append_child(pugi::node_pcdata).set_value(value.c_str());
122  return n;
123 }
124 
125 xml_node AddXmlNodeWithIntValue(xml_node *parent, const char *name,
126  int val) {
127  stringstream s;
128  s << val;
129  xml_node n = parent->append_child(name);
130  n.append_child(pugi::node_pcdata).set_value(s.str().c_str());
131  return n;
132 }
133 }
134 
136 // AgentUtXmlTest routines
138 AgentUtXmlTest::AgentUtXmlTest(const std::string &name) : file_name_(name) {
139 }
140 
142 
143  for (AgentUtXmlTestList::iterator i = test_list_.begin();
144  i != test_list_.end(); i++) {
145  delete *i;
146  }
147 }
148 
149 void AgentUtXmlTest::AddConfigEntry(const std::string &name,
151  config_factory_[name] = fn;
152 }
153 
154 void AgentUtXmlTest::AddValidateEntry(const std::string &name,
156  validate_factory_[name] = fn;
157 }
158 
160 AgentUtXmlTest::GetConfigCreateFn(const std::string &name) {
161  AgentUtXmlTestConfigFactory::iterator iter = config_factory_.find(name);
162  if (iter == config_factory_.end()) {
164  }
165 
166  return iter->second;
167 }
168 
170 AgentUtXmlTest::GetValidateCreateFn(const std::string &name) {
171  AgentUtXmlTestValidateFactory::iterator iter = validate_factory_.find(name);
172  if (iter == validate_factory_.end()) {
173  assert(0);
174  }
175  return iter->second;
176 }
177 
179  xml_node list = doc_.child("test_suite");
180  GetStringAttribute(list, "name", &name_);
181 
182  for (xml_node node = list.first_child(); node; node = node.next_sibling()) {
183  if (strcmp(node.name(), "test") == 0) {
184  xml_attribute attr = node.attribute("name");
185  if (!attr) {
186  cout << "Missing attribute \"name\". Skipping" << endl;
187  continue;
188  }
189  AgentUtXmlTestCase *test = new AgentUtXmlTestCase(attr.value(),
190  node, this);
191  attr = node.attribute("verbose");
192  bool verbose = false;
193  if (!attr) {
194  verbose = false;
195  } else {
196  if (atoi(attr.value()))
197  verbose = true;
198  }
199  test->set_verbose(verbose);
200  test_list_.push_back(test);
201  test->ReadXml();
202  }
203  }
204 
205  return true;
206 }
207 
209  boost::system::error_code ec;
210  boost::filesystem::path file_path(file_name_);
211  uintmax_t file_size = boost::filesystem::file_size(file_path, ec);
212  if (ec) {
213  cout << "Error <" << ec << "> opening file" << file_name_ << endl;
214  return false;
215  }
216 
217  std::fstream file(file_name_.c_str(), std::ios::binary | std::ios_base::in);
218  if (!file) {
219  cout << "Error <fstream error> opening file" << file_name_ << endl;
220  return false;
221  }
222 
223  std::vector<char> data(file_size + 1, 0);
224  file.read(data.data(), file_size);
225  if (!file || file.gcount() < static_cast<std::streamsize>(file_size)) {
226  cout << "Error <fstream::read> reading file" << file_name_ << endl;
227  return false;
228  }
229 
230  xml_parse_result result = doc_.load(data.data());
231  if (result) {
232  cout << "Loaded data file successfully" << endl;
233  } else {
234  cout << "Error in XML string at offset <: " << result.offset
235  << "> (error at [..." << (data.data() + result.offset) << "])" << endl;
236  return false;
237  }
238 
239  return true;
240 }
241 
242 void AgentUtXmlTest::ToString(string *str) {
243  stringstream s;
244 
245  s << "Test Suite : " << name_ << endl;
246  *str += s.str();
247  for (AgentUtXmlTestList::iterator it = test_list_.begin();
248  it != test_list_.end(); it++) {
249  (*it)->ToString(str);
250  }
251  return;
252 }
253 
255  for (AgentUtXmlTestList::iterator it = test_list_.begin();
256  it != test_list_.end(); it++) {
257  (*it)->Run();
258  }
259 
260  return true;
261 }
262 
263 bool AgentUtXmlTest::Run(std::string test_case) {
264  for (AgentUtXmlTestList::iterator it = test_list_.begin();
265  it != test_list_.end(); it++) {
266  if ((*it)->name().compare(test_case) == 0) {
267  (*it)->Run();
268  return true;
269  }
270  }
271 
272  return false;
273 }
274 
276 // AgentUtXmlTestCase routines
278 static bool CheckConfigNode(const string &node_name, const xml_node &node,
279  uuid *id, string *name) {
280  if (strcmp(node.name(), node_name.c_str()) != 0) {
281  return false;
282  }
283 
284  xml_attribute attr = node.attribute("name");
285  if (!attr) {
286  cout << "Attribute \"name\" not found for " << node_name
287  << ". Skipping..." << endl;
288  return false;
289  }
290 
291  *name = attr.as_string();
292  if (*name == "") {
293  cout << "Invalid \"name\" for " << node_name << " Skipping" << endl;
294  return false;
295  }
296 
297  if (node_name == "validate")
298  return false;
299 
300  attr = node.attribute("uuid");
301  if (!attr) {
302  cout << "Attribute \"uuid\" not found for " << node_name
303  << ". Skipping..." << endl;
304  return false;;
305  }
306 
307  int x = attr.as_uint();
308  if (x == 0) {
309  cout << "Invalid \"uuid\" (0) for " << node_name << " Skipping" << endl;
310  return false;
311  }
312 
313  *id = MakeUuid(x);
314 
315  return true;
316 }
317 
319  const xml_node &node,
320  AgentUtXmlTest *test)
321  : name_(name), xml_node_(node), test_(test), verbose_(false) {
322  cout << "Creating test-case <" << name_ << ">" << endl;
323 }
324 
326  for (AgentUtXmlNodeList::iterator i = node_list_.begin();
327  i != node_list_.end(); i++) {
328  delete *i;
329  }
330 }
331 
333  for (xml_node node = xml_node_.first_child(); node;
334  node = node.next_sibling()) {
335 
336  string str;
337  bool op_delete = false;
338  if (GetStringAttribute(node, "delete", &str) == true ||
339  GetStringAttribute(node, "del", &str) == true) {
340  if (str != "false" && str != "0")
341  op_delete = true;
342  }
343 
344  uuid id;
345  string name;
346  AgentUtXmlNode *cfg = NULL;
347 
349  test_->GetConfigCreateFn(node.name());
350  if (CheckConfigNode(node.name(), node, &id, &name) == true) {
351  if (fn.empty() == false)
352  cfg = fn(node.name(), name, id, node, this);
353  }
354 
355  if (strcmp(node.name(), "link") == 0) {
356  cfg = new AgentUtXmlLink(node, this);
357  }
358 
359  if (strcmp(node.name(), "packet") == 0) {
360  if (GetStringAttribute(node, "name", &name) == false) {
361  cout << "Attribute \"name\" not specified for Packet. Skipping"
362  << endl;
363  continue;
364  }
365  cfg = new AgentUtXmlPacket(name, node, this);
366  }
367 
368  if (strcmp(node.name(), "task") == 0) {
369  cfg = new AgentUtXmlTask(node, this);
370  }
371 
372  if (strcmp(node.name(), "validate") == 0) {
373  if (GetStringAttribute(node, "name", &name) == false) {
374  cout << "Attribute \"name\" not specified for validate."
375  " Skipping" << endl;
376  continue;
377  }
378  cfg = new AgentUtXmlValidate(name, node, this);
379  }
380 
381  if (cfg) {
382  cfg->set_op_delete(op_delete);
383  } else {
384  cout << "Unknown node name <" << node.name() << ">. Ignoring"
385  << endl;
386  }
387  if (cfg) {
388  bool ret = cfg->ReadXml();
389  if (op_delete == false && ret == false) {
390  delete cfg;
391  cfg = NULL;
392  }
393  }
394 
395  if (cfg) {
396  node_list_.push_back(cfg);
397  }
398  }
399 
400  return true;
401 }
402 
404  for (AgentUtXmlNodeList::iterator it = node_list_.begin();
405  it != node_list_.end(); it++) {
406  if ((*it)->gen_xml() == false) {
407  (*it)->Run();
409  continue;
410  }
411 
412  xml_document doc;
413 
414  xml_node decl = doc.prepend_child(pugi::node_declaration);
415  decl.append_attribute("version") = "1.0";
416 
417  xml_node n = doc.append_child("config");
418  xml_node n1;
419  if ((*it)->op_delete()) {
420  n1 = n.append_child("delete");
421  } else {
422  n1 = n.append_child("update");
423  }
424  (*it)->ToXml(&n1);
425  if (verbose_) {
426  doc.print(std::cout);
427  }
428  Agent *agent = Agent::GetInstance();
429  agent->ifmap_parser()->ConfigParse(n, 0);
431  }
432 
433  return true;
434 }
435 
436 void AgentUtXmlTestCase::ToString(string *str) {
437  stringstream s;
438 
439  s << "Test Case : " << name_ << endl;
440  *str += s.str();
441  for (AgentUtXmlNodeList::iterator it = node_list_.begin();
442  it != node_list_.end(); it++) {
443  (*it)->ToString(str);
444  }
445  return;
446 }
447 
449 // AgentUtXmlNode routines
451 AgentUtXmlNode::AgentUtXmlNode(const string &name, const xml_node &node,
452  AgentUtXmlTestCase *test_case) :
453  node_(node), name_(name), op_delete_(false), gen_xml_(true),
454  test_case_(test_case) {
455 }
456 
457 AgentUtXmlNode::AgentUtXmlNode(const string &name, const xml_node &node,
458  bool gen_xml, AgentUtXmlTestCase *test_case) :
459  node_(node), name_(name), op_delete_(false), gen_xml_(gen_xml),
460  test_case_(test_case) {
461 }
462 
464 }
465 
467  string str;
468  op_delete_ = false;
469  if (GetStringAttribute(node_, "delete", &str) == true ||
470  GetStringAttribute(node_, "del", &str) == true) {
471  if (str != "false" && str != "0")
472  op_delete_ = true;
473  }
474 
475  return true;
476 }
477 
478 void AgentUtXmlNode::ToString(string *str) {
479  stringstream s;
480 
481  if (op_delete_)
482  s << "Delete ";
483  else
484  s << "Add ";
485 
486  s << NodeType() << " : " << name_ << " ";
487 
488  *str += s.str();
489  return;
490 }
491 
493 // AgentUtXmlTask routines
495 AgentUtXmlTask::AgentUtXmlTask(const xml_node &node,
496  AgentUtXmlTestCase *test_case) :
497  AgentUtXmlNode("task", node, false, test_case) {
498 }
499 
501 }
502 
504  GetStringAttribute(node(), "stop", &stop_);
505  return true;
506 }
507 
508 bool AgentUtXmlTask::ToXml(xml_node *parent) {
509  return true;
510 }
511 
512 void AgentUtXmlTask::ToString(string *str) {
514  stringstream s;
515 
516  s << "Stop : " << stop_ << endl;
517  *str += s.str();
518  return;
519 }
520 
522  return "Task";
523 }
524 
526  if (boost::iequals(stop_, "1") || boost::iequals(stop_, "yes")) {
529  } else {
532  }
533  return true;
534 }
535 
537 // AgentUtXmlLink routines
539 AgentUtXmlLink::AgentUtXmlLink(const xml_node &node,
540  AgentUtXmlTestCase *test_case) :
541  AgentUtXmlNode("link", node, test_case) {
542 }
543 
545 }
546 
548  if (GetStringAttribute(node(), "left", &l_node_) == false) {
549  cout << "Left node-type not specified for link. Skipping" << endl;
550  return false;
551  }
552 
553  if (GetStringAttribute(node(), "left-name", &l_name_) == false) {
554  cout << "Right node-name not specified for link. Skipping" << endl;
555  return false;
556  }
557 
558  if (GetStringAttribute(node(), "right", &r_node_) == false) {
559  cout << "Right node-type not specified for link. Skipping" << endl;
560  return false;
561  }
562 
563  if (GetStringAttribute(node(), "right-name", &r_name_) == false) {
564  cout << "Right node-name not specified for link. Skipping" << endl;
565  return false;
566  }
567 
568  return true;
569 }
570 
571 bool AgentUtXmlLink::ToXml(xml_node *parent) {
573  return true;
574 }
575 
576 void AgentUtXmlLink::ToString(string *str) {
578  stringstream s;
579 
580  s << "<" << l_node_ << " : " << l_name_ << "> <" << " right-node "
581  << r_node_ << " : " << r_name_ << ">" << endl;
582 
583  *str += s.str();
584  return;
585 }
586 
588  return "Link";
589 }
590 
592 // AgentUtXmlConfig routines
594 AgentUtXmlConfig::AgentUtXmlConfig(const string &name, const uuid &id,
595  const xml_node &node,
596  AgentUtXmlTestCase *test_case) :
597  AgentUtXmlNode(name, node, test_case), id_(id) {
598 }
599 
600 AgentUtXmlConfig::AgentUtXmlConfig(const string &name, const uuid &id,
601  const xml_node &node, bool gen_xml,
602  AgentUtXmlTestCase *test_case) :
603  AgentUtXmlNode(name, node, gen_xml, test_case), id_(id) {
604 }
605 
607 }
608 
610  return AgentUtXmlNode::ReadXml();
611 }
612 
613 void AgentUtXmlConfig::ToString(std::string *str) {
615  stringstream s;
616  s << " UUID : " << id_;
617  *str += s.str();
618 }
619 
620 static void AddPermissions(xml_node *parent) {
621  xml_node n = parent->append_child("permissions");
622 
623  AddXmlNodeWithValue(&n, "owner", "cloud-admin");
624  AddXmlNodeWithValue(&n, "owner-access", "7");
625  AddXmlNodeWithValue(&n, "group", "cloud-admin-group");
626  AddXmlNodeWithValue(&n, "group-access", "7");
627  AddXmlNodeWithValue(&n, "other-access", "7");
628 }
629 
630 static void AddUuid(xml_node *parent, const uuid &id) {
631  xml_node n = parent->append_child("uuid");
632 
633  std::vector<uint8_t> v1(id.size());
634  std::vector<uint64_t> v(id.size());
635  std::copy(id.begin(), id.end(), v.begin());
636 
637  uint64_t ms_val = v[7] + (v[6] << 8) + (v[5] << 16) + (v[4] << 24) +
638  (v[3] << 32) + (v[2] << 40) + (v[1] << 48) + (v[0] << 56);
639  uint64_t ls_val = v[15] + (v[14] << 8) + (v[13] << 16) + (v[12] << 24) +
640  (v[11] << 32) + (v[10] << 40) + (v[9] << 48) + (v[8] << 56);
641  stringstream s;
642  s << ms_val;
643  AddXmlNodeWithValue(&n, "uuid-mslong", s.str());
644 
645  stringstream s1;
646  s1 << ls_val;
647  AddXmlNodeWithValue(&n, "uuid-lslong", s1.str());
648 }
649 
650 void AgentUtXmlConfig::AddIdPerms(xml_node *parent) {
651 
652  if (op_delete())
653  return;
654 
655  xml_node n = parent->append_child("id-perms");
656  AddPermissions(&n);
657  AddUuid(&n, id());
658  AddXmlNodeWithValue(&n, "enable", "true");
659 }
std::string name_
Definition: test_xml.h:79
boost::function< AgentUtXmlValidationNode *(const std::string &type, const std::string &name, const boost::uuids::uuid &id, const pugi::xml_node &node)> AgentUtXmlTestValidateCreateFn
Definition: test_xml.h:56
virtual void ToString(std::string *str)
Definition: test_xml.cc:436
IFMapAgentParser * ifmap_parser() const
Definition: agent.h:1172
virtual ~AgentUtXmlTest()
Definition: test_xml.cc:141
virtual std::string NodeType()
Definition: test_xml.cc:521
virtual void ToString(std::string *str)
Definition: test_xml.cc:613
xml_node AddXmlNodeWithIntValue(xml_node *parent, const char *name, int val)
Definition: test_xml.cc:125
void set_verbose(bool val)
Definition: test_xml.h:99
AgentUtXmlNode(const std::string &name, const pugi::xml_node &node, AgentUtXmlTestCase *test_case)
static Agent * GetInstance()
Definition: agent.h:436
bool GetIntAttribute(const xml_node &node, const string &name, int *value)
Definition: test_xml.cc:49
std::string file_name_
Definition: test_xml.h:78
virtual void ToString(std::string *str)
Definition: test_xml.cc:512
pugi::xml_document doc_
Definition: test_xml.h:80
AgentUtXmlTestValidateFactory validate_factory_
Definition: test_xml.h:83
static bool CheckConfigNode(const string &node_name, const xml_node &node, uuid *id, string *name)
Definition: test_xml.cc:278
AgentUtXmlTestValidateCreateFn GetValidateCreateFn(const std::string &name)
Definition: test_xml.cc:170
const std::string & name() const
Definition: test_xml.h:101
AgentUtXmlTask(const pugi::xml_node &node, AgentUtXmlTestCase *test_case)
Definition: test_xml.cc:495
void ToString(std::string *str)
Definition: test_xml.cc:242
boost::uuids::uuid id_
Definition: test_xml.h:204
static void AddPermissions(xml_node *parent)
Definition: test_xml.cc:620
bool op_delete_
Definition: test_xml.h:138
virtual bool ReadXml()=0
Definition: test_xml.cc:466
virtual ~AgentUtXmlConfig()
Definition: test_xml.cc:606
AgentUtXmlTestList test_list_
Definition: test_xml.h:81
void Start()
Starts scheduling of all tasks.
Definition: task.cc:798
boost::uuids::uuid uuid
static void WaitForIdle()
void NovaIntfAdd(bool op_delete, const uuid &id, const Ip4Address &ip, const uuid &vm_uuid, const uuid vn_uuid, const string &name, const string &mac, const string vm_name)
Definition: test_xml.cc:75
std::string name_
Definition: test_xml.h:103
bool GetBoolAttribute(const xml_node &node, const string &name, bool *value)
Definition: test_xml.cc:60
bool ReadXml()
Definition: test_xml.cc:178
xml_node AddXmlNodeWithValue(xml_node *parent, const char *name, const string &value)
Definition: test_xml.cc:118
std::string name_
Definition: test_xml.h:137
virtual ~AgentUtXmlNode()
Definition: test_xml.cc:463
AgentUtXmlTestCase(const std::string &name, const pugi::xml_node &node, AgentUtXmlTest *test)
Definition: test_xml.cc:318
virtual std::string NodeType()=0
virtual bool ReadXml()
Definition: test_xml.cc:503
xml_node AddXmlNodeWithAttr(xml_node *parent, const char *attr)
Definition: test_xml.cc:112
void AddIdPerms(pugi::xml_node *parent)
Definition: test_xml.cc:650
Definition: agent.h:358
boost::function< AgentUtXmlNode *(const std::string type, const std::string &name, const boost::uuids::uuid &id, const pugi::xml_node &node, AgentUtXmlTestCase *test_case)> AgentUtXmlTestConfigCreateFn
Definition: test_xml.h:51
virtual ~AgentUtXmlTask()
Definition: test_xml.cc:500
AgentUtXmlTest(const std::string &file_name)
Definition: test_xml.cc:138
static TaskScheduler * GetInstance()
Definition: task.cc:547
void AddConfigEntry(const std::string &name, AgentUtXmlTestConfigCreateFn fn)
Definition: test_xml.cc:149
bool GetStringAttribute(const xml_node &node, const string &name, string *value)
Definition: test_xml.cc:25
std::string stop_
Definition: test_xml.h:160
virtual ~AgentUtXmlTestCase()
Definition: test_xml.cc:325
pugi::xml_node node_
Definition: test_xml.h:136
boost::asio::ip::address_v4 Ip4Address
Definition: address.h:14
void ConfigParse(const pugi::xml_node config, uint64_t seq)
virtual bool ToXml(pugi::xml_node *parent)
Definition: test_xml.cc:508
bool GetUintAttribute(const xml_node &node, const string &name, uint16_t *value)
Definition: test_xml.cc:37
virtual bool Run()
Definition: test_xml.cc:525
static void AddUuid(xml_node *parent, const uuid &id)
Definition: test_xml.cc:630
void AddValidateEntry(const std::string &name, AgentUtXmlTestValidateCreateFn fn)
Definition: test_xml.cc:154
void set_op_delete(bool val)
Definition: test_xml.h:129
void Stop()
Stops scheduling of all tasks.
Definition: task.cc:792
AgentUtXmlConfig(const std::string &name, const boost::uuids::uuid &uuid, const pugi::xml_node &node, AgentUtXmlTestCase *test_case)
bool op_delete() const
Definition: test_xml.h:128
pugi::xml_node xml_node_
Definition: test_xml.h:104
AgentUtXmlTest * test_
Definition: test_xml.h:107
virtual bool ReadXml()
Definition: test_xml.cc:332
AgentUtXmlTestConfigFactory config_factory_
Definition: test_xml.h:82
virtual bool ReadXml()
Definition: test_xml.cc:609
const pugi::xml_node & node() const
Definition: test_xml.h:131
virtual void ToString(std::string *str)
Definition: test_xml.cc:478
AgentUtXmlTestConfigCreateFn GetConfigCreateFn(const std::string &name)
Definition: test_xml.cc:160
void LinkXmlNode(xml_node *parent, const string &ltype, const string lname, const string &rtype, const string rname)
Definition: test_xml.cc:90
virtual bool Run()
Definition: test_xml.cc:403
AgentUtXmlNodeList node_list_
Definition: test_xml.h:105