except Exception as e: pass request_resources() #NETResourcesView.load_topology() NETManagersView.CRS_DISABLE=options.CRS_DISABLE NETManagersView.IGNORE_IRMS=options.IGNORE_IRMS NETManagersView.CRS_HOST = options.CRS_HOST NETManagersView.CRS_PORT = options.CRS_PORT NETManagersView.PORT = options.PORT log = logging.getLogger('werkzeug') log.setLevel(logging.ERROR) if not NETManagersView.CRS_DISABLE: NETManagersView.register_crs() print "running..." mgr.run(options.PORT)
default=56788, help="CRS port", type="int") parser.add_option("-s", "--scheduler", dest="scheduler", default="auto", help="CRS scheduler ('simple', 'NC', 'auto')", type="string") (options, _) = parser.parse_args() def request_resources(): global options threading.Timer(6.0, request_resources).start() try: hresman.utils.get('v3/resources/request', options.PORT) except: pass request_resources() log = logging.getLogger('werkzeug') log.setLevel(logging.ERROR) CRSReservationsView._scheduler_option = options.scheduler print "Using scheduler: %s" % options.scheduler mgr.run(options.PORT)
try: out=hresman.utils.post({"Port":config['IRM_PORT'], "Name": "IRM-SHEPARD"} , 'registerManager', crs_port, crs_host) if 'result' not in out: raise Exception(str(out)) except Exception as e: print "[x] Error connecting to the CRS: ", str(e) exit(-1) ############################################## Logging log = logging.getLogger('werkzeug') log.setLevel(logging.ERROR) ##################################### up, up and away... mgr.run(config['IRM_PORT'])