FSP/BPA redundancy: change CEC/Frame nodes into FSP/BPA nodes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8841 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
13f18be403
commit
44b5013d09
@ -67,20 +67,39 @@ sub parse_args {
|
||||
#############################################
|
||||
# Get support command list
|
||||
#############################################
|
||||
my $sitetab = xCAT::Table->new( 'nodetype' );
|
||||
#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 $nodes = $request->{node};
|
||||
foreach (@$nodes) {
|
||||
if ( defined( $sitetab )) {
|
||||
my ($ent) = $sitetab->getAttribs({ node=>$_},'nodetype');
|
||||
if ( defined($ent) ) {
|
||||
$request->{hwtype} = $ent->{nodetype};
|
||||
last;
|
||||
foreach my $snode(@$nodes) {
|
||||
my $ntype = xCAT::DBobjUtils->getnodetype($snode);
|
||||
if ( $ntype =~ /^(cec|frame)$/) {
|
||||
my $children = xCAT::DBobjUtils->getchildren($snode);
|
||||
unless( $children ) {
|
||||
next;
|
||||
}
|
||||
|
||||
foreach (@$children) {
|
||||
push @newnodes, $_;
|
||||
}
|
||||
$request->{hwtype} = ($ntype =~ /^cec$/) ? "fsp" : "bpa";
|
||||
} else {
|
||||
push @newnodes, $_;
|
||||
$request->{hwtype} = $ntype;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$request->{node} = \@newnodes;
|
||||
#$request->{noderange} = \@newnodes;
|
||||
my $supported = $rsp{$request->{hwtype}};
|
||||
|
||||
#############################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user