def test_04_AllNodes(self):
     l_nodes = nodesXml.read_all_nodes_xml(self.m_pyhouse_obj)
     # print(PrettyFormatAny.form(l_nodes, 'C1-04-A All Nodes'))
     self.m_pyhouse_obj.Computer.Nodes = l_nodes
     l_xml, l_count = nodesXml.write_nodes_xml(self.m_pyhouse_obj)
     # print(PrettyFormatAny.form(l_xml, 'C1-04-B All Nodes'))
     self.assertEqual(l_count, 2)
 def test_4_AllNodes(self):
     l_nodes = nodesXml.read_all_nodes_xml(self.m_pyhouse_obj)
     print(PrettyFormatAny.form(l_nodes, 'C1-4-A All Nodes'))
     self.m_pyhouse_obj.Computer.Nodes = l_nodes
     l_xml, l_count = nodesXml.write_nodes_xml(self.m_pyhouse_obj)
     print(PrettyFormatAny.form(l_xml, 'C1-4-B All Nodes'))
     self.assertEqual(l_count, 2)
     self.assertEqual(l_xml[0].attrib['Name'], TESTING_NODES_NODE_NAME_1)
     self.assertEqual(l_xml[1].attrib['Name'], TESTING_NODES_NODE_NAME_0)
     self.assertEqual(l_xml[0].attrib['Key'], TESTING_NODES_NODE_KEY_1)
     self.assertEqual(l_xml[1].attrib['Key'], TESTING_NODES_NODE_KEY_0)
     self.assertEqual(l_xml[1].attrib['Active'], TESTING_NODES_NODE_ACTIVE_0)
     self.assertEqual(l_xml[4][0].attrib['Name'], TESTING_NODES_INTERFACE_NAME_0_0)
     self.assertEqual(l_xml[4][0].attrib['Key'], TESTING_NODES_INTERFACE_KEY_0_0)
     self.assertEqual(l_xml[4][0].attrib['Active'], TESTING_NODES_INTERFACE_ACTIVE_0_0)
     self.assertEqual(l_xml[4][1].attrib['Name'], TESTING_NODES_INTERFACE_NAME_0_1)
     self.assertEqual(l_xml[4][1].attrib['Key'], TESTING_NODES_INTERFACE_KEY_0_1)
     self.assertEqual(l_xml[4][1].attrib['Active'], TESTING_NODES_INTERFACE_ACTIVE_0_1)
     self.assertEqual(l_xml[4][2].attrib['Name'], TESTING_NODES_INTERFACE_NAME_0_2)
     self.assertEqual(l_xml[4][2].attrib['Key'], TESTING_NODES_INTERFACE_KEY_0_2)
     self.assertEqual(l_xml[4][2].attrib['Active'], TESTING_NODES_INTERFACE_ACTIVE_0_2)
     self.assertEqual(l_xml[1][0].text, TESTING_NODES_NODE_UUID_0)
Exemple #3
0
 def SaveXml(self, p_xml):
     l_xml = nodesXml.write_nodes_xml(self.m_pyhouse_obj.Computer.Nodes)
     p_xml.append(l_xml)
     LOG.info("Saved XML.")
     return l_xml  #  For testing
Exemple #4
0
 def test_04_AllNodes(self):
     l_nodes = nodesXml.read_all_nodes_xml(self.m_pyhouse_obj)
     l_xml = nodesXml.write_nodes_xml(l_nodes)
     print(PrettyFormatAny.form(l_xml, 'All Interfaces'))
Exemple #5
0
 def SaveXml(self, p_xml):
     l_xml, l_count = nodesXml.write_nodes_xml(self.m_pyhouse_obj)
     p_xml.append(l_xml)
     LOG.info("Saved XML for {} nodes.".format(l_count))
     return l_xml  # For testing