Prevent potential undefined warning in ports() of Layer3::C3550

Add Layer3::C3550 test class
This commit is contained in:
Eric A. Miller
2018-04-11 20:30:46 -04:00
parent 02e6807e44
commit c515a5e4a1
2 changed files with 178 additions and 2 deletions

View File

@@ -96,8 +96,8 @@ sub ports {
my $c3550 = shift;
my $id = $c3550->id();
my $model = &SNMP::translateObj($id);
if ( $model =~ /(12|24|48)(C|T|TS|G|TS-E|TS-S|T-E)?$/ ) {
my $model = SNMP::translateObj($id);
if ( defined $model && $model =~ /(12|24|48)(C|T|TS|G|TS-E|TS-S|T-E)?$/ ) {
return $1;
}