Added JuraOrGreater function

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2017-12-18 11:39:05 +00:00
parent ea1e26d062
commit 8ab61cf12e

View File

@ -398,6 +398,24 @@ namespace XenAdmin.Core
platform_version != null && productVersionCompare(platform_version, "2.3.50") >= 0; platform_version != null && productVersionCompare(platform_version, "2.3.50") >= 0;
} }
/// <param name="conn">May be null, in which case true is returned.</param>
public static bool JuraOrGreater(IXenConnection conn)
{
return conn == null || JuraOrGreater(Helpers.GetMaster(conn));
}
/// Jura is ver. 2.5.0
/// <param name="host">May be null, in which case true is returned.</param>
public static bool JuraOrGreater(Host host)
{
if (host == null)
return true;
string platform_version = HostPlatformVersion(host);
return
platform_version != null && productVersionCompare(platform_version, "2.4.50") >= 0;
}
/// <summary> /// <summary>
/// Cream (Creedence SP1) has API version 2.4 /// Cream (Creedence SP1) has API version 2.4
/// </summary> /// </summary>