From ee4fa1e7f72fcb6df46d7d3710adcff4c85dfa72 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Thu, 11 Mar 2010 08:42:55 +0000 Subject: [PATCH] Add another check to determine if the discovered hardware is new or not in lsslp git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5443 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index 92f418dab..8e90c9abe 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -1637,6 +1637,15 @@ sub parse_responses { } } + my %nodehm_table_hash; + my $nodehm_tab = xCAT::Table->new('nodehm'); + my @nodehm_entries = $nodehm_tab->getAllNodeAttribs(['node','mgt']); + for my $entry ( @nodehm_entries ) { + if ( $entry->{'mgt'} ) { + $nodehm_table_hash{$entry->{'node'}} = $entry->{ 'mgt'}; + } + } + my %hash = (); for my $h ( keys %outhash ) { my $data = $outhash{$h}; @@ -1660,7 +1669,10 @@ sub parse_responses { ############################################################ if ( exists( $opt{n} ) ) { if ( exists $vpd_table_hash{$mtm . '*' . $sn . '-' . $side} ) { - next; + my $existing_node = $vpd_table_hash{$mtm . '*' . $sn . '-' . $side}; + if ( exists $nodehm_table_hash{$existing_node} ) { + next; + } } }