- Timestamp:
- Sep 20, 2015, 7:17:01 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r13404 r13405 238 238 datadump['autogen_item'] = item 239 239 240 datadump['autogen_realname'] = get_realname(datadump)241 240 datadump['autogen_domain'] = datadump['domain'] if datadump.has_key('domain') else 'wleiden.net.' 242 datadump['autogen_fqdn'] = datadump[' autogen_realname'] + '.' + datadump['autogen_domain']241 datadump['autogen_fqdn'] = datadump['nodename'] + '.' + datadump['autogen_domain'] 243 242 datadump_cache[item] = datadump.copy() 244 243 except Exception: … … 757 756 list_ileiden_proxies=" 758 757 {% for item in autogen_ileiden_proxies -%} 759 {{ "%-16s"|format(item.masterip) }} # {{ item. autogen_realname }}758 {{ "%-16s"|format(item.masterip) }} # {{ item.nodename }} 760 759 {% endfor -%} 761 760 " 762 761 list_normal_proxies=" 763 762 {% for item in autogen_normal_proxies -%} 764 {{ "%-16s"|format(item.masterip) }} # {{ item. autogen_realname }}763 {{ "%-16s"|format(item.masterip) }} # {{ item.nodename }} 765 764 {% endfor -%} 766 765 " … … 940 939 hostdump = get_yaml(host) 941 940 if hostdump['status'] == 'up' and (hostdump['service_proxy_ileiden'] or hostdump['service_proxy_normal']): 942 nameservers_cache.append((hostdump['masterip'], hostdump[' autogen_realname']))941 nameservers_cache.append((hostdump['masterip'], hostdump['nodename'])) 943 942 944 943 return nameservers_cache[0:max_servers] … … 1027 1026 hostdump = get_yaml(host) 1028 1027 if hostdump['service_proxy_ileiden'] or hostdump['service_proxy_normal']: 1029 datadump['autogen_ntp_servers'] += "server %(masterip)-15s iburst maxpoll 9 # %( autogen_realname)s\n" % hostdump1028 datadump['autogen_ntp_servers'] += "server %(masterip)-15s iburst maxpoll 9 # %(nodename)s\n" % hostdump 1030 1029 1031 1030 return Template("""\ … … 1329 1328 1330 1329 1331 def get_realname(datadump):1332 # Proxy naming convention is special, as the proxy name is also included in1333 # the nodename, when it comes to the numbered proxies.1334 if datadump['nodetype'] == 'Proxy':1335 realname = datadump['nodetype'] + datadump['nodename'].replace('proxy','')1336 else:1337 # By default the full name is listed and also a shortname CNAME for easy use.1338 realname = datadump['nodetype'] + datadump['nodename']1339 return(realname)1340 1341 1342 1343 1330 def make_dns(output_dir = 'dns', external = False): 1344 1331 items = dict() … … 1353 1340 1354 1341 # Proxy naming convention is special 1355 fqdn = datadump[' autogen_realname']1342 fqdn = datadump['nodename'] 1356 1343 if datadump['nodetype'] in ['CNode', 'Hybrid']: 1357 1344 wleiden_cname[datadump['nodename']] = fqdn … … 1981 1968 datadump = { 'board' : 'UNKNOWN' } 1982 1969 datadump.update(get_yaml(host)) 1983 datadumps[datadump[' autogen_realname']] = datadump1970 datadumps[datadump['nodename']] = datadump 1984 1971 1985 1972 (poel, errors) = make_relations()
Note:
See TracChangeset
for help on using the changeset viewer.