- parser = OptionParser()
- parser.set_defaults(cmpdays=False,
- comon="sshstatus",
- fields="nodename,ping,ssh,pcu,category,state,kernel,bootcd",
- dbname="findbad", # -070724-1",
- cmpping=False,
- cmpdns=False,
- cmploginbase=False,
- cmpssh=False,
- cmpcategory=False,
- cmpstate=False)
- parser.add_option("", "--fields", dest="fields", help="")
- parser.add_option("", "--dbname", dest="dbname", help="")
- parser.add_option("", "--days", dest="cmpdays", action="store_true", help="")
- parser.add_option("", "--ping", dest="cmpping", action="store_true", help="")
- parser.add_option("", "--dns", dest="cmpdns", action="store_true", help="")
- parser.add_option("", "--ssh", dest="cmpssh", action="store_true", help="")
- parser.add_option("", "--loginbase",dest="cmploginbase",action="store_true", help="")
- parser.add_option("", "--category", dest="cmpcategory", action="store_true", help="")
- parser.add_option("", "--kernel", dest="cmpkernel", action="store_true", help="")
- parser.add_option("", "--state", dest="cmpstate", action="store_true", help="")
- parser.add_option("", "--comon", dest="comon", help="")
- config = config(parser)
- config.parse_args()
+
+ if form.has_key('category'):
+ mycategory = form.getvalue("category")
+ else:
+ mycategory = None
+
+ if form.has_key('state'):
+ mystate = form.getvalue("state")
+ else:
+ mystate = None
+
+ if form.has_key('comon'):
+ mycomon = form.getvalue("comon")
+ else:
+ mycomon = None
+
+ if form.has_key('nodeonly'):
+ mynodeonly = form.getvalue("nodeonly")
+ else:
+ mynodeonly = None
+
+ config.cmpdays=False
+ config.comon="sshstatus"
+ config.fields="nodename,ping,ssh,pcu,category,state,last_contact,kernel,bootcd"
+ config.dbname="findbad"
+ config.cmpping=False
+ config.cmpdns=False
+ config.cmploginbase=False
+ config.cmpssh=False
+ config.cmpcategory=False
+