Example #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)
Example #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)    
Example #3
0
 def import_client(self, client):
     cpath, ppath, fpath, tpath = self._cpaths_(client)
     profiles, families, traits = self._client_schema(client)
     mdbpath = join(cpath, 'machine_database.xml')
     if families:
         f = Family(self.conn)
         f.import_families(fpath)
     if profiles:
         pp = PaellaProcessor(self.conn, self.cfg)
         pp.main_path = cpath
         pp.insert_profiles()
     mh = MachineHandler(self.conn)
     md = mh.parse_xmlfile(mdbpath)
     mh.insert_parsed_element(md)
Example #4
0
 def import_client(self, client):
     cpath, ppath, fpath, tpath = self._cpaths_(client)
     profiles, families, traits = self._client_schema(client)
     mdbpath = join(cpath, 'machine_database.xml')
     if families:
         f = Family(self.conn)
         f.import_families(fpath)
     if profiles:
         pp = PaellaProcessor(self.conn, self.cfg)
         pp.main_path = cpath
         pp.insert_profiles()
     mh = MachineHandler(self.conn)
     md = mh.parse_xmlfile(mdbpath)
     mh.insert_parsed_element(md)