+ print pcuid
+ return self.pcuview(pcuid, **dict(exceptions=tg_exceptions))
+ #return dict(pcuquery=[], nodequery=[], exceptions=tg_exceptions)
+
+ def nodeaction(self, **data):
+ for item in data.keys():
+ print "%s %s" % ( item, data[item] )
+
+ if 'hostname' in data:
+ hostname = data['hostname']
+ else:
+ flash("No hostname given in submitted data")
+ return
+
+ if 'submit' in data:
+ action = data['submit']
+ else:
+ flash("No submit action given in submitted data")
+ return
+
+ if action == "Reboot":
+ print "REBOOT: %s" % hostname
+ ret = reboot.reboot_str(str(hostname))
+ print ret
+ if ret: raise RuntimeError("Error using PCU: " + ret)
+
+ elif action == "ExternalProbe":
+ raise RuntimeError("THIS IS A PROBLEM")
+
+ elif action == "DeepProbe":
+ findbad.probe(str(hostname))
+ else:
+ # unknown action
+ flash("Unknown action given")
+ return
+
+ # TODO: add form validation