From 274b09d0879f508ee71ccde2991be3933afcd727 Mon Sep 17 00:00:00 2001 From: yinle Date: Tue, 7 Jun 2011 05:41:37 +0000 Subject: [PATCH] change the way of finding node type git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9746 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/PPC.pm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/PPC.pm b/xCAT-server/lib/perl/xCAT/PPC.pm index 1c44a2834..2ad9ea066 100644 --- a/xCAT-server/lib/perl/xCAT/PPC.pm +++ b/xCAT-server/lib/perl/xCAT/PPC.pm @@ -989,25 +989,28 @@ sub resolve { ################################# # Get node type ################################# - my $ent = $tabs->{nodetype}->getNodeAttribs($node,[qw(nodetype node)]); - if ( !defined( $ent )) { - return( sprintf( $errmsg{NODE_UNDEF}, "nodetype" )); - } + #my $ent = $tabs->{nodetype}->getNodeAttribs($node,[qw(nodetype node)]); + #if ( !defined( $ent )) { + # return( sprintf( $errmsg{NODE_UNDEF}, "nodetype" )); + #} ################################# # Check for type ################################# - if ( !exists( $ent->{nodetype} )) { - return( sprintf( $errmsg{NO_ATTR}, "nodetype","nodetype" )); - } + #if ( !exists( $ent->{nodetype} )) { + # return( sprintf( $errmsg{NO_ATTR}, "nodetype","nodetype" )); + #} ################################# # Check for valid "type" ################################# + my $ttype = xCAT::DBobjUtils->getnodetype($node); my ($type) = grep( /^$::NODETYPE_LPAR|$::NODETYPE_OSI|$::NODETYPE_BPA|$::NODETYPE_FSP|$::NODETYPE_CEC|$::NODETYPE_FRAME$/, - split /,/, $ent->{nodetype} ); + #split /,/, $ent->{nodetype} ); + split /,/, $ttype); if ( !defined( $type )) { - return( "Invalid node type: $ent->{nodetype}" ); + #return( "Invalid node type: $ent->{nodetype}" ); + return( "Invalid node type: $ttype" ); } ################################# # Get attributes