Merge pull request #1900 from MihaelaStoica/release/jura/master

Added JuraOrGreater function
This commit is contained in:
Gabor Apati-Nagy 2017-12-18 13:15:55 +00:00 committed by GitHub
commit 281c68edb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -398,6 +398,24 @@ namespace XenAdmin.Core
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>
/// Cream (Creedence SP1) has API version 2.4
/// </summary>