CP-242134: Remove pre-Clearwater hotfixes

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2017-05-05 10:18:40 +01:00
parent 1351155283
commit d9f6016933
5 changed files with 13 additions and 68 deletions

Binary file not shown.

View File

@ -153,10 +153,8 @@
</Component>
<Component Id="UpdateFiles" Guid="[BRANDING_XSUPDATE_FILE_GUID]">
<?if "$(env.Branding)"="XenCenter"?>
<File Id="hotfixBoston" Source="..\Branding\Hotfixes\XS60E001.xsupdate" />
<File Id="hotfixBostonSource" Source="..\Branding\Hotfixes\XS60E001-src-pkgs.tar.gz" />
<File Id="hotfixSanibelToClearwater" Source="..\Branding\Hotfixes\RPU001.xsupdate" />
<File Id="hotfixSanibelToClearwaterSource" Source="..\Branding\Hotfixes\RPU001-src-pkgs.tar.gz" />
<File Id="hotfixClearwater" Source="..\Branding\Hotfixes\RPU001.xsupdate" />
<File Id="hotfixClearwaterSource" Source="..\Branding\Hotfixes\RPU001-src-pkgs.tar.gz" />
<?endif?>
<File Id="hotfixCreedence" Source="..\Branding\Hotfixes\RPU002.[xsupdate]" />
<File Id="hotfixDundee" Source="..\Branding\Hotfixes\RPU003.[xsupdate]" />

View File

@ -30,7 +30,6 @@
*/
using System;
using System.Collections.Generic;
using XenAdmin.Core;
using XenAPI;
@ -40,31 +39,13 @@ namespace XenAdmin.Diagnostics.Hotfixing
{
public enum HotfixableServerVersion
{
Boston,
SanibelToClearwater,
Clearwater,
Creedence,
Dundee,
Ely
}
private readonly Hotfix bostonHotfix = new MultipleHotfix()
{
ComponentHotfixes = new List<Hotfix>
{
new SingleHotfix
{
Filename = "XS60E001",
UUID = "95ac709c-e408-423f-8d22-84b8134a149e"
},
new SingleHotfix
{
Filename = "RPU001",
UUID = "591d0209-531e-4ed8-9ed2-98df2a1a445c"
}
}
};
private readonly Hotfix sanibelToClearwaterHotfix = new SingleHotfix
private readonly Hotfix clearwaterHotfix = new SingleHotfix
{
Filename = "RPU001",
UUID = "591d0209-531e-4ed8-9ed2-98df2a1a445c"
@ -96,10 +77,8 @@ namespace XenAdmin.Diagnostics.Hotfixing
return Hotfix(HotfixableServerVersion.Dundee);
if (Helpers.CreedenceOrGreater(host) && !Helpers.DundeeOrGreater(host))
return Hotfix(HotfixableServerVersion.Creedence);
if (Helpers.SanibelOrGreater(host) && !Helpers.CreedenceOrGreater(host))
return Hotfix(HotfixableServerVersion.SanibelToClearwater);
if (!Helpers.SanibelOrGreater(host))
return Hotfix(HotfixableServerVersion.Boston);
if (!Helpers.CreedenceOrGreater(host))
return Hotfix(HotfixableServerVersion.Clearwater);
return null;
}
@ -112,10 +91,8 @@ namespace XenAdmin.Diagnostics.Hotfixing
return dundeeHotfix;
if (version == HotfixableServerVersion.Creedence)
return creedenceHotfix;
if (version == HotfixableServerVersion.SanibelToClearwater)
return sanibelToClearwaterHotfix;
if (version == HotfixableServerVersion.Boston)
return bostonHotfix;
if (version == HotfixableServerVersion.Clearwater)
return clearwaterHotfix;
throw new ArgumentException("A version was provided for which there is no hotfix filename");
}

View File

@ -59,7 +59,7 @@ namespace XenAdminTests.UnitTests.Diagnostics
string[] enumNames = Enum.GetNames(typeof (HotfixFactory.HotfixableServerVersion));
Array.Sort(enumNames);
string[] expectedNames = new []{"Boston", "SanibelToClearwater", "Creedence", "Dundee", "Ely"};
string[] expectedNames = new []{"Clearwater", "Creedence", "Dundee", "Ely"};
Array.Sort(expectedNames);
CollectionAssert.AreEqual(expectedNames, enumNames, "Expected contents of HotfixableServerVersion enum");
@ -68,13 +68,9 @@ namespace XenAdminTests.UnitTests.Diagnostics
[Test]
public void UUIDLookedUpFromEnum()
{
Assert.AreEqual("95ac709c-e408-423f-8d22-84b8134a149e;591d0209-531e-4ed8-9ed2-98df2a1a445c",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Boston).UUID,
"Boston UUID lookup from enum");
Assert.AreEqual("591d0209-531e-4ed8-9ed2-98df2a1a445c",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.SanibelToClearwater).UUID,
"SanibelToClearwater UUID lookup from enum");
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Clearwater).UUID,
"Clearwater UUID lookup from enum");
Assert.AreEqual("3f92b111-0a90-4ec6-b85a-737f241a3fc1 ",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Creedence).UUID,
@ -92,13 +88,9 @@ namespace XenAdminTests.UnitTests.Diagnostics
[Test]
public void FilenameLookedUpFromEnum()
{
Assert.AreEqual("XS60E001;RPU001",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Boston).Filename,
"Boston Filename lookup from enum");
Assert.AreEqual("RPU001",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.SanibelToClearwater).Filename,
"SanibelToClearwater Filename lookup from enum");
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Clearwater).Filename,
"Clearwater Filename lookup from enum");
Assert.AreEqual("RPU002",
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Creedence).Filename,
@ -123,23 +115,12 @@ namespace XenAdminTests.UnitTests.Diagnostics
Assert.IsNull(factory.Hotfix(host.Object));
}
[Test]
[TestCase("6.0.2", "RPU001", Description = "Sanibel")]
[TestCase("6.0.0", "XS60E001;RPU001", Description = "Boston")]
public void TestProductVersionNumbersWithHotfixes(string productVersion, string filenames)
{
Mock<Host> host = ObjectManager.NewXenObject<Host>(id);
host.Setup(h => h.ProductVersion).Returns(productVersion);
Assert.That(filenames, Is.EqualTo(factory.Hotfix(host.Object).Filename));
}
[Test]
[TestCase("2.2.50", Description = "Falcon", Result = false)]
[TestCase("2.1.1", Description = "Ely", Result = true)]
[TestCase("2.0.0", Description = "Dundee", Result = true)]
[TestCase("1.9.0", Description = "Creedence", Result = true)]
[TestCase("1.8.0", Description = "Clearwater", Result = true)]
[TestCase("1.6.10", Description = "Tampa", Result = true)]
[TestCase("9999.9999.9999", Description = "Future", Result = false)]
public bool TestIsHotfixRequiredBasedOnPlatformVersion(string version)
{
@ -147,16 +128,5 @@ namespace XenAdminTests.UnitTests.Diagnostics
host.Setup(h => h.PlatformVersion).Returns(version);
return factory.IsHotfixRequired(host.Object);
}
[Test]
[TestCase("6.0.2", Description = "Sanibel", Result = true)]
[TestCase("6.0.0", Description = "Boston", Result = true)]
public bool TestIsHotfixRequiredBasedOnProductVersion(string productVersion)
{
Mock<Host> host = ObjectManager.NewXenObject<Host>(id);
host.Setup(h => h.ProductVersion).Returns(productVersion);
return factory.IsHotfixRequired(host.Object);
}
}
}