CP-20712: Add support for FalconOrGreater function in XC (#1418)

Signed-Off-by: Sharath Babu <sharath.babu@citrix.com>
This commit is contained in:
geosharath 2017-02-03 17:42:24 +05:30 committed by Stephen Turner
parent 01cebc9166
commit ffc23c102e

View File

@ -421,6 +421,25 @@ namespace XenAdmin.Core
HostBuildNumber(host) == CUSTOM_BUILD_NUMBER;
}
/// <param name="conn">May be null, in which case true is returned.</param>
public static bool FalconOrGreater(IXenConnection conn)
{
return conn == null ? true : FalconOrGreater(Helpers.GetMaster(conn));
}
/// Falcon is ver. 2.3.0
/// <param name="host">May be null, in which case true is returned.</param>
public static bool FalconOrGreater(Host host)
{
if (host == null)
return true;
string platform_version = HostPlatformVersion(host);
return
platform_version != null && productVersionCompare(platform_version, "2.2.50") >= 0 ||
HostBuildNumber(host) == CUSTOM_BUILD_NUMBER;
}
/// <summary>
/// Cream (Creedence SP1) has API version 2.4
/// </summary>