Skip to content

Commit

Permalink
Merge pull request #52 from borzel/feature-no-xscontainer-check
Browse files Browse the repository at this point in the history
Do not check for ContainerCapability on XCP-ng, just belive in it :-)
  • Loading branch information
borzel authored May 13, 2018
2 parents ce8e0d7 + 5da6166 commit 3a07f54
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions XenModel/Utils/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public static class Helpers

public const string GuiTempObjectPrefix = "__gui__";

public const string PRODUCT_BRAND_XCP_NG = "XCP-ng";

public static NumberFormatInfo _nfi = new CultureInfo("en-US", false).NumberFormat;

public static readonly Regex SessionRefRegex = new Regex(@"OpaqueRef:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}");
Expand Down Expand Up @@ -1960,6 +1962,8 @@ public static bool ContainerCapability(IXenConnection connection)
var master = GetMaster(connection);
if (master == null)
return false;
if (master.ProductBrand() == PRODUCT_BRAND_XCP_NG)
return true;
if (ElyOrGreater(connection))
return master.AppliedUpdates().Any(update => update.Name().ToLower().StartsWith("xscontainer"));
return CreamOrGreater(connection) && master.SuppPacks().Any(suppPack => suppPack.Name.ToLower().StartsWith("xscontainer"));
Expand Down

0 comments on commit 3a07f54

Please sign in to comment.