import threadpool
import syncplcdb
from nodequery import verify,query_to_dict,node_select
+import parser as parsermodule
+from nodecommon import *
import plc
-import auth
-api = plc.PLC(auth.auth, auth.plc)
+api = plc.getAuthAPI()
from unified_model import *
-from monitor_policy import MINUP
+from const import MINUP
round = 1
externalState = {'round': round, 'nodes': {}}
return True
if __name__ == '__main__':
- from config import config
- from optparse import OptionParser
- parser = OptionParser()
+ parser = parsermodule.getParser()
parser.set_defaults(filename=None, pcu=None, pcuselect=False, pcugroup=None,
increment=False, dbname="pcubad", cachepcus=False)
parser.add_option("", "--pcu", dest="pcu", metavar="hostname",
help="Specify the name of the database to which the information is saved")
parser.add_option("-i", "--increment", action="store_true", dest="increment",
help="Increment round number to force refresh or retry")
- config = config(parser)
- config.parse_args()
+ config = parsermodule.parse_args(parser)
try:
main(config)