mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-27 14:03:25 +00:00
Oneclipasu (#4020)
* Filter out extraneous output of OneCli * Remove extraneous content from pasu * Update pasu filtering * Fix recognizing success to filter * Update for new Lenovo OneCLI rpm The new packaging offers up iflash64 and asu in a consistent location. * Workaround different IPv6 syntax for asu/onecli * Filter out header of new version of OneCLI * Filter out the Invoking SET command output of onecli
This commit is contained in:
parent
90c10ede1d
commit
489ee67c6a
@ -23,13 +23,24 @@ use Getopt::Long;
|
||||
use POSIX qw(:signal_h :errno_h :sys_wait_h);
|
||||
use Thread qw(yield);
|
||||
|
||||
|
||||
$::onecli = 0;
|
||||
if ($iam =~ /pasu/) {
|
||||
$::utilcmd = '/opt/lenovo/toolscenter/asu/asu64';
|
||||
$::utilcmd = '/opt/lenovo/onecli/asu';
|
||||
$::onecli = 1;
|
||||
if (!-x $::utilcmd) {
|
||||
$::onecli = 0;
|
||||
$::utilcmd = '/opt/lenovo/toolscenter/asu/asu64';
|
||||
}
|
||||
if (!-x $::utilcmd) {
|
||||
$::utilcmd = '/opt/ibm/toolscenter/asu/asu64';
|
||||
}
|
||||
} elsif ($iam =~ /piflash/) {
|
||||
$::utilcmd = '/opt/xcat/sbin/iflash64 --unattended';
|
||||
$::utilcmd = '/opt/lenovo/onecli/iflash64';
|
||||
if (!-x $::utilcmd) {
|
||||
$::utilcmd = '/opt/xcat/sbin/iflash64';
|
||||
}
|
||||
$::utilcmd .= ' --unattended'
|
||||
}
|
||||
my $interface;
|
||||
my $username;
|
||||
@ -198,7 +209,17 @@ sub processoutput { #This way, one arbiter handles output, no interrupting
|
||||
$line !~ /Licensed Materials - Property of Lenovo/i &&
|
||||
$line !~ /\(C\) Copyright IBM Corp. \d+-\d+ All Rights Reserved/i &&
|
||||
$line !~ /\(C\) Copyright Lenovo Corp. \d+-\d+ All Rights Reserved/i &&
|
||||
$line !~ /Connected to IMM at IP address/i)) {
|
||||
$line !~ /Connected to IMM at IP address/i &&
|
||||
$line !~ /Lenovo ASU/i &&
|
||||
$line !~ /^\s*$/i &&
|
||||
$line !~ /Lenovo ToolsCenterSuite CLI/i &&
|
||||
$line !~ /Lenovo XClarity Essentials OneCLI/i &&
|
||||
$line !~ /Invoking SHOW command .../i &&
|
||||
$line !~ /Invoking SET command .../i &&
|
||||
$line !~ /Connected to BMC by IP address/i &&
|
||||
$line !~ /Succeeded running the command /i &&
|
||||
$line !~ /Based on module version /i &&
|
||||
$line !~ /Succeed running command /i)) {
|
||||
print $nodehdl{$readyh} . ": " . $line . "\n";
|
||||
}
|
||||
}
|
||||
@ -225,6 +246,9 @@ sub utilnode {
|
||||
} else {
|
||||
foreach my $a (@_) { $args .= ' ' . xCAT::Utils->quote($a); }
|
||||
}
|
||||
if ($::onecli and $bmc =~ /:/) {
|
||||
$bmc = "[$bmc]";
|
||||
}
|
||||
my $cmd = "$::utilcmd $args --host '$bmc' --user '$username' --password '$passwd' 2>&1 |";
|
||||
if ($::VERBOSE) { print "forking $cmd\n"; }
|
||||
my $pid = open($$out, $cmd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user