From dce68b58c902c344ac17b315a17ecd7679f757df Mon Sep 17 00:00:00 2001 From: Mihaela Stoica Date: Wed, 31 May 2017 16:58:52 +0100 Subject: [PATCH] CA-242134: Remove Host.IsXCP extension (#1618) * CA-242134: Remove Host.IsXCP extension Signed-off-by: Mihaela Stoica * CA-242134: Remove Host.IsXCP extension - retain the host.license_params condition Signed-off-by: Mihaela Stoica --- XenAdmin/LicenseTimer.cs | 3 --- XenAdmin/TabPages/GeneralTabPage.cs | 11 ++++------- XenModel/Messages.Designer.cs | 27 --------------------------- XenModel/Messages.resx | 9 --------- XenModel/XenAPI-Extensions/Host.cs | 13 ------------- 5 files changed, 4 insertions(+), 59 deletions(-) diff --git a/XenAdmin/LicenseTimer.cs b/XenAdmin/LicenseTimer.cs index f2139fe0a..16ba10070 100644 --- a/XenAdmin/LicenseTimer.cs +++ b/XenAdmin/LicenseTimer.cs @@ -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); diff --git a/XenAdmin/TabPages/GeneralTabPage.cs b/XenAdmin/TabPages/GeneralTabPage.cs index 7f567646d..ff48bc28c 100644 --- a/XenAdmin/TabPages/GeneralTabPage.cs +++ b/XenAdmin/TabPages/GeneralTabPage.cs @@ -969,7 +969,7 @@ namespace XenAdmin.TabPages PDSection s = pdSectionLicense; - if (host.license_params == null || host.IsXCP) + if (host.license_params == null) return; Dictionary info = new Dictionary(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"]); diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs index 1fe09a8a1..4d66ec8cc 100755 --- a/XenModel/Messages.Designer.cs +++ b/XenModel/Messages.Designer.cs @@ -30875,33 +30875,6 @@ namespace XenAdmin { } } - /// - /// Looks up a localized string similar to XCP build number. - /// - public static string SOFTWARE_VERSION_XCP_BUILD_NUMBER { - get { - return ResourceManager.GetString("SOFTWARE_VERSION_XCP_BUILD_NUMBER", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to XCP build date. - /// - public static string SOFTWARE_VERSION_XCP_DATE { - get { - return ResourceManager.GetString("SOFTWARE_VERSION_XCP_DATE", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to XCP version. - /// - public static string SOFTWARE_VERSION_XCP_PLATFORM_VERSION { - get { - return ResourceManager.GetString("SOFTWARE_VERSION_XCP_PLATFORM_VERSION", resourceCulture); - } - } - /// /// Looks up a localized string similar to Try again using a correct user name and password.. /// diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx index 1c6aabdbe..2388eb2a8 100755 --- a/XenModel/Messages.resx +++ b/XenModel/Messages.resx @@ -10724,15 +10724,6 @@ Do you want to connect to the pool master '{1}'? [XenServer] version - - XCP build number - - - XCP build date - - - XCP version - Try again using a correct user name and password. diff --git a/XenModel/XenAPI-Extensions/Host.cs b/XenModel/XenAPI-Extensions/Host.cs index fe9ad57d1..11a2da69b 100644 --- a/XenModel/XenAPI-Extensions/Host.cs +++ b/XenModel/XenAPI-Extensions/Host.cs @@ -754,19 +754,6 @@ namespace XenAPI get { return Get(software_version, "product_brand"); } } - /// - /// Whether this host is an XCP host - /// - public bool IsXCP - { - get - { - return - ProductVersion == null && PlatformVersion != null || // for Tampa and later - ProductBrand == "XCP"; // for Boston and earlier - } - } - /// /// The remote syslog target. May return null if not set on the server. Set to null to unset. ///