Commentaire
This commit is contained in:
parent
827220a50a
commit
fae56e6fa6
1 changed files with 2 additions and 0 deletions
2
main.py
2
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"]]
|
||||
|
|
Loading…
Reference in a new issue