Changeset 10936 in genesis for tools/gformat.py


Ignore:
Timestamp:
May 20, 2012, 1:16:06 AM (13 years ago)
Author:
rick
Message:

Fixed ordering please, prefer the Good Hybrids first.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r10935 r10936  
    824824
    825825
    826 nameservers_cache = {}
     826nameservers_cache = []
    827827def get_nameservers():
    828828  if nameservers_cache:
    829829    return nameservers_cache
    830830
    831   for host in get_proxylist():
    832     hostdump = get_yaml(host)
    833     nameservers_cache[hostdump['masterip']] = hostdump['autogen_realname']
    834831  for host in get_hybridlist():
    835832    hostdump = get_yaml(host)
    836833    if hostdump['service_proxy_ileiden'] or hostdump['service_proxy_normal']:
    837       nameservers_cache[hostdump['masterip']] = hostdump['autogen_realname']
     834      nameservers_cache.append((hostdump['masterip'], hostdump['autogen_realname']))
     835  for host in get_proxylist():
     836    hostdump = get_yaml(host)
     837    nameservers_cache.append((hostdump['masterip'], hostdump['autogen_realname']))
    838838
    839839  return nameservers_cache
     
    847847
    848848
    849   for masterip,realname in get_nameservers().iteritems():
     849  for masterip,realname in get_nameservers():
    850850    datadump['autogen_edge_nameservers'] += "nameserver %-15s # %s\n" % (masterip, realname)
    851851
Note: See TracChangeset for help on using the changeset viewer.