diff --git a/perl-xCAT/xCAT/FSPUtils.pm b/perl-xCAT/xCAT/FSPUtils.pm index d9d81dca7..289af4435 100644 --- a/perl-xCAT/xCAT/FSPUtils.pm +++ b/perl-xCAT/xCAT/FSPUtils.pm @@ -156,6 +156,9 @@ sub fsp_api_action { if( defined($parameter) ) { if ($action =~ /^set_(frame|cec|lpar)_name$/) { $cmd = "$fsp_api -a $action -n $parameter -T $tooltype -t $type:$fsp_ip:$id:$node_name:"; + } elsif( $parameter !=0 && $action =~ /^(on|reset)$/ ) { + #powerinterval for lpars power on + $cmd = "$fsp_api -a $action -i $parameter -T $tooltype -t $type:$fsp_ip:$id:$node_name:"; } else { $cmd = "$fsp_api -a $action -T $tooltype -t $type:$fsp_ip:$id:$node_name:$parameter"; } diff --git a/perl-xCAT/xCAT/FSPpower.pm b/perl-xCAT/xCAT/FSPpower.pm index 2c766272f..70ba605cd 100644 --- a/perl-xCAT/xCAT/FSPpower.pm +++ b/perl-xCAT/xCAT/FSPpower.pm @@ -175,7 +175,7 @@ sub powercmd { my $lpar_flag = 0; my $cec_flag = 0; my $frame_flag = 0; - + #print "++++in powercmd++++\n"; #print Dumper($hash); @@ -198,7 +198,7 @@ sub powercmd { foreach $node_name ( keys %$hash) { - $action = $request->{'op'}; + $action = $request->{'op'}; my $d = $hash->{$node_name}; if ($$d[4] =~ /^lpar$/) { if( !($action =~ /^(on|off|of|reset|sms)$/)) { @@ -241,19 +241,19 @@ sub powercmd { } if( $lpar_flag && $cec_flag) { - push @output, [$node_name," $node_name\'s type is different from the last name. The noderange of power control operation could NOT be lpar/cec mixed" , -1 ]; + push @output, [$node_name," $node_name\'s type is different from the last node. The noderange of power control operation could NOT be lpar/cec mixed" , -1 ]; return (\@output); } if( $lpar_flag && $frame_flag) { - push @output, [$node_name," $node_name\'s type is different from the last name. The noderange of power control operation could NOT be lpar/frame mixed" , -1 ]; + push @output, [$node_name," $node_name\'s type is different from the last node. The noderange of power control operation could NOT be lpar/frame mixed" , -1 ]; return (\@output); } if( $cec_flag && $frame_flag) { - push @output, [$node_name," $node_name\'s type is different from the last name. The noderange of power control operation could NOT be cec/frame mixed" , -1 ]; + push @output, [$node_name," $node_name\'s type is different from the last node. The noderange of power control operation could NOT be cec/frame mixed" , -1 ]; return (\@output); } @@ -263,8 +263,8 @@ sub powercmd { $$newd[0] = $newids; #print Dumper($newd); - - my $res = xCAT::FSPUtils::fsp_api_action($newnames, $newd, $action ); + + my $res = xCAT::FSPUtils::fsp_api_action($newnames, $newd, $action, 0, $request->{'powerinterval'} ); # print "In boot, state\n"; # print Dumper($res); my $Rc = @$res[2];