CA-242134: Remove Host.IsXCP extension (#1618)

* CA-242134: Remove Host.IsXCP extension

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>

* CA-242134: Remove Host.IsXCP extension

- retain the host.license_params condition

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2017-05-31 16:58:52 +01:00 committed by Stephen Turner
parent cf1f630486
commit dce68b58c9
5 changed files with 4 additions and 59 deletions

View File

@ -87,9 +87,6 @@ namespace XenAdmin
DateTime now = DateTime.UtcNow - connection.ServerTimeOffset;
foreach (Host host in connection.Cache.Hosts)
{
if (host.IsXCP)
continue;
DateTime expiryDate = host.LicenseExpiryUTC;
TimeSpan timeToExpiry = expiryDate.Subtract(now);

View File

@ -969,7 +969,7 @@ namespace XenAdmin.TabPages
PDSection s = pdSectionLicense;
if (host.license_params == null || host.IsXCP)
if (host.license_params == null)
return;
Dictionary<string, string> info = new Dictionary<string, string>(host.license_params);
@ -1053,14 +1053,11 @@ namespace XenAdmin.TabPages
if (host == null || host.software_version == null)
return;
bool isXCP = host.IsXCP;
if (host.software_version.ContainsKey("date"))
pdSectionVersion.AddEntry(isXCP ? Messages.SOFTWARE_VERSION_XCP_DATE : Messages.SOFTWARE_VERSION_DATE, host.software_version["date"]);
pdSectionVersion.AddEntry(Messages.SOFTWARE_VERSION_DATE, host.software_version["date"]);
if (!Helpers.FalconOrGreater(host) && host.software_version.ContainsKey("build_number"))
pdSectionVersion.AddEntry(isXCP ? Messages.SOFTWARE_VERSION_XCP_BUILD_NUMBER : Messages.SOFTWARE_VERSION_BUILD_NUMBER, host.software_version["build_number"]);
if (isXCP && host.software_version.ContainsKey("platform_version"))
pdSectionVersion.AddEntry(Messages.SOFTWARE_VERSION_XCP_PLATFORM_VERSION, host.software_version["platform_version"]);
if (!isXCP && host.software_version.ContainsKey("product_version"))
pdSectionVersion.AddEntry(Messages.SOFTWARE_VERSION_BUILD_NUMBER, host.software_version["build_number"]);
if (host.software_version.ContainsKey("product_version"))
pdSectionVersion.AddEntry(Messages.SOFTWARE_VERSION_PRODUCT_VERSION, host.ProductVersionText);
if (host.software_version.ContainsKey("dbv"))
pdSectionVersion.AddEntry("DBV", host.software_version["dbv"]);

View File

@ -30875,33 +30875,6 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to XCP build number.
/// </summary>
public static string SOFTWARE_VERSION_XCP_BUILD_NUMBER {
get {
return ResourceManager.GetString("SOFTWARE_VERSION_XCP_BUILD_NUMBER", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to XCP build date.
/// </summary>
public static string SOFTWARE_VERSION_XCP_DATE {
get {
return ResourceManager.GetString("SOFTWARE_VERSION_XCP_DATE", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to XCP version.
/// </summary>
public static string SOFTWARE_VERSION_XCP_PLATFORM_VERSION {
get {
return ResourceManager.GetString("SOFTWARE_VERSION_XCP_PLATFORM_VERSION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Try again using a correct user name and password..
/// </summary>

View File

@ -10724,15 +10724,6 @@ Do you want to connect to the pool master '{1}'?</value>
<data name="SOFTWARE_VERSION_PRODUCT_VERSION" xml:space="preserve">
<value>[XenServer] version</value>
</data>
<data name="SOFTWARE_VERSION_XCP_BUILD_NUMBER" xml:space="preserve">
<value>XCP build number</value>
</data>
<data name="SOFTWARE_VERSION_XCP_DATE" xml:space="preserve">
<value>XCP build date</value>
</data>
<data name="SOFTWARE_VERSION_XCP_PLATFORM_VERSION" xml:space="preserve">
<value>XCP version</value>
</data>
<data name="SOLUTION_AUTHENTICATION" xml:space="preserve">
<value>Try again using a correct user name and password.</value>
</data>

View File

@ -754,19 +754,6 @@ namespace XenAPI
get { return Get(software_version, "product_brand"); }
}
/// <summary>
/// Whether this host is an XCP host
/// </summary>
public bool IsXCP
{
get
{
return
ProductVersion == null && PlatformVersion != null || // for Tampa and later
ProductBrand == "XCP"; // for Boston and earlier
}
}
/// <summary>
/// The remote syslog target. May return null if not set on the server. Set to null to unset.
/// </summary>