From 01260508a4f0c920fc1061a51ca0de354fffcc33 Mon Sep 17 00:00:00 2001 From: yinle Date: Fri, 3 Jun 2011 03:31:17 +0000 Subject: [PATCH] change the way of get nodetype git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9733 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DBobjUtils.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index 5c8117852..543815a0f 100644 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -2106,8 +2106,10 @@ sub getchildren my $p = $entry->{parent}; my $c = $entry->{node}; if ( $p and $c) { - my $type = $ppctab->getNodeAttribs($c, ["nodetype"]); - if ( $type and ($type->{nodetype} eq 'fsp') or ($type->{nodetype} eq 'bpa')) + #my $type = $ppctab->getNodeAttribs($c, ["nodetype"]); + my $type = getnodetype($c); + #if ( $type and ($type->{nodetype} eq 'fsp') or ($type->{nodetype} eq 'bpa')) + if ( $type eq 'fsp' or $type eq 'bpa') { push @{$::PARENT_CHILDREN{$p}}, $c; } @@ -2272,8 +2274,9 @@ sub getcecchildren my $p = $entry->{parent}; my $c = $entry->{node}; if ( $p and $c) { - my $type = $ppctab->getNodeAttribs($c, ["nodetype"]); - if ( $type and ($type->{nodetype} eq 'cec')) { + #my $type = $ppctab->getNodeAttribs($c, ["nodetype"]); + my $type = getnodetype($c); + if ( $type eq 'cec') { push @{$::PARENT_CHILDREN_CEC{$p}}, $c; } }