Пример #1
0
 def getDB(self):
     if self._db:
         return self._db
     (driver, database) = self.cfg.repositoryDB
     self._db = dbstore.connect(database, driver)
     schema.setupTempTables(self._db)
     depSchema.setupTempDepTables(self._db)
     return self._db
Пример #2
0
 def getDB(self):
     if self._db:
         return self._db
     (driver, database) = self.cfg.repositoryDB
     self._db = dbstore.connect(database, driver)
     schema.setupTempTables(self._db)
     depSchema.setupTempDepTables(self._db)
     return self._db
Пример #3
0
 def initDB(self):
     from conary.server.schema import setupTempTables
     from conary.local.schema import setupTempDepTables
     db = self.connect()
     setupTempTables(db)
     setupTempDepTables(db)
     db.commit() # force file creation
     return db
Пример #4
0
 def _connect(self):
     db = self.getDB()
     schema.createSchema(db)
     schema.setupTempTables(db)
     depSchema.setupTempDepTables(db)
     store = trovestore.TroveStore(db)
     auth = netauth.NetworkAuthorization(db, ['localhost'])
     auth.addUser('anonymous', 'anonymous')
     auth.addRole('anonymous')
     auth.addRoleMember('anonymous', 'anonymous')
     auth.addAcl('anonymous', None, None, write = False, remove = False)
     auth.setAdmin('anonymous', False)
     return store
Пример #5
0
 def _connect(self):
     db = self.getDB()
     schema.createSchema(db)
     schema.setupTempTables(db)
     depSchema.setupTempDepTables(db)
     store = trovestore.TroveStore(db)
     auth = netauth.NetworkAuthorization(db, ['localhost'])
     auth.addUser('anonymous', 'anonymous')
     auth.addRole('anonymous')
     auth.addRoleMember('anonymous', 'anonymous')
     auth.addAcl('anonymous', None, None, write=False, remove=False)
     auth.setAdmin('anonymous', False)
     return store