fixed defect:2792126. revitals should output some error message if bpa is not defined
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3727 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
321b06e1fb
commit
ea639a4479
@ -46,6 +46,7 @@ my %modules = (
|
||||
my %errmsg = (
|
||||
NODE_UNDEF =>"Node not defined in '%s' database",
|
||||
NO_ATTR =>"'%s' not defined in '%s' database",
|
||||
NO_UNDEF =>"'%s' not defined in '%s' database for '%s'",
|
||||
DB_UNDEF =>"'%s' database not defined"
|
||||
);
|
||||
|
||||
@ -823,15 +824,12 @@ sub resolve {
|
||||
my @attrs = qw(mtm serial);
|
||||
my ($vpd) = $tabs->{vpd}->getNodeAttribs($ent->{parent},\@attrs);
|
||||
|
||||
if ( !defined( $vpd )) {
|
||||
return( sprintf( $errmsg{NO_UNDEF}, "vpd" ));
|
||||
}
|
||||
########################
|
||||
# Verify attributes
|
||||
########################
|
||||
foreach ( @attrs ) {
|
||||
if ( !exists( $vpd->{$_} )) {
|
||||
return( sprintf( $errmsg{NO_ATTR}, $_, "vpd" ));
|
||||
if ( !defined( $vpd ) || !exists( $vpd->{$_} )) {
|
||||
return( sprintf( $errmsg{NO_UNDEF}, $_, "vpd", $ent->{parent} ));
|
||||
}
|
||||
}
|
||||
$att->{bpa} = "$vpd->{mtm}*$vpd->{serial}";
|
||||
|
Loading…
Reference in New Issue
Block a user