For the places that open site table to read attributes, change to call xCAT::Utils->get_site_attribute instead
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12778 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
a16709090b
commit
1a71630307
@ -676,9 +676,14 @@ sub getmacs {
|
||||
return( [[$node,"Node not found, lparid=$lparid",RC_ERROR]] );
|
||||
}
|
||||
|
||||
my $sitetab = xCAT::Table->new('site');
|
||||
my $vcon = $sitetab->getAttribs({key => "conserverondemand"}, 'value');
|
||||
if ($vcon and $vcon->{"value"} and $vcon->{"value"} eq "yes" ) {
|
||||
#my $sitetab = xCAT::Table->new('site');
|
||||
#my $vcon = $sitetab->getAttribs({key => "conserverondemand"}, 'value');
|
||||
#there may be something wrong with the conserverondemand attribute.
|
||||
# Currently, the code is not used. So not fix this time. Just keep it here.
|
||||
my @vcons = xCAT::Utils->get_site_attribute("conserverondemand");
|
||||
my $vcon = $vcons[0];
|
||||
#if ($vcon and $vcon->{"value"} and $vcon->{"value"} eq "yes" ) {
|
||||
if ( defined($vcon) and $vcon eq "yes" ) {
|
||||
$result = xCAT::PPCcli::lpar_netboot(
|
||||
$exp,
|
||||
$request->{verbose},
|
||||
@ -692,7 +697,7 @@ sub getmacs {
|
||||
$result = do_getmacs( $request, $d, $exp, $name, $node );
|
||||
$Rc = shift(@$result);
|
||||
}
|
||||
$sitetab->close;
|
||||
#$sitetab->close;
|
||||
|
||||
|
||||
##################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user