From 5a561cf82f7b31e28a8f1033d1a82bb85c7d6969 Mon Sep 17 00:00:00 2001 From: jjhua Date: Fri, 25 May 2012 09:05:53 +0000 Subject: [PATCH] improve the performance of rvitals git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12942 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/PPC.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/PPC.pm b/xCAT-server/lib/perl/xCAT/PPC.pm index 2be66eef4..f98c686fc 100644 --- a/xCAT-server/lib/perl/xCAT/PPC.pm +++ b/xCAT-server/lib/perl/xCAT/PPC.pm @@ -1119,9 +1119,11 @@ sub resolve { } ############################# # Get BPA (if any) + #DFM doesn't support rvitals with temp, so add the if fsp_api != 1 + #It will improve the performance of rvitals with all ############################# if (( $request->{command} eq "rvitals" ) && - ( $request->{method} =~ /^all|temp$/ )) { + ( $request->{method} =~ /^all|temp$/ ) && $request->{fsp_api} != 1 ) { my ($ent) = $tabs->{ppc}->getNodeAttribs( $att->{parent},['parent']); ############################# @@ -1160,7 +1162,7 @@ sub resolve { $ntype = xCAT::DBobjUtils->getnodetype($att->{parent}, "ppc"); } if (( $request->{command} eq "rvitals" ) && - ( $request->{method} =~ /^all|temp$/ && $ntype =~ /^cec$/ )) { + ( $request->{method} =~ /^all|temp$/ && $ntype =~ /^cec$/ ) && $request->{fsp_api} != 1 ) { my ($ent) = $tabs->{ppc}->getNodeAttribs( $att->{parent},['parent']); ############################# @@ -1181,7 +1183,7 @@ sub resolve { $att->{bpa} = "$vpd->{mtm}*$vpd->{serial}"; } } elsif (( $request->{command} eq "rvitals" ) && - ( $request->{method} =~ /^all|temp$/ && $ntype =~ /^bpa$/ )) { + ( $request->{method} =~ /^all|temp$/ && $ntype =~ /^bpa$/ ) && $request->{fsp_api} != 1) { my @attrs = qw(mtm serial); my ($vpd) = $tabs->{vpd}->getNodeAttribs($att->{parent},\@attrs); ######################## @@ -1216,7 +1218,7 @@ sub resolve { $att->{bpa} = $att->{parent}; if (( $request->{command} eq "rvitals" ) && - ( $request->{method} =~ /^all|temp$/ )) { + ( $request->{method} =~ /^all|temp$/ ) && $request->{fsp_api} != 1) { ############################# # Find MTMS in vpd database