From 91caa34007b59fbc96d674fb5811fd6c5b957bb6 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 19 May 2008 16:01:29 +0000 Subject: [PATCH] -Use getSNList to list xcatd instances for a broadcast scope git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1441 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/Scope.pm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/perl-xCAT-2.0/xCAT/Scope.pm b/perl-xCAT-2.0/xCAT/Scope.pm index 24cd31ed0..583666552 100644 --- a/perl-xCAT-2.0/xCAT/Scope.pm +++ b/perl-xCAT-2.0/xCAT/Scope.pm @@ -9,19 +9,27 @@ sub get_broadcast_scope { $callback = shift; if ($req->{_xcatdest}) { return [$req]; } #Exit if the packet has been preprocessed in its history my @requests = ({%$req}); #Start with a straight copy to reflect local instance - my $sitetab = xCAT::Table->new('site'); - (my $ent) = $sitetab->getAttribs({key=>'xcatservers'},'value'); - $sitetab->close; - if ($ent and $ent->{value}) { - foreach (split /,/,$ent->{value}) { + foreach (xCAT::Utils->getSNList()) { if (xCAT::Utils->thishostisnot($_)) { my $reqcopy = {%$req}; $reqcopy->{'_xcatdest'} = $_; push @requests,$reqcopy; } - } } return \@requests; + #my $sitetab = xCAT::Table->new('site'); + #(my $ent) = $sitetab->getAttribs({key=>'xcatservers'},'value'); + #$sitetab->close; + #if ($ent and $ent->{value}) { + # foreach (split /,/,$ent->{value}) { + # if (xCAT::Utils->thishostisnot($_)) { + # my $reqcopy = {%$req}; + # $reqcopy->{'_xcatdest'} = $_; + # push @requests,$reqcopy; + # } + # } + #} + #return \@requests; } 1;