I have a question about listenTo in l2_multi.

sometimes  I can follow the command line, such as "listenTo(core)" or 
"listenTo(core.openflow)". 

but in the forwarding.l2_multi , in the class "l2_multi":

  def _handle_ConnectionUp (self, event):
    sw = switches.get(event.dpid)
    if sw is None:
      # New switch
      sw = Switch()
      switches[event.dpid] = sw
      sw.connect(event.connection)
    else:
      sw.connect(event.connection)

and then I find the "connect" in the "Switch" class :

  def connect (self, connection):
    if self.dpid is None:
      self.dpid = connection.dpid
    assert self.dpid == connection.dpid
    if self.ports is None:
      self.ports = connection.features.ports
    self.disconnect()
    log.debug("Connect %s" % (connection,))
    self.connection = connection
    self._listeners = self.listenTo(connection)
    self._connected_at = time.time()

the debug is "DEBUG:forwarding.l2_multi:Connect [90-e2-ba-28-29-f6 1]".

It seems that the conneciton is not  a "source".

I am confused about the listenTo in forwarding.l2_multi.  

Please help me to understand this.

Best Regards,
Yanan


Reply via email to