FSPvitals with lcds support; FSPflash with --recover's defect is fixed.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4963 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
457e9344a4
commit
e762911f5e
@ -355,7 +355,8 @@ sub action {
|
||||
my $action = shift;
|
||||
# my $user = "HMC";
|
||||
# my $password = "abc123";
|
||||
my $fsp_api ="/home/fsp-api";
|
||||
# my $fsp_api ="/opt/xcat/sbin/fsp-api";
|
||||
my $fsp_api = ($::XCATROOT) ? "$::XCATROOT/sbin/fsp-api" : "/opt/xcat/sbin/fsp-api";
|
||||
my $id = 1;
|
||||
my $fsp_name = ();
|
||||
my $fsp_ip = ();
|
||||
|
@ -173,10 +173,13 @@ sub state {
|
||||
|
||||
my $request = shift;
|
||||
my $hash = shift;
|
||||
# my $prefix = shift;
|
||||
# my $convert = shift;
|
||||
my $exp = shift; # NOt use
|
||||
my $prefix = shift;
|
||||
my $convert = shift;
|
||||
my @output = ();
|
||||
|
||||
|
||||
|
||||
|
||||
#print "------in state--------\n";
|
||||
#print Dumper($request);
|
||||
#print Dumper($hash);
|
||||
@ -207,7 +210,7 @@ sub state {
|
||||
for my $node_name ( keys %$node_hash)
|
||||
{
|
||||
my $d = $node_hash->{$node_name};
|
||||
my $stat = action ($node_name, $d, "state");
|
||||
my $stat = action ($node_name, $d, "state", $prefix, $convert);
|
||||
my $Rc = shift(@$stat);
|
||||
my $data = @$stat[0];
|
||||
my $t = $data->{$node_name};
|
||||
@ -237,6 +240,8 @@ sub action {
|
||||
my $node_name = shift;
|
||||
my $attrs = shift;
|
||||
my $action = shift;
|
||||
my $prefix = shift;
|
||||
my $convert = shift;
|
||||
# my $fsp_api ="/opt/xcat/sbin/fsp-api";
|
||||
my $fsp_api = ($::XCATROOT) ? "$::XCATROOT/sbin/fsp-api" : "/opt/xcat/sbin/fsp-api";
|
||||
my $id = 1;
|
||||
@ -318,12 +323,23 @@ sub action {
|
||||
return ([$Rc, \%outhash]);
|
||||
}
|
||||
}
|
||||
|
||||
##################
|
||||
##############################
|
||||
# Convert state to on/off
|
||||
##############################
|
||||
if ( defined( $convert )) {
|
||||
$res = power_status( $res );
|
||||
}
|
||||
|
||||
#print Dumper($prefix);
|
||||
##################
|
||||
# state cec_state
|
||||
#################
|
||||
$outhash{ $node_name } = $res;
|
||||
|
||||
if (!defined($prefix)) {
|
||||
$outhash{ $node_name } = $res;
|
||||
} else {
|
||||
$outhash{ $node_name } = "$prefix $res";
|
||||
}
|
||||
|
||||
return( [$Rc,\%outhash] );
|
||||
|
||||
}
|
||||
|
@ -11,7 +11,6 @@ use xCAT::Table;
|
||||
use Getopt::Long;
|
||||
use File::Spec;
|
||||
use POSIX qw(tmpnam);
|
||||
use xCAT::FSPflash;
|
||||
|
||||
|
||||
my $packages_dir= ();
|
||||
@ -149,6 +148,8 @@ sub parse_args {
|
||||
print "no housekeeping - update mode\n";
|
||||
$housekeeping = undef;
|
||||
}
|
||||
|
||||
$request->{housekeeping} = $housekeeping;
|
||||
|
||||
#############################################
|
||||
# Option -V for verbose output
|
||||
@ -548,6 +549,8 @@ sub rflash {
|
||||
my $hwtype = @$exp[2];
|
||||
my @result;
|
||||
my $timeout = $request->{ppctimeout};
|
||||
|
||||
my $housekeeping = $request->{housekeeping};
|
||||
|
||||
$packages_dir = $request->{opt}->{p};
|
||||
$activate = $request->{opt}->{activate};
|
||||
|
@ -32,6 +32,8 @@ my %modules = (
|
||||
bpa => "xCAT::FSPpower",
|
||||
},
|
||||
rvitals => { hmc => "xCAT::PPCvitals",
|
||||
fsp => "xCAT::FSPvitals",
|
||||
bpa => "xCAT::FSPvitals",
|
||||
},
|
||||
rscan => { hmc => "xCAT::PPCscan",
|
||||
},
|
||||
@ -165,7 +167,7 @@ sub process_command {
|
||||
my $fsp_api = check_fsp_api($request);
|
||||
if($fsp_api == 0 &&
|
||||
($request->{command} =~ /^(rpower)$/ || $request->{command} =~ /^rinv$/ || $request->{command} =~ /^rflash$/
|
||||
|| $request->{command} =~ /^getmacs$/ || $request->{command} =~ /^rnetboot$/ )
|
||||
|| $request->{command} =~ /^getmacs$/ || $request->{command} =~ /^rnetboot$/ || $request->{command} =~ /^rvitals$/ )
|
||||
) {
|
||||
#support FSPpower, FSPinv and FSPrflash
|
||||
$request->{fsp_api} = 1;
|
||||
|
@ -15,8 +15,8 @@ sub handled_commands {
|
||||
rmhwconn => 'nodehm:mgt',
|
||||
lshwconn => 'nodehm:mgt',
|
||||
rinv => 'nodehm:mgt',
|
||||
rflash => 'nodehm:mgt'
|
||||
|
||||
rflash => 'nodehm:mgt',
|
||||
rvitals => 'nodehm:mgt'
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,8 @@ sub handled_commands {
|
||||
rinv => 'nodehm:mgt',
|
||||
rflash => 'nodehm:mgt',
|
||||
getmacs => 'nodehm:mgt',
|
||||
rnetboot => 'nodehm:mgt'
|
||||
rnetboot => 'nodehm:mgt',
|
||||
rvitals => 'nodehm:mgt'
|
||||
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user