2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 11:42:05 +00:00

Change format of rinv/rvitals output for PDU

This commit is contained in:
Casandra Qiu 2017-09-29 15:30:22 -04:00
parent 474b78dc52
commit 9ff54dede6

View File

@ -765,7 +765,6 @@ sub process_pdudiscover {
sub showMFR {
my $noderange = shift;
my $callback = shift;
my $output;
my $nodetab = xCAT::Table->new('hosts');
my $nodehash = $nodetab->getNodesAttribs($noderange,['ip','otherinterfaces']);
@ -784,7 +783,12 @@ sub showMFR {
xCAT::SvrUtils::sendmsg("Failed to list MFR information: $err", $callback);
}
if (defined $ret) {
xCAT::SvrUtils::sendmsg("$ret", $callback);
foreach my $line (split /[\r\n]+/, $ret) {
if ($line) {
$line = join(' ',split(' ',$line));
xCAT::SvrUtils::sendmsg("$line", $callback,$pdu);
}
}
}
$exp->hard_close();
@ -810,7 +814,6 @@ sub showMFR {
sub showMonitorData {
my $noderange = shift;
my $callback = shift;
my $output;
my $nodetab = xCAT::Table->new('hosts');
my $nodehash = $nodetab->getNodesAttribs($noderange,['ip','otherinterfaces']);
@ -829,7 +832,12 @@ sub showMonitorData {
xCAT::SvrUtils::sendmsg("Failed to show monitor data: $err", $callback);
}
if (defined $ret) {
xCAT::SvrUtils::sendmsg("$ret", $callback,$pdu);
foreach my $line (split /[\r\n]+/, $ret) {
if ($line) {
$line = join(' ',split(' ',$line));
xCAT::SvrUtils::sendmsg("$line", $callback,$pdu);
}
}
}
$exp->hard_close();