77d55609c0
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1562 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
36 lines
1.0 KiB
Perl
36 lines
1.0 KiB
Perl
package xCAT::Scope;
|
|
use xCAT::Utils;
|
|
use xCAT::Table;
|
|
sub get_broadcast_scope {
|
|
my $req = shift;
|
|
if ($req =~ /xCAT::Scope/) {
|
|
$req = shift;
|
|
}
|
|
$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
|
|
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;
|