mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
CP-36392: Add null
check in EnableHostAction.cs
Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
This commit is contained in:
parent
b6a70e2ffc
commit
5f117e90c5
@ -42,10 +42,10 @@ namespace XenAdmin.Actions
|
||||
private readonly bool _resumeVMs;
|
||||
|
||||
public EnableHostAction(Host host, bool resumeVMs,Func<Pool, Host, long, long, bool> acceptNTolChangesOnEnable)
|
||||
: base(host.Connection, Messages.HOST_ENABLE, Messages.WAITING, null, acceptNTolChangesOnEnable)
|
||||
: base(host?.Connection, Messages.HOST_ENABLE, Messages.WAITING, null, acceptNTolChangesOnEnable)
|
||||
{
|
||||
Host = host ?? throw new ArgumentNullException("host");
|
||||
_resumeVMs = resumeVMs;
|
||||
Host = host;
|
||||
AddCommonAPIMethodsToRoleCheck();
|
||||
ApiMethodsToRoleCheck.Add("pool.ha_compute_hypothetical_max_host_failures_to_tolerate");
|
||||
ApiMethodsToRoleCheck.Add("pool.set_ha_host_failures_to_tolerate");
|
||||
|
Loading…
Reference in New Issue
Block a user