def scan( host=get_hostname(), db=None, pyro_timeout=None, verbose=False, silent=False ): #print 'SCANNING PORTS' # scan all cylc Pyro ports for cylc suites gcfg = get_global_cfg(verbose=verbose) pyro_base_port = gcfg.cfg['pyro']['base port'] pyro_port_range = gcfg.cfg['pyro']['maximum number of ports'] # In non-verbose mode print nothing (scan is used by cylc db viewer). # load my suite passphrases reg = localdb(db) reg_suites = reg.get_list() my_passphrases = {} for item in reg_suites: rg = item[0] di = item[1] try: pp = passphrase( rg, user, host ).get( suitedir=di ) except Exception, x: #print >> sys.stderr, x # no passphrase defined for this suite pass else: my_passphrases[ rg ] = pp
def scan(host=hostname, db=None, pyro_timeout=None, verbose=False): # print 'SCANNING PORTS' # scan all cylc Pyro ports for cylc suites # In non-verbose mode print nothing (scan is used by gcylc). # load my suite passphrases reg = localdb(db) reg.load_from_file() reg_suites = reg.get_list() my_passphrases = {} for item in reg_suites: rg = item[0] di = item[1] try: pp = passphrase(rg, user, host).get(suitedir=di) except Exception, x: # print >> sys.stderr, x # no passphrase defined for this suite pass else: my_passphrases[rg] = pp