Changed nodelist "groups" attribute write to database to (fsp|bpa|hmc|ivm|lpar,osi)

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1121 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
sakolish 2008-04-18 17:41:58 +00:00
parent ac30b53f00
commit 69f2a0db4a

View File

@ -12,10 +12,17 @@ use xCAT::GlobalDef;
##########################################################################
sub add_ppc {
my $hwtype = shift;
my $values = shift;
my @tabs = qw(ppc vpd nodehm nodelist nodetype);
my %db = ();
my $hwtype = shift;
my $values = shift;
my @tabs = qw(ppc vpd nodehm nodelist nodetype);
my %db = ();
my %nodetype = (
fsp => $::NODETYPE_FSP,
bpa => $::NODETYPE_BPA,
lpar =>"$::NODETYPE_LPAR,$::NODETYPE_OSI",
hmc => $::NODETYPE_HMC,
ivm => $::NODETYPE_IVM,
);
###################################
# Open database needed
@ -45,13 +52,6 @@ sub add_ppc {
###############################
if ( $type =~ /^(fsp|bpa|lpar|hmc|ivm)$/ ) {
my ($k,$u);
my %nodetype = (
fsp => $::NODETYPE_FSP,
bpa => $::NODETYPE_BPA,
lpar =>"$::NODETYPE_LPAR,$::NODETYPE_OSI",
hmc => $::NODETYPE_HMC,
ivm => $::NODETYPE_IVM,
);
$k->{node} = $name;
$u->{nodetype} = $nodetype{$type};
$db{nodetype}->setAttribs( $k,$u );
@ -75,7 +75,7 @@ sub add_ppc {
###########################
my ($k1,$u1);
$k1->{node} = $name;
$u1->{groups} = lc($hwtype).",all";
$u1->{groups} = $nodetype{$type}.",all";
$db{nodelist}->setAttribs( $k1,$u1 );
$db{nodelist}{commit} = 1;
@ -290,3 +290,4 @@ sub credentials {