Moved the nodetype attr from the nodelist table

to the nodetype table.

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@832 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
nott 2008-03-19 14:41:00 +00:00
parent cc3a397df9
commit 4bd389077b

View File

@ -139,7 +139,7 @@ sub invoke_cmd {
##################################
# Open databases needed
##################################
foreach ( qw(ppc vpd nodelist) ) {
foreach ( qw(ppc vpd nodetype) ) {
$tabs{$_} = xCAT::Table->new($_);
if ( !exists( $tabs{$_} )) {
@ -155,15 +155,15 @@ sub invoke_cmd {
#################################
# Get node type
#################################
my ($ent) = $tabs{nodelist}->getAttribs({'node'=>$node}, "nodetype" );
my ($ent) = $tabs{nodetype}->getAttribs({'node'=>$node}, "nodetype" );
if ( !defined( $ent )) {
return( sprintf( $errmsg{NODE_UNDEF}, "nodelist" ));
return( sprintf( $errmsg{NODE_UNDEF}, "nodetype" ));
}
#################################
# Check for type
#################################
if ( !exists( $ent->{nodetype} )) {
return( sprintf( $errmsg{NO_ATTR}, $ent->{nodetype},"nodelist" ));
return( sprintf( $errmsg{NO_ATTR}, $ent->{nodetype},"nodetype" ));
}
#################################
# Check for valid "type"