"getnodetype performance improvement": change getnodetype related code.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11546 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
yinle 2012-02-10 10:12:19 +00:00
parent ba01bb554a
commit 4cd7205eca

View File

@ -3011,8 +3011,9 @@ sub do_resetnet {
if ( $req->{node} ) {
$reset_all = 0;
my $typehash = xCAT::DBobjUtils->getnodetype(\@{ $req->{node}});
foreach my $nn ( @{ $req->{node}} ) {
$nodetype = xCAT::DBobjUtils->getnodetype($nn);
$nodetype = $$typehash{$nn};
# this brunch is just for the xcat 2.6(+) database
if ( $nodetype =~ /^(cec|frame)$/ ) {
my $cnodep = xCAT::DBobjUtils->getchildren($nn);