From 54cfea48b61ec109ba5a70754305f9f37c981385 Mon Sep 17 00:00:00 2001 From: yinle Date: Thu, 8 Dec 2011 06:26:37 +0000 Subject: [PATCH] Remove getAttribs from lsslp.pm git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11171 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/lsslp.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index 7e1003e55..a473bb7e5 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -3853,7 +3853,8 @@ sub get_rsp_dev ############################################# my $passtab = xCAT::Table->new('passwd'); if ( $passtab ) { - my ($ent) = $passtab->getAttribs({key=>'blade'},'username','password'); + #my ($ent) = $passtab->getAttribs({key=>'blade'},'username','password'); + my $ent = $passtab->getNodeAttribs('blade', ['username','password']); if ( defined( $ent )) { $bladeuser = $ent->{username}; $bladepass = $ent->{password}; @@ -3863,17 +3864,18 @@ sub get_rsp_dev # Get MM userid/password ############################################# my $mpatab = xCAT::Table->new('mpa'); - foreach ( keys %$mm ) { + for my $nd ( keys %$mm ) { my $user = $bladeuser; my $pass = $bladepass; if ( defined( $mpatab )) { - my ($ent) = $mpatab->getAttribs({mpa=>$_},'username','password'); + #my ($ent) = $mpatab->getAttribs({mpa=>$_},'username','password'); + my $ent = $mpatab->getNodeAttribs($nd, ['username','password']); if ( defined( $ent->{password} )) { $pass = $ent->{password}; } if ( defined( $ent->{username} )) { $user = $ent->{username}; } } - $mm->{$_}->{username} = $user; - $mm->{$_}->{password} = $pass; + $mm->{$nd}->{username} = $user; + $mm->{$nd}->{password} = $pass; } } if (%$hmc )