Rewrite TableUtils->setUpdateStatus no Where clause , use setNodesAttribs instead

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14195 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
immarvin 2012-11-01 08:43:14 +00:00
parent 0a7fbc43cd
commit f19883d909

View File

@ -901,18 +901,14 @@ sub setUpdateStatus
if(@nodes>0){
my %updates;
$updates{'updatestatus'} = $status;
$updates{'updatestatustime'} = $currtime;
my $where_clause;
my $dbname=xCAT::Utils->get_DBName() ;
if ($dbname eq 'DB2') {
$where_clause="\"node\" in ('" . join("','", @nodes) . "')";
} else {
$where_clause="node in ('" . join("','", @nodes) . "')";
}
# print "$where_clause";
$nltab->setAttribsWhere($where_clause, \%updates );
}
foreach my $node (@nodes)
{
$updates{$node}{'updatestatus'} = $status;
$updates{$node}{'updatestatustime'} = $currtime;
}
$nltab->setNodesAttribs(\%updates);
}
$nltab->close;
}
return;