- #print dict_query
-
- for node in fb['nodes'].keys():
- if nodelist is not None:
- if node not in nodelist: continue
-
- fb_nodeinfo = fb['nodes'][node]['values']
- if pcu_in(fb_nodeinfo):
- pcuinfo = fbpcu['nodes']['id_%s' % fb_nodeinfo['plcnode']['pcu_ids'][0]]['values']
- if verify(dict_query, pcuinfo):
- nodenames.append(node)
- str = "cmdhttps/locfg.pl -s %s -f iloxml/License.xml -u %s -p '%s' | grep MESSAGE" % \
- (pcu_name(pcuinfo), pcuinfo['username'], pcuinfo['password'])
- #pcunames.append(str)
- pcunames.append(pcuinfo['pcu_id'])
+ print "dict_query", dict_query
+ print 'length %s' % len(fbpcuquery.all())
+
+ for pcurec in fbpcuquery:
+ pcuinfo = pcurec.to_dict()
+ if verify(dict_query, pcuinfo):
+ #nodenames.append(noderec.hostname)
+ #print 'appending %s' % pcuinfo['plc_pcuid']
+ pcunames.append(pcuinfo['plc_pcuid'])
+
+ #for noderec in fbquery:
+ # if nodelist is not None:
+ # if noderec.hostname not in nodelist: continue
+#
+# fb_nodeinfo = noderec.to_dict()
+# if pcu_in(fb_nodeinfo):
+# pcurec = FindbadPCURecord.get_latest_by(plc_pcuid=get(fb_nodeinfo,
+# 'plc_node_stats.pcu_ids')[0]).first()
+# if pcurec:
+# pcuinfo = pcurec.to_dict()
+# if verify(dict_query, pcuinfo):
+# nodenames.append(noderec.hostname)
+# pcunames.append(pcuinfo['plc_pcuid'])