Tagging module Monitor - Monitor-2.0-6
[monitor.git] / findbadpcu.py
index 815a77e..d00d7f7 100755 (executable)
@@ -13,7 +13,6 @@ import threadpool
 import threading
 
 import monitor
-from pcucontrol  import reboot
 from monitor import config
 from monitor.database.info.model import FindbadPCURecordSync, FindbadPCURecord, session
 from monitor import database
@@ -164,6 +163,7 @@ if __name__ == '__main__':
                                                pcuid=None,
                                                pcuselect=None,
                                                site=None,
+                                               sitelist=None,
                                                dbname="findbadpcus", 
                                                cachenodes=False,
                                                cachecalls=True,
@@ -173,6 +173,8 @@ if __name__ == '__main__':
                                                help="Provide the input file for the node list")
        parser.add_option("", "--site", dest="site", metavar="FILE", 
                                                help="Get all pcus associated with the given site's nodes")
+       parser.add_option("", "--sitelist", dest="sitelist", metavar="FILE", 
+                                               help="Get all pcus associated with the given site's nodes")
        parser.add_option("", "--pcuselect", dest="pcuselect", metavar="FILE", 
                                                help="Query string to apply to the findbad pcus")
        parser.add_option("", "--pcuid", dest="pcuid", metavar="id", 
@@ -203,6 +205,8 @@ if __name__ == '__main__':
                time.sleep(1)
        except Exception, err:
                traceback.print_exc()
+               from monitor.common import email_exception
+               email_exception()
                print "Exception: %s" % err
                print "Saving data... exitting."
                sys.exit(0)