mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	change the way of getting node type
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9734 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -194,22 +194,8 @@ sub getmulcon { | ||||
|     ################################# | ||||
|     # Get node type | ||||
|     ################################# | ||||
|     my ($ent) = $tabs{nodetype}->getNodeAttribs($node, ["nodetype"] ); | ||||
|     if ( !defined( $ent )) { | ||||
|         $rsp->{node}->[0]->{error}=["Not define nodetype"]; | ||||
|         $rsp->{node}->[0]->{errorcode}=[1];     | ||||
|     } | ||||
|     ################################# | ||||
|     # Check for type | ||||
|     ################################# | ||||
|     if ( !exists( $ent->{nodetype} )) { | ||||
|         $rsp->{node}->[0]->{error}=["Can't find nodetype"]; | ||||
|         $rsp->{node}->[0]->{errorcode}=[1];     | ||||
|     } | ||||
|     ################################# | ||||
|     # Check for valid "type" | ||||
|     ################################# | ||||
|     my @types = split /,/, $ent->{nodetype}; | ||||
|     my $ntype = xCAT::DBobjUtils->getnodetype($node); | ||||
|     my @types = split /,/, $ntype; | ||||
|     my ($type) = grep( /^(lpar|osi)$/, @types ); | ||||
|      | ||||
|     if ( !defined( $type )) { | ||||
| @@ -246,7 +232,8 @@ sub getmulcon { | ||||
|  | ||||
|  | ||||
|     foreach my $thishcp ( @hcp_list ) { | ||||
|         my $thishcp_type = xCAT::FSPUtils->getTypeOfNode($thishcp); | ||||
|         #my $thishcp_type = xCAT::FSPUtils->getTypeOfNode($thishcp); | ||||
|         my $thishcp_type = xCAT::DBobjUtils->getnodetype($thishcp); | ||||
|         if(!defined($thishcp_type)) { | ||||
|             $rsp->{node}->[0]->{error}=["Can't get nodetype of $thishcp"]; | ||||
|             $rsp->{node}->[0]->{errorcode}=[1];    | ||||
|   | ||||
		Reference in New Issue
	
	Block a user