Changeset 13404 in genesis
- Timestamp:
- Sep 20, 2015, 7:09:40 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r13403 r13404 299 299 return str(addr).startswith('172.') 300 300 301 def get_system_list(prefix):302 return sorted([os.path.basename(os.path.dirname(x)) for x in glob.glob("%s/%s*/wleiden.yaml" % (NODE_DIR, prefix))])303 304 get_hybridlist = lambda: get_system_list("Hybrid")305 get_nodelist = lambda: get_system_list("CNode")306 get_proxylist = lambda: get_system_list("Proxy")307 308 301 def get_hostlist(): 309 302 """ Combined hosts and proxy list""" 310 return get_nodelist() + get_proxylist() + get_hybridlist()303 return sorted([os.path.basename(os.path.dirname(x)) for x in glob.glob("%s/*/wleiden.yaml" % (NODE_DIR))]) 311 304 312 305 def angle_between_points(lat1,lat2,long1,long2): … … 705 698 706 699 if not ileiden_proxies or not normal_proxies: 707 for proxy in get_proxylist(): 708 proxydump = get_yaml(proxy) 709 if proxydump['ileiden']: 710 ileiden_proxies.append(proxydump) 711 else: 712 normal_proxies.append(proxydump) 713 for host in get_hybridlist(): 700 for host in get_hostlist(): 714 701 hostdump = get_yaml(host) 715 702 if hostdump['status'] == 'up': … … 950 937 return nameservers_cache[0:max_servers] 951 938 952 for host in get_h ybridlist():939 for host in get_hostlist(): 953 940 hostdump = get_yaml(host) 954 941 if hostdump['status'] == 'up' and (hostdump['service_proxy_ileiden'] or hostdump['service_proxy_normal']): 955 nameservers_cache.append((hostdump['masterip'], hostdump['autogen_realname']))956 for host in get_proxylist():957 hostdump = get_yaml(host)958 if hostdump['status'] == 'up':959 942 nameservers_cache.append((hostdump['masterip'], hostdump['autogen_realname'])) 960 943 … … 1041 1024 datadump['autogen_header'] = generate_header(datadump, "#") 1042 1025 datadump['autogen_ntp_servers'] = '' 1043 for host in get_proxylist(): 1044 hostdump = get_yaml(host) 1045 datadump['autogen_ntp_servers'] += "server %(masterip)-15s iburst maxpoll 9 # %(autogen_realname)s\n" % hostdump 1046 for host in get_hybridlist(): 1026 for host in get_hostlist(): 1047 1027 hostdump = get_yaml(host) 1048 1028 if hostdump['service_proxy_ileiden'] or hostdump['service_proxy_normal']:
Note:
See TracChangeset
for help on using the changeset viewer.