CP-20712: Add support for FalconOrGreater function in XC

Signed-Off-by: Sharath Babu <sharath.babu@citrix.com>
This commit is contained in:
Sharath Babu 2017-02-01 05:06:40 +05:30
parent dbd60f1365
commit 25b056ce21

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.1") >= 0 ||
HostBuildNumber(host) == CUSTOM_BUILD_NUMBER;
}
/// <summary>
/// Cream (Creedence SP1) has API version 2.4
/// </summary>