defect 4178,4179: pass the [all] parameter to inventory and vitals resource, this is must have for ppc node; make the return code of rinv and rvitals always to be 0 so that rest api could handle the return message which has both success and failure.
This commit is contained in:
parent
96d9612893
commit
899428db2c
@ -264,7 +264,7 @@ sub temp {
|
||||
# No frame commands for IVM
|
||||
#################################
|
||||
if ( $hwtype eq "ivm" ) {
|
||||
push @result, [$name,"$prefix Not available (No BPA)",1];
|
||||
push @result, [$name,"$prefix Not available (No BPA)",0];
|
||||
next;
|
||||
}
|
||||
#################################
|
||||
@ -272,14 +272,14 @@ sub temp {
|
||||
#################################
|
||||
if ( @$d[4] !~ /^(fsp|lpar|cec)$/ ) {
|
||||
my $text = "$prefix Only available for CEC/LPAR";
|
||||
push @result, [$name,$text,1];
|
||||
push @result, [$name,$text,0];
|
||||
next;
|
||||
}
|
||||
#################################
|
||||
# Error - No frame
|
||||
#################################
|
||||
if ( $mtms eq "0" ) {
|
||||
push @result, [$name,"$prefix Not available (No BPA)",1];
|
||||
push @result, [$name,"$prefix Not available (No BPA)",0];
|
||||
next;
|
||||
}
|
||||
#################################
|
||||
@ -352,7 +352,7 @@ sub rackenv {
|
||||
#################################
|
||||
if ( @$d[4] !~ /^(bpa|frame)$/ ) {
|
||||
my $text = "$prefix Only available for BPA/Frame";
|
||||
push @result, [$name,$text,1];
|
||||
push @result, [$name,$text,0];
|
||||
next;
|
||||
}
|
||||
|
||||
|
@ -347,7 +347,7 @@ sub bus {
|
||||
#################################
|
||||
# Output header
|
||||
#################################
|
||||
push @result, [$name,"I/O Bus Information"];
|
||||
push @result, [$name,"I/O Bus Information", 0];
|
||||
|
||||
#################################
|
||||
# Output error
|
||||
@ -532,7 +532,7 @@ sub config {
|
||||
#################################
|
||||
# Output header
|
||||
#################################
|
||||
push @result, [$name,"Machine Configuration Info"];
|
||||
push @result, [$name,"Machine Configuration Info", 0];
|
||||
my $i;
|
||||
|
||||
foreach ( @prefix ) {
|
||||
|
@ -203,7 +203,7 @@ sub voltage {
|
||||
# Voltages available in frame
|
||||
#################################
|
||||
if ( @$d[4] ne "bpa" ) {
|
||||
push @result, [$name,"$text Only available for BPA",1];
|
||||
push @result, [$name,"$text Only available for BPA",0];
|
||||
next;
|
||||
}
|
||||
my $volt = enumerate_volt( $exp, $d );
|
||||
@ -256,7 +256,7 @@ sub temp {
|
||||
# No frame commands for IVM
|
||||
#################################
|
||||
if ( $hwtype eq "ivm" ) {
|
||||
push @result, [$name,"$prefix Not available (No BPA)",1];
|
||||
push @result, [$name,"$prefix Not available (No BPA)",0];
|
||||
next;
|
||||
}
|
||||
#################################
|
||||
@ -264,14 +264,14 @@ sub temp {
|
||||
#################################
|
||||
if ( @$d[4] !~ /^(fsp|cec|lpar)$/ ) {
|
||||
my $text = "$prefix Only available for CEC/LPAR";
|
||||
push @result, [$name,$text,1];
|
||||
push @result, [$name,$text,0];
|
||||
next;
|
||||
}
|
||||
#################################
|
||||
# Error - No frame
|
||||
#################################
|
||||
if ( $mtms eq "0" ) {
|
||||
push @result, [$name,"$prefix Not available (No BPA)",1];
|
||||
push @result, [$name,"$prefix Not available (No BPA)",0];
|
||||
next;
|
||||
}
|
||||
#################################
|
||||
|
@ -1585,6 +1585,9 @@ sub actionout {
|
||||
# use resourcename as the record name
|
||||
if ($param->{'resourcename'} eq "eventlog") {
|
||||
push @{$jsonnode->{$d->{node}->[0]->{name}->[0]}->{$param->{'resourcename'}}}, $d->{node}->[0]->{data}->[0]->{contents}->[0];
|
||||
} elsif ($param->{'resourcename'} =~ /(vitals|inventory)/) {
|
||||
# handle output of rvital and rinv for ppc node
|
||||
push @{$jsonnode->{$d->{node}->[0]->{name}->[0]}}, $d->{node}->[0]->{data}->[0]->{contents}->[0];
|
||||
} else {
|
||||
$jsonnode->{$d->{node}->[0]->{name}->[0]}->{$param->{'resourcename'}} = $d->{node}->[0]->{data}->[0]->{contents}->[0];
|
||||
}
|
||||
@ -1756,6 +1759,8 @@ sub actionhdl {
|
||||
if (defined($urilayers[3])) {
|
||||
my @attrs = split(';', $urilayers[3]);
|
||||
push @args, @attrs;
|
||||
} else { # default, get all attrs
|
||||
push @args, "all";
|
||||
}
|
||||
} elsif ($params->{'resourcename'} eq "serviceprocessor") {
|
||||
if (isGET()) {
|
||||
|
Loading…
Reference in New Issue
Block a user