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
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
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
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