Move credential to the hmc.pm

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9248 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
yinle 2011-04-08 03:29:19 +00:00
parent 4e4c3307d1
commit d2a1d9da61

View File

@ -140,10 +140,25 @@ sub gethmccon {
return ;
}
}
################################
# Get username and passwd
################################
my $hwtype = "hmc";
my $host = $att->{hcp};
my @cred = xCAT::PPCdb::credentials( $host, $hwtype );
if ( !defined(@cred) )
{
$rsp->{node}->[0]->{error}=["Can't username and passwd for the hmc"];
$rsp->{node}->[0]->{errorcode}=[1];
$callback->($rsp);
return;
}
$rsp = {node=>[{name=>[$node]}]};
$rsp->{node}->[0]->{mtms}->[0] = "$vpd->{mtm}*$vpd->{serial}";
$rsp->{node}->[0]->{host}->[0] = $att->{hcp};
$rsp->{node}->[0]->{lparid}->[0] = $att->{id};
$rsp->{node}->[0]->{cred}->[0] = join ',', @cred;
$callback->($rsp);
}