Exemplo n.º 1
0
 def setUp(self):
     self.env_assist, self.config = get_env_tools(self)
     self.config.env.set_known_hosts_dests(KNOWN_HOSTS_DESTS)
     cib_xml_man = XmlManipulation.from_file(rc("cib-empty.xml"))
     cib_xml_man.append_to_first_tag_name(
         "resources", """
             <primitive class="ocf" id="{0}"
                 provider="heartbeat" type="VirtualDomain"
             />
         """.format(VIRTUAL_MACHINE_ID))
     self.config.env.set_cib_data(str(cib_xml_man))
Exemplo n.º 2
0
 def fixture_status_xml(self, nodes, resources):
     xml_man = XmlManipulation.from_file(rc("crm_mon.minimal.xml"))
     doc = xml_man.tree.getroottree()
     doc.find("/summary/nodes_configured").set("number", str(nodes))
     doc.find("/summary/resources_configured").set("number", str(resources))
     return str(XmlManipulation(doc))
Exemplo n.º 3
0
 def setUp(self):
     self.status = XmlManipulation.from_file(rc("crm_mon.minimal.xml"))
Exemplo n.º 4
0
 def fixture_status_xml(self, nodes, resources):
     xml_man = XmlManipulation.from_file(rc("crm_mon.minimal.xml"))
     doc = xml_man.tree.getroottree()
     doc.find("/summary/nodes_configured").set("number", str(nodes))
     doc.find("/summary/resources_configured").set("number", str(resources))
     return str(XmlManipulation(doc))
Exemplo n.º 5
0
 def setUp(self):
     self.status = XmlManipulation.from_file(rc("crm_mon.minimal.xml"))