def dumpPorts(switches):
 for switch in switches:
  output(('%s ' % switch.name))
  for intf in switch.intfList():
   port = switch.ports[intf]
   output(('%s:%d ' % (intf, port)))
  output('\n')

def dumpPorts ( switches ) : for switch in switches : output ( ( '%s ' % switch . name ) ) for intf in switch . intfList ( ) : port = switch . ports [ intf ] output ( ( '%s:%d ' % ( intf , port ) ) ) output ( '\n' )
dump interface to openflow port mappings for each switch .