diff --git a/Netdisco/Changes b/Netdisco/Changes index 6e87a96e..da549638 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -6,6 +6,10 @@ * Hide Legend item relating to port control if not an admin * No-Wrap on port name column + [BUG FIXES] + + * Change port ordering for Arista and Foundry platforms + 2.004002 - 2013-01-30 [BUG FIXES] diff --git a/Netdisco/lib/App/Netdisco/Util/Web.pm b/Netdisco/lib/App/Netdisco/Util/Web.pm index 92a153b0..290065a9 100644 --- a/Netdisco/lib/App/Netdisco/Util/Web.pm +++ b/Netdisco/lib/App/Netdisco/Util/Web.pm @@ -29,14 +29,14 @@ sub sort_port { my ($aval, $bval) = @_; # hack for foundry "10GigabitEthernet" -> cisco-like "TenGigabitEthernet" - $aval = "Ten$1" if $aval =~ qr/^10(GigabitEthernet.+)$/; - $bval = "Ten$1" if $bval =~ qr/^10(GigabitEthernet.+)$/; + $aval = $1 if $aval =~ qr/^10(GigabitEthernet.+)$/; + $bval = $1 if $bval =~ qr/^10(GigabitEthernet.+)$/; my $numbers = qr{^(\d+)$}; my $numeric = qr{^([\d\.]+)$}; my $dotted_numeric = qr{^(\d+)\.(\d+)$}; my $letter_number = qr{^([a-zA-Z]+)(\d+)$}; - my $wordcharword = qr{^([^:\/.]+)[\ :\/\.]+([^:\/.]+)(\d+)?$}; #port-channel45 + my $wordcharword = qr{^([^:\/.]+)[-\ :\/\.]+([^:\/.0-9]+)(\d+)?$}; #port-channel45 my $netgear = qr{^Slot: (\d+) Port: (\d+) }; # "Slot: 0 Port: 15 Gigabit - Level" my $ciscofast = qr{^ # Word Number slash (Gigabit0/) @@ -58,7 +58,7 @@ sub sort_port { } elsif ($aval =~ $numbers) { @a = ($1); } elsif ($aval =~ $ciscofast) { - @a = ($2,$1); + @a = ($1,$2); push @a, split(/[:\/]/,$3), $4; } elsif ($aval =~ $wordcharword) { @a = ($1,$2,$3); @@ -75,7 +75,7 @@ sub sort_port { } elsif ($bval =~ $numbers) { @b = ($1); } elsif ($bval =~ $ciscofast) { - @b = ($2,$1); + @b = ($1,$2); push @b, split(/[:\/]/,$3),$4; } elsif ($bval =~ $wordcharword) { @b = ($1,$2,$3);