Changeset 10887 in genesis
- Timestamp:
- May 16, 2012, 9:32:05 PM (13 years ago)
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
nodes/HybridHenk/wleiden.yaml
r10885 r10887 48 48 sdesc : "2external" 49 49 type : "eth" 50 dhcp : False 51 dhcpclient : True 50 dhcp : "client" 52 51 compass : "None" 53 52 status : "up" -
nodes/HybridHerman/wleiden.yaml
r10884 r10887 40 40 sdesc : "uplink" 41 41 type : "eth" 42 dhcp : True42 dhcp : "client" 43 43 compass : "None" 44 44 status : "up" -
nodes/HybridHuub/wleiden.yaml
r10885 r10887 76 76 sdesc : "2external" 77 77 type : "eth" 78 dhcp : False 79 dhcpclient : True 78 dhcp : "client" 80 79 compass : "None" 81 80 status : "up" -
nodes/HybridLHS/wleiden.yaml
r10885 r10887 58 58 sdesc : "2external" 59 59 type : "eth" 60 dhcp : False 61 dhcpclient : True 60 dhcp : "client" 62 61 compass : "None" 63 62 status : "up" -
nodes/HybridLivingLab/wleiden.yaml
r10885 r10887 67 67 sdesc : "2external" 68 68 type : "eth" 69 dhcp : False 70 dhcpclient : True 69 dhcp : "client" 71 70 compass : "None" 72 71 status : "up" -
nodes/HybridMeerburg/wleiden.yaml
r10885 r10887 75 75 sdesc : "2internet" 76 76 type : "eth" 77 dhcp : False 78 dhcpclient : True 77 dhcp : "client" 79 78 compass : "None" 80 79 status : "up" -
nodes/HybridRick2/wleiden.yaml
r10885 r10887 49 49 sdesc : "2external" 50 50 type : "eth" 51 dhcp : False 52 dhcpclient : True 51 dhcp : "client" 53 52 compass : "None" 54 53 status : "up" -
nodes/HybridRickVPN/wleiden.yaml
r10883 r10887 50 50 sdesc : "2external" 51 51 type : "eth" 52 dhcp : False 53 dhcpclient : True 52 dhcp : "client" 54 53 compass : "None" 55 54 status : "up" -
nodes/HybridWBRotary/wleiden.yaml
r10885 r10887 89 89 ssid : "il-n.wbrotary.wleiden.net" 90 90 dhcp : False 91 dhcpclient : False92 91 compass : "w" 93 92 ns_ip : "192.168.0.82/24" -
nodes/HybridZwet/wleiden.yaml
r10885 r10887 74 74 sdesc : "2house" 75 75 type : "eth" 76 dhcp client : True76 dhcp : "client" 77 77 compass : "None" 78 78 status : "up" -
nodes/ProxyKWVdeKaag/wleiden.yaml
r10884 r10887 28 28 sdesc : "uplink" 29 29 type : "eth" 30 dhcp : False 31 dhcpclient : True 30 dhcp : "client" 32 31 compass : "None" 33 32 status : "up" -
nodes/ProxyZwaluwak/wleiden.yaml
r10885 r10887 39 39 sdesc : "uplink" 40 40 type : "eth" 41 dhcp : False 42 dhcpclient : True 41 dhcp : "client" 43 42 compass : "None" 44 43 status : "up" -
nodes/retired/ProxyHenk/wleiden.yaml
r10779 r10887 31 31 dhcp : False 32 32 compass : "None" 33 dhcp client : True33 dhcp : "client" 34 34 status : "up" 35 35 -
nodes/retired/ProxyLHS/wleiden.yaml
r10779 r10887 31 31 dhcp : False 32 32 compass : "None" 33 dhcp client : True33 dhcp : "client" 34 34 status : "up" 35 35 -
nodes/retired/ProxyMeerburg/wleiden.yaml
r10779 r10887 31 31 dhcp : False 32 32 compass : "None" 33 dhcp client : True33 dhcp : "client" 34 34 status : "up" 35 35 -
tools/gformat.py
r10885 r10887 97 97 datadump_cache = {} 98 98 99 NO_DHCP = 0 100 DHCP_CLIENT = 10 101 DHCP_SERVER = 20 102 def dhcp_type(item): 103 if not item.has_key('dhcp'): 104 return NO_DHCP 105 elif not item['dhcp']: 106 return NO_DHCP 107 elif item['dhcp'].lower() == 'client': 108 return DHCP_CLIENT 109 else: 110 return DHCP_SERVER 111 99 112 def get_yaml(item): 100 113 try: … … 139 152 raise 140 153 141 dhcp_interfaces = [datadump[key]['autogen_ifname'] for key in datadump['autogen_iface_keys'] if (datadump[key].has_key('dhcp') and datadump[key]['dhcp'])] 154 dhcp_interfaces = [datadump[key]['autogen_ifname'] for key in datadump['autogen_iface_keys'] \ 155 if dhcp_type(datadump[key]) == DHCP_SERVER] 156 142 157 datadump['autogen_dhcp_interfaces'] = dhcp_interfaces 143 158 datadump['autogen_item'] = item … … 433 448 datadump[iface_key]['autogen_subnet'] = get_network(addr, mask) 434 449 try: 450 if dhcp_type(datadump[iface_key]) != DHCP_SERVER: 451 raise ValueError 435 452 (dhcp_start, dhcp_stop) = datadump[iface_key]['dhcp'].split('-') 436 453 except (AttributeError, ValueError, KeyError): … … 678 695 679 696 # Flag dhclient is possible 680 dhclient_if[ifname] = ifacedump.has_key('dhcpclient') and ifacedump['dhcpclient']697 dhclient_if[ifname] = dhcp_type(ifacedump) == DHCP_CLIENT 681 698 682 699 # Add interface IP to list … … 948 965 ('ssid', False), 949 966 ('dhcp', True), 950 ('dhcpclient', False),951 967 ('compass', False), 952 968 ('distance', False),
Note:
See TracChangeset
for help on using the changeset viewer.