More error handling
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@686 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
3cc2eb0f9e
commit
f2f0ffd6a8
@ -261,7 +261,7 @@ sub getmacs {
|
||||
# Invalid target hardware
|
||||
#########################################
|
||||
if ( $type ne "lpar" ) {
|
||||
return( [[$name,"Node must be LPAR"]] );
|
||||
return( [[$name,"Node must be LPAR",1]] );
|
||||
}
|
||||
#########################################
|
||||
# IVM does not have lpar_netboot command
|
||||
@ -285,16 +285,16 @@ sub getmacs {
|
||||
# Form string from array results
|
||||
##################################
|
||||
if ( exists($request->{verbose}) ) {
|
||||
return( [[$name,join( '', @$result )]] );
|
||||
return( [[$name,join( '', @$result ),$Rc]] );
|
||||
}
|
||||
##################################
|
||||
# Return error
|
||||
##################################
|
||||
if ( $Rc != SUCCESS ) {
|
||||
if ( @$result[0] =~ /lpar_netboot: (.*)/ ) {
|
||||
return( [[$name,$1]] );
|
||||
return( [[$name,$1,$Rc]] );
|
||||
}
|
||||
return( [[$name,join( '', @$result )]] );
|
||||
return( [[$name,join( '', @$result ),$Rc]] );
|
||||
}
|
||||
##################################
|
||||
# Split results into array
|
||||
@ -325,7 +325,7 @@ sub getmacs {
|
||||
$values.= "$_\n";
|
||||
}
|
||||
}
|
||||
return( [[$name,$values]] );
|
||||
return( [[$name,$values,$Rc]] );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user