Changeset 248


Ignore:
Timestamp:
Sep 8, 2017, 3:35:47 PM (3 years ago)
Author:
g7moreau
Message:
  • Define more SEPARATOR via Readonly variable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r247 r248  
    192192Readonly my $RE_FLOAT_HOSTNAME => $DEFAULT{'float-regex'} || qr{ ^float }xms;
    193193
    194 Readonly my $SEP_AGGREGATOR_PORT => '|';  # : is already use to join switch and port
     194Readonly my $SEP_AGGREGATOR_PORT => ',';  # : is already use to join switch and port
     195Readonly my $SEP_SWITCH_PORT     => ':';
    195196
    196197
     
    10441045   my %db_switch_chained_port = ();
    10451046   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;
    10471048      $db_switch_chained_port{$sw_connect} .= "$port_connect:";
    10481049      }
     
    15581559
    15591560   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;
    15611562      for my $sw (keys %{$db_switch_connected_on_port{$swport}}) {
    15621563
     
    25352536            my $port_hr = $db_switch_link_with{$sw}->{$connect};
    25362537
    2537             $db_switch_connected_on_port{"$connect:$port_hr"} ||= {};
    2538             $db_switch_connected_on_port{"$connect:$port_hr"}->{$sw}++; # Just to define the key
     2538            $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
    25392540            }
    25402541         }
     
    25492550         $maybe_more_than_one_switch_connected = 'yes';
    25502551
    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;
    25522553         my @sw_on_same_port = keys %{$db_switch_connected_on_port{$swport}};
    25532554         print "VERBOSE_10: $swport -- ".$#sw_on_same_port." -- @sw_on_same_port\n" if $verbose;
     
    25792580         my $port_hr = $db_switch_link_with{$sw}->{$connect};
    25802581
    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;
    25832584
    25842585         $db_switch_parent{$sw} = {switch => $connect, port_hr => $port_hr};
     
    26012602   print "------------------------------------------------\n";
    26022603   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;
    26042605      for my $sw (keys %{$db_switch_connected_on_port{$swport}}) {
    26052606         if (exists $db_switch_output_port{$sw}) {
     
    26732674   print "------------------------------------------------\n";
    26742675   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;
    26762677      for my $sw (keys %{$db_switch_connected_on_port{$swport}}) {
    26772678         my $arrow ='<--';
     
    27492750
    27502751            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;
    27522753               next if not $sw_connect eq $sw;
    27532754               next if $port_connect eq $db_switch_output_port{$sw};
     
    27742775#   print "------------------------------------------------\n";
    27752776   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;
    27772778      for my $sw (keys %{$db_switch_connected_on_port{$swport}}) {
    27782779         if (exists $db_switch_output_port{$sw}) {
Note: See TracChangeset for help on using the changeset viewer.