From 6a06645b92fe7f68685ffdadbe86341bf10e8474 Mon Sep 17 00:00:00 2001 From: Mihaela Stoica Date: Wed, 4 Nov 2015 12:18:20 +0000 Subject: [PATCH] CP-14642: Add friendly names for the new XenServer alerts Signed-off-by: Mihaela Stoica --- XenAdmin/Alerts/Types/MessageAlert.cs | 4 ++ XenModel/FriendlyNames.Designer.cs | 72 +++++++++++++++++++++++++++ XenModel/FriendlyNames.resx | 24 +++++++++ XenModel/XenAPI/Message.cs | 10 +++- 4 files changed, 109 insertions(+), 1 deletion(-) diff --git a/XenAdmin/Alerts/Types/MessageAlert.cs b/XenAdmin/Alerts/Types/MessageAlert.cs index 273265fa7..ef28a6a37 100644 --- a/XenAdmin/Alerts/Types/MessageAlert.cs +++ b/XenAdmin/Alerts/Types/MessageAlert.cs @@ -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; diff --git a/XenModel/FriendlyNames.Designer.cs b/XenModel/FriendlyNames.Designer.cs index 1379edb04..a43867330 100644 --- a/XenModel/FriendlyNames.Designer.cs +++ b/XenModel/FriendlyNames.Designer.cs @@ -3500,6 +3500,24 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to The CPU feature level on host '{0}' has been reduced.. + /// + public static string Message_body_host_cpu_features_down { + get { + return ResourceManager.GetString("Message.body-host_cpu_features_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The CPU feature level on host '{0}' has been increased.. + /// + public static string Message_body_host_cpu_features_up { + get { + return ResourceManager.GetString("Message.body-host_cpu_features_up", resourceCulture); + } + } + /// /// 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.. /// @@ -3644,6 +3662,24 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to The CPU feature level on pool '{0}' has been reduced.. + /// + public static string Message_body_pool_cpu_features_down { + get { + return ResourceManager.GetString("Message.body-pool_cpu_features_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The CPU feature level on pool '{0}' has been increased.. + /// + public static string Message_body_pool_cpu_features_up { + get { + return ResourceManager.GetString("Message.body-pool_cpu_features_up", resourceCulture); + } + } + /// /// Looks up a localized string similar to Server '{0}' is now the master of pool '{1}'.. /// @@ -4274,6 +4310,24 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to Host CPU features reduced. + /// + public static string Message_name_host_cpu_features_down { + get { + return ResourceManager.GetString("Message.name-host_cpu_features_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Host CPU features increased. + /// + public static string Message_name_host_cpu_features_up { + get { + return ResourceManager.GetString("Message.name-host_cpu_features_up", resourceCulture); + } + } + /// /// Looks up a localized string similar to XenServer statistics synchronization failed. /// @@ -4400,6 +4454,24 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to Pool CPU features reduced. + /// + public static string Message_name_pool_cpu_features_down { + get { + return ResourceManager.GetString("Message.name-pool_cpu_features_down", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pool CPU features increased. + /// + public static string Message_name_pool_cpu_features_up { + get { + return ResourceManager.GetString("Message.name-pool_cpu_features_up", resourceCulture); + } + } + /// /// Looks up a localized string similar to Pool master changed. /// diff --git a/XenModel/FriendlyNames.resx b/XenModel/FriendlyNames.resx index f05ccab68..6e56b378b 100644 --- a/XenModel/FriendlyNames.resx +++ b/XenModel/FriendlyNames.resx @@ -1793,4 +1793,28 @@ I/O errors + + The CPU feature level on host '{0}' has been reduced. + + + The CPU feature level on host '{0}' has been increased. + + + The CPU feature level on pool '{0}' has been reduced. + + + The CPU feature level on pool '{0}' has been increased. + + + Host CPU features reduced + + + Host CPU features increased + + + Pool CPU features reduced + + + Pool CPU features increased + \ No newline at end of file diff --git a/XenModel/XenAPI/Message.cs b/XenModel/XenAPI/Message.cs index bf01179c1..5c0bf3807 100644 --- a/XenModel/XenAPI/Message.cs +++ b/XenModel/XenAPI/Message.cs @@ -44,7 +44,7 @@ namespace XenAPI /// public partial class Message : XenObject { - 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":