From bf9fdb2a855b68b76d64ddf41fbd22c63ac8e4a5 Mon Sep 17 00:00:00 2001 From: Rob Hoes Date: Wed, 9 Mar 2016 16:14:05 +0000 Subject: [PATCH] Add Standard license edition Signed-off-by: Rob Hoes --- .../Dialogs/LicenseManager/LicenseStatus.cs | 4 +++- XenModel/FriendlyNames.Designer.cs | 11 ++++++++++- XenModel/FriendlyNames.resx | 3 +++ XenModel/XenAPI-Extensions/Host.cs | 17 +++++++++++++++-- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/XenAdmin/Dialogs/LicenseManager/LicenseStatus.cs b/XenAdmin/Dialogs/LicenseManager/LicenseStatus.cs index bb2f1d1c1..a684e940e 100644 --- a/XenAdmin/Dialogs/LicenseManager/LicenseStatus.cs +++ b/XenAdmin/Dialogs/LicenseManager/LicenseStatus.cs @@ -1,4 +1,4 @@ -/* Copyright (c) Citrix Systems Inc. +/* Copyright (c) Citrix Systems Inc. * All rights reserved. * * Redistribution and use in source and binary forms, @@ -335,6 +335,8 @@ namespace XenAdmin.Dialogs return Messages.LICENSE_SUPPORT_AND_DESKTOP_FEATURES_ENABLED; if (XenObject.Connection.Cache.Hosts.All(h => h.PremiumFeaturesEnabled)) return Messages.LICENSE_SUPPORT_AND_PREMIUM_FEATURES_ENABLED; + if (XenObject.Connection.Cache.Hosts.All(h => h.StandardFeaturesEnabled)) + return Messages.LICENSE_SUPPORT_AND_STANDARD_FEATURES_ENABLED; if (XenObject.Connection.Cache.Hosts.All(h => h.EligibleForSupport)) return Messages.LICENSE_SUPPORT_AND_STANDARD_FEATURES_ENABLED; return Messages.LICENSE_NOT_ELIGIBLE_FOR_SUPPORT; diff --git a/XenModel/FriendlyNames.Designer.cs b/XenModel/FriendlyNames.Designer.cs index 6086518fa..68b7ae111 100644 --- a/XenModel/FriendlyNames.Designer.cs +++ b/XenModel/FriendlyNames.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18444 +// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -879,6 +879,15 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to [Citrix] [XenServer product] Standard Edition. + /// + public static string Label_host_edition_standard { + get { + return ResourceManager.GetString("Label-host.edition-standard", resourceCulture); + } + } + /// /// Looks up a localized string similar to [XenServer product] Standard Per-Socket. /// diff --git a/XenModel/FriendlyNames.resx b/XenModel/FriendlyNames.resx index 59b184b54..b5f756864 100644 --- a/XenModel/FriendlyNames.resx +++ b/XenModel/FriendlyNames.resx @@ -1856,4 +1856,7 @@ Connection test + + [Citrix] [XenServer product] Standard Edition + \ No newline at end of file diff --git a/XenModel/XenAPI-Extensions/Host.cs b/XenModel/XenAPI-Extensions/Host.cs index 1681aee2f..756e67bd5 100644 --- a/XenModel/XenAPI-Extensions/Host.cs +++ b/XenModel/XenAPI-Extensions/Host.cs @@ -1,4 +1,4 @@ -/* Copyright (c) Citrix Systems Inc. +/* Copyright (c) Citrix Systems Inc. * All rights reserved. * * Redistribution and use in source and binary forms, @@ -60,7 +60,8 @@ namespace XenAPI StandardPerSocket, // Added in Creedence (standard-per-socket) Desktop, // Added in Creedence (desktop) DesktopPlus, // Added in Creedence (desktop-plus) - Premium // Added in Indigo (premium) + Premium, // Added in Indigo (premium) + Standard // Added in Dundee/Violet (standard) } public static string LicenseServerWebConsolePort = "8082"; @@ -104,6 +105,8 @@ namespace XenAPI return Edition.Free; case "premium": return Edition.Premium; + case "standard": + return Edition.Standard; default: return Edition.Free; } @@ -155,6 +158,8 @@ namespace XenAPI return "desktop-plus"; case Edition.Premium: return "premium"; + case Edition.Standard: + return "standard"; default: return "free"; } @@ -1429,6 +1434,14 @@ namespace XenAPI } } + public bool StandardFeaturesEnabled + { + get + { + return GetEdition(edition) == Edition.Standard; + } + } + public bool EligibleForSupport { get