From 15500d97daf27b867df2b6d799c711577fc30a4a Mon Sep 17 00:00:00 2001 From: yinle Date: Tue, 7 Jun 2011 06:02:28 +0000 Subject: [PATCH] change the way of finding node type git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9748 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCcfg.pm | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/perl-xCAT/xCAT/PPCcfg.pm b/perl-xCAT/xCAT/PPCcfg.pm index 5f63b3584..f9ee53042 100644 --- a/perl-xCAT/xCAT/PPCcfg.pm +++ b/perl-xCAT/xCAT/PPCcfg.pm @@ -71,18 +71,24 @@ sub parse_args { ############################################# # Get support command list ############################################# - my $sitetab = xCAT::Table->new( 'nodetype' ); + #my $typetab = xCAT::Table->new( 'nodetype' ); + #my $nodes = $request->{node}; + #foreach (@$nodes) { + # if ( defined( $typetab )) { + # my ($ent) = $typetab->getAttribs({ node=>$_},'nodetype'); + # if ( defined($ent) ) { + # $request->{hwtype} = $ent->{nodetype}; + # last; + # } + # + # } + # + #} + my $nodes = $request->{node}; - foreach (@$nodes) { - if ( defined( $sitetab )) { - my ($ent) = $sitetab->getAttribs({ node=>$_},'nodetype'); - if ( defined($ent) ) { - $request->{hwtype} = $ent->{nodetype}; - last; - } - - } - + foreach my $nn (@$nodes) { + $request->{hwtype} = xCAT::DBobjUtils->getnodetype($nn); + last if ($request->{hwtype}); } my $supported = $rsp{$request->{hwtype}};