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:
Konstantina Chremmou 2018-07-02 13:08:46 +01:00 committed by Mihaela Stoica
parent 8ff639bfe9
commit 5728a84e33
14 changed files with 17 additions and 17 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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>();

View File

@ -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);
}

View File

@ -96,7 +96,7 @@ namespace XenAdmin.Diagnostics.Problems
get { return _check; }
}
public virtual AsyncAction UnwindChanges()
public virtual AsyncAction CreateUnwindChangesAction()
{
return null;
}

View File

@ -105,7 +105,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
};
}
public override AsyncAction UnwindChanges()
public override AsyncAction CreateUnwindChangesAction()
{
return new DelegatedAsyncAction(
_connection,

View File

@ -86,7 +86,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
return null;
}
public override AsyncAction UnwindChanges()
public override AsyncAction CreateUnwindChangesAction()
{
return null;
}

View File

@ -82,7 +82,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
return action;
}
public override AsyncAction UnwindChanges()
public override AsyncAction CreateUnwindChangesAction()
{
return null;
}

View File

@ -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;

View File

@ -75,7 +75,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
return new VMHardShutdown(VM);
}
public override AsyncAction UnwindChanges()
public override AsyncAction CreateUnwindChangesAction()
{
return null;
}

View File

@ -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);
}

View File

@ -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;

View File

@ -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());
}
}
}

View File

@ -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;