def _validate_router(self, context, router_assoc):
        if not router_assoc or 'router_id' not in router_assoc:
            msg = 'no router specified'
            raise n_exc.BadRequest(resource='bgpvpn', msg=msg)

        l3_plugin = manager.NeutronManager.get_service_plugins().get(
            plugin_constants.L3_ROUTER_NAT)
        router = l3_plugin.get_router(context, router_assoc['router_id'])
        plugin = manager.NeutronManager.get_plugin()
        self._validate_router_has_net_assocs(context, router, plugin)
        return router
dataset/ETHPy150Open openstack/networking-bgpvpn/networking_bgpvpn/neutron/services/plugin.py/BGPVPNPlugin._validate_router/original