From 0259399ae32fa894858b8f310165eed1f349ba4f Mon Sep 17 00:00:00 2001 From: yinle Date: Fri, 3 Jun 2011 07:24:34 +0000 Subject: [PATCH] change the way of getting node type git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9734 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/fsp.pm | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/fsp.pm b/xCAT-server/lib/xcat/plugins/fsp.pm index 146013a5a..d2ecc93f2 100644 --- a/xCAT-server/lib/xcat/plugins/fsp.pm +++ b/xCAT-server/lib/xcat/plugins/fsp.pm @@ -194,22 +194,8 @@ sub getmulcon { ################################# # Get node type ################################# - my ($ent) = $tabs{nodetype}->getNodeAttribs($node, ["nodetype"] ); - if ( !defined( $ent )) { - $rsp->{node}->[0]->{error}=["Not define nodetype"]; - $rsp->{node}->[0]->{errorcode}=[1]; - } - ################################# - # Check for type - ################################# - if ( !exists( $ent->{nodetype} )) { - $rsp->{node}->[0]->{error}=["Can't find nodetype"]; - $rsp->{node}->[0]->{errorcode}=[1]; - } - ################################# - # Check for valid "type" - ################################# - my @types = split /,/, $ent->{nodetype}; + my $ntype = xCAT::DBobjUtils->getnodetype($node); + my @types = split /,/, $ntype; my ($type) = grep( /^(lpar|osi)$/, @types ); if ( !defined( $type )) { @@ -246,7 +232,8 @@ sub getmulcon { foreach my $thishcp ( @hcp_list ) { - my $thishcp_type = xCAT::FSPUtils->getTypeOfNode($thishcp); + #my $thishcp_type = xCAT::FSPUtils->getTypeOfNode($thishcp); + my $thishcp_type = xCAT::DBobjUtils->getnodetype($thishcp); if(!defined($thishcp_type)) { $rsp->{node}->[0]->{error}=["Can't get nodetype of $thishcp"]; $rsp->{node}->[0]->{errorcode}=[1];