From b1281cdc44b34bf9bc823c54eb8936749a17ba14 Mon Sep 17 00:00:00 2001 From: nott Date: Mon, 25 Oct 2010 16:50:29 +0000 Subject: [PATCH] use getObjectsOfType to get nodelist git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7915 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/InstUtils.pm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/perl-xCAT/xCAT/InstUtils.pm b/perl-xCAT/xCAT/InstUtils.pm index 0e49fa8a6..e5188d417 100644 --- a/perl-xCAT/xCAT/InstUtils.pm +++ b/perl-xCAT/xCAT/InstUtils.pm @@ -813,11 +813,17 @@ sub dolitesetup # statelite, litefile and litetree files in an image and these files # must always contain all the info from the corresponding database # table. - my @nlist = ('all'); - foreach my $n (@nlist) { - push(@nodelist, xCAT::NodeRange::noderange($n)); - } - my $noderange = join(',',@nodelist); + @nodelist= xCAT::DBobjUtils->getObjectsOfType('node'); + my $noderange; + if (scalar(@nodelist) > 0) + { + $noderange = join(',',@nodelist); + } else { + my $rsp; + push @{$rsp->{data}}, "Could not get list of xCAT nodes. No statelite configuration will be done.\n"; + xCAT::MsgUtils->message("E", $rsp, $callback); + return 2; + } # get spot inst_root loc my $spotloc = xCAT::InstUtils->get_nim_attr_val($imghash{$imagename}{spot}, 'location', $callback, "", $subreq);