Changeset 10748 in genesis
- Timestamp:
- May 9, 2012, 5:18:18 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r10734 r10748 99 99 gfile = os.path.join(NODE_DIR,item,'wleiden.yaml') 100 100 101 # Use some boring defaults102 101 datadump = {} 103 102 f = open(gfile, 'r') 104 103 datadump.update(yaml.load(f,Loader=Loader)) 105 104 if datadump['nodetype'] == 'Hybrid': 106 defaults = { 'service_proxy_normal' : False, 'service_proxy_ileiden' : False, 'service_accesspoint' : True } 105 # Some values are defined implicitly 106 if datadump.has_key('rdr_rules') and datadump['rdr_rules'] and not datadump.has_key('service_incoming_rdr'): 107 datadump['service_incoming_rdr'] = True 108 # Use some boring defaults 109 defaults = { 110 'service_proxy_normal' : False, 111 'service_proxy_ileiden' : False, 112 'service_accesspoint' : True, 113 'service_incoming_rdr' : False 114 } 107 115 for (key,value) in defaults.iteritems(): 108 116 if not datadump.has_key(key): … … 560 568 service_proxy_normal="{{ service_proxy_normal|yesorno }}" 561 569 service_accesspoint="{{ service_accesspoint|yesorno }}" 570 service_incoming_rdr="{{ service_incoming_rdr|yesorno }}" 562 571 # 563 572 … … 566 575 pf_flags="-D ext_if=$externalif -D ext_if_net=$externalif:network -D masterip=$masterip" 567 576 pf_flags="$pf_flags -D publicnat=80,443" 568 {% elif service_proxy_normal %}577 {% elif service_proxy_normal or service_incoming_rdr %} 569 578 pf_rules="/etc/pf.hybrid.conf" 570 579 pf_flags="-D ext_if=$externalif -D ext_if_net=$externalif:network -D masterip=$masterip" … … 849 858 {% if service_proxy_ileiden -%} 850 859 - iLeiden Proxy 860 {% endif -%} 861 {% if service_incoming_rdr -%} 862 - Incoming port redirects 851 863 {% endif %} 852 864 Interlinks:\n
Note:
See TracChangeset
for help on using the changeset viewer.