Added pwerinterval for DFM to control the rpower speed for on/boot/reset options

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10364 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz 2011-08-25 09:11:06 +00:00
parent b1978b5f85
commit df08da6c39

View File

@ -132,6 +132,14 @@ sub powercmd_boot {
my $state = power_status($data);
#print "boot:state:$state\n";
my $op = ($state =~ /^off$/) ? "on" : "reset";
# Attribute powerinterval in site table,
# to control the rpower speed
if(defined($request->{'powerinterval'}) && ($request->{'powerinterval'} ne '')) {
Time::HiRes::sleep($request->{'powerinterval'});
}
$res = xCAT::FSPUtils::fsp_api_action ($node_name, $d, $op);
# @output ...
@ -209,6 +217,16 @@ sub powercmd {
next;
}
}
# Attribute powerinterval in site table,
# to control the rpower speed
if (($action ne 'enter_rack_standby') && ($action ne 'exit_rack_standby') && ($action ne 'stat') && ($action ne 'status')
&& ($action ne 'state') && ($action ne 'off') && ($action ne 'softoff')) {
if(defined($request->{'powerinterval'}) && ($request->{'powerinterval'} ne '')) {
Time::HiRes::sleep($request->{'powerinterval'});
}
}
my $res = xCAT::FSPUtils::fsp_api_action($node_name, $d, $action );
# print "In boot, state\n";
# print Dumper($res);