From d4de05052aa69c95aaa201df19d6e5e35fd53b33 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Tue, 10 May 2011 07:35:18 +0000 Subject: [PATCH] Fixed a bug that lsslp cannot set CEC's parent to frame defined in xCAT DB git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.6@9526 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index d974c3a6e..9f09bdae9 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -2384,6 +2384,17 @@ sub parse_responses { $parent = undef; # Frame and HMC have no parent } } + if ( !defined( $parent ) ) { + if ( exists $vpd_table_hash{$bpamtm . '*' . $bpasn . '-'} ) { + my $existing_node = $vpd_table_hash{$bpamtm . '*' . $bpasn . '-'}; + my $type1 = xCAT::DBobjUtils->getnodetype($existing_node); + if ( $type1 eq "frame" and ($type eq TYPE_BPA or $type eq TYPE_CEC) ) { + $parent = $existing_node; + } elsif ( $type1 eq "cec" and $type eq TYPE_FSP ) { + $parent = $existing_node; + } + } + } push @$data, $parent;