Merge pull request #892 from robhoes/master

Add Standard license edition
This commit is contained in:
Mihaela Stoica 2016-03-10 14:17:27 +00:00
commit 96c36f653f
4 changed files with 31 additions and 4 deletions

View File

@ -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;

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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 {
}
}
/// <summary>
/// Looks up a localized string similar to [Citrix] [XenServer product] Standard Edition.
/// </summary>
public static string Label_host_edition_standard {
get {
return ResourceManager.GetString("Label-host.edition-standard", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [XenServer product] Standard Per-Socket.
/// </summary>

View File

@ -1856,4 +1856,7 @@
<data name="Label-host.system_status-conntest" xml:space="preserve">
<value>Connection test</value>
</data>
<data name="Label-host.edition-standard" xml:space="preserve">
<value>[Citrix] [XenServer product] Standard Edition</value>
</data>
</root>

View File

@ -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