- Timestamp:
- Sep 8, 2017, 3:35:47 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r247 r248 192 192 Readonly my $RE_FLOAT_HOSTNAME => $DEFAULT{'float-regex'} || qr{ ^float }xms; 193 193 194 Readonly my $SEP_AGGREGATOR_PORT => '|'; # : is already use to join switch and port 194 Readonly my $SEP_AGGREGATOR_PORT => ','; # : is already use to join switch and port 195 Readonly my $SEP_SWITCH_PORT => ':'; 195 196 196 197 … … 1044 1045 my %db_switch_chained_port = (); 1045 1046 for my $swport (keys %db_switch_connected_on_port) { 1046 my ($sw_connect, $port_connect) = split m/ :/xms, $swport, 2;1047 my ($sw_connect, $port_connect) = split m/ $SEP_SWITCH_PORT /xms, $swport, 2; 1047 1048 $db_switch_chained_port{$sw_connect} .= "$port_connect:"; 1048 1049 } … … 1558 1559 1559 1560 for my $swport (sort keys %db_switch_connected_on_port) { 1560 my ($sw_connect, $port_connect) = split m/ :/xms, $swport, 2;1561 my ($sw_connect, $port_connect) = split m/ $SEP_SWITCH_PORT /xms, $swport, 2; 1561 1562 for my $sw (keys %{$db_switch_connected_on_port{$swport}}) { 1562 1563 … … 2535 2536 my $port_hr = $db_switch_link_with{$sw}->{$connect}; 2536 2537 2537 $db_switch_connected_on_port{"$connect :$port_hr"} ||= {};2538 $db_switch_connected_on_port{"$connect :$port_hr"}->{$sw}++; # Just to define the key2538 $db_switch_connected_on_port{"$connect$SEP_SWITCH_PORT$port_hr"} ||= {}; 2539 $db_switch_connected_on_port{"$connect$SEP_SWITCH_PORT$port_hr"}->{$sw}++; # Just to define the key 2539 2540 } 2540 2541 } … … 2549 2550 $maybe_more_than_one_switch_connected = 'yes'; 2550 2551 2551 my ($sw_connect, $port_connect) = split m/ :/xms, $swport, 2;2552 my ($sw_connect, $port_connect) = split m/ $SEP_SWITCH_PORT /xms, $swport, 2; 2552 2553 my @sw_on_same_port = keys %{$db_switch_connected_on_port{$swport}}; 2553 2554 print "VERBOSE_10: $swport -- ".$#sw_on_same_port." -- @sw_on_same_port\n" if $verbose; … … 2579 2580 my $port_hr = $db_switch_link_with{$sw}->{$connect}; 2580 2581 2581 $db_switch_connected_on_port{"$connect :$port_hr"} ||= {};2582 $db_switch_connected_on_port{"$connect :$port_hr"}->{$sw} = $port_hr;2582 $db_switch_connected_on_port{"$connect$SEP_SWITCH_PORT$port_hr"} ||= {}; 2583 $db_switch_connected_on_port{"$connect$SEP_SWITCH_PORT$port_hr"}->{$sw} = $port_hr; 2583 2584 2584 2585 $db_switch_parent{$sw} = {switch => $connect, port_hr => $port_hr}; … … 2601 2602 print "------------------------------------------------\n"; 2602 2603 for my $swport (sort keys %db_switch_connected_on_port) { 2603 my ($sw_connect, $port_connect) = split m/ :/xms, $swport, 2;2604 my ($sw_connect, $port_connect) = split m/ $SEP_SWITCH_PORT /xms, $swport, 2; 2604 2605 for my $sw (keys %{$db_switch_connected_on_port{$swport}}) { 2605 2606 if (exists $db_switch_output_port{$sw}) { … … 2673 2674 print "------------------------------------------------\n"; 2674 2675 for my $swport (sort keys %db_switch_connected_on_port) { 2675 my ($sw_connect, $port_connect) = split m/ :/xms, $swport, 2;2676 my ($sw_connect, $port_connect) = split m/ $SEP_SWITCH_PORT /xms, $swport, 2; 2676 2677 for my $sw (keys %{$db_switch_connected_on_port{$swport}}) { 2677 2678 my $arrow ='<--'; … … 2749 2750 2750 2751 for my $swport (keys %db_switch_connected_on_port) { 2751 my ($sw_connect, $port_connect) = split m/ :/xms, $swport, 2;2752 my ($sw_connect, $port_connect) = split m/ $SEP_SWITCH_PORT /xms, $swport, 2; 2752 2753 next if not $sw_connect eq $sw; 2753 2754 next if $port_connect eq $db_switch_output_port{$sw}; … … 2774 2775 # print "------------------------------------------------\n"; 2775 2776 for my $swport (sort keys %db_switch_connected_on_port) { 2776 my ($sw_connect, $port_connect) = split m/ :/xms, $swport, 2;2777 my ($sw_connect, $port_connect) = split m/ $SEP_SWITCH_PORT /xms, $swport, 2; 2777 2778 for my $sw (keys %{$db_switch_connected_on_port{$swport}}) { 2778 2779 if (exists $db_switch_output_port{$sw}) {
Note: See TracChangeset
for help on using the changeset viewer.