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@12853 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
14097c36ee
commit
50001aae62
@ -3790,14 +3790,19 @@ 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}; }
|
||||
my @entries = xCAT::Utils->get_site_attribute("blademaxp");
|
||||
my $site_entry = $entries[0];
|
||||
if(defined($site_entry)) {
|
||||
$blademaxp = $site_entry;
|
||||
}
|
||||
#if ($sitetab) {
|
||||
# ($tmp)=$sitetab->getAttribs({'key'=>'blademaxp'},'value');
|
||||
# if (defined($tmp)) { $blademaxp=$tmp->{value}; }
|
||||
#}
|
||||
if ($request->{environment}->[0]->{XCAT_BLADEUSER}) {
|
||||
$bladeuser=$request->{environment}->[0]->{XCAT_BLADEUSER}->[0];
|
||||
$bladepass=$request->{environment}->[0]->{XCAT_BLADEPASS}->[0];
|
||||
@ -5090,13 +5095,18 @@ sub dompa {
|
||||
my @allerrornodes=();
|
||||
my $check=0;
|
||||
my $global_check=1;
|
||||
my $sitetab = xCAT::Table->new('site');
|
||||
if ($sitetab) {
|
||||
(my $ref) = $sitetab->getAttribs({key => 'nodestatus'}, 'value');
|
||||
if ($ref) {
|
||||
if ($ref->{value} =~ /0|n|N/) { $global_check=0; }
|
||||
}
|
||||
my @entries = xCAT::Utils->get_site_attribute("nodestatus");
|
||||
my $site_entry = $entries[0];
|
||||
if(defined($site_entry)) {
|
||||
if ($site_entry =~ /0|n|N/) { $global_check=0; }
|
||||
}
|
||||
#my $sitetab = xCAT::Table->new('site');
|
||||
#if ($sitetab) {
|
||||
# (my $ref) = $sitetab->getAttribs({key => 'nodestatus'}, 'value');
|
||||
# if ($ref) {
|
||||
# if ($ref->{value} =~ /0|n|N/) { $global_check=0; }
|
||||
# }
|
||||
#}
|
||||
|
||||
|
||||
if ($command eq 'rpower') {
|
||||
|
Loading…
Reference in New Issue
Block a user