Add: flask api include resource type, resource pool, resource and deployment manager
[pti/o2.git] / o2ims / bootstrap.py
index 55fc99d..10bdc26 100644 (file)
@@ -34,8 +34,11 @@ def bootstrap(
         notifications = SmoO2Notifications()
 
     if start_orm:
-        orm.start_o2ims_mappers()
         orm_stx.start_o2ims_stx_mappers(uow)
+        with uow:
+            # get default engine if uow is by default
+            engine = uow.session.get_bind()
+            orm.start_o2ims_mappers(engine)
 
     dependencies = {"uow": uow, "notifications": notifications,
                     "publish": publish}