diff --git a/perl-xCAT/xCAT/FSPpower.pm b/perl-xCAT/xCAT/FSPpower.pm index d19076c2c..6252daf47 100644 --- a/perl-xCAT/xCAT/FSPpower.pm +++ b/perl-xCAT/xCAT/FSPpower.pm @@ -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);