lslite supports node in nodegroup while nodegroup in statelite table.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7369 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
sjing 2010-09-07 08:20:51 +00:00
parent e130863d82
commit 090192c743

View File

@ -313,6 +313,32 @@ sub getNodeData {
{
# get locations with specific nodes
push @imageInfo, $tab->getAttribs({node => $node}, @attrs);
if (!defined $imageInfo[0])
{
# maybe node belongs to nodegroup
# try to find it in groups
my @tmpnodes = join(',', $node);
# group info in nodelist tab
my $nltab = xCAT::Table->new('nodelist');
my $nltabdata = $nltab->getNodesAttribs(\@tmpnodes, ['node', 'groups']);
my $data = $nltabdata->{$node}->[0];
my @grps = split(',', $data->{groups});
foreach my $g (@grps)
{
chomp $g;
my $info = $tab->getAttribs({node => $g}, @attrs);
if(defined $info)
{
push @imageInfo, $info;
}
# return once get one record
last if (defined $imageInfo[1]);
}
}
}
else
{