docs: def _setup_rpc(self):
          """Setup the RPC client for the current agent."""
          self._plugin_rpc = agent_rpc.PluginApi(topics.PLUGIN)
          self._state_rpc = agent_rpc.PluginReportStateAPI(topics.PLUGIN)
          self._client = n_rpc.get_client(self.target)
  
          self._consumers.extend([
              [topics.PORT, topics.UPDATE], [topics.NETWORK, topics.DELETE],
              [topics.PORT, topics.DELETE]
          ])
  
          self._connection = agent_rpc.create_consumers(
              self._endpoints, self._topic, self._consumers,
              start_listening=False
          )
          self._setup_qos_extension()
          self._connection.consume_in_threads()
  
          report_interval = CONF.AGENT.report_interval
          if report_interval:
              heartbeat = loopingcall.FixedIntervalLoopingCall(
                  self._report_state)
              heartbeat.start(interval=report_interval)