From 35b3edd590fe61cca4ea37e154fe9250d8a8098a Mon Sep 17 00:00:00 2001 From: Gabor Apati-Nagy Date: Thu, 12 Mar 2015 17:37:53 +0000 Subject: [PATCH] CA-163778: [CAR-1711] Cleanup not working -When calling cleanup_disk_space, excluded patch is passed only when it is not null Signed-off-by: Gabor Apati-Nagy --- XenModel/Actions/Pool_Patch/CleanupDiskSpaceAction.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/XenModel/Actions/Pool_Patch/CleanupDiskSpaceAction.cs b/XenModel/Actions/Pool_Patch/CleanupDiskSpaceAction.cs index 8787c563b..dcd5e33d3 100644 --- a/XenModel/Actions/Pool_Patch/CleanupDiskSpaceAction.cs +++ b/XenModel/Actions/Pool_Patch/CleanupDiskSpaceAction.cs @@ -56,7 +56,10 @@ namespace XenAdmin.Actions Description = String.Format(Messages.ACTION_CLEANUP_DISK_SPACE_DESCRIPTION, Host.Name); try { - var args = new Dictionary {{"exclude", excludedPatch.uuid}}; + var args = new Dictionary(); + if (excludedPatch != null) + args.Add("exclude", excludedPatch.uuid); + Result = Host.call_plugin(Session, Host.opaque_ref, "disk-space", "cleanup_disk_space", args); if (Result.ToLower() == "true") Description = String.Format(Messages.ACTION_CLEANUP_DISK_SPACE_SUCCESS, Host.Name);