Changeset 10585 in genesis


Ignore:
Timestamp:
Apr 26, 2012, 1:30:24 PM (13 years ago)
Author:
rick
Message:

Find a better way of formatting those listings, as diffing and reading them on
an long line is a real pain todo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r10584 r10585  
    470470      normal_proxies.append(hostdump)
    471471
    472   datadump['autogen_ileiden_proxies'] = ','.join([x['masterip'] for x in ileiden_proxies])
     472  datadump['autogen_ileiden_proxies'] = ileiden_proxies
     473  datadump['autogen_normal_proxies'] = normal_proxies
     474  datadump['autogen_ileiden_proxies_ips'] = ','.join([x['masterip'] for x in ileiden_proxies])
    473475  datadump['autogen_ileiden_proxies_names'] = ','.join([x['autogen_item'] for x in ileiden_proxies])
    474   datadump['autogen_normal_proxies'] = ','.join([x['masterip'] for x in normal_proxies])
     476  datadump['autogen_normal_proxies_ips'] = ','.join([x['masterip'] for x in normal_proxies])
    475477  datadump['autogen_normal_proxies_names'] = ','.join([x['autogen_item'] for x in normal_proxies])
    476478
     
    485487#
    486488captive_portal_whitelist=""
    487 # iLeiden Proxies {{ autogen_ileiden_proxies_names }}
    488 list_ileiden_proxies="{{ autogen_ileiden_proxies }}"
    489 # normal Proxies {{ autogen_normal_proxies_names }}
    490 list_normal_proxies="{{ autogen_normal_proxies }}"
    491 
    492489{% if nodetype == "Proxy" %}
    493490#
     
    520517  # Hybrid Configuration
    521518  #
     519  list_ileiden_proxies=`cat <<EOF | cut -f 1 | tr '\\n' ','
     520  {% for item in autogen_ileiden_proxies -%}
     521    {{ "%-16s"|format(item.masterip) }} # {{ item.autogen_realname }}
     522  {% endfor -%}
     523  EOF`
     524  list_normal_proxies=`cat <<EOF | cut -f 1 | tr '\\n' ','
     525  {% for item in autogen_normal_proxies -%}
     526    {{ "%-16s"|format(item.masterip) }} # {{ item.autogen_realname }}
     527  {% endfor -%}
     528  EOF`
     529
    522530  captive_portal_interfaces="{{ autogen_dhcp_interfaces|default('none', true) }}"
    523531  externalif="{{ externalif|default('vr0', true) }}"
     
    574582# NODE iLeiden Configuration
    575583#
     584
     585# iLeiden Proxies {{ autogen_ileiden_proxies_names }}
     586list_ileiden_proxies="{{ autogen_ileiden_proxies_ips }}"
     587# normal Proxies {{ autogen_normal_proxies_names }}
     588list_normal_proxies="{{ autogen_normal_proxies_ips }}"
     589
    576590captive_portal_interfaces="{{ autogen_dhcp_interfaces }}"
    577591
Note: See TracChangeset for help on using the changeset viewer.