Fix bug 3299796: rspconfig could not config password
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9532 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
9db152a96d
commit
f0de7f97f0
@ -59,6 +59,8 @@ sub parse_args {
|
||||
"sshcfg"
|
||||
);
|
||||
my %rsp = (
|
||||
cec=> \@fsp,
|
||||
frame=>\@bpa,
|
||||
fsp => \@fsp,
|
||||
bpa => \@bpa,
|
||||
ivm => \@ppc,
|
||||
@ -67,39 +69,20 @@ sub parse_args {
|
||||
#############################################
|
||||
# Get support command list
|
||||
#############################################
|
||||
#my $sitetab = xCAT::Table->new( 'nodetype' );
|
||||
#my $nodes = $request->{node};
|
||||
#foreach (@$nodes) {
|
||||
# if ( defined( $sitetab )) {
|
||||
# my ($ent) = $sitetab->getAttribs({ node=>$_},'nodetype');
|
||||
# if ( defined($ent) ) {
|
||||
# $request->{hwtype} = $ent->{nodetype};
|
||||
# last;
|
||||
# }
|
||||
#
|
||||
# }
|
||||
#
|
||||
#}
|
||||
my @newnodes = ();
|
||||
my $sitetab = xCAT::Table->new( 'nodetype' );
|
||||
my $nodes = $request->{node};
|
||||
foreach my $snode(@$nodes) {
|
||||
my $ntype = xCAT::DBobjUtils->getnodetype($snode);
|
||||
if ( $ntype =~ /^(cec|frame)$/) {
|
||||
my $children = xCAT::DBobjUtils->getchildren($snode);
|
||||
unless( $children ) {
|
||||
next;
|
||||
foreach (@$nodes) {
|
||||
if ( defined( $sitetab )) {
|
||||
my ($ent) = $sitetab->getAttribs({ node=>$_},'nodetype');
|
||||
if ( defined($ent) ) {
|
||||
$request->{hwtype} = $ent->{nodetype};
|
||||
last;
|
||||
}
|
||||
foreach (@$children) {
|
||||
push @newnodes, $_;
|
||||
}
|
||||
$request->{hwtype} = ($ntype =~ /^cec$/) ? "fsp" : "bpa";
|
||||
} else {
|
||||
push @newnodes, $snode;
|
||||
$request->{hwtype} = $ntype;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
$request->{node} = \@newnodes;
|
||||
#$request->{noderange} = \@newnodes;
|
||||
|
||||
my $supported = $rsp{$request->{hwtype}};
|
||||
|
||||
#############################################
|
||||
|
Loading…
Reference in New Issue
Block a user