CA-249084: Removed obsolete functionality

Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit is contained in:
Gabor Apati-Nagy 2017-04-11 16:01:20 +01:00
parent 32124f9e00
commit 72ceeb2de3
2 changed files with 8 additions and 34 deletions

View File

@ -850,7 +850,7 @@ namespace XenAdmin
log.InfoFormat("Connected to {0} (version {1}, build {2}.{3}) with {4} {5} (build {6}.{7})",
Helpers.GetName(master), Helpers.HostProductVersionText(master), Helpers.HostProductVersion(master),
Helpers.HostBuildNumber(master), Messages.XENCENTER, Branding.PRODUCT_VERSION_TEXT,
master.BuildNumberRaw, Messages.XENCENTER, Branding.PRODUCT_VERSION_TEXT,
Branding.XENCENTER_VERSION, Program.Version.Revision);
// Check the PRODUCT_BRAND

View File

@ -76,25 +76,6 @@ namespace XenAdmin.Core
return url.EndsWith(".db") || url.EndsWith(".xml") || url.EndsWith(".tmp");
}
/// <summary>
/// Return the build number of the given host, or the build number of the master if the
/// given host does not have a build number, or -1 if we can't find one. This will often be
/// 0 or -1 for developer builds, so comparisons should generally treat those numbers as if
/// they were brand new.
/// </summary>
public static int HostBuildNumber(Host host)
{
if (host.BuildNumber <= 0)
{
Host master = GetMaster(host.Connection);
return master == null ? -1 : master.BuildNumber;
}
else
{
return host.BuildNumber;
}
}
/// <summary>
/// Return the given host's product version, or the pool master's product version if
/// the host does not have one, or null if none can be found.
@ -347,8 +328,7 @@ namespace XenAdmin.Core
string platform_version = Helpers.HostPlatformVersion(host);
return
platform_version != null && Helpers.productVersionCompare(platform_version, "1.5.50") >= 0 ||
Helpers.HostBuildNumber(host) == CUSTOM_BUILD_NUMBER;
platform_version != null && Helpers.productVersionCompare(platform_version, "1.5.50") >= 0;
}
public static bool SanibelOrGreater(IXenConnection conn)
@ -360,8 +340,7 @@ namespace XenAdmin.Core
{
return
TampaOrGreater(host) || // CP-2480
Helpers.productVersionCompare(Helpers.HostProductVersion(host), "6.0.1") >= 0 ||
Helpers.HostBuildNumber(host) == CUSTOM_BUILD_NUMBER;
Helpers.productVersionCompare(Helpers.HostProductVersion(host), "6.0.1") >= 0;
}
/// <param name="conn">May be null, in which case true is returned.</param>
@ -379,8 +358,7 @@ namespace XenAdmin.Core
string platform_version = HostPlatformVersion(host);
return
platform_version != null && productVersionCompare(platform_version, "1.8.90") >= 0 ||
HostBuildNumber(host) == CUSTOM_BUILD_NUMBER;
platform_version != null && productVersionCompare(platform_version, "1.8.90") >= 0;
}
/// <param name="conn">May be null, in which case true is returned.</param>
@ -398,8 +376,7 @@ namespace XenAdmin.Core
string platform_version = HostPlatformVersion(host);
return
platform_version != null && productVersionCompare(platform_version, "2.0.0") >= 0 ||
HostBuildNumber(host) == CUSTOM_BUILD_NUMBER;
platform_version != null && productVersionCompare(platform_version, "2.0.0") >= 0;
}
/// <param name="conn">May be null, in which case true is returned.</param>
@ -417,8 +394,7 @@ namespace XenAdmin.Core
string platform_version = HostPlatformVersion(host);
return
platform_version != null && productVersionCompare(platform_version, "2.1.1") >= 0 ||
HostBuildNumber(host) == CUSTOM_BUILD_NUMBER;
platform_version != null && productVersionCompare(platform_version, "2.1.1") >= 0;
}
/// <param name="conn">May be null, in which case true is returned.</param>
@ -436,8 +412,7 @@ namespace XenAdmin.Core
string platform_version = HostPlatformVersion(host);
return
platform_version != null && productVersionCompare(platform_version, "2.2.50") >= 0 ||
HostBuildNumber(host) == CUSTOM_BUILD_NUMBER;
platform_version != null && productVersionCompare(platform_version, "2.2.50") >= 0;
}
/// <summary>
@ -481,8 +456,7 @@ namespace XenAdmin.Core
string platform_version = HostPlatformVersion(host);
return
platform_version != null && productVersionCompare(platform_version, "1.6.900") >= 0 ||
HostBuildNumber(host) == CUSTOM_BUILD_NUMBER;
platform_version != null && productVersionCompare(platform_version, "1.6.900") >= 0;
}
/// <summary>