From 977d2aa5030737e14b407399b3a99d8d35da32e3 Mon Sep 17 00:00:00 2001 From: Konstantina Chremmou Date: Fri, 22 Feb 2019 16:50:30 +0000 Subject: [PATCH] CP-30597: Remove RPU005. Use a repackaged RPU004 instead. Signed-off-by: Konstantina Chremmou --- Branding/branding.sh | 2 +- WixInstaller/XenCenter.wxs | 1 - .../Diagnostics/Hotfixing/HotfixFactory.cs | 25 ++++++------------- .../Diagnostics/HotFixFactoryTests.cs | 20 +++++---------- 4 files changed, 14 insertions(+), 34 deletions(-) diff --git a/Branding/branding.sh b/Branding/branding.sh index 68bbffb73..59ccc13c3 100755 --- a/Branding/branding.sh +++ b/Branding/branding.sh @@ -53,7 +53,7 @@ do fi done -for hfx in RPU004 RPU005 +for hfx in RPU004 do if [ -d "${hfx}" ]; then latest=$(ls ${hfx} | /usr/bin/sort -n | tail -n 1) diff --git a/WixInstaller/XenCenter.wxs b/WixInstaller/XenCenter.wxs index 0ad88fa57..b88664d18 100644 --- a/WixInstaller/XenCenter.wxs +++ b/WixInstaller/XenCenter.wxs @@ -155,7 +155,6 @@ - diff --git a/XenAdmin/Diagnostics/Hotfixing/HotfixFactory.cs b/XenAdmin/Diagnostics/Hotfixing/HotfixFactory.cs index 3901d4992..b515a363e 100644 --- a/XenAdmin/Diagnostics/Hotfixing/HotfixFactory.cs +++ b/XenAdmin/Diagnostics/Hotfixing/HotfixFactory.cs @@ -40,8 +40,7 @@ namespace XenAdmin.Diagnostics.Hotfixing public enum HotfixableServerVersion { Dundee, - ElyKolkata, - Lima + ElyLima } private readonly Hotfix dundeeHotfix = new SingleHotfix @@ -50,24 +49,16 @@ namespace XenAdmin.Diagnostics.Hotfixing UUID = "149be566-421d-4661-bfca-e70970f86a36" }; - private readonly Hotfix elyKolkataHotfix = new SingleHotfix + private readonly Hotfix elyLimaHotfix = new SingleHotfix { Filename = "RPU004", - UUID = "072bf802-c54d-4e0d-b110-f0647ea86e32" - }; - - private readonly Hotfix limaHotfix = new SingleHotfix - { - Filename = "RPU005", - UUID = "660e3036-a090-44b5-a06b-10b3bd929855" + UUID = "d72c237a-eaaf-4d98-be63-48e2add8dc3a" }; public Hotfix Hotfix(Host host) { - if (Helpers.LimaOrGreater(host) && !Helpers.NaplesOrGreater(host)) - return Hotfix(HotfixableServerVersion.Lima); - if (Helpers.ElyOrGreater(host) && !Helpers.LimaOrGreater(host)) - return Hotfix(HotfixableServerVersion.ElyKolkata); + if (Helpers.ElyOrGreater(host) && !Helpers.NaplesOrGreater(host)) + return Hotfix(HotfixableServerVersion.ElyLima); if (Helpers.DundeeOrGreater(host) && !Helpers.ElyOrGreater(host)) return Hotfix(HotfixableServerVersion.Dundee); return null; @@ -75,10 +66,8 @@ namespace XenAdmin.Diagnostics.Hotfixing public Hotfix Hotfix(HotfixableServerVersion version) { - if (version == HotfixableServerVersion.Lima) - return limaHotfix; - if (version == HotfixableServerVersion.ElyKolkata) - return elyKolkataHotfix; + if (version == HotfixableServerVersion.ElyLima) + return elyLimaHotfix; if (version == HotfixableServerVersion.Dundee) return dundeeHotfix; diff --git a/XenAdminTests/UnitTests/Diagnostics/HotFixFactoryTests.cs b/XenAdminTests/UnitTests/Diagnostics/HotFixFactoryTests.cs index 8711bdb67..129be2afc 100644 --- a/XenAdminTests/UnitTests/Diagnostics/HotFixFactoryTests.cs +++ b/XenAdminTests/UnitTests/Diagnostics/HotFixFactoryTests.cs @@ -59,7 +59,7 @@ namespace XenAdminTests.UnitTests.Diagnostics string[] enumNames = Enum.GetNames(typeof (HotfixFactory.HotfixableServerVersion)); Array.Sort(enumNames); - string[] expectedNames = {"Dundee", "ElyKolkata", "Lima"}; + string[] expectedNames = {"Dundee", "ElyLima"}; Array.Sort(expectedNames); CollectionAssert.AreEqual(expectedNames, enumNames, "Expected contents of HotfixableServerVersion enum"); @@ -72,13 +72,9 @@ namespace XenAdminTests.UnitTests.Diagnostics factory.Hotfix(HotfixFactory.HotfixableServerVersion.Dundee).UUID, "Dundee UUID lookup from enum"); - Assert.AreEqual("072bf802-c54d-4e0d-b110-f0647ea86e32", - factory.Hotfix(HotfixFactory.HotfixableServerVersion.ElyKolkata).UUID, - "Ely - Kolkata UUID lookup from enum"); - - Assert.AreEqual("660e3036-a090-44b5-a06b-10b3bd929855", - factory.Hotfix(HotfixFactory.HotfixableServerVersion.Lima).UUID, - "Lima UUID lookup from enum"); + Assert.AreEqual("d72c237a-eaaf-4d98-be63-48e2add8dc3a", + factory.Hotfix(HotfixFactory.HotfixableServerVersion.ElyLima).UUID, + "Ely - Lima UUID lookup from enum"); } [Test] @@ -89,12 +85,8 @@ namespace XenAdminTests.UnitTests.Diagnostics "Dundee Filename lookup from enum"); Assert.AreEqual("RPU004", - factory.Hotfix(HotfixFactory.HotfixableServerVersion.ElyKolkata).Filename, - "Ely - Kolkata Filename lookup from enum"); - - Assert.AreEqual("RPU005", - factory.Hotfix(HotfixFactory.HotfixableServerVersion.Lima).Filename, - "Lima Filename lookup from enum"); + factory.Hotfix(HotfixFactory.HotfixableServerVersion.ElyLima).Filename, + "Ely - Lima Filename lookup from enum"); } [Test]