From 3d8ccf29e36f9b37025e342983249376f29a8ba3 Mon Sep 17 00:00:00 2001 From: Mihaela Stoica Date: Fri, 19 Jul 2013 16:30:27 +0100 Subject: [PATCH 1/3] Updated Helpers.AugustaOrGreater function to use Augusta platform version Signed-off-by: Mihaela Stoica --- XenModel/Utils/Helpers.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/XenModel/Utils/Helpers.cs b/XenModel/Utils/Helpers.cs index ef87d3578..6f3662cce 100644 --- a/XenModel/Utils/Helpers.cs +++ b/XenModel/Utils/Helpers.cs @@ -451,13 +451,10 @@ namespace XenAdmin.Core if (host == null) return true; - return false; - - //TODO: uncomment and update Augusta platform_version when it's known - //string platform_version = HostPlatformVersion(host); - //return - // platform_version != null && productVersionCompare(platform_version, "x.x.x") >= 0 || - // HostBuildNumber(host) == CUSTOM_BUILD_NUMBER; + string platform_version = HostPlatformVersion(host); + return + platform_version != null && productVersionCompare(platform_version, "1.8.50") >= 0 || + HostBuildNumber(host) == CUSTOM_BUILD_NUMBER; } // CP-3435: Disable Check for Updates in Common Criteria Certification project From 6399087bd55190ad6d3a4cdf0e830a35949ad79a Mon Sep 17 00:00:00 2001 From: Mihaela Stoica Date: Fri, 19 Jul 2013 16:32:42 +0100 Subject: [PATCH 2/3] Updated ApplyLicenseEdition action to use the correct version of Host.apply_edition depending on host's version. Signed-off-by: Mihaela Stoica --- XenModel/Actions/Host/ApplyLicenseEditionAction.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/XenModel/Actions/Host/ApplyLicenseEditionAction.cs b/XenModel/Actions/Host/ApplyLicenseEditionAction.cs index 4896b2fe7..f1dae4e90 100644 --- a/XenModel/Actions/Host/ApplyLicenseEditionAction.cs +++ b/XenModel/Actions/Host/ApplyLicenseEditionAction.cs @@ -173,9 +173,13 @@ namespace XenAdmin.Actions // PR-1102: catch the host's license data, before applying the new one, so it can be sent later to the licensing server LicensingHelper.LicenseDataStruct previousLicenseData = new LicensingHelper.LicenseDataStruct(host); - if(xo is Host) + if(xo is Host && host != null) { - Host.apply_edition(host.Connection.Session, host.opaque_ref, Host.GetEditionText(_edition), false); + if (Helpers.AugustaOrGreater(host)) + Host.apply_edition(host.Connection.Session, host.opaque_ref, Host.GetEditionText(_edition),false); + else + Host.apply_edition(host.Connection.Session, host.opaque_ref, Host.GetEditionText(_edition)); + // PR-1102: populate the list of updated hosts updatedHosts.Add(host, previousLicenseData); } @@ -186,7 +190,7 @@ namespace XenAdmin.Actions { foreach (Host poolHost in xo.Connection.Cache.Hosts) { - Host.apply_edition(host.Connection.Session, poolHost.opaque_ref, Host.GetEditionText(_edition), false); + Host.apply_edition(host.Connection.Session, poolHost.opaque_ref, Host.GetEditionText(_edition)); } } else From bec2117a2ac7f61053a36cf5641326dbd3b26132 Mon Sep 17 00:00:00 2001 From: Mihaela Stoica Date: Mon, 22 Jul 2013 14:07:47 +0100 Subject: [PATCH 3/3] CA-110610: It should be possible to apply a free license to a 6.1 or earlier pool if the pool has two or more servers in it. - Changed the condition under which we show pool members as individual hosts in the License Manager dialog, from ALL to ANY, meaning that if any of the pool members can be activated, then we split the pool. Signed-off-by: Mihaela Stoica --- XenAdmin/Dialogs/LicenseManager/LicenseActivationRequest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XenAdmin/Dialogs/LicenseManager/LicenseActivationRequest.cs b/XenAdmin/Dialogs/LicenseManager/LicenseActivationRequest.cs index 4fff0a874..838c416e7 100644 --- a/XenAdmin/Dialogs/LicenseManager/LicenseActivationRequest.cs +++ b/XenAdmin/Dialogs/LicenseManager/LicenseActivationRequest.cs @@ -71,7 +71,7 @@ namespace XenAdmin.Dialogs public static bool CanActivate(Pool pool) { - return pool.Connection.Cache.Hosts.All(CanActivate); + return pool.Connection.Cache.Hosts.Any(CanActivate); } public ReadOnlyCollection HostsThatCanBeActivated