From e19dd4583ab35c27d9c82609ea93aab658a4ddaa Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 22 May 2012 09:13:58 +0000 Subject: [PATCH] For the places that open site table to read attributes, change to call xCAT::Utils->get_siteibute instead git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12870 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/hpblade.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/hpblade.pm b/xCAT-server/lib/xcat/plugins/hpblade.pm index 4f995cf52..9f5c80004 100755 --- a/xCAT-server/lib/xcat/plugins/hpblade.pm +++ b/xCAT-server/lib/xcat/plugins/hpblade.pm @@ -638,14 +638,16 @@ sub process_request { my $bladeuser = 'USERID'; my $bladepass = 'PASSW0RD'; my $blademaxp = 64; - my $sitetab = xCAT::Table->new('site'); + #my $sitetab = xCAT::Table->new('site'); my $mpatab = xCAT::Table->new('mpa'); my $mptab = xCAT::Table->new('mp'); my $tmp; - if ($sitetab) { - ($tmp)=$sitetab->getAttribs({'key'=>'blademaxp'},'value'); - if (defined($tmp)) { $blademaxp=$tmp->{value}; } - } + #if ($sitetab) { + #($tmp)=$sitetab->getAttribs({'key'=>'blademaxp'},'value'); + my @entries = xCAT::Utils->get_site_attribute("blademaxp"); + my $t_entry = $entries[0]; + if (defined($t_entry)) { $blademaxp=$t_entry; } + #} my $passtab = xCAT::Table->new('passwd'); if ($passtab) { ($tmp)=$passtab->getAttribs({'key'=>'blade'},'username','password');