chkosimage - check req resources

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7722 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
nott 2010-09-29 15:06:14 +00:00
parent fddc3f6a5c
commit 6862de33b5

View File

@ -1569,6 +1569,45 @@ sub chkosimage
return 1;
}
#
# check the diskless osimage def
#
if ($imagedef{$image_name}{nimtype} eq 'diskless') {
# must have spot, root or shared_root and paging
if (!$imagedef{$image_name}{spot} ) {
my $rsp;
push @{$rsp->{data}}, "A diskless osimage must include a spot resource.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
}
if (!$imagedef{$image_name}{paging} ) {
my $rsp;
push @{$rsp->{data}}, "A diskless osimage must include a paging resource.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
}
#
# make sure they have either a root or a shared_root - but not both
#
if (!$imagedef{$image_name}{root} && !$imagedef{$image_name}{shared_root} ) {
my $rsp;
push @{$rsp->{data}}, "A diskless osimage must include either a \'root\' or a 'shared_root\' resource.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
}
#
# make sure they don't have both
#
if ($imagedef{$image_name}{root} && $imagedef{$image_name}{shared_root} ) {
my $rsp;
push @{$rsp->{data}}, "Cannot have both a \'root\' and a \'shared_root\' resources.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
}
}
#
# check to see if all the software is available in the lpp_source
# directories