mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
CA-292991: Remove unused modules and check clusterHostPif not null
Signed-off-by: serenc <seren.corbett@citrix.com>
This commit is contained in:
parent
dc833d2cc8
commit
e1cb27a80d
@ -34,8 +34,6 @@ using System.Collections.Generic;
|
||||
using XenAdmin.Network;
|
||||
using XenAPI;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using XenAdmin.Actions;
|
||||
|
||||
namespace XenAdmin.Core
|
||||
{
|
||||
@ -690,15 +688,17 @@ namespace XenAdmin.Core
|
||||
|
||||
public static bool HasIpForClusterNetwork(IXenConnection masterConnection, Host slaveHost, out bool clusterHostInBond)
|
||||
{
|
||||
|
||||
clusterHostInBond = false;
|
||||
var clusterHost = masterConnection.Cache.Cluster_hosts.FirstOrDefault();
|
||||
|
||||
if (clusterHost == null)
|
||||
{
|
||||
clusterHostInBond = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
var clusterHostPif = clusterHost.Connection.Resolve(clusterHost.PIF);
|
||||
|
||||
if (clusterHostPif == null)
|
||||
return true;
|
||||
|
||||
clusterHostInBond = clusterHostPif.IsBondNIC();
|
||||
|
||||
var pifsWithIPAddress = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user