Changeset 13405 in genesis


Ignore:
Timestamp:
Sep 20, 2015, 7:17:01 PM (7 years ago)
Author:
rick
Message:

Hybrid* will also be removed from references to in FQDN

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r13404 r13405  
    238238    datadump['autogen_item'] = item
    239239
    240     datadump['autogen_realname'] = get_realname(datadump)
    241240    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']
    243242    datadump_cache[item] = datadump.copy()
    244243  except Exception:
     
    757756  list_ileiden_proxies="
    758757  {% for item in autogen_ileiden_proxies -%}
    759     {{ "%-16s"|format(item.masterip) }} # {{ item.autogen_realname }}
     758    {{ "%-16s"|format(item.masterip) }} # {{ item.nodename }}
    760759  {% endfor -%}
    761760  "
    762761  list_normal_proxies="
    763762  {% for item in autogen_normal_proxies -%}
    764     {{ "%-16s"|format(item.masterip) }} # {{ item.autogen_realname }}
     763    {{ "%-16s"|format(item.masterip) }} # {{ item.nodename }}
    765764  {% endfor -%}
    766765  "
     
    940939    hostdump = get_yaml(host)
    941940    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']))
    943942
    944943  return nameservers_cache[0:max_servers]
     
    10271026    hostdump = get_yaml(host)
    10281027    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" % hostdump
     1028      datadump['autogen_ntp_servers'] += "server %(masterip)-15s iburst maxpoll 9 # %(nodename)s\n" % hostdump
    10301029
    10311030  return Template("""\
     
    13291328
    13301329
    1331 def get_realname(datadump):
    1332   # Proxy naming convention is special, as the proxy name is also included in
    1333   # 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 
    13431330def make_dns(output_dir = 'dns', external = False):
    13441331  items = dict()
     
    13531340
    13541341    # Proxy naming convention is special
    1355     fqdn = datadump['autogen_realname']
     1342    fqdn = datadump['nodename']
    13561343    if datadump['nodetype'] in ['CNode', 'Hybrid']:
    13571344      wleiden_cname[datadump['nodename']] = fqdn
     
    19811968        datadump = { 'board' : 'UNKNOWN' }
    19821969        datadump.update(get_yaml(host))
    1983         datadumps[datadump['autogen_realname']] = datadump
     1970        datadumps[datadump['nodename']] = datadump
    19841971
    19851972      (poel, errors) = make_relations()
Note: See TracChangeset for help on using the changeset viewer.