def main(argv=None): # Parameter options = libTopology.Parameter(argv) options.check() log = libTopology.logC() cfg = config([options.netcfg, options.topocfg], options) cfg.eval() db = dbCon.dbCon(options) cDB = libTopology.cacheDB(options, cfg, db, log,"/tmp/topology.db") cDB.init() ## Los gehts G = graph(cDB) G.evalSystems() topo = libTopology.myTopo(cDB,options,cfg,log) topo.create(31) cDB.bkpDat() print "Ausstieg nach topo.create(None)" sys.exit() topo.fixPositions() topo.create(None) topo.svg() cDB.bkpDat()
def main(argv=None): options = libTopology.Parameter(argv) options.check() rDB = dbCon.dbCon(options) while True: if os.path.exists('/tmp/parse_ibnetdiscover.lock'): time.sleep(1) print "Lockfile exists" continue cfg = config([options.cfgfile, ], options) cfg.eval() log = libTopology.logC("/var/log/create_netgraph.log") if os.path.exists('/tmp/parse_ibnetdiscover.lock'): time.sleep(1) print "Lockfile exists" continue try: create(options, rDB, cfg, log) except IOError, e: print "Creation failed, I guess it overlaps with parse_ibnetdiscover" print e time.sleep(2) continue else: dump_log(rDB) if not options.loop: break time.sleep(int(options.loop_delay))
def main(argv=None): options = libTopology.Parameter(argv) options.check() db = dbCon.dbCon(options) cfg = libTopology.config([options.cfgfile, ], options) cfg.eval() log = libTopology.logC(options, "/var/log/uptopo.log") eval_topo(options, db, cfg, log)