fix bug4218:rscan -w writes wrong mgt for the CECs

This commit is contained in:
huweihua 2014-08-04 22:03:40 -04:00
parent e48e3b1c1a
commit 19e7c2071d
4 changed files with 11 additions and 5 deletions

View File

@ -1682,7 +1682,7 @@ sub xCATdB {
$profile,
$parent );
return( xCAT::PPCdb::add_ppc( $hwtype, [$values] ));
return( xCAT::PPCdb::add_ppc( $hwtype, [$values],'','',"FSP" ));
}
return undef;
}

View File

@ -75,6 +75,7 @@ sub add_ppc {
my $values = shift;
my $not_overwrite = shift;
my $otherinterfaces = shift;
my $callfile = shift;
my @tabs = qw(ppc vpd nodehm nodelist nodetype hosts mac);
my %db = ();
###################################
@ -119,7 +120,12 @@ sub add_ppc {
# Specify CEC and Frame's mgt as fsp and bpa
if ( $type =~ /^cec$/) {
$mgt = "fsp";
if ( $callfile eq "PPC" ) {
$mgt = "hmc";
}
if ( $callfile eq "FSP" ) {
$mgt = "fsp";
}
}
if ( $type =~ /^frame$/) {
$mgt = "bpa";
@ -320,7 +326,7 @@ sub update_lpar {
}
}
if (defined($write)) {
&add_ppc($hwtype, \@write_list);
&add_ppc($hwtype, \@write_list,'','',"FSP");
return ([@update_list,@write_list]);
} else {
foreach ( @tabs ) {

View File

@ -411,7 +411,7 @@ sub format_output {
# Strip errors for results
#######################################
my @val = grep( !/^#.*: ERROR /, @$values );
xCAT::PPCdb::add_ppc( $hwtype, \@val );
xCAT::PPCdb::add_ppc( $hwtype, \@val ,'','',"PPC");
}
###########################################

View File

@ -1913,7 +1913,7 @@ sub xCATdB {
$profile,
$parent );
return( xCAT::PPCdb::add_ppc( $hwtype, [$values] ));
return( xCAT::PPCdb::add_ppc( $hwtype, [$values],'','',"PPC" ));
}
return undef;
}