Changeset 160


Ignore:
Timestamp:
Jun 8, 2016, 11:05:40 PM (8 years ago)
Author:
g7moreau
Message:
  • Add Bridge short name
  • Error betwwen port number and port short name...
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r159 r160  
    665665   my $sw_port_hr  = shift;
    666666
    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/;
    669670
    670671   return $sw_port_hr;
     
    20712072
    20722073         $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};
    20742075         print "VERBOSE_7: +++++\n" if $verbose;
    20752076         }
     
    20842085         for my $connect (keys %{$db_switch_link_with{$sw}}) {
    20852086
    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 key
     2087            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
    20902091            }
    20912092         }
     
    21272128      for my $connect (keys %{$db_switch_link_with{$sw}}) {
    21282129
    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;
    21332134
    21342135         $db_switch_parent{$sw} = {switch => $connect, port => $port};
Note: See TracChangeset for help on using the changeset viewer.