support blade cycle: rpower blade cycle

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11776 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
zhaoertao 2012-03-07 05:41:13 +00:00
parent 60fbc4b1a3
commit 8759c66130
3 changed files with 13 additions and 10 deletions

View File

@ -214,10 +214,10 @@ sub powercmd {
if($action =~ /^off$/) { $action = "cec_off"; }
if($action =~ /^resetsp$/) { $action = "reboot_service_processor"; }
if($action =~ /^lowpower$/) { $action = "cec_on_low_power"; }
if($action =~ /^reboot$/) {$action = "cec_reboot";}
if($action !~ /^cec_on_autostart$/ && $action !~ /^cec_off$/ && $action !~ /^cec_on_low_power$/ && $action !~ /^onstandby$/ && $action !~ /^reboot_service_processor$/ ) {
if($action =~ /^cycle$/) {$action = "cec_reboot";}
if($action !~ /^cec_on_autostart$/ && $action !~ /^cec_off$/ && $action !~ /^cec_on_low_power$/ && $action !~ /^onstandby$/ && $action !~ /^reboot_service_processor$/ && $action !~ /^cec_reboot$/) {
push @output, [$node_name, "\'$action\' command not supported for $$d[4]", -1 ];
next;
return (\@output);
}
$newids = $$d[0];
$newnames = $node_name;
@ -232,8 +232,7 @@ sub powercmd {
$action = "reboot_service_processor";
} else {
push @output, [$node_name, "$node_name\'s type isn't fsp or lpar. Not allow doing this operation", -1 ];
#return (\@output);
next;
return (\@output);
}
$newids = $$d[0];
$newnames = $node_name;
@ -285,11 +284,13 @@ sub powercmd {
next;
}
}
push @output, [$node_name,"Success", 0];
if ((scalar(keys %$hash) == 1) and $Rc) {
push @output, [$node_name, $data, $Rc];
} else {
push @output, [$node_name,"Success", 0];
}
}
return( \@output );
}

View File

@ -35,7 +35,9 @@ my %usage = (
rpower <noderange> [stat|state|rackstandby|exit_rackstandby|resetsp]
LPAR(using Direct FSP Management) specific:
rpower <noderange> [on|off|reset|stat|state|boot|of|sms]
Blade specific:
Blade(using Direct FSP Management) specific:
rpower <noderange> [on|off|cycle|state]
Blade(using AMM) specific:
rpower <noderange> [cycle|softoff] [-V|--verbose]
zVM specific:
rpower noderange [on|off|reset|stat|softoff]

View File

@ -1808,7 +1808,7 @@ sub getmacs {
my @allmacs;
foreach my $midx ( @midxary) {
(my $macd,my $mac) = split (/:/,$macs[$midx-1],2);
(my $macd,my $mac) = split (/:/,$macs[$midx],2);
$mac =~ s/\s+//g;
if ($macd !~ /mac address \d/i) {
return 1,"Unable to retrieve MAC address for interface $midx from Management Module";