Пример #1
0
 def _create_router(self, distributed=True, ha=False):
     with self.ctx.session.begin(subtransactions=True):
         self.ctx.session.add(l3_models.Router(id=TEST_ROUTER_ID))
         l3_objs.RouterExtraAttributes(self.ctx,
                                       router_id=TEST_ROUTER_ID,
                                       distributed=distributed,
                                       ha=ha).create()
Пример #2
0
 def _create_router(self, distributed=True, ha=False):
     with db_api.CONTEXT_WRITER.using(self.ctx):
         self.ctx.session.add(l3_models.Router(id=TEST_ROUTER_ID))
         l3_objs.RouterExtraAttributes(self.ctx,
                                       router_id=TEST_ROUTER_ID,
                                       distributed=distributed,
                                       ha=ha).create()