mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
Use expression-bodied format for properties in Xenadmin/Diagnostics/Problems/*
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
This commit is contained in:
parent
4ef260111b
commit
c6b50a5669
@ -45,17 +45,8 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
this.conflictingUpdates = conflictingUpdates;
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(Messages.UPDATES_WIZARD_PRECHECK_FAILED_CONFLICTING_UPDATE, ServerName, conflictingUpdates);
|
||||
}
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_PRECHECK_FAILED_CONFLICTING_UPDATE, ServerName, conflictingUpdates);
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return string.Empty; }
|
||||
}
|
||||
public override string HelpMessage => string.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -44,10 +44,7 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
{
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.UPDATES_WIZARD_HOST_MAINTENANCE_MODE, ServerName); }
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_HOST_MAINTENANCE_MODE, ServerName);
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
@ -56,10 +53,7 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
return new EnableHostAction(Server, false, AddHostToPoolCommand.EnableNtolDialog);
|
||||
}
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return Messages.ENABLE_PLAIN; }
|
||||
}
|
||||
public override string HelpMessage => Messages.ENABLE_PLAIN;
|
||||
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
|
@ -45,15 +45,9 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
{
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.UPDATES_WIZARD_HOST_NOT_LIVE, ServerName); }
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_HOST_NOT_LIVE, ServerName);
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return CanStartHost() ? Messages.START_HOST : string.Empty; }
|
||||
}
|
||||
public override string HelpMessage => CanStartHost() ? Messages.START_HOST : string.Empty;
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
@ -85,17 +79,8 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
public override string Title
|
||||
{
|
||||
get { return Check.Description; }
|
||||
}
|
||||
public override string Title => Check.Description;
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(Messages.UPDATES_WIZARD_HOST_NOT_LIVE_WARNING, host);
|
||||
}
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_HOST_NOT_LIVE_WARNING, host);
|
||||
}
|
||||
}
|
||||
|
@ -134,18 +134,9 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
return action;
|
||||
}
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return diskSpaceReq.GetMessageForActionLink(); }
|
||||
}
|
||||
public override string HelpMessage => diskSpaceReq.GetMessageForActionLink();
|
||||
|
||||
public override bool IsFixable
|
||||
{
|
||||
get
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public override bool IsFixable => false;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
|
@ -51,10 +51,7 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
{
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.UPDATES_WIZARD_NO_MEMORY, ServerName); }
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_NO_MEMORY, ServerName);
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
@ -75,10 +72,7 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return Messages.SUSPEND_VMS; }
|
||||
}
|
||||
public override string HelpMessage => Messages.SUSPEND_VMS;
|
||||
|
||||
public override AsyncAction CreateUnwindChangesAction()
|
||||
{
|
||||
|
@ -46,19 +46,10 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
_host = host;
|
||||
}
|
||||
|
||||
public override string Title
|
||||
{
|
||||
get { return string.Format(Messages.UPDATES_WIZARD_PATCH_ALREADY_APPLIED_TITLE, Helpers.GetName(_host).Ellipsise(30)); }
|
||||
}
|
||||
public override string Title => string.Format(Messages.UPDATES_WIZARD_PATCH_ALREADY_APPLIED_TITLE, Helpers.GetName(_host).Ellipsise(30));
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.UPDATES_WIZARD_PATCH_ALREADY_APPLIED, Helpers.GetName(_host).Ellipsise(30)); }
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_PATCH_ALREADY_APPLIED, Helpers.GetName(_host).Ellipsise(30));
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return string.Empty; }
|
||||
}
|
||||
public override string HelpMessage => string.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -44,17 +44,8 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
this.requiredUpdates = requiredUpdates;
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(Messages.UPDATES_WIZARD_PRECHECK_FAILED_REQUIRED_UPDATE_MISSING, ServerName, requiredUpdates);
|
||||
}
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_PRECHECK_FAILED_REQUIRED_UPDATE_MISSING, ServerName, requiredUpdates);
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return string.Empty; }
|
||||
}
|
||||
public override string HelpMessage => string.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -50,17 +50,8 @@ namespace XenAdmin.Diagnostics.Problems.HostProblem
|
||||
{
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(Messages.UPDATE_FOR_DIFFERENT_XENSERVER_VERSION, ServerName);
|
||||
}
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATE_FOR_DIFFERENT_XENSERVER_VERSION, ServerName);
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return string.Empty; }
|
||||
}
|
||||
public override string HelpMessage => string.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -99,21 +99,9 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(Messages.UPGRADEWIZARD_PROBLEM_INCOMPATIBLE_CPUS, Pool);
|
||||
}
|
||||
}
|
||||
public override string Description => String.Format(Messages.UPGRADEWIZARD_PROBLEM_INCOMPATIBLE_CPUS, Pool);
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return Messages.UPGRADEWIZARD_PROBLEM_INCOMPATIBLE_CPUS_HELPMESSAGE;
|
||||
}
|
||||
}
|
||||
public override string HelpMessage => Messages.UPGRADEWIZARD_PROBLEM_INCOMPATIBLE_CPUS_HELPMESSAGE;
|
||||
}
|
||||
|
||||
class CPUCIncompatibilityWarning : Warning
|
||||
@ -128,17 +116,8 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
public override string Title
|
||||
{
|
||||
get { return Check.Description; }
|
||||
}
|
||||
public override string Title => Check.Description;
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(Messages.UPGRADEWIZARD_WARNING_INCOMPATIBLE_CPUS, host, pool);
|
||||
}
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPGRADEWIZARD_WARNING_INCOMPATIBLE_CPUS, host, pool);
|
||||
}
|
||||
}
|
||||
|
@ -72,21 +72,9 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
return pool != null ? new EnableHAAction(pool, null, HeartbeatSrs, FailuresToTolerate) : null;
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(Messages.UPDATES_WIZARD_HA_ON_DESCRIPTION, Pool);
|
||||
}
|
||||
}
|
||||
public override string Description => String.Format(Messages.UPDATES_WIZARD_HA_ON_DESCRIPTION, Pool);
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return Messages.TURN_HA_OFF;
|
||||
}
|
||||
}
|
||||
public override string HelpMessage => Messages.TURN_HA_OFF;
|
||||
}
|
||||
|
||||
class DrHAEnabledProblem : HAEnabledProblem
|
||||
@ -96,10 +84,7 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
{
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return Messages.DR_WIZARD_PROBLEM_HA_ENABLED; }
|
||||
}
|
||||
public override string Description => Messages.DR_WIZARD_PROBLEM_HA_ENABLED;
|
||||
}
|
||||
|
||||
class HAEnabledWarning : Warning
|
||||
@ -114,17 +99,8 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
public override string Title
|
||||
{
|
||||
get { return Check.Description; }
|
||||
}
|
||||
public override string Title => Check.Description;
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(Messages.UPDATES_WIZARD_HA_ON_WARNING, host, pool);
|
||||
}
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_HA_ON_WARNING, host, pool);
|
||||
}
|
||||
}
|
||||
|
@ -41,22 +41,14 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
: base(check, pool)
|
||||
{ }
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(
|
||||
((RestartHostOrToolstackPendingOnCoordinatorCheck)Check).UpdateUuid != null
|
||||
public override string Description =>
|
||||
string.Format(
|
||||
((RestartHostOrToolstackPendingOnCoordinatorCheck)Check).UpdateUuid != null
|
||||
? Messages.PROBLEM_COORDINATOR_PENDING_RESTART_HOST_THIS_UPDATE
|
||||
: Messages.PROBLEM_COORDINATOR_PENDING_RESTART_HOST,
|
||||
Helpers.GetName(Pool).Ellipsise(30));
|
||||
}
|
||||
}
|
||||
Helpers.GetName(Pool).Ellipsise(30));
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
public override string HelpMessage => null;
|
||||
}
|
||||
|
||||
class CoordinatorIsPendingRestartToolstackProblem : PoolProblem
|
||||
@ -65,21 +57,13 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
: base(check, pool)
|
||||
{ }
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(
|
||||
((RestartHostOrToolstackPendingOnCoordinatorCheck)Check).UpdateUuid != null
|
||||
public override string Description =>
|
||||
string.Format(
|
||||
((RestartHostOrToolstackPendingOnCoordinatorCheck)Check).UpdateUuid != null
|
||||
? Messages.PROBLEM_COORDINATOR_PENDING_RESTART_TOOLSTACK_THIS_UPDATE
|
||||
: Messages.PROBLEM_COORDINATOR_PENDING_RESTART_TOOLSTACK,
|
||||
Helpers.GetName(Pool).Ellipsise(30));
|
||||
}
|
||||
}
|
||||
Helpers.GetName(Pool).Ellipsise(30));
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
public override string HelpMessage => null;
|
||||
}
|
||||
}
|
||||
|
@ -50,15 +50,9 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
this.srDeviceConfigList = srDeviceConfigList;
|
||||
}
|
||||
|
||||
private bool EmptySRDeviceConfigList
|
||||
{
|
||||
get { return srDeviceConfigList == null || srDeviceConfigList.Count == 0; }
|
||||
}
|
||||
private bool EmptySRDeviceConfigList => srDeviceConfigList == null || srDeviceConfigList.Count == 0;
|
||||
|
||||
public override string Title
|
||||
{
|
||||
get { return Check.Description; }
|
||||
}
|
||||
public override string Title => Check.Description;
|
||||
|
||||
public override string Description
|
||||
{
|
||||
|
@ -70,13 +70,6 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
}
|
||||
}
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public override string HelpMessage => "";
|
||||
}
|
||||
}
|
@ -46,17 +46,8 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
_pool = pool;
|
||||
}
|
||||
|
||||
public Pool Pool
|
||||
{
|
||||
get
|
||||
{
|
||||
return _pool;
|
||||
}
|
||||
}
|
||||
public Pool Pool => _pool;
|
||||
|
||||
public sealed override string Title
|
||||
{
|
||||
get { return string.Format(Messages.PROBLEM_POOLPROBLEM_TITLE, Helpers.GetName(Pool).Ellipsise(30)); }
|
||||
}
|
||||
public sealed override string Title => string.Format(Messages.PROBLEM_POOLPROBLEM_TITLE, Helpers.GetName(Pool).Ellipsise(30));
|
||||
}
|
||||
}
|
||||
|
@ -42,15 +42,9 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
{
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.UPDATES_WIZARD_SERVER_SELECTION_PROBLEM, Pool); }
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_SERVER_SELECTION_PROBLEM, Pool);
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
public override string HelpMessage => null;
|
||||
}
|
||||
|
||||
class MixedPoolServerSelectionWarning : Warning
|
||||
@ -63,17 +57,8 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
this.pool = pool;
|
||||
}
|
||||
|
||||
public override string Title
|
||||
{
|
||||
get { return Check.Description; }
|
||||
}
|
||||
public override string Title => Check.Description;
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(Messages.UPDATES_WIZARD_MIXED_POOL_SERVER_SELECTION_WARNING, pool);
|
||||
}
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_MIXED_POOL_SERVER_SELECTION_WARNING, pool);
|
||||
}
|
||||
}
|
||||
|
@ -46,15 +46,9 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
{
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.CHECK_WLB_ENABLED, Pool); }
|
||||
}
|
||||
public override string Description => string.Format(Messages.CHECK_WLB_ENABLED, Pool);
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return Messages.HELP_MESSAGE_DISABLE_WLB; }
|
||||
}
|
||||
public override string HelpMessage => Messages.HELP_MESSAGE_DISABLE_WLB;
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
@ -87,17 +81,8 @@ namespace XenAdmin.Diagnostics.Problems.PoolProblem
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
public override string Title
|
||||
{
|
||||
get { return Check.Description; }
|
||||
}
|
||||
public override string Title => Check.Description;
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Format(Messages.UPDATES_WIZARD_WLB_ON_WARNING, host, pool);
|
||||
}
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_WLB_ON_WARNING, host, pool);
|
||||
}
|
||||
}
|
||||
|
@ -144,10 +144,10 @@ namespace XenAdmin.Diagnostics.Problems
|
||||
return new List<AsyncAction>();
|
||||
|
||||
var actions = from problem in problems
|
||||
where problem.SolutionActionCompleted
|
||||
let action = problem.CreateUnwindChangesAction()
|
||||
where action != null && action.Connection != null && action.Connection.IsConnected
|
||||
select action;
|
||||
where problem.SolutionActionCompleted
|
||||
let action = problem.CreateUnwindChangesAction()
|
||||
where action != null && action.Connection != null && action.Connection.IsConnected
|
||||
select action;
|
||||
|
||||
return actions.ToList();
|
||||
}
|
||||
|
@ -42,10 +42,7 @@ namespace XenAdmin.Diagnostics.Problems.UtilityProblem
|
||||
{
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return Messages.UPGRADEWIZARD_PROBLEM_CFU_STATUS; }
|
||||
}
|
||||
public override string Description => Messages.UPGRADEWIZARD_PROBLEM_CFU_STATUS;
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
@ -58,14 +55,8 @@ namespace XenAdmin.Diagnostics.Problems.UtilityProblem
|
||||
|
||||
public override string HelpMessage => Messages.MORE_INFO;
|
||||
|
||||
public sealed override string Title
|
||||
{
|
||||
get { return string.Empty; }
|
||||
}
|
||||
public sealed override string Title => string.Empty;
|
||||
|
||||
public override bool IsFixable
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
public override bool IsFixable => false;
|
||||
}
|
||||
}
|
||||
|
@ -45,10 +45,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
: base(check, vm)
|
||||
{ }
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.AUTOSTART_ENABLED_CHECK_DESCRIPTION, ServerName, Helpers.GetName(VM).Ellipsise(30)); }
|
||||
}
|
||||
public override string Description => string.Format(Messages.AUTOSTART_ENABLED_CHECK_DESCRIPTION, ServerName, Helpers.GetName(VM).Ellipsise(30));
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
@ -56,10 +53,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
return new DelegatedAsyncAction(VM.Connection, Messages.ACTION_DISABLE_AUTOSTART_ON_VM, string.Format(Messages.ACTION_DISABLING_AUTOSTART_ON_VM, Helpers.GetName(VM)), null, ActionDelegate(false));
|
||||
}
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return Messages.DISABLE_NOAMP; }
|
||||
}
|
||||
public override string HelpMessage => Messages.DISABLE_NOAMP;
|
||||
|
||||
private Action<Session> ActionDelegate(bool autostartValue)
|
||||
{
|
||||
|
@ -49,18 +49,9 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
{
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(Messages.DR_WIZARD_PROBLEM_EXISTING_VM, Helpers.GetPoolOfOne(VM.Connection).Name());
|
||||
}
|
||||
}
|
||||
public override string Description => String.Format(Messages.DR_WIZARD_PROBLEM_EXISTING_VM, Helpers.GetPoolOfOne(VM.Connection).Name());
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return Messages.DR_WIZARD_PROBLEM_EXISTING_VM_HELPMESSAGE; }
|
||||
}
|
||||
public override string HelpMessage => Messages.DR_WIZARD_PROBLEM_EXISTING_VM_HELPMESSAGE;
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
|
@ -47,22 +47,10 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
_vm = vm;
|
||||
}
|
||||
|
||||
protected VM Vm
|
||||
{
|
||||
get
|
||||
{
|
||||
return _vm.Connection.WaitForCache(new XenRef<VM>(_vm.opaque_ref));
|
||||
}
|
||||
}
|
||||
protected VM Vm => _vm.Connection.WaitForCache(new XenRef<VM>(_vm.opaque_ref));
|
||||
|
||||
public sealed override string Title
|
||||
{
|
||||
get { return string.Format(Messages.PROBLEM_VMPROBLEM_TITLE, Helpers.GetName(Vm).Ellipsise(30)); }
|
||||
}
|
||||
public sealed override string Title => string.Format(Messages.PROBLEM_VMPROBLEM_TITLE, Helpers.GetName(Vm).Ellipsise(30));
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return String.Format(Messages.DR_WIZARD_WARNING_EXISTING_VM, Helpers.GetPoolOfOne(Vm.Connection).Name()); }
|
||||
}
|
||||
public override string Description => String.Format(Messages.DR_WIZARD_WARNING_EXISTING_VM, Helpers.GetPoolOfOne(Vm.Connection).Name());
|
||||
}
|
||||
}
|
||||
|
@ -44,15 +44,9 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
public InvalidVCPUConfiguration(Check check, VM vm)
|
||||
: base(check, vm) { }
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return String.Format(Messages.UPGRADEWIZARD_PROBLEM_INVALID_VCPU_SETTINGS, ServerName, VM.Name()); }
|
||||
}
|
||||
public override string Description => String.Format(Messages.UPGRADEWIZARD_PROBLEM_INVALID_VCPU_SETTINGS, ServerName, VM.Name());
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return Messages.UPGRADEWIZARD_PROBLEM_INVALID_VCPU_SETTINGS_HELPMESSAGE; }
|
||||
}
|
||||
public override string HelpMessage => Messages.UPGRADEWIZARD_PROBLEM_INVALID_VCPU_SETTINGS_HELPMESSAGE;
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
|
@ -41,10 +41,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
public LocalCD(Check check, VM vm)
|
||||
: base(check, vm) { }
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.UPDATES_WIZARD_LOCAL_CD, ServerName, VM.Name()); }
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_LOCAL_CD, ServerName, VM.Name());
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
@ -60,10 +57,6 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
|
||||
}
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return Messages.EJECT_CD; }
|
||||
}
|
||||
|
||||
public override string HelpMessage => Messages.EJECT_CD;
|
||||
}
|
||||
}
|
||||
|
@ -40,9 +40,6 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
public LocalStorage(Check check, VM vm)
|
||||
: base(check, vm) { }
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.UPDATES_WIZARD_LOCAL_STORAGE, ServerName, VM.Name()); }
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_LOCAL_STORAGE, ServerName, VM.Name());
|
||||
}
|
||||
}
|
||||
|
@ -42,9 +42,6 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
{
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.UPDATES_WIZARD_NO_HOSTS, ServerName, VM.Name()); }
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_NO_HOSTS, ServerName, VM.Name());
|
||||
}
|
||||
}
|
||||
|
@ -49,18 +49,9 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
this.hardShutdown = hardShutdown;
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(Messages.DR_WIZARD_PROBLEM_RUNNING_VM, Helpers.GetPoolOfOne(VM.Connection).Name());
|
||||
}
|
||||
}
|
||||
public override string Description => String.Format(Messages.DR_WIZARD_PROBLEM_RUNNING_VM, Helpers.GetPoolOfOne(VM.Connection).Name());
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return Messages.DR_WIZARD_PROBLEM_RUNNING_VM_HELPMESSAGE; }
|
||||
}
|
||||
public override string HelpMessage => Messages.DR_WIZARD_PROBLEM_RUNNING_VM_HELPMESSAGE;
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
|
@ -42,9 +42,6 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
{
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.UPDATES_WIZARD_TOOLS_CD, ServerName, VM.Name()); }
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_TOOLS_CD, ServerName, VM.Name());
|
||||
}
|
||||
}
|
||||
|
@ -46,9 +46,6 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
Network = network;
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return String.Format(Messages.UPDATES_WIZARD_CANNOT_SEE_NETWORK, ServerName, VM.Name(), Network.Name()); }
|
||||
}
|
||||
public override string Description => String.Format(Messages.UPDATES_WIZARD_CANNOT_SEE_NETWORK, ServerName, VM.Name(), Network.Name());
|
||||
}
|
||||
}
|
||||
|
@ -53,13 +53,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
}
|
||||
|
||||
|
||||
protected string ServerName
|
||||
{
|
||||
get
|
||||
{
|
||||
return residentOn != null ? Helpers.GetName(residentOn).Ellipsise(30) : Helpers.GetName(Helpers.GetPoolOfOne(VM.Connection)).Ellipsise(30);
|
||||
}
|
||||
}
|
||||
protected string ServerName => residentOn != null ? Helpers.GetName(residentOn).Ellipsise(30) : Helpers.GetName(Helpers.GetPoolOfOne(VM.Connection)).Ellipsise(30);
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
@ -74,10 +68,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
}
|
||||
}
|
||||
|
||||
public sealed override string Title
|
||||
{
|
||||
get { return string.Format(Messages.PROBLEM_VMPROBLEM_TITLE, VM.uuid); }
|
||||
}
|
||||
public sealed override string Title => string.Format(Messages.PROBLEM_VMPROBLEM_TITLE, VM.uuid);
|
||||
|
||||
protected AsyncAction SuspendVM()
|
||||
{
|
||||
@ -89,13 +80,7 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
return new VMHardShutdown(VM);
|
||||
}
|
||||
|
||||
protected virtual bool CanSuspendVM
|
||||
{
|
||||
get
|
||||
{
|
||||
return VM.allowed_operations.Contains(vm_operations.suspend);
|
||||
}
|
||||
}
|
||||
protected virtual bool CanSuspendVM => VM.allowed_operations.Contains(vm_operations.suspend);
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
|
@ -39,9 +39,6 @@ namespace XenAdmin.Diagnostics.Problems.VMProblem
|
||||
public VmHasVgpu(Check check, VM vm)
|
||||
: base(check, vm) { }
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return string.Format(Messages.UPDATES_WIZARD_VM_HAS_VGPU, ServerName, VM.Name()); }
|
||||
}
|
||||
public override string Description => string.Format(Messages.UPDATES_WIZARD_VM_HAS_VGPU, ServerName, VM.Name());
|
||||
}
|
||||
}
|
||||
|
@ -52,18 +52,9 @@ namespace XenAdmin.Diagnostics.Problems.VmApplianceProblem
|
||||
this.vmsToDestroy = vmsToDestroy;
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(Messages.DR_WIZARD_PROBLEM_EXISTING_APPLIANCE, Helpers.GetPoolOfOne(vmsToDestroy[0].Connection).Name());
|
||||
}
|
||||
}
|
||||
public override string Description => String.Format(Messages.DR_WIZARD_PROBLEM_EXISTING_APPLIANCE, Helpers.GetPoolOfOne(vmsToDestroy[0].Connection).Name());
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return Messages.DR_WIZARD_PROBLEM_EXISTING_APPLIANCE_HELPMESSAGE; }
|
||||
}
|
||||
public override string HelpMessage => Messages.DR_WIZARD_PROBLEM_EXISTING_APPLIANCE_HELPMESSAGE;
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
|
@ -47,22 +47,10 @@ namespace XenAdmin.Diagnostics.Problems.VmApplianceProblem
|
||||
this.vmAppliance = vmAppliance;
|
||||
}
|
||||
|
||||
protected VM_appliance VmAppliance
|
||||
{
|
||||
get
|
||||
{
|
||||
return vmAppliance.Connection.WaitForCache(new XenRef<VM_appliance>(vmAppliance.opaque_ref));
|
||||
}
|
||||
}
|
||||
protected VM_appliance VmAppliance => vmAppliance.Connection.WaitForCache(new XenRef<VM_appliance>(vmAppliance.opaque_ref));
|
||||
|
||||
public sealed override string Title
|
||||
{
|
||||
get { return Helpers.GetName(VmAppliance).Ellipsise(30); }
|
||||
}
|
||||
public sealed override string Title => Helpers.GetName(VmAppliance).Ellipsise(30);
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get { return String.Format(Messages.DR_WIZARD_WARNING_EXISTING_VM, Helpers.GetPoolOfOne(VmAppliance.Connection).Name()); }
|
||||
}
|
||||
public override string Description => String.Format(Messages.DR_WIZARD_WARNING_EXISTING_VM, Helpers.GetPoolOfOne(VmAppliance.Connection).Name());
|
||||
}
|
||||
}
|
@ -52,18 +52,9 @@ namespace XenAdmin.Diagnostics.Problems.VmApplianceProblem
|
||||
this.hardShutdown = hardShutdown;
|
||||
}
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(Messages.DR_WIZARD_PROBLEM_RUNNING_APPLIANCE, Helpers.GetPoolOfOne(VmAppliance.Connection).Name());
|
||||
}
|
||||
}
|
||||
public override string Description => String.Format(Messages.DR_WIZARD_PROBLEM_RUNNING_APPLIANCE, Helpers.GetPoolOfOne(VmAppliance.Connection).Name());
|
||||
|
||||
public override string HelpMessage
|
||||
{
|
||||
get { return Messages.DR_WIZARD_PROBLEM_RUNNING_APPLIANCE_HELPMESSAGE; }
|
||||
}
|
||||
public override string HelpMessage => Messages.DR_WIZARD_PROBLEM_RUNNING_APPLIANCE_HELPMESSAGE;
|
||||
|
||||
protected override AsyncAction CreateAction(out bool cancelled)
|
||||
{
|
||||
|
@ -46,18 +46,8 @@ namespace XenAdmin.Diagnostics.Problems.VmApplianceProblem
|
||||
_vmAppliance = vmAppliance;
|
||||
}
|
||||
|
||||
public VM_appliance VmAppliance
|
||||
{
|
||||
get
|
||||
{
|
||||
return _vmAppliance;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed override string Title
|
||||
{
|
||||
get { return string.Format(Messages.PROBLEM_VMAPPLIANCEPROBLEM_TITLE, Helpers.GetName(VmAppliance).Ellipsise(30)); }
|
||||
}
|
||||
public VM_appliance VmAppliance => _vmAppliance;
|
||||
|
||||
public sealed override string Title => string.Format(Messages.PROBLEM_VMAPPLIANCEPROBLEM_TITLE, Helpers.GetName(VmAppliance).Ellipsise(30));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user