From 41a22e437027eeaa90eba796bac50acb34136a06 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Wed, 27 May 2015 12:07:23 -0400 Subject: [PATCH] Task 44651 Filter out unwanted entries from nmap output --- xCAT-server/lib/xcat/plugins/switchdiscover.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/switchdiscover.pm b/xCAT-server/lib/xcat/plugins/switchdiscover.pm index de7bae5de..dfa61c753 100755 --- a/xCAT-server/lib/xcat/plugins/switchdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/switchdiscover.pm @@ -584,10 +584,14 @@ sub nmap_scan { $ip = $addr->{addr}; } if ($addr->{vendor}) { + if ( ($addr->{vendor} =~ "Juniper") + || ($addr->{vendor} =~ "Cisco") + || ($addr->{vendor} =~ "BNT") + || ($addr->{vendor} =~ "Mellanox") ) { $switches->{$ip}->{mac} = $addr->{addr}; $switches->{$ip}->{vendor} = $addr->{vendor}; $switches->{$ip}->{name} = $host->{hostname}; - + } } } #end for each address }