summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/find_recalled_parts.py12
-rw-r--r--examples/part_data.txt4
2 files changed, 7 insertions, 9 deletions
diff --git a/examples/find_recalled_parts.py b/examples/find_recalled_parts.py
index f9ca4bb..fc1a3b1 100644
--- a/examples/find_recalled_parts.py
+++ b/examples/find_recalled_parts.py
@@ -7,7 +7,7 @@ import func.overlord.client as fc
bad = open("./part_data.txt").read().split()
-info = fc.Client("*").hardware.info()
+info = fc.Client("*").hardware.hal_info()
for (host,details) in info.iteritems():
@@ -15,10 +15,10 @@ for (host,details) in info.iteritems():
print "%s had an error : %s" % (host,str(details))
break
- for device in details["devices"]:
+ for (device, full_output) in details.iteritems():
for bad_value in bad:
- if device["Description"].find(bad_value) != -1:
- print "%s has flagged part: %s " % (host, device["Description"])
- break
-
+ if full_output.find(bad_value) != -1:
+ print "%s has flagged part: %s, matched %s" % (host, device, bad_value)
+ break
+
diff --git a/examples/part_data.txt b/examples/part_data.txt
index 3d2cf3a..ad888d9 100644
--- a/examples/part_data.txt
+++ b/examples/part_data.txt
@@ -7,6 +7,4 @@
C6270 GD785 M3006 X5329 Y5466 6P922 D2961 H3191 RD857 X5332 C2603 D5555 J1524 TD349
X5333 C5339 D6024 JD616 U5867 X5875 C5340 D6025 JD617 U5882 X5877
-#-RANDOM-STUFF-SO-GET-A-FALSE-POSITIVE
-SCSI
-
+#-RANDOM-STUFF-IF-YOU-NEED-A-FALSE-POSITIVE-LIKE-MAYBE-SCSI