Changeset 160
- Timestamp:
- Jun 8, 2016, 11:05:40 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r159 r160 665 665 my $sw_port_hr = shift; 666 666 667 $sw_port_hr =~ s/Ten-GigabitEthernet/Te/; 668 $sw_port_hr =~ s/GigabitEthernet/Gi/; 667 $sw_port_hr =~ s/^Bridge-Aggregation/Br/; 668 $sw_port_hr =~ s/^Ten-GigabitEthernet/Te/; 669 $sw_port_hr =~ s/^GigabitEthernet/Gi/; 669 670 670 671 return $sw_port_hr; … … 2071 2072 2072 2073 $db_switch_link_with{ $db_switch_ip_hostnamefq{$ip} } ||= {}; 2073 $db_switch_link_with{ $db_switch_ip_hostnamefq{$ip} }->{ $switch->{hostname} } = $switch->{port };2074 $db_switch_link_with{ $db_switch_ip_hostnamefq{$ip} }->{ $switch->{hostname} } = $switch->{port_hr}; 2074 2075 print "VERBOSE_7: +++++\n" if $verbose; 2075 2076 } … … 2084 2085 for my $connect (keys %{$db_switch_link_with{$sw}}) { 2085 2086 2086 my $port = $db_switch_link_with{$sw}->{$connect};2087 2088 $db_switch_connected_on_port{"$connect:$port "} ||= {};2089 $db_switch_connected_on_port{"$connect:$port "}->{$sw}++; # Just to define the key2087 my $port_hr = $db_switch_link_with{$sw}->{$connect}; 2088 2089 $db_switch_connected_on_port{"$connect:$port_hr"} ||= {}; 2090 $db_switch_connected_on_port{"$connect:$port_hr"}->{$sw}++; # Just to define the key 2090 2091 } 2091 2092 } … … 2127 2128 for my $connect (keys %{$db_switch_link_with{$sw}}) { 2128 2129 2129 my $port = $db_switch_link_with{$sw}->{$connect};2130 2131 $db_switch_connected_on_port{"$connect:$port "} ||= {};2132 $db_switch_connected_on_port{"$connect:$port "}->{$sw} = $port;2130 my $port_hr = $db_switch_link_with{$sw}->{$connect}; 2131 2132 $db_switch_connected_on_port{"$connect:$port_hr"} ||= {}; 2133 $db_switch_connected_on_port{"$connect:$port_hr"}->{$sw} = $port_hr; 2133 2134 2134 2135 $db_switch_parent{$sw} = {switch => $connect, port => $port};
Note: See TracChangeset
for help on using the changeset viewer.