def getDevicePorts (self, dpid):
    self.log.debug("XMLRPC:getDeviceInfo (%s)" % (dpid))
    
    pinfoall = []
    if "vertigo" in self.getFVVersion():
      pinfoall = self.xmlcall("getVTPlannerPortInfo", dpid, "all")
      
    portlist = []
    dinfo = self.xmlcall("getDeviceInfo", dpid)
    for portstr in dinfo["portNames"].split(","):
      p = Port()
      elems = portstr.split("(")
      p.name = elems[0]
      p.num = int(elems[1][:-1])
      
      for pinfo in pinfoall:
        pelems = pinfo.split(",")
        if int(pelems[0]) == p.num:
          p.features = pelems[2]
          break
      
      p.dpid = dpid
      portlist.append(p)
    return portlist
dataset/ETHPy150Open fp7-ofelia/ocf/ofam/src/src/foam/flowvisor.py/_Connection.getDevicePorts/original