CP-14642: Add friendly names for the new XenServer alerts

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2015-11-04 12:18:20 +00:00
parent 2f1e5c38bb
commit 6a06645b92
4 changed files with 109 additions and 1 deletions

View File

@ -142,6 +142,10 @@ namespace XenAdmin.Alerts
case XenAPI.Message.MessageType.LICENSE_SERVER_CONNECTED:
case XenAPI.Message.MessageType.LICENSE_SERVER_UNAVAILABLE:
case XenAPI.Message.MessageType.HOST_CLOCK_WENT_BACKWARDS:
case XenAPI.Message.MessageType.POOL_CPU_FEATURES_UP:
case XenAPI.Message.MessageType.POOL_CPU_FEATURES_DOWN:
case XenAPI.Message.MessageType.HOST_CPU_FEATURES_UP:
case XenAPI.Message.MessageType.HOST_CPU_FEATURES_DOWN:
if (XenObject != null)
return string.Format(FriendlyFormat(), Helpers.GetName(XenObject));
break;

View File

@ -3500,6 +3500,24 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to The CPU feature level on host &apos;{0}&apos; has been reduced..
/// </summary>
public static string Message_body_host_cpu_features_down {
get {
return ResourceManager.GetString("Message.body-host_cpu_features_down", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The CPU feature level on host &apos;{0}&apos; has been increased..
/// </summary>
public static string Message_body_host_cpu_features_up {
get {
return ResourceManager.GetString("Message.body-host_cpu_features_up", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to There was a temporary failure synchronizing performance statistics across the pool, probably because one or more servers were offline. Another synchronization attempt will be made later..
/// </summary>
@ -3644,6 +3662,24 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to The CPU feature level on pool &apos;{0}&apos; has been reduced..
/// </summary>
public static string Message_body_pool_cpu_features_down {
get {
return ResourceManager.GetString("Message.body-pool_cpu_features_down", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The CPU feature level on pool &apos;{0}&apos; has been increased..
/// </summary>
public static string Message_body_pool_cpu_features_up {
get {
return ResourceManager.GetString("Message.body-pool_cpu_features_up", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Server &apos;{0}&apos; is now the master of pool &apos;{1}&apos;..
/// </summary>
@ -4274,6 +4310,24 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Host CPU features reduced.
/// </summary>
public static string Message_name_host_cpu_features_down {
get {
return ResourceManager.GetString("Message.name-host_cpu_features_down", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Host CPU features increased.
/// </summary>
public static string Message_name_host_cpu_features_up {
get {
return ResourceManager.GetString("Message.name-host_cpu_features_up", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to XenServer statistics synchronization failed.
/// </summary>
@ -4400,6 +4454,24 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Pool CPU features reduced.
/// </summary>
public static string Message_name_pool_cpu_features_down {
get {
return ResourceManager.GetString("Message.name-pool_cpu_features_down", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Pool CPU features increased.
/// </summary>
public static string Message_name_pool_cpu_features_up {
get {
return ResourceManager.GetString("Message.name-pool_cpu_features_up", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Pool master changed.
/// </summary>

View File

@ -1793,4 +1793,28 @@
<data name="Label-performance.io_errors" xml:space="preserve">
<value>I/O errors</value>
</data>
<data name="Message.body-host_cpu_features_down" xml:space="preserve">
<value>The CPU feature level on host '{0}' has been reduced.</value>
</data>
<data name="Message.body-host_cpu_features_up" xml:space="preserve">
<value>The CPU feature level on host '{0}' has been increased.</value>
</data>
<data name="Message.body-pool_cpu_features_down" xml:space="preserve">
<value>The CPU feature level on pool '{0}' has been reduced.</value>
</data>
<data name="Message.body-pool_cpu_features_up" xml:space="preserve">
<value>The CPU feature level on pool '{0}' has been increased.</value>
</data>
<data name="Message.name-host_cpu_features_down" xml:space="preserve">
<value>Host CPU features reduced</value>
</data>
<data name="Message.name-host_cpu_features_up" xml:space="preserve">
<value>Host CPU features increased</value>
</data>
<data name="Message.name-pool_cpu_features_down" xml:space="preserve">
<value>Pool CPU features reduced</value>
</data>
<data name="Message.name-pool_cpu_features_up" xml:space="preserve">
<value>Pool CPU features increased</value>
</data>
</root>

View File

@ -44,7 +44,7 @@ namespace XenAPI
/// </summary>
public partial class Message : XenObject<Message>
{
public enum MessageType { BOND_STATUS_CHANGED, VMPP_SNAPSHOT_ARCHIVE_ALREADY_EXISTS, VMPP_ARCHIVE_MISSED_EVENT, VMPP_SNAPSHOT_MISSED_EVENT, VMPP_XAPI_LOGON_FAILURE, VMPP_LICENSE_ERROR, VMPP_ARCHIVE_TARGET_UNMOUNT_FAILED, VMPP_ARCHIVE_TARGET_MOUNT_FAILED, VMPP_ARCHIVE_SUCCEEDED, VMPP_ARCHIVE_FAILED_0, VMPP_ARCHIVE_LOCK_FAILED, VMPP_SNAPSHOT_FAILED, VMPP_SNAPSHOT_SUCCEEDED, VMPP_SNAPSHOT_LOCK_FAILED, LICENSE_SERVER_VERSION_OBSOLETE, LICENSE_SERVER_UNREACHABLE, LICENSE_NOT_AVAILABLE, GRACE_LICENSE, LICENSE_EXPIRED, LICENSE_SERVER_UNAVAILABLE, LICENSE_SERVER_CONNECTED, MULTIPATH_PERIODIC_ALERT, EXTAUTH_IN_POOL_IS_NON_HOMOGENEOUS, EXTAUTH_INIT_IN_HOST_FAILED, WLB_OPTIMIZATION_ALERT, WLB_CONSULTATION_FAILED, ALARM, PBD_PLUG_FAILED_ON_SERVER_START, POOL_MASTER_TRANSITION, HOST_CLOCK_WENT_BACKWARDS, HOST_CLOCK_SKEW_DETECTED, HOST_SYNC_DATA_FAILED, VM_CLONED, VM_CRASHED, VM_RESUMED, VM_SUSPENDED, VM_REBOOTED, VM_SHUTDOWN, VM_STARTED, VCPU_QOS_FAILED, VBD_QOS_FAILED, VIF_QOS_FAILED, IP_CONFIGURED_PIF_CAN_UNPLUG, METADATA_LUN_BROKEN, METADATA_LUN_HEALTHY, HA_HOST_WAS_FENCED, HA_HOST_FAILED, HA_PROTECTED_VM_RESTART_FAILED, HA_POOL_DROP_IN_PLAN_EXISTS_FOR, HA_POOL_OVERCOMMITTED, HA_NETWORK_BONDING_ERROR, HA_XAPI_HEALTHCHECK_APPROACHING_TIMEOUT, HA_STATEFILE_APPROACHING_TIMEOUT, HA_HEARTBEAT_APPROACHING_TIMEOUT, HA_STATEFILE_LOST, LICENSE_EXPIRES_SOON, LICENSE_DOES_NOT_SUPPORT_POOLING, unknown };
public enum MessageType { POOL_CPU_FEATURES_UP, POOL_CPU_FEATURES_DOWN, HOST_CPU_FEATURES_UP, HOST_CPU_FEATURES_DOWN, BOND_STATUS_CHANGED, VMPP_SNAPSHOT_ARCHIVE_ALREADY_EXISTS, VMPP_ARCHIVE_MISSED_EVENT, VMPP_SNAPSHOT_MISSED_EVENT, VMPP_XAPI_LOGON_FAILURE, VMPP_LICENSE_ERROR, VMPP_ARCHIVE_TARGET_UNMOUNT_FAILED, VMPP_ARCHIVE_TARGET_MOUNT_FAILED, VMPP_ARCHIVE_SUCCEEDED, VMPP_ARCHIVE_FAILED_0, VMPP_ARCHIVE_LOCK_FAILED, VMPP_SNAPSHOT_FAILED, VMPP_SNAPSHOT_SUCCEEDED, VMPP_SNAPSHOT_LOCK_FAILED, LICENSE_SERVER_VERSION_OBSOLETE, LICENSE_SERVER_UNREACHABLE, LICENSE_NOT_AVAILABLE, GRACE_LICENSE, LICENSE_EXPIRED, LICENSE_SERVER_UNAVAILABLE, LICENSE_SERVER_CONNECTED, MULTIPATH_PERIODIC_ALERT, EXTAUTH_IN_POOL_IS_NON_HOMOGENEOUS, EXTAUTH_INIT_IN_HOST_FAILED, WLB_OPTIMIZATION_ALERT, WLB_CONSULTATION_FAILED, ALARM, PBD_PLUG_FAILED_ON_SERVER_START, POOL_MASTER_TRANSITION, HOST_CLOCK_WENT_BACKWARDS, HOST_CLOCK_SKEW_DETECTED, HOST_SYNC_DATA_FAILED, VM_CLONED, VM_CRASHED, VM_RESUMED, VM_SUSPENDED, VM_REBOOTED, VM_SHUTDOWN, VM_STARTED, VCPU_QOS_FAILED, VBD_QOS_FAILED, VIF_QOS_FAILED, IP_CONFIGURED_PIF_CAN_UNPLUG, METADATA_LUN_BROKEN, METADATA_LUN_HEALTHY, HA_HOST_WAS_FENCED, HA_HOST_FAILED, HA_PROTECTED_VM_RESTART_FAILED, HA_POOL_DROP_IN_PLAN_EXISTS_FOR, HA_POOL_OVERCOMMITTED, HA_NETWORK_BONDING_ERROR, HA_XAPI_HEALTHCHECK_APPROACHING_TIMEOUT, HA_STATEFILE_APPROACHING_TIMEOUT, HA_HEARTBEAT_APPROACHING_TIMEOUT, HA_STATEFILE_LOST, LICENSE_EXPIRES_SOON, LICENSE_DOES_NOT_SUPPORT_POOLING, unknown };
public MessageType Type
{
@ -52,6 +52,14 @@ namespace XenAPI
{
switch (this.name)
{
case "POOL_CPU_FEATURES_UP":
return MessageType.POOL_CPU_FEATURES_UP;
case "POOL_CPU_FEATURES_DOWN":
return MessageType.POOL_CPU_FEATURES_DOWN;
case "HOST_CPU_FEATURES_UP":
return MessageType.HOST_CPU_FEATURES_UP;
case "HOST_CPU_FEATURES_DOWN":
return MessageType.HOST_CPU_FEATURES_DOWN;
case "BOND_STATUS_CHANGED":
return MessageType.BOND_STATUS_CHANGED;
case "VMPP_SNAPSHOT_ARCHIVE_ALREADY_EXISTS":