From fae56e6fa66383117dd229e4fad1a62ad3eaee06 Mon Sep 17 00:00:00 2001 From: chirac Date: Thu, 12 Jul 2018 16:55:15 +0200 Subject: [PATCH] Commentaire --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 60e9f5e..78d2799 100755 --- a/main.py +++ b/main.py @@ -70,6 +70,7 @@ class Switch: for vlan in port['get_port_profil']['vlan_tagged']: add_to_vlans(vlans, vlan, port) + #Trie les ip par vlan, et les ajoute ainsi que les subnet for ip, subnet in self.switch["interfaces_subnet"].items(): vlans[subnet[0]["vlan_id"]].setdefault("ipv4", {}) vlans[subnet[0]["vlan_id"]]["ipv4"][ip] = subnet @@ -77,6 +78,7 @@ class Switch: vlans[subnet["vlan_id"]].setdefault("ipv6", {}) vlans[subnet["vlan_id"]]["ipv6"][ipv6] = subnet + #Regroupement des options par vlans : dhcp_soop,arp, et dhcpv6, ainsi que igmp, mld , ra-guard et loop_protect arp_protect_vlans = [vlan["vlan_id"] for vlan in self.all_vlans if vlan["arp_protect"]] dhcp_snooping_vlans = [vlan["vlan_id"] for vlan in self.all_vlans if vlan["dhcp_snooping"]] dhcpv6_snooping_vlans = [vlan["vlan_id"] for vlan in self.all_vlans if vlan["dhcpv6_snooping"]]