Commit fae56e6f authored by chirac's avatar chirac
Browse files


parent 827220a5
......@@ -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"]]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment