Merge pull request #125 from tpazderka/identity_database_as_instance
Allow usage of external IdentDB instance
This commit is contained in:
@@ -21,6 +21,7 @@ or attribute authority (AA) may use to conclude its tasks.
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import importlib
|
||||||
import shelve
|
import shelve
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
@@ -144,7 +145,12 @@ class Server(Entity):
|
|||||||
|
|
||||||
self.ident = IdentMDB(database=addr, collection="ident")
|
self.ident = IdentMDB(database=addr, collection="ident")
|
||||||
|
|
||||||
if typ == "mongodb":
|
elif typ == "identdb":
|
||||||
|
mod, clas = addr.rsplit('.', 1)
|
||||||
|
mod = importlib.import_module(mod)
|
||||||
|
self.ident = getattr(mod, clas)()
|
||||||
|
|
||||||
|
if typ == "mongodb" or typ == "identdb":
|
||||||
pass
|
pass
|
||||||
elif idb is not None:
|
elif idb is not None:
|
||||||
self.ident = IdentDB(idb)
|
self.ident = IdentDB(idb)
|
||||||
|
|||||||
Reference in New Issue
Block a user