'Start RPC server with a given number of workers.'

def _serve_rpc(self, workers=1):

    with mock.patch('neutron.service.RpcWorker.start') as start_method:
        with mock.patch('neutron_lib.plugins.directory.get_plugin') as get_plugin:
            start_method.side_effect = self._fake_start
            get_plugin.return_value = self.plugin
            CONF.set_override('rpc_workers', workers)
            CONF.set_override('rpc_state_report_workers', 0)
            rpc_workers_launcher = service.start_rpc_workers()
            rpc_workers_launcher.wait()
