mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
Merge pull request #2951 from xuweibj/I2948
Add bmc specific for rpower in usage & return if encountered error
This commit is contained in:
commit
18dc716959
@ -23,8 +23,8 @@ SYNOPSIS
|
||||
|
||||
\ **rpower**\ [\ **-h | -**\ **-help | -v | -**\ **-version**\ ]
|
||||
|
||||
BMC (using IPMI) specific:
|
||||
==========================
|
||||
BMC (using IPMI):
|
||||
=================
|
||||
|
||||
|
||||
\ **rpower**\ \ *noderange*\ [\ **on | off | softoff | reset | boot | stat | state | status | wake | suspend**\ [\ **-w**\ \ *timeout*\ ] [\ **-o**\ ] [\ **-r**\ ]]
|
||||
@ -32,8 +32,17 @@ BMC (using IPMI) specific:
|
||||
\ **rpower**\ \ *noderange*\ [\ **pduon | pduoff | pdustat | pdureset**\ ]
|
||||
|
||||
|
||||
OpenBMC specific:
|
||||
=================
|
||||
OpenPower BMC (using IPMI):
|
||||
===========================
|
||||
|
||||
|
||||
\ **rpower**\ \ *noderange*\ [\ **on | off | reset | boot | stat | state | status**\ ]
|
||||
|
||||
\ **rpower**\ \ *noderange*\ [\ **pduon | pduoff | pdustat | pdureset**\ ]
|
||||
|
||||
|
||||
OpenPower OpenBMC:
|
||||
==================
|
||||
|
||||
|
||||
\ **rpower**\ \ *noderange*\ [\ **off | on | reset | boot | stat | state | status**\ ]
|
||||
@ -97,6 +106,13 @@ Blade specific:
|
||||
\ **rpower**\ \ *noderange*\ [\ **cycle | softoff**\ ]
|
||||
|
||||
|
||||
Lenovo High-Density Server specific:
|
||||
====================================
|
||||
|
||||
|
||||
\ **rpower**\ \ *noderange*\ [\ **on | off | reset | boot | reseat**\ ]
|
||||
|
||||
|
||||
zVM specific:
|
||||
=============
|
||||
|
||||
@ -270,6 +286,12 @@ OPTIONS
|
||||
|
||||
|
||||
|
||||
\ **reseat**\
|
||||
|
||||
For Lenovo high-density servers, simulates unplugging and replugging the node into the chassis.
|
||||
|
||||
|
||||
|
||||
\ **of**\
|
||||
|
||||
Boot the node to open firmware console mode.
|
||||
|
@ -26,7 +26,13 @@ my %usage = (
|
||||
"rpower" =>
|
||||
"Usage: rpower <noderange> [--nodeps] [on|onstandby|off|suspend|reset|stat|state|boot] [-V|--verbose] [-m table.colum==expectedstatus][-m table.colum==expectedstatus...] [-r <retrycount>] [-t <timeout>]
|
||||
rpower [-h|--help|-v|--version]
|
||||
OpenBMC specific:
|
||||
BMC (using IPMI):
|
||||
rpower noderange [on|off|softoff|reset|boot|stat|state|status|wake|suspend [-w timeout] [-o] [-r]]
|
||||
rpower noderange [pduon|pduoff|pdustat]
|
||||
OpenPower BMC:
|
||||
rpower noderange [on|off|reset|boot|stat|state|status]
|
||||
rpower noderange [pduon|pduoff|pdustat]
|
||||
OpenPower OpenBMC:
|
||||
rpower noderange [on|off|reset|boot|stat|state|status]
|
||||
KVM Virtualization specific:
|
||||
rpower <noderange> [boot] [ -c <path to iso> ]
|
||||
|
@ -8,13 +8,19 @@ B<rpower> I<noderange> [B<--nodeps>] [B<on>|B<onstandby>|B<off>|B<suspend>|B<sta
|
||||
|
||||
B<rpower> [B<-h>|B<--help>|B<-v>|B<--version>]
|
||||
|
||||
=head2 BMC (using IPMI) specific:
|
||||
=head2 BMC (using IPMI):
|
||||
|
||||
B<rpower> I<noderange> [B<on>|B<off>|B<softoff>|B<reset>|B<boot>|B<stat>|B<state>|B<status>|B<wake>|B<suspend> [B<-w> I<timeout>] [B<-o>] [B<-r>]]
|
||||
|
||||
B<rpower> I<noderange> [B<pduon>|B<pduoff>|B<pdustat>|B<pdureset>]
|
||||
|
||||
=head2 OpenBMC specific:
|
||||
=head2 OpenPower BMC (using IPMI):
|
||||
|
||||
B<rpower> I<noderange> [B<on>|B<off>|B<reset>|B<boot>|B<stat>|B<state>|B<status>]
|
||||
|
||||
B<rpower> I<noderange> [B<pduon>|B<pduoff>|B<pdustat>|B<pdureset>]
|
||||
|
||||
=head2 OpenPower OpenBMC:
|
||||
|
||||
B<rpower> I<noderange> [B<off>|B<on>|B<reset>|B<boot>|B<stat>|B<state>|B<status>]
|
||||
|
||||
|
@ -2535,6 +2535,12 @@ sub power {
|
||||
my $rc = 0;
|
||||
my $text;
|
||||
my $code;
|
||||
|
||||
if (($sessdata->{subcommand} !~ /^on$|^off$|^reset$|^boot$|^stat$|^state$|^status$/) and isopenpower($sessdata)) {
|
||||
xCAT::SvrUtils::sendmsg([ 1, "unsupported command rpower $sessdata->{subcommand} for OpenPower" ], $callback, $sessdata->{node}, %allerrornodes);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($sessdata->{subcommand} eq "reseat") {
|
||||
reseat_node($sessdata);
|
||||
} elsif (not $sessdata->{acpistate} and is_systemx($sessdata)) { #Only implemented for IBM servers
|
||||
@ -2681,6 +2687,7 @@ sub power_response {
|
||||
my $text = $codes{ $rsp->{code} };
|
||||
unless ($text) { $text = sprintf("Unknown response %02xh", $rsp->{code}); }
|
||||
xCAT::SvrUtils::sendmsg([ 1, $text ], $callback, $sessdata->{node}, %allerrornodes);
|
||||
return;
|
||||
} else {
|
||||
my $command = $sessdata->{subcommand};
|
||||
my $status = $sessdata->{powerstatus};
|
||||
|
Loading…
x
Reference in New Issue
Block a user