Changeset 12349 in genesis for tools


Ignore:
Timestamp:
Jun 12, 2013, 8:02:52 PM (12 years ago)
Author:
rick
Message:

Initial configuration of automatic nanostion configuration

Location:
tools
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r12247 r12349  
    197197      for key in datadump['autogen_iface_keys']:
    198198        datadump[key]['autogen_ifbase'] = key.split('_')[1]
     199        datadump[key]['autogen_gateway'] = datadump[key]['ip'].split('/')[0]
    199200        if datadump[key]['type'] in ['11a', '11b', '11g', 'wireless']:
    200201          datadump[key]['autogen_ifname'] = 'wlan%i' % wlan_count
     
    11091110  return output
    11101111
     1112def generate_nanostation_config(datadump, iface, ns_type):
     1113  datadump.update(datadump['iface_%s' % iface])
     1114
     1115  return open(os.path.join(os.path.dirname(__file__), 'ns5m.cfg.tmpl'),'r').read() % datadump
    11111116
    11121117def generate_yaml(datadump):
     
    11431148    elif config == 'pf.hybrid.conf.local':
    11441149      output += generate_pf_hybrid_conf_local(datadump)
     1150    elif config.startswith('vr'):
     1151      interface, ns_type = config.strip('.yaml').split('-')
     1152      output += generate_nanostation_config(datadump, interface, ns_type)
    11451153    else:
    11461154      assert False, "Config not found!"
Note: See TracChangeset for help on using the changeset viewer.