Changeset 14025 in genesis
- Timestamp:
- Jan 22, 2018, 12:49:48 PM (7 years ago)
- Files:
-
- 45 edited
Legend:
- Unmodified
- Added
- Removed
-
nodes/AJSoft2/wleiden.yaml
r13548 r14025 64 64 dhcp : False 65 65 compass : "z" 66 ns_ip : "172.16.17.106 "66 ns_ip : "172.16.17.106/29" 67 67 ns_mac : "00:15:6d:71:53:4e" 68 68 bridge_type: "NanoStation5" -
nodes/CeTIM1/wleiden.yaml
r13102 r14025 63 63 dhcp : False 64 64 compass : "w" 65 ns_ip : "172.16.4.171 "65 ns_ip : "172.16.4.171/29" 66 66 ns_mac : "00:15:6d:f2:38:9a" 67 67 bridge_type: "NanoStation5" … … 107 107 dhcp : False 108 108 compass : "no" 109 ns_ip : "172.16.17.146 "109 ns_ip : "172.16.17.146/29" 110 110 ns_mac : "00:15:6d:f6:be:e4" 111 111 bridge_type: "NanoStation5" -
nodes/DeKijker/wleiden.yaml
r13844 r14025 63 63 dhcp : False 64 64 compass : "z" 65 ns_ip : "172.16.7.186 "65 ns_ip : "172.16.7.186/29" 66 66 ns_mac : "04:18:d6:ca:fd:bf" 67 67 bridge_type: "NanoStationM5" -
nodes/Drijfhuis/wleiden.yaml
r13102 r14025 45 45 dhcp : False 46 46 compass : "zo" 47 ns_ip : "172.16.16.35 "47 ns_ip : "172.16.16.35/29" 48 48 ns_mac : "00:15:6d:70:50:04" 49 49 bridge_type: "NanoStation5" -
nodes/Dwars/wleiden.yaml
r14024 r14025 10 10 location : "Thomas Uittenbogaard, XXX, XXXX XX, Leiden" 11 11 longitude : "4.000" 12 masterip : "172.17. 115.1"12 masterip : "172.17.73.1" 13 13 monitoring_group: "wleiden" 14 14 nodename : "Dwars" … … 42 42 iface_bridge0: 43 43 comment : "Access Points" 44 ip : "172.17. 115.1/24"44 ip : "172.17.73.1/24" 45 45 type : "eth" 46 46 dhcp : "10-240" … … 64 64 channel : 1 65 65 ssid : "Wifi Leiden" 66 ns_ip : "172.17. 115.2/24"66 ns_ip : "172.17.73.2/24" 67 67 ns_mac : "xx:xx:xx:xx:xx:xx" 68 68 ns_type : "mesh" … … 72 72 iface_vr1_extra0: 73 73 comment : "Monitoring Server" 74 ip : "172.17. 115.5/24"74 ip : "172.17.73.5/24" 75 75 sdesc : "2monitor" 76 76 type : "eth" -
nodes/Graficall/wleiden.yaml
r13968 r14025 104 104 dhcp : False 105 105 compass : "zw" 106 ns_ip : "172.16.3.11 "106 ns_ip : "172.16.3.11/29" 107 107 ns_mac : "04:18:d6:56:ae:0c" 108 108 bridge_type: "NanoStationM5" … … 121 121 dhcp : False 122 122 compass : "nw" 123 ns_ip : "172.16.10.50 "123 ns_ip : "172.16.10.50/29" 124 124 ns_mac : "04:18:d6:56:a5:bc" 125 125 bridge_type: "NanoStationM5" -
nodes/HMKerk/wleiden.yaml
r13548 r14025 31 31 ssid : "WiFi-Hoogmade" 32 32 dhcp : "10-60" 33 ns_ip : "172.25.64.2 "33 ns_ip : "172.25.64.2/24" 34 34 ns_mac : "00:15:6d:e8:e7:46" 35 35 bridge_type: "Bullet2" -
nodes/Haagwijk/wleiden.yaml
r13605 r14025 62 62 dhcp : False 63 63 compass : "o" 64 ns_ip : "172.16.17.130 "64 ns_ip : "172.16.17.130/29" 65 65 ns_mac : "00:15:6d:ec:82:60" 66 66 bridge_type: "NanoStation5" -
nodes/Hofland/wleiden.yaml
r13548 r14025 58 58 ssid : "ap-WirelessLeiden-Hofland" 59 59 dhcp : "10-250" 60 ns_ip : "172.20.148.2 "60 ns_ip : "172.20.148.2/24" 61 61 ns_mac : "dc:9f:db:3e:27:a1" 62 62 bridge_type: "BulletM2" -
nodes/Hofwijck/wleiden.yaml
r13313 r14025 36 36 iface_ue0: 37 37 comment : "Ethernet naar Hofwijck" 38 ip : "172. 23.16.65/28"38 ip : "172.17.128.1/24" 39 39 sdesc : "2hofwijck" 40 40 type : "eth" … … 54 54 dhcp : False 55 55 compass : "n" 56 ns_ip : "172.16.6.26 "56 ns_ip : "172.16.6.26/29" 57 57 ns_mac : "00:15:6d:e8:e7:37" 58 58 bridge_type: "Bullet2" … … 88 88 dhcp : False 89 89 compass : "w" 90 ns_ip : "172.16.3.107 "90 ns_ip : "172.16.3.107/29" 91 91 ns_mac : "00:15:6d:f7:be:d0" 92 92 bridge_type: "NanoStation5" -
nodes/Houtmarkt/wleiden.yaml
r13583 r14025 62 62 dhcp : False 63 63 compass : "zw" 64 ns_ip : "172.16.17.147 "64 ns_ip : "172.16.17.147/29" 65 65 ns_mac : "04:18:d6:cc:02:0c" 66 66 bridge_type: "NanoStationM5" … … 78 78 ssid : "ap-WirelessLeiden-Houtmarkt2" 79 79 dhcp : "10-250" 80 ns_ip : "172.17.43.2 "80 ns_ip : "172.17.43.2/24" 81 81 ns_mac : "00:15:6d:30:28:4e" 82 82 bridge_type: "Bullet2" -
nodes/HuygensZ/wleiden.yaml
r13844 r14025 45 45 dhcp : False 46 46 compass : "140" 47 ns_ip : "172.16.5.98 "47 ns_ip : "172.16.5.98/29" 48 48 ns_mac : "04:18:d6:cc:01:8d" 49 49 bridge_type: "NanoStationM5" -
nodes/JorisdeWitte/wleiden.yaml
r13861 r14025 58 58 dhcp : False 59 59 compass : "w" 60 ns_ip : "172.16.7.11 "60 ns_ip : "172.16.7.11/29" 61 61 ns_mac : "dc:9f:db:f2:0e:5d" 62 62 bridge_type: "NanoBridge25 M5" … … 75 75 dhcp : False 76 76 compass : "w" 77 ns_ip : "172.16.7.19 "77 ns_ip : "172.16.7.19/29" 78 78 ns_mac : "00:15:6d:f2:43:83" 79 79 bridge_type: "NanoStation M5" -
nodes/LHS/wleiden.yaml
r13880 r14025 37 37 iface_vr0: 38 38 comment : "External Link" 39 ip : "0.0.0.0/30"40 39 sdesc : "2external" 41 40 type : "eth" -
nodes/Langevoort/wleiden.yaml
r13869 r14025 92 92 dhcp : "10-240" 93 93 compass : "w" 94 ns_ip : "172.17.70.2/2 9"94 ns_ip : "172.17.70.2/24" 95 95 ns_mac : "00:15:6d:e9:f9:bd" 96 96 bridge_type: "Bullet2" -
nodes/Lebkov/wleiden.yaml
r13584 r14025 55 55 dhcp : False 56 56 compass : "z" 57 ns_ip : "172.16.17.227 "57 ns_ip : "172.16.17.227/29" 58 58 ns_mac : "04:18:d6:56:ac:b7" 59 59 bridge_type: "NanoStation5" -
nodes/Lijtweg1/wleiden.yaml
r13946 r14025 44 44 dhcp : "10-250" 45 45 compass : "w" 46 ns_ip : "172.17.69.2 "46 ns_ip : "172.17.69.2/24" 47 47 ns_mac : "00:27:22:e2:53:1c" 48 48 bridge_type: "NanoStationM2" … … 60 60 dhcp : False 61 61 compass : "n" 62 ns_ip : "172.16.4.114 "62 ns_ip : "172.16.4.114/29" 63 63 ns_mac : "dc:9f:db:2e:0b:03" 64 64 bridge_type: "NanoBridgeM5" … … 90 90 ssid : "il-o.lijtweg1.wleiden.net" 91 91 compass : "no" 92 ns_ip : "172.16.6.242 "92 ns_ip : "172.16.6.242/29" 93 93 ns_mac : "24:a4:3c:0a:54:9e" 94 94 bridge_type: "NanoStationM5" -
nodes/Lijtweg2/wleiden.yaml
r13953 r14025 77 77 78 78 iface_vr0_alias0: 79 comment : "Link naar Juffermans via switch nano 172.16. 17.146 00:15:6d:f2:43:eb"79 comment : "Link naar Juffermans via switch nano 172.16.3.146 00:15:6d:f2:43:eb" 80 80 ip : "172.16.3.145/29" 81 81 sdesc : "2juffermans" … … 87 87 dhcp : False 88 88 compass : "o" 89 ns_ip : "172.16. 17.146/29"89 ns_ip : "172.16.3.146/29" 90 90 ns_mac : "00:15:6d:f2:43:eb" 91 91 bridge_type: "NanoStation M5" … … 129 129 dhcp : False 130 130 compass : "zw" 131 ns_ip : "172.16.6.34 "131 ns_ip : "172.16.6.34/29" 132 132 ns_mac : "04:18:d6:56:ad:5e" 133 133 bridge_type: "NanoStation5 M5" -
nodes/LivingLab/wleiden.yaml
r13567 r14025 55 55 iface_vr0: 56 56 comment : "Lokaal maar uitgezet ivm reboot probleem" 57 ip : "0.0.0.0/32"58 57 sdesc : "2lokaal" 59 58 type : "eth" … … 90 89 dhcp : False 91 90 compass : "zo" 92 ns_ip : "172.16.17.114 "91 ns_ip : "172.16.17.114/29" 93 92 ns_mac : "00:15:6d:70:51:e9" 94 93 bridge_type: "NanoStation5" -
nodes/Meelfabriek1/wleiden.yaml
r13998 r14025 72 72 dhcp : False 73 73 compass : "zw" 74 ns_ip : "172.17.152.2 "74 ns_ip : "172.17.152.2/24" 75 75 ns_mac : "24:a4:3c:0a:42:1d" 76 76 bridge_type: "NanostationM5" -
nodes/OnsBuiten/wleiden.yaml
r13928 r14025 66 66 dhcp : False 67 67 compass : "w" 68 ns_ip : "172.16.3.251 "68 ns_ip : "172.16.3.251/29" 69 69 ns_mac : "00:15:6d:e8:f9:c6" 70 70 bridge_type: "Bullet2" … … 83 83 dhcp : False 84 84 compass : "z" 85 ns_ip : "172.17.40.2 "85 ns_ip : "172.17.40.2/24" 86 86 ns_mac : "dc:9f:db:36:a5:93" 87 87 bridge_type: "NanoStationM2-Loco" -
nodes/Rabo1/wleiden.yaml
r13548 r14025 53 53 iface_vr0: 54 54 comment : "Ethernet naar Rabo2" 55 ip : "172.1 9.137.65/30"55 ip : "172.16.3.17/30" 56 56 sdesc : "2rabo2" 57 57 type : "eth" -
nodes/Rabo2/wleiden.yaml
r13548 r14025 7 7 location : "Rabobank (Zuid), Schipholweg 105, 2316 XC, Leiden" 8 8 longitude : "4.48901" 9 masterip : "172.1 9.137.1"9 masterip : "172.17.116.1" 10 10 monitoring_group: "wleiden" 11 11 nodename : "Rabo2" … … 24 24 iface_ath0: 25 25 comment : "Ap zuid" 26 ip : "172.1 9.137.1/24"26 ip : "172.17.116.1/24" 27 27 sdesc : "ap-z" 28 28 mode : "ap" … … 37 37 iface_vr0: 38 38 comment : "Ethernet naar Rabo1" 39 ip : "172.1 9.137.66/30"39 ip : "172.16.3.18/30" 40 40 sdesc : "2rabo1" 41 41 type : "eth" -
nodes/RijnVliet/wleiden.yaml
r13442 r14025 46 46 dhcp : "10-250" 47 47 compass : "zw" 48 ns_ip : "172.17.4.2 "48 ns_ip : "172.17.4.2/24" 49 49 ns_mac : "00:15:6d:e8:f9:b0" 50 50 bridge_type: "Bullet2" -
nodes/Robijn2/wleiden.yaml
r13869 r14025 54 54 dhcp : "10-240" 55 55 compass : "nw" 56 ns_ip : "172.17.98.2 "56 ns_ip : "172.17.98.2/24" 57 57 ns_mac : "dc:9f:db:36:1d:b7" 58 58 bridge_type: "NanoStationM2" … … 71 71 dhcp : "10-240" 72 72 compass : "zo" 73 ns_ip : "172.17.99.2 "73 ns_ip : "172.17.99.2/24" 74 74 ns_mac : "dc:9f:db:36:1d:b5" 75 75 bridge_type: "NanoStationM2" -
nodes/Robijn3/wleiden.yaml
r13894 r14025 80 80 dhcp : "10-240" 81 81 compass : "nw" 82 ns_ip : "172.17.103.2 "82 ns_ip : "172.17.103.2/24" 83 83 ns_mac : "dc:9f:db:36:1d:1d" 84 84 bridge_type: "NanoStationM2" … … 132 132 iface_vr2_extra4: 133 133 comment : "AP-repeater " 134 ip : "172.17.103. 6.6/28"134 ip : "172.17.103.7/28" 135 135 type : "eth" 136 136 channel : "11" -
nodes/Roomburgh1/wleiden.yaml
r13125 r14025 53 53 54 54 iface_vr0: 55 comment : " Lokaal subnet"56 ip : "172.1 8.49.71/28"57 sdesc : " localsubnet"55 comment : "Ethernet naar Roomburgh2" 56 ip : "172.16.3.61/30" 57 sdesc : "2roomburgh2" 58 58 type : "eth" 59 59 dhcp : False -
nodes/Roomburgh2/wleiden.yaml
r13125 r14025 54 54 55 55 iface_vr0: 56 comment : " Lokaal subnet"57 ip : "172.1 8.49.72/28"58 sdesc : " localsubnet"56 comment : "Ethernet naar Roomburgh1" 57 ip : "172.16.3.62/30" 58 sdesc : "2roomburgh1" 59 59 type : "eth" 60 60 dhcp : False -
nodes/Rustdam/wleiden.yaml
r14018 r14025 130 130 131 131 132 #? (172.17.164.23) at dc:9f:db:3e:27:b0 on bridge1 expires in 1189 seconds [bridge] 133 #? (172.17.164.43) at dc:9f:db:3e:27:32 on bridge1 expires in 1199 seconds [bridge] 134 #? (172.17.164.42) at dc:9f:db:3e:27:4c on bridge1 expires in 1192 seconds [bridge] 135 #? (172.17.164.44) at dc:9f:db:3e:27:52 on bridge1 expires in 1126 seconds [bridge] 136 #? (172.17.164.1) at 02:f1:10:3d:9e:01 on bridge1 permanent [bridge] 137 #? (172.17.164.34) at dc:9f:db:3e:26:81 on bridge1 expires in 1189 seconds [bridge] 138 # -
nodes/Rustenborch/wleiden.yaml
r13995 r14025 54 54 dhcp : False 55 55 compass : "no" 56 ns_ip : "172.16.6.35 "56 ns_ip : "172.16.6.35/29" 57 57 ns_mac : "00:15:6d:70:54:67" 58 58 bridge_type: "NanoStation5" -
nodes/SOM1/wleiden.yaml
r14022 r14025 46 46 dhcp : False 47 47 compass : "o" 48 ns_ip : "172.16.7.10 "48 ns_ip : "172.16.7.10/29" 49 49 ns_mac : "24:a4:3c:0a:54:99" 50 50 bridge_type: "NanoStation M5" -
nodes/SOM2/wleiden.yaml
r13990 r14025 45 45 dhcp : False 46 46 compass : "o" 47 ns_ip : "172.16.3.250 "47 ns_ip : "172.16.3.250/29" 48 48 ns_mac : "04:18:d6:ca:fc:be" 49 49 bridge_type: "NanoStationM5" -
nodes/StJan/wleiden.yaml
r13548 r14025 180 180 dhcp : False 181 181 compass : "no" 182 ns_ip : "172.16.3.235 "182 ns_ip : "172.16.3.235/29" 183 183 ns_mac : "00:27:22:8a:3b:f5" 184 184 bridge_type: "NanoStation M5" -
nodes/Stadhuis/wleiden.yaml
r13961 r14025 75 75 compass : "nw" 76 76 distance : "1.8 km" 77 ns_ip : "172.17.30.2 "77 ns_ip : "172.17.30.2/24" 78 78 ns_mac : "00:15:6d:d4:f8:05" 79 79 bridge_type: "Bullet2" -
nodes/TEYAkzoNobel1/wleiden.yaml
r13943 r14025 62 62 dhcp : False 63 63 compass : "n" 64 ns_ip : "172.16.9.35 "64 ns_ip : "172.16.9.35/29" 65 65 ns_mac : "dc:9f:db:64:23:47" 66 66 bridge_type: "NanoStationM5" … … 79 79 dhcp : False 80 80 compass : "o" 81 ns_ip : "172.16.9.250 "81 ns_ip : "172.16.9.250/29" 82 82 ns_mac : "dc:9f:db:e4:98:96" 83 83 bridge_type: "NanoStationM5" … … 96 96 dhcp : False 97 97 compass : "n" 98 ns_ip : "172.16.10.34 "98 ns_ip : "172.16.10.34/29" 99 99 ns_mac : "dc:9f:db:f2:0e:3f" 100 100 bridge_type: "NanoBridgeM5" -
nodes/TEYAkzoNobel2/wleiden.yaml
r13844 r14025 45 45 dhcp : False 46 46 compass : "nw" 47 ns_ip : "172.16.10.2 "47 ns_ip : "172.16.10.2/29" 48 48 ns_mac : "dc:9f:db:f2:0f:6c" 49 49 bridge_type: "NanoBridgeM5" … … 62 62 dhcp : False 63 63 compass : "o" 64 ns_ip : "172.16.7.18 "64 ns_ip : "172.16.7.18/29" 65 65 ns_mac : "dc:9f:db:2a:2c:ed" 66 66 bridge_type: "NanoStationM5" … … 90 90 dhcp : False 91 91 compass : "z" 92 ns_ip : "172.16.5.3 "92 ns_ip : "172.16.5.3/29" 93 93 ns_mac : "dc:9f:db:f2:0e:2d" 94 94 bridge_type: "NanoBridgeM5" -
nodes/TEYJOP/wleiden.yaml
r13804 r14025 74 74 dhcp : False 75 75 compass : "z" 76 ns_ip : "172.16.5.187 "76 ns_ip : "172.16.5.187/29" 77 77 ns_mac : "" 78 78 bridge_type: "NanoStationM5" -
nodes/TestTienThuis/wleiden.yaml
r13869 r14025 47 47 ssid : "WiFi Leiden TEST" 48 48 dhcp : "10-240" 49 ns_ip : "172.17. 41.2/24"49 ns_ip : "172.17.155.2/24" 50 50 ns_mac : "00:15:6d:d4:f8:36" 51 51 bridge_type: "Bullet2" -
nodes/Vosko2/wleiden.yaml
r13140 r14025 63 63 dhcp : False 64 64 compass : "n" 65 ns_ip : "172.16.4.11 "65 ns_ip : "172.16.4.11/29" 66 66 ns_mac : "00:15:6d:f2:35:7d" 67 67 bridge_type: "NanoStation5" -
nodes/WP/wleiden.yaml
r11738 r14025 21 21 status : "up" 22 22 23 iface_bridge0: 24 comment : "Access Points" 25 ip : "172.19.137.1/24" 26 type : "eth" 27 dhcp : "10-240" 28 status : "up" 23 29 24 30 iface_sis0: 25 31 comment : "Ethernet naar proxy5" 26 ip : "172.19.168.65/30"32 parent : "bridge0" 27 33 sdesc : "2proxy5" 28 34 type : "eth" 29 dhcp : False30 35 status : "up" 31 36 … … 50 55 iface_wi0: 51 56 comment : "Omni voor de buurt" 52 ip : "172.19.168.1/24"57 parent : "bridge0" 53 58 sdesc : "ap" 54 59 mode : "ap" … … 56 61 channel : 11 57 62 ssid : "ap-WirelessLeiden-WoutertjeP" 58 dhcp : "10-250"59 63 status : "up" 60 64 -
nodes/ZTWDorpskerk/wleiden.yaml
r13960 r14025 80 80 ssid : "ap-ZTW-Dorpskerk-Plein" 81 81 compass : "o" 82 ns_ip : "172.17.6 2.2/24"82 ns_ip : "172.17.61.2/24" 83 83 ns_mac : "00:15:6d:30:d2:b8" 84 84 bridge_type: "NanoStation2" -
nodes/ZTWMeerburgkerk/wleiden.yaml
r14023 r14025 60 60 dhcp : False 61 61 compass : "zw" 62 ns_ip : "172.16.7.202 "62 ns_ip : "172.16.7.202/29" 63 63 ns_mac : "dc:9f:db:64:23:a3" 64 64 bridge_type: "NanoStation M5" -
nodes/ZTWRijneke/wleiden.yaml
r14021 r14025 41 41 dhcp : False 42 42 compass : "nw" 43 ns_ip : "172.16.9.195 "43 ns_ip : "172.16.9.195/29" 44 44 ns_mac : "00:27:22:8a:3b:f3" 45 45 bridge_type: "NanoStation M5" … … 58 58 dhcp : False 59 59 compass : "no" 60 ns_ip : "172.16.5.251 "60 ns_ip : "172.16.5.251/29" 61 61 ns_mac : "00:27:22:8a:3b:4f" 62 62 bridge_type: "NanoStation M5" … … 126 126 dhcp : False 127 127 compass : "zw" 128 ns_ip : "172.16.3.234 "128 ns_ip : "172.16.3.234/29" 129 129 ns_mac : "00:27:22:8a:3b:d0" 130 130 bridge_type: "NanoStation M5" -
nodes/ZwaluwAK/wleiden.yaml
r13844 r14025 54 54 ssid : "WiFi-Leiden-N" 55 55 dhcp : "10-250" 56 ns_ip : "172.17.117.2 "56 ns_ip : "172.17.117.2/24" 57 57 ns_mac : "00:15:6d:e8:e7:4a" 58 58 bridge_type: "Bullet2" … … 70 70 dhcp : False 71 71 compass : "o" 72 ns_ip : "172.16.4.35 "72 ns_ip : "172.16.4.35/29" 73 73 ns_mac : "00:15:6d:f2:39:44" 74 74 bridge_type: "Nanostation5" -
tools/syntax-checker.py
r13987 r14025 6 6 import gformat 7 7 import sys 8 import ipaddress 8 9 9 10 from collections import defaultdict … … 11 12 __version__ = '$Id$' 12 13 13 allowed_multi_use = ['0.0.0.0', '192.168.1.', '192.168.178.'] 14 allowed_multi_use = map(lambda x: ipaddress.ip_network(x, strict=True), [ 15 u'192.168.0.0/22', 16 u'192.168.0.0/16', 17 u'192.168.0.0/24', 18 u'192.168.1.0/24', 19 u'192.168.178.0/24', 20 ]) 21 22 23 24 14 25 15 26 def check_double_ip(): … … 19 30 print "## Processing host %-25s: " % host, 20 31 datadump = gformat.get_yaml(host,add_version_info=False) 32 masterip_addr = ipaddress.IPv4Interface(unicode(datadump['masterip'])) 33 masterip_is_used = False 34 21 35 # Check syntax of defined variables 22 36 _ = gformat.generate_wleiden_yaml(datadump) … … 25 39 iface_keys = [elem for elem in datadump.keys() if (elem.startswith('iface_') and not "lo0" in elem)] 26 40 for iface_key in iface_keys: 27 # Virtual interfaces bridge interfaces do not have IP addreses28 if not datadump[iface_key].has_key('ip'):41 # Extra (descriptive entries) are ignored 42 if '_extra' in iface_key: 29 43 continue 30 44 31 l = datadump[iface_key]['ip'] 32 addr, mask = l.split('/') 45 # Process actual and virtual IP (avoiding clashes with nanostation IP) 46 for entry in ['ip', 'ns_ip']: 47 if entry in datadump[iface_key]: 48 addr = ipaddress.IPv4Interface(unicode(datadump[iface_key][entry])) 49 if masterip_addr in addr.network: 50 masterip_is_used = True 51 pool[addr.network].append((host, iface_key, entry, addr)) 33 52 34 pool[addr].append((host, iface_key))35 53 36 iface_key = 'masterip'37 addr = datadump['masterip']38 54 # Add masterip to the list if IP has not been defined at interface 39 if not host in [x[0] for x in pool[addr]]:40 pool[addr].append((host, 'masterip'))55 if not masterip_is_used: 56 pool[masterip_addr.network].append((host, 'masterip', '', masterip_addr)) 41 57 42 58 print "OK" … … 48 64 sys.exit(1) 49 65 50 error = False 51 for addr,leden in pool.iteritems(): 52 if len(leden) > 1: 53 if not any(map(lambda x: addr.startswith(x), allowed_multi_use)): 54 print "[ERROR] Multiple usages of IP %s:" % (addr) 55 for host, key in leden: 56 print " - %s - %s" % (host, key) 57 error = True 66 errors = 0 67 keys = sorted(pool.keys(),reverse=True) 58 68 59 if error: 60 print "# Errors found" 69 for i,network in enumerate(keys): 70 if not network in allowed_multi_use: 71 for network2 in keys[i+1:]: 72 if not network2 in allowed_multi_use and network2.overlaps(network): 73 errors += 1 74 print "[ERROR#%i] network %s overlaps with %s:" % (errors, network, network2) 75 for (host, key, entry, addr) in sorted(pool[network] + pool[network2]): 76 print " - %-20s - %-20s - %-5s - %s" % (host, key, entry, addr) 77 78 leden = sorted(pool[network]) 79 for i,lid in enumerate(leden): 80 for lid2 in leden[i+1:]: 81 if lid[3] == lid2[3]: 82 errors += 1 83 print "[ERROR#%i] Multiple usages of IP %s:" % (errors, lid[3]) 84 print " - %-20s - %-20s - %-5s" % (lid[0], lid[1], lid[2]) 85 print " - %-20s - %-20s - %-5s" % (lid2[0], lid2[1], lid2[2]) 86 87 if errors > 0: 88 print "# %i Errors found" % errors 61 89 return 1 62 90 else:
Note:
See TracChangeset
for help on using the changeset viewer.