Add lsslp unicast support
This commit is contained in:
parent
d6b62f0eac
commit
acce8ea798
@ -277,7 +277,7 @@ sub parse_args {
|
||||
# Process command-line flags
|
||||
#############################################
|
||||
if (!GetOptions( \%opt,
|
||||
qw(h|help V|Verbose v|version i=s x z w r s=s e=s t=s m c n C=s T=s I flexdiscover updatehosts vpdtable))) {
|
||||
qw(h|help V|Verbose v|version i=s x z w r s=s e=s t=s m c n C=s T=s I u range=s flexdiscover updatehosts vpdtable))) {
|
||||
return( usage() );
|
||||
}
|
||||
|
||||
@ -420,6 +420,21 @@ sub parse_args {
|
||||
$globalopt{n} = 1;
|
||||
}
|
||||
|
||||
##############################################
|
||||
# unicast
|
||||
##############################################
|
||||
if ( exists( $opt{u} )) {
|
||||
$globalopt{u} = 1;
|
||||
unless (exists( $opt{s} ) and exists ($opt{range})) {
|
||||
return( usage( "-u should be used with -s and --range" ));
|
||||
}
|
||||
$globalopt{range} = $opt{range};
|
||||
}
|
||||
if (exists( $opt{range} )) {
|
||||
unless (exists( $opt{u} )) {
|
||||
return( usage( "range is used in unicast mode" ));
|
||||
}
|
||||
}
|
||||
##############################################
|
||||
# warn for no discovered nodes in database
|
||||
##############################################
|
||||
@ -560,6 +575,10 @@ sub invoke_dodiscover {
|
||||
$arg{Time} = $globalopt{T} if($globalopt{T});
|
||||
$arg{nomsg} = 1 if($globalopt{z} or $globalopt{x});
|
||||
$arg{reqcallback} = $request->{callback} if($request->{callback});
|
||||
if ($globalopt{u}) {
|
||||
$arg{unicast} = 1;
|
||||
$arg{range} = $globalopt{range};
|
||||
}
|
||||
my ($searchmacsref,$sendcount,$rsp) = xCAT::SLP::dodiscover(%arg);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user