Changeset 228


Ignore:
Timestamp:
Mar 5, 2017, 9:52:02 AM (8 years ago)
Author:
g7moreau
Message:
  • Add a new format for MAC address and work on search-mac-on-switch
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r227 r228  
    428428   my $mac_address = shift;
    429429
    430    # D07E-28D1-7AB8 or d07e28-d17ab8
    431    if ($mac_address =~ m{^ (?: [0-9A-Fa-f]{4} -){2} [0-9A-Fa-f]{4} $}xms
    432       or $mac_address =~ m{^ [0-9A-Fa-f]{6} - [0-9A-Fa-f]{6} $}xms) {
     430   # D07E-28D1-7AB8 or D07E.28D1.7AB8 or d07e28-d17ab8
     431   if ($mac_address =~ m{^ (?: [0-9A-Fa-f]{4} [-\.]){2} [0-9A-Fa-f]{4} $}xms
     432      or $mac_address =~ m{^ [0-9A-Fa-f]{6} - [0-9A-Fa-f]{6} $}xms
     433      ) {
    433434      $mac_address =~ s/-//g;
    434435      return join q{:}, unpack('(A2)*', uc($mac_address));
     
    22262227
    22272228   $mac_address = normalize_mac_address($mac_address);
    2228    $switch_name = join(',', map {$_->{hostname}} @SWITCH_LIST ) if $switch_name eq q{*};
     2229   $switch_name = join(',', map {$_->{hostname}} @SWITCH_LIST ) if $switch_name eq q{*} or $switch_name eq q{all};
    22292230
    22302231   for my $sw_name (split /,/, $switch_name) {
Note: See TracChangeset for help on using the changeset viewer.