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()
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()