#221180 There is no mechanism to prevent error message printed in kitimagepostdelete when disassociated kit with the image profile

This commit is contained in:
yinqing 2013-08-07 11:32:13 +08:00
parent f6ecd4a68e
commit 9ddfd08f24

View File

@ -171,6 +171,12 @@ sub process_request {
# Do the check
my $imageprofile = parse_str_arg($request->{arg}->[0]);
if (! exists($request->{kitdata}))
{
$rsp->{data}->[0] = "Skipped running \"$command\" plugin command for \"$PLUGIN_KITNAME\" kit.";
xCAT::MsgUtils->message("I", $rsp, $callback);
return;
}
my $kitdata = $request->{kitdata};
if (! defined($kitdata) && !($command eq "kitimagepostdelete")) {
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_image_profiles([$imageprofile]);