X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_nbi%2Fengine.py;h=5bdbb7e021a23b0be5bd7b106bfde7af84de3afe;hb=refs%2Fchanges%2F23%2F8323%2F1;hp=f9fb1e7313da783fb5561a5fd84fbdff68c987b8;hpb=7e0eb1359144e47425da40504350f0d7cdc408e4;p=osm%2FNBI.git diff --git a/osm_nbi/engine.py b/osm_nbi/engine.py index f9fb1e7..5bdbb7e 100644 --- a/osm_nbi/engine.py +++ b/osm_nbi/engine.py @@ -68,7 +68,7 @@ class Engine(object): # Add new versions here } - def __init__(self): + def __init__(self, token_cache): self.db = None self.fs = None self.msg = None @@ -78,6 +78,7 @@ class Engine(object): self.logger = logging.getLogger("nbi.engine") self.map_topic = {} self.write_lock = None + self.token_cache = token_cache def start(self, config): """ @@ -126,7 +127,7 @@ class Engine(object): if config["authentication"]["backend"] == "keystone": self.auth = AuthconnKeystone(config["authentication"], self.db, None) else: - self.auth = AuthconnInternal(config["authentication"], self.db, dict()) + self.auth = AuthconnInternal(config["authentication"], self.db, self.token_cache) if not self.operations: if "resources_to_operations" in config["rbac"]: resources_to_operations_file = config["rbac"]["resources_to_operations"]