set fallback for nonmatching interfaces

This commit is contained in:
Oliver Gorwits
2018-03-17 15:35:55 +00:00
parent 1a65be101e
commit f8a1d5bc7a

View File

@@ -219,11 +219,15 @@ sub interfaces {
# Slot: 0 Port: 4 Gigabit - Level # Slot: 0 Port: 4 Gigabit - Level
if ($i_descr->{$iid} =~ m/([0-9]+)[^0-9]+([0-9]+)/) { if ($i_descr->{$iid} =~ m/([0-9]+)[^0-9]+([0-9]+)/) {
$return->{$iid} = $1 .'/'. $2; $return->{$iid} = $1 .'/'. $2;
next;
} }
# Link Aggregate 4 # Link Aggregate 4
if ($i_descr->{$iid} =~ m/Link Aggregate (\d+)/) { if ($i_descr->{$iid} =~ m/Link Aggregate (\d+)/) {
$return->{$iid} = '3/'. $1; $return->{$iid} = '3/'. $1;
next;
} }
# else
$return->{$iid} = $i_descr->{$iid};
} }
return $return; return $return;