add support of lsslp -i (specify the nic to do lsslp) and fix a bug.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12346 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
yinle 2012-04-26 08:56:24 +00:00
parent f6cca9aa39
commit abb3d4989a

View File

@ -61,6 +61,16 @@ sub dodiscover {
@srvtypes = split /,/,$args{SrvTypes};
}
my $interfaces = get_interfaces(%args);
if ($args{Ip}) {
my @ips = split /,/, $args{Ip};
foreach my $ip (@ips) {
foreach my $nic (keys %$interfaces) {
unless (${${$interfaces->{$nic}}{ipv4addrs}}[0] =~ $ip) {
delete $interfaces->{$nic};
}
}
}
}
foreach my $srvtype (@srvtypes) {
send_service_request_single(%args,ifacemap=>$interfaces,SrvType=>$srvtype);
}
@ -170,8 +180,8 @@ sub parse_attribute_list {
$attrib =~ s/\),?$//;
$attrib =~ s/=(.*)$//;
$attribs{$attrib}=[];
if ($1) {
my $valstring = $1;
my $valstring = $1;
if (defined $valstring) {
foreach(split /,/,$valstring) {
push @{$attribs{$attrib}},$_;
}