From facbb5a71fe2c0c2581972991b3b0fa722966617 Mon Sep 17 00:00:00 2001 From: nott Date: Wed, 19 Mar 2008 14:23:29 +0000 Subject: [PATCH] The nodetype attr is now in the nodetype table and not the nodelist table. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@830 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/PPCdb.pm | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/perl-xCAT-2.0/xCAT/PPCdb.pm b/perl-xCAT-2.0/xCAT/PPCdb.pm index cd52374d7..dd9aedd82 100644 --- a/perl-xCAT-2.0/xCAT/PPCdb.pm +++ b/perl-xCAT-2.0/xCAT/PPCdb.pm @@ -14,7 +14,7 @@ sub add_ppc { my $hwtype = shift; my $values = shift; - my @tabs = qw(ppc vpd nodehm nodelist); + my @tabs = qw(ppc vpd nodehm nodelist nodetype); my %db = (); ################################### @@ -57,16 +57,24 @@ sub add_ppc { # Update nodelist table ########################### my ($k1,$u1); - my %nodetype = ( + $k1->{node} = $name; + $u1->{groups} = lc($hwtype).",all"; + $db{nodelist}->setAttribs( $k1,$u1 ); + $db{nodelist}{commit} = 1; + + ########################### + # Update nodetype table + ########################### + my ($k3,$u3); + my %nodetype = ( fsp => $::NODETYPE_FSP, bpa => $::NODETYPE_BPA, lpar =>"$::NODETYPE_LPAR,$::NODETYPE_OSI" ); - $k1->{node} = $name; - $u1->{groups} = lc($hwtype).",all"; - $u1->{nodetype} = $nodetype{$type}; - $db{nodelist}->setAttribs( $k1,$u1 ); - $db{nodelist}{commit} = 1; + $k3->{node} = $name; + $u3->{nodetype} = $nodetype{$type}; + $db{nodetype}->setAttribs( $k3,$u3 ); + $db{nodetype}{commit} = 1; ########################### # Update nodehm table