From 64217a35c4e29495727daf5ef6524117650d7561 Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 22 May 2012 09:09:30 +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@12869 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/hosts.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/hosts.pm b/xCAT-server/lib/xcat/plugins/hosts.pm index 398eaa70a..8d286af30 100644 --- a/xCAT-server/lib/xcat/plugins/hosts.pm +++ b/xCAT-server/lib/xcat/plugins/hosts.pm @@ -163,15 +163,17 @@ sub process_request { my $hoststab = xCAT::Table->new('hosts'); - my $sitetab = xCAT::Table->new('site'); + #my $sitetab = xCAT::Table->new('site'); my $domain; my $lockh; - if ($sitetab) { - my $dent = $sitetab->getAttribs({key=>'domain'},'value'); - if ($dent and $dent->{value}) { - $domain=$dent->{value}; + #if ($sitetab) { + #my $dent = $sitetab->getAttribs({key=>'domain'},'value'); + my @entries = xCAT::Utils->get_site_attribute("domain"); + my $t_entry = $entries[0]; + if ( defined($t_entry) ) { + $domain=$t_entry; } - } + #} @hosts = (); if ($REMOVE) {