Exemplo n.º 1
0
 def export_machine_database(self, exportdir):
     element = MachineDatabaseElement(self.conn)
     exportdir = path(exportdir)
     makepaths(exportdir)
     filename = exportdir / 'machine_database.xml'
     xmlfile = file(filename, 'w')
     xmlfile.write(element.toprettyxml())
     xmlfile.close()
     machine_dir = exportdir / 'machines'
     self.export_all_machines(machine_dir)
Exemplo n.º 2
0
 def export_machine_database(self, path):
     me = MachineDatabaseElement(self.conn)
     mdfile = file(join(path, 'machine_database.xml'), 'w')
     mtypepath = join(path, 'machine_types')
     mdfile.write(me.toprettyxml())
     mdfile.close()
     for mtype in me.mtypes.machine_types:
         name = mtype.getAttribute('name')
         self.mtype.set_machine_type(name)
         self.mtype.export_machine_type(name, mtypepath)
Exemplo n.º 3
0
 def export_machine_database(self, path):
     me = MachineDatabaseElement(self.conn)
     mdfile = file(join(path, 'machine_database.xml'), 'w')
     mtypepath = join(path, 'machine_types')
     mdfile.write(me.toprettyxml())
     mdfile.close()
     for mtype in me.mtypes.machine_types:
         name = mtype.getAttribute('name')
         self.mtype.set_machine_type(name)
         self.mtype.export_machine_type(name, mtypepath)