Ejemplo n.º 1
0
 def restore(self, path):
     if not os.path.isdir(path):
         raise Error, 'arguement needs to be a directory'
     dbpath = join(path, 'database.xml')
     mdbpath = join(path, 'machine_database.xml')
     pp = PaellaProcessor(self.conn, self.cfg)
     pp.create(dbpath)
     mh = MachineHandler(self.conn)
     #md = mh.parse_xmlfile(mdbpath)
     mh.restore_machine_database(path)
Ejemplo n.º 2
0
 def restore(self, path):
     if not os.path.isdir(path):
         raise Error, 'arguement needs to be a directory'
     dbpath = join(path, 'database.xml')
     mdbpath = join(path, 'machine_database.xml')
     pp = PaellaProcessor(self.conn, self.cfg)
     pp.create(dbpath)
     mh = MachineHandler(self.conn)
     md = mh.parse_xmlfile(mdbpath)
     mh.insert_parsed_element(md)