- #get ports
- #cmd = "CALL GetPortsFromNuma(%s)'" % str(numa['id'])
- #self.cur.callproc('GetPortsFromNuma', (numa['id'],) )
- #every time a Procedure is launched you need to close and open the cursor
- #under Error 2014: Commands out of sync; you can't run this command now
- #self.cur.close()
- #self.cur = self.con.cursor(mdb.cursors.DictCursor)
- cmd="SELECT Mbps, pci, status, Mbps_used, instance_id, if(id=root_id,'PF','VF') as type_,\
- switch_port, switch_dpid, mac, source_name\
- FROM resources_port WHERE numa_id=%d ORDER BY root_id, type_ DESC" % (numa['id'])
+ # get ports
+ # cmd = "CALL GetPortsFromNuma(%s)'" % str(numa['id'])
+ # self.cur.callproc('GetPortsFromNuma', (numa['id'],) )
+ # every time a Procedure is launched you need to close and open the cursor
+ # under Error 2014: Commands out of sync; you can't run this command now
+ # self.cur.close()
+ # self.cur = self.con.cursor(mdb.cursors.DictCursor)
+ cmd = "SELECT Mbps, pci, status, Mbps_used, instance_id, if(id=root_id,'PF','VF') as type_, "\
+ "switch_port, switch_dpid, switch_mac, mac, source_name "\
+ "FROM resources_port WHERE numa_id={} ORDER BY root_id, type_ DESC".format(numa['id'])