Changeset 10156 in genesis for tools


Ignore:
Timestamp:
Mar 14, 2012, 6:46:40 AM (13 years ago)
Author:
rick
Message:

WL has an SSID naming scheme, so make sure to check and correct on it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r10143 r10156  
    963963        datadumps[get_fqdn(datadump)] = datadump
    964964
    965       for key,datadump in datadumps.iteritems():
     965      for host,datadump in datadumps.iteritems():
    966966        datadump['latitude'], datadump['longitude'] = rdnap.rd2etrs(datadump['rdnap_x'], datadump['rdnap_y'])
     967        for iface_key in datadump['autogen_iface_keys']:
     968          # Wireless Leiden SSID have an consistent lowercase/uppercase
     969          if datadump[iface_key].has_key('ssid'):
     970            ssid = datadump[iface_key]['ssid']
     971            prefix = 'ap-WirelessLeiden-'
     972            if ssid.lower().startswith(prefix.lower()):
     973              datadump[iface_key]['ssid'] = prefix + ssid[len(prefix)].upper() + ssid[len(prefix) + 1:]
    967974        store_yaml(datadump)
    968975    elif sys.argv[1] == "list":
Note: See TracChangeset for help on using the changeset viewer.