CP-19218: Using livepatch_status (for newer bindings)

Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit is contained in:
Gabor Apati-Nagy 2016-10-20 18:12:13 +01:00
parent 1c7f6ac643
commit 735feec3e4

View File

@ -39,20 +39,20 @@ namespace XenAdmin.Diagnostics.Checks
{
public class HostNeedsRebootCheck : Check
{
private readonly Dictionary<string, LivePatchCode> livePatchCodesByHost;
private readonly Dictionary<string, livepatch_status> livePatchCodesByHost;
private readonly List<after_apply_guidance> patchGuidance;
private readonly List<update_after_apply_guidance> updateGuidance;
private string successfulCheckDescription;
public HostNeedsRebootCheck(Host host, List<update_after_apply_guidance> guidance, Dictionary<string, LivePatchCode> livePatchCodesByHost)
public HostNeedsRebootCheck(Host host, List<update_after_apply_guidance> guidance, Dictionary<string, livepatch_status> livePatchCodesByHost)
: base(host)
{
this.livePatchCodesByHost = livePatchCodesByHost;
updateGuidance = guidance;
}
public HostNeedsRebootCheck(Host host, List<after_apply_guidance> guidance, Dictionary<string, LivePatchCode> livePatchCodesByHost)
public HostNeedsRebootCheck(Host host, List<after_apply_guidance> guidance, Dictionary<string, livepatch_status> livePatchCodesByHost)
: base(host)
{
this.livePatchCodesByHost = livePatchCodesByHost;
@ -66,7 +66,7 @@ namespace XenAdmin.Diagnostics.Checks
// when livepatching is available, no restart is expected
if (livePatchCodesByHost != null && livePatchCodesByHost.ContainsKey(Host.uuid) &&
livePatchCodesByHost[Host.uuid] == LivePatchCode.PATCH_PRECHECK_LIVEPATCH_COMPLETE)
livePatchCodesByHost[Host.uuid] == livepatch_status.ok_livepatch_complete)
{
successfulCheckDescription = string.Format(Messages.UPDATES_WIZARD_NO_REBOOT_NEEDED_LIVE_PATCH, Host);
return null;