Changeset 10459 in genesis
- Timestamp:
- Apr 12, 2012, 9:11:28 PM (13 years ago)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
nodes/CNodeRick/wleiden.yaml
r10454 r10459 10 10 masterip : "172.20.145.1" 11 11 nodename : "Rick" 12 nodetype : " CNode"12 nodetype : "Hybrid" 13 13 rdnap_x : 92280 14 14 rdnap_y : 461707 15 15 release : "9.0-RELEASE" 16 16 remote_access: "riff.vanderzwet.net:2022" 17 service_ nat: True17 service_ileiden: True 18 18 service_proxy: True 19 19 status : "up" … … 70 70 sdesc : "2external" 71 71 type : "eth" 72 dhcp : "False"72 dhcp : False 73 73 compass : "None" 74 74 dhcpclient : True -
tools/gformat.py
r10455 r10459 96 96 datadump[key]['autogen_ifname'] = datadump[key]['interface'].split(':')[0] 97 97 98 dhcp_interfaces = [datadump[key]['autogen_ifname'] for key in datadump['autogen_iface_keys'] if datadump[key]['dhcp'] != 'no']99 datadump['autogen_dhcp_interfaces'] = ' 98 dhcp_interfaces = [datadump[key]['autogen_ifname'] for key in datadump['autogen_iface_keys'] if datadump[key]['dhcp']] 99 datadump['autogen_dhcp_interfaces'] = ','.join(dhcp_interfaces) 100 100 datadump['autogen_item'] = item 101 101 … … 457 457 nodetype="{{ nodetype }}" 458 458 459 {% if tproxy -%} 460 tproxy_enable='YES' 461 tproxy_range='{{ tproxy }}' 462 {% else -%} 463 tproxy_enable='NO' 464 {% endif -%} 465 466 {% if nodetype == "Proxy" or nodetype == "Hybrid" %} 467 # 468 # Edge Configuration 469 # 470 471 472 # Firewall and Routing Configuration 473 459 # 460 # Configured listings 461 # 462 captive_portal_whitelist="" 463 captive_portal_interfaces="{{ autogen_dhcp_interfaces }}" 464 # iLeiden Proxies {{ autogen_ileiden_proxies_names }} 465 list_ileiden_proxies="{{ autogen_ileiden_proxies }}" 466 # normal Proxies {{ autogen_normal_proxies_names }} 467 list_normal_proxies="{{ autogen_normal_proxies }}" 468 469 {% if nodetype == "Proxy" %} 470 # 471 # Proxy Configuration 472 # 474 473 {% if gateway -%} 475 474 defaultrouter="{{ gateway }}" … … 495 494 {% endif -%} 496 495 497 {% if nodetype == "CNode" %} 496 {% if nodetype == "Hybrid" %} 497 # 498 # Hybrid Configuration 499 # 500 captive_portal_interfaces="{{ autogen_dhcp_interfaces }}" 501 502 pf_rules="/etc/pf.hybrid.conf" 503 {% if service_ileiden -%} 504 # Service iLeiden 505 pf_flags="-D ext_if={{ externalif }} -D captive_portal_interfaces=${captive_portal_interfaces:-'none'} -D publicnat=80,443" 506 {% else -%} 507 pf_flags="-D ext_if={{ externalif }} -D captive_portal_interfaces=${captive_portal_interfaces:-'none'} -D publicnat=0" 508 {% endif -%} 509 510 {% if service_proxy %} 511 # Service Proxy 512 tinyproxy_enable="yes" 513 {% endif -%} 514 515 {% if gateway -%} 516 defaultrouter="{{ gateway }}" 517 {% endif -%} 518 # 519 # END Hybrid Configuration 520 # 521 {% endif -%} 522 523 524 {% if nodetype == "CNode" %} 498 525 # 499 526 # NODE iLeiden Configuration 500 527 # 501 # iLeiden Proxies {{ autogen_ileiden_proxies_names }} 502 list_ileiden_proxies="{{ autogen_ileiden_proxies }}" 503 # normal Proxies {{ autogen_normal_proxies_names }} 504 list_normal_proxies="{{ autogen_normal_proxies }}" 528 529 {% if tproxy -%} 530 tproxy_enable='YES' 531 tproxy_range='{{ tproxy }}' 532 {% else -%} 533 tproxy_enable='NO' 534 {% endif -%} 505 535 506 536 lvrouted_flags="-u -s s00p3rs3kr3t -m 28 -z $list_ileiden_proxies" 507 537 {% endif %} 508 {% if vpnif -%}509 vpnif="{{ vpnif }}"510 {% endif -%}511 512 captive_portal_whitelist=""513 captive_portal_interfaces="{{ autogen_dhcp_interfaces }}"514 538 \n 515 539 """).render(datadump) … … 1148 1172 if type(dump[key]) == dict: 1149 1173 dump[key] = fix_boolean(dump[key]) 1150 elif str(dump[key]).lower() == "yes":1174 elif str(dump[key]).lower() in ["yes", "true"]: 1151 1175 dump[key] = True 1152 elif str(dump[key]).lower() == "no":1176 elif str(dump[key]).lower() in ["no", "false"]: 1153 1177 # Compass richting no (Noord Oost) is valid input 1154 if key != "compass": 1155 dump[key] = False 1178 if key != "compass": dump[key] = False 1156 1179 return dump 1157 1180 datadump = fix_boolean(datadump)
Note:
See TracChangeset
for help on using the changeset viewer.