'Create the DB object.'

def _create_router_db(self, context, router, tenant_id):

    router.setdefault('id', uuidutils.generate_uuid())
    router['tenant_id'] = tenant_id
    registry.notify(resources.ROUTER, events.BEFORE_CREATE, self, context=context, router=router)
    with context.session.begin(subtransactions=True):
        router_db = l3_models.Router(id=router['id'], tenant_id=router['tenant_id'], name=router['name'], admin_state_up=router['admin_state_up'], status=n_const.ROUTER_STATUS_ACTIVE, description=router.get('description'))
        context.session.add(router_db)
        registry.notify(resources.ROUTER, events.PRECOMMIT_CREATE, self, context=context, router=router, router_id=router['id'], router_db=router_db)
        return router_db
