Fix ipmi and bmcconfig retrieval of non-node attributes, was calling the Table API incorrectly
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@26 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
46e0e8884a
commit
d6846d76ba
@ -60,7 +60,7 @@ sub process_request {
|
||||
my $gennedpassword=0;
|
||||
my $bmc;
|
||||
my $password = 'PASSW0RD';
|
||||
if ($passtable) { $tmphash=$passtable->getAttribs({key=>'ipmi'},'username','password'); }
|
||||
if ($passtable) { ($tmphash)=$passtable->getAttribs({key=>'ipmi'},'username','password'); }
|
||||
#Check for generics, can grab for both user and pass with a query
|
||||
#since they cannot be in disparate records in passwd tab
|
||||
if ($tmphash->{username}) {
|
||||
|
@ -310,17 +310,17 @@ sub ipmiinit {
|
||||
|
||||
my $table = xCAT::Table->new('site');
|
||||
if ($table) {
|
||||
$tmp=$table->getAttribs({'key'=>'ipmimaxp'},'value');
|
||||
($tmp)=$table->getAttribs({'key'=>'ipmimaxp'},'value');
|
||||
if (defined($tmp)) { $ipmimaxp=$tmp->{value}; }
|
||||
$tmp=$table->getAttribs({'key'=>'ipmitimeout'},'value');
|
||||
($tmp)=$table->getAttribs({'key'=>'ipmitimeout'},'value');
|
||||
if (defined($tmp)) { $ipmitimeout=$tmp->{value}; }
|
||||
$tmp=$table->getAttribs({'key'=>'ipmiretries'},'value');
|
||||
($tmp)=$table->getAttribs({'key'=>'ipmiretries'},'value');
|
||||
if (defined($tmp)) { $ipmitrys=$tmp->{value}; }
|
||||
$tmp=$table->getAttribs({'key'=>'ipmisdrcache'},'value');
|
||||
($tmp)=$table->getAttribs({'key'=>'ipmisdrcache'},'value');
|
||||
}
|
||||
$table = xCAT::Table->new('passwd');
|
||||
if ($table) {
|
||||
$tmp=$table->getAttribs({'key'=>'ipmi'},['username','password']);
|
||||
($tmp)=$table->getAttribs({'key'=>'ipmi'},'username','password');
|
||||
if (defined($tmp)) {
|
||||
$ipmiuser = $tmp->{username};
|
||||
$ipmipass = $tmp->{password};
|
||||
@ -4334,18 +4334,18 @@ sub process_request {
|
||||
my $ipmitab = xCAT::Table->new('ipmi');
|
||||
my $tmp;
|
||||
if ($sitetab) {
|
||||
$tmp=$sitetab->getAttribs({'key'=>'ipmimaxp'},'value');
|
||||
($tmp)=$sitetab->getAttribs({'key'=>'ipmimaxp'},'value');
|
||||
if (defined($tmp)) { $ipmimaxp=$tmp->{value}; }
|
||||
$tmp=$sitetab->getAttribs({'key'=>'ipmitimeout'},'value');
|
||||
($tmp)=$sitetab->getAttribs({'key'=>'ipmitimeout'},'value');
|
||||
if (defined($tmp)) { $ipmitimeout=$tmp->{value}; }
|
||||
$tmp=$sitetab->getAttribs({'key'=>'ipmiretries'},'value');
|
||||
($tmp)=$sitetab->getAttribs({'key'=>'ipmiretries'},'value');
|
||||
if (defined($tmp)) { $ipmitrys=$tmp->{value}; }
|
||||
$tmp=$sitetab->getAttribs({'key'=>'ipmisdrcache'},'value');
|
||||
($tmp)=$sitetab->getAttribs({'key'=>'ipmisdrcache'},'value');
|
||||
if (defined($tmp)) { $enable_cache=$tmp->{value}; }
|
||||
}
|
||||
my $passtab = xCAT::Table->new('passwd');
|
||||
if ($passtab) {
|
||||
$tmp=$passtab->getAttribs({'key'=>'ipmi'},['username','password']);
|
||||
($tmp)=$passtab->getAttribs({'key'=>'ipmi'},'username','password');
|
||||
if (defined($tmp)) {
|
||||
$ipmiuser = $tmp->{username};
|
||||
$ipmipass = $tmp->{password};
|
||||
|
Loading…
Reference in New Issue
Block a user