X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fengine.py;h=5bdbb7e021a23b0be5bd7b106bfde7af84de3afe;hp=f9fb1e7313da783fb5561a5fd84fbdff68c987b8;hb=3d6881c23aea64d391e1e648c615f9dbd89e00ad;hpb=332e080919376d26f7bb98478d9ebe14b73f4d03 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"]