mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
Renamed method UnwindChanges to CreateUnwindChangesAction to avoid cofusion, because the method only creates the action and does not run it.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
8ff639bfe9
commit
5728a84e33
@ -61,7 +61,7 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
get { return Messages.ENABLE_PLAIN; }
|
||||
}
|
||||
|
||||
public override AsyncAction UnwindChanges()
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
Program.MainWindow.CloseActiveWizards(Server.Connection);
|
||||
return new DisableHostAction(Server);
|
||||
|
@ -80,7 +80,7 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
get { return Messages.SUSPEND_VMS; }
|
||||
}
|
||||
|
||||
public override AsyncAction UnwindChanges()
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
return new ResumeAndStartVMsAction(Server.Connection, Server, VmsToSuspend, VmsToShutdown,VMOperationCommand.WarningDialogHAInvalidConfig,VMOperationCommand.StartDiagnosisForm);
|
||||
}
|
||||
|
@ -71,9 +71,9 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
return new MultipleAction(Pool.Connection, Messages.ACTION_VMS_SHUTTING_DOWN_TITLE,
|
||||
Messages.ACTION_VMS_SHUTTING_DOWN_TITLE, Messages.ACTION_SHUT_DOWN, actions, true, false, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
public override AsyncAction UnwindChanges()
|
||||
}
|
||||
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
|
||||
var actions = new List<AsyncAction>();
|
||||
|
@ -56,7 +56,7 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
return new DisableHAAction(Pool);
|
||||
}
|
||||
|
||||
public override AsyncAction UnwindChanges()
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
return new EnableHAAction(Pool, null, HeartbeatSrs, FailuresToTolerate);
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ namespace XenAdmin.Diagnostics.Problems
|
||||
get { return _check; }
|
||||
}
|
||||
|
||||
public virtual AsyncAction UnwindChanges()
|
||||
public virtual AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
};
|
||||
}
|
||||
|
||||
public override AsyncAction UnwindChanges()
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
return new DelegatedAsyncAction(
|
||||
_connection,
|
||||
|
@ -86,7 +86,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
return null;
|
||||
}
|
||||
|
||||
public override AsyncAction UnwindChanges()
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
return action;
|
||||
}
|
||||
|
||||
public override AsyncAction UnwindChanges()
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
return new ChangeVMISOAction(VM.Connection, VM, null, cddrive);
|
||||
}
|
||||
|
||||
public override AsyncAction UnwindChanges()
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
return null;
|
||||
|
||||
|
@ -75,7 +75,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
return new VMHardShutdown(VM);
|
||||
}
|
||||
|
||||
public override AsyncAction UnwindChanges()
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
return new VMResumeAction(VM, VMOperationCommand.WarningDialogHAInvalidConfig, VMOperationCommand.StartDiagnosisForm);
|
||||
}
|
||||
|
||||
public override AsyncAction UnwindChanges()
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
return new VMSuspendAction(VM);
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
return ShutdownVM();
|
||||
}
|
||||
|
||||
public override AsyncAction UnwindChanges()
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
if (_vm.Connection.Resolve(new XenRef<VM>(_vm.opaque_ref)) == null) // check if the vm is still in the cache
|
||||
return null;
|
||||
|
@ -487,7 +487,7 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
progressDialog.ShowDialog(this);
|
||||
if (action.Succeeded)
|
||||
{
|
||||
var revertAction = preCheckRow.Problem.UnwindChanges();
|
||||
var revertAction = preCheckRow.Problem.CreateUnwindChangesAction();
|
||||
if (revertAction != null)
|
||||
RevertActions.Add(revertAction);
|
||||
}
|
||||
@ -532,7 +532,7 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
AsyncAction action = preCheckRow.Problem.GetSolutionAction(out cancelled);
|
||||
if (action != null)
|
||||
{
|
||||
actions.Add(action, preCheckRow.Problem.UnwindChanges());
|
||||
actions.Add(action, preCheckRow.Problem.CreateUnwindChangesAction());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -643,7 +643,7 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
|
||||
var actions = from problem in ProblemsResolvedPreCheck
|
||||
where problem.SolutionActionCompleted
|
||||
let action = problem.UnwindChanges()
|
||||
let action = problem.CreateUnwindChangesAction()
|
||||
where action != null && action.Connection != null && action.Connection.IsConnected
|
||||
select action;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user