mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Added parameter enableOnly defaulting to false to the RestartHostPlanAction
so as to be able to evacuate-reboot the host without bringing the VMs back. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
4b6e826ed3
commit
b3828ef452
@ -185,7 +185,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
{
|
||||
var action = patch.after_apply_guidance == after_apply_guidance.restartXAPI &&
|
||||
delayedActionsByHost[host].Any(a => a is RestartHostPlanAction)
|
||||
? new RestartHostPlanAction(host, host.GetRunningVMs(), true)
|
||||
? new RestartHostPlanAction(host, host.GetRunningVMs(), restartAgentFallback:true)
|
||||
: GetAfterApplyGuidanceAction(host, patch.after_apply_guidance);
|
||||
|
||||
if (action != null)
|
||||
|
@ -40,13 +40,15 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions
|
||||
public class RestartHostPlanAction : RebootPlanAction
|
||||
{
|
||||
private readonly List<XenRef<VM>> _vms;
|
||||
private readonly bool _enableOnly;
|
||||
private readonly bool _restartAgentFallback;
|
||||
|
||||
public RestartHostPlanAction(Host host, List<XenRef<VM>> vms, bool restartAgentFallback = false)
|
||||
public RestartHostPlanAction(Host host, List<XenRef<VM>> vms, bool enableOnly = false, bool restartAgentFallback = false)
|
||||
: base(host, string.Empty)
|
||||
{
|
||||
_vms = vms;
|
||||
Visible = false;
|
||||
_enableOnly = enableOnly;
|
||||
_restartAgentFallback = restartAgentFallback;
|
||||
}
|
||||
|
||||
@ -83,7 +85,7 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions
|
||||
|
||||
EvacuateHost(ref session);
|
||||
RebootHost(ref session);
|
||||
BringBabiesBack(ref session, _vms, false);
|
||||
BringBabiesBack(ref session, _vms, _enableOnly);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user