Idan Shaby has uploaded a new change for review. Change subject: core: New Error Message for an IDE Hot Plug ......................................................................
core: New Error Message for an IDE Hot Plug Hot plugging a disk to an IDE interface is currently not supported at all (by any OS). Thus, the previous error message saying that the guest OS version is not supported is irrelevant. Change-Id: I10acfe04f2089708de7212b179d5e3d71edb4a12 Bug-Url: https://bugzilla.redhat.com/1126547 Signed-off-by: Idan Shaby <ish...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommandTest.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties 7 files changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/67/35467/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java index 31fcab1..8e91fd1 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java @@ -482,6 +482,11 @@ * @return */ protected boolean isDiskSupportedForPlugUnPlug(Disk disk) { + if (disk.getDiskInterface() == DiskInterface.IDE) { + addCanDoActionMessageVariable("diskAlias", disk.getDiskAlias()); + addCanDoActionMessageVariable("vmName", getVm().getName()); + return failCanDoAction(VdcBllMessages.HOT_PLUG_IDE_DISK_IS_NOT_SUPPORTED); + } Set<String> diskHotpluggableInterfaces = osRepository.getDiskHotpluggableInterfaces(getVm().getOs(), getVm().getVdsGroupCompatibilityVersion()); diff --git a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommandTest.java b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommandTest.java index 0b16f22..3a3acc3 100644 --- a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommandTest.java +++ b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommandTest.java @@ -154,7 +154,7 @@ assertFalse(command.canDoAction()); assertTrue(command.getReturnValue() .getCanDoActionMessages() - .contains(VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED.toString())); + .contains(VdcBllMessages.HOT_PLUG_IDE_DISK_IS_NOT_SUPPORTED.toString())); } @Test diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java index 2c8738c..2eccb54 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java @@ -784,6 +784,7 @@ HOT_UNPLUG_CPU_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED), UNLINKING_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED), HOT_PLUG_DISK_SNAPSHOT_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED), + HOT_PLUG_IDE_DISK_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED), NULL_NETWORK_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED), ACTION_TYPE_FAILED_NETWORK_QOS_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED), ACTION_TYPE_FAILED_HOST_NETWORK_QOS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED), diff --git a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties index d14e990..3ed11f5 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -965,6 +965,7 @@ HOT_PLUG_CPU_IS_NOT_SUPPORTED=Hot plugging a CPU is not supported for cluster version ${clusterVersion} and architecture ${architecture}. HOT_UNPLUG_CPU_IS_NOT_SUPPORTED=Hot un-plugging a CPU is not supported for cluster version ${clusterVersion} and architecture ${architecture}. HOT_PLUG_DISK_SNAPSHOT_IS_NOT_SUPPORTED=Cannot ${action} ${type}. Activation/Deactivation of Disk Snapshot is not supported for clusters of version ${clusterVersion}. +HOT_PLUG_IDE_DISK_IS_NOT_SUPPORTED=Cannot ${action} ${diskAlias} to ${vmName}.\nHot plugging a disk to an IDE interface is not supported. UNLINKING_IS_NOT_SUPPORTED=Cannot ${action} ${type}. Link state is set to 'Down' on the virtual machine's interface, this is not supported for clusters of version ${clusterVersion}. NULL_NETWORK_IS_NOT_SUPPORTED=Cannot ${action} ${type}. There is no network on the virtual machine's interface, this is not supported for clusters of version ${clusterVersion}. ACTION_TYPE_FAILED_NETWORK_QOS_IS_NOT_SUPPORTED=Cannot ${action} ${type}. There is Network QoS on the profile, this is not supported for clusters of version ${clusterVersion}. diff --git a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java index 37cde6e..bf56b64 100644 --- a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java +++ b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java @@ -2603,6 +2603,9 @@ @DefaultStringValue("Cannot ${action} ${type}. Activation/Deactivation of Disk Snapshot is not supported for clusters of version ${clusterVersion}.") String HOT_PLUG_DISK_SNAPSHOT_IS_NOT_SUPPORTED(); + @DefaultStringValue("Cannot ${action} ${diskAlias} to ${vmName}.\nHot plugging a disk to an IDE interface is not supported.") + String HOT_PLUG_IDE_DISK_IS_NOT_SUPPORTED(); + @DefaultStringValue("Cannot ${action} ${type}. Link state is set to 'Down' on the virtual machine's interface, this is not supported for clusters of version ${clusterVersion}.") String UNLINKING_IS_NOT_SUPPORTED(); diff --git a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties index 06d22b5..1abf804 100644 --- a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties +++ b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties @@ -907,6 +907,7 @@ HOT_PLUG_CPU_IS_NOT_SUPPORTED=Hot plugging a CPU is not supported for cluster version ${clusterVersion} and architecture ${architecture}. HOT_UNPLUG_CPU_IS_NOT_SUPPORTED=Hot un-plugging a CPU is not supported for cluster version ${clusterVersion} and architecture ${architecture}. HOT_PLUG_DISK_SNAPSHOT_IS_NOT_SUPPORTED=Cannot ${action} ${type}. Activation/Deactivation of Disk Snapshot is not supported for clusters of version ${clusterVersion}. +HOT_PLUG_IDE_DISK_IS_NOT_SUPPORTED=Cannot ${action} ${diskAlias} to ${vmName}.\nHot plugging a disk to an IDE interface is not supported. UNLINKING_IS_NOT_SUPPORTED=Cannot ${action} ${type}. Link state is set to 'Down' on the virtual machine's interface, this is not supported for clusters of version ${clusterVersion}. NULL_NETWORK_IS_NOT_SUPPORTED=Cannot ${action} ${type}. There is no network on the virtual machine's interface, this is not supported for clusters of version ${clusterVersion}. ACTION_TYPE_FAILED_NETWORK_QOS_IS_NOT_SUPPORTED=Cannot ${action} ${type}. There is Network QoS on the profile, this is not supported for clusters of version ${clusterVersion}. diff --git a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties index f0071b6..6b1b1bd 100644 --- a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties +++ b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties @@ -960,6 +960,7 @@ HOT_PLUG_CPU_IS_NOT_SUPPORTED=Hot plugging a CPU is not supported for cluster version ${clusterVersion} and architecture ${architecture}. HOT_UNPLUG_CPU_IS_NOT_SUPPORTED=Hot un-plugging a CPU is not supported for cluster version ${clusterVersion} and architecture ${architecture}. HOT_PLUG_DISK_SNAPSHOT_IS_NOT_SUPPORTED=Cannot ${action} ${type}. Activation/Deactivation of Disk Snapshot is not supported for clusters of version ${clusterVersion}. +HOT_PLUG_IDE_DISK_IS_NOT_SUPPORTED=Cannot ${action} ${diskAlias} to ${vmName}.\nHot plugging a disk to an IDE interface is not supported. UNLINKING_IS_NOT_SUPPORTED=Cannot ${action} ${type}. Link state is set to 'Down' on the virtual machine's interface, this is not supported for clusters of version ${clusterVersion}. NULL_NETWORK_IS_NOT_SUPPORTED=Cannot ${action} ${type}. There is no network on the virtual machine's interface, this is not supported for clusters of version ${clusterVersion}. ACTION_TYPE_FAILED_NETWORK_QOS_IS_NOT_SUPPORTED=Cannot ${action} ${type}. There is Network QoS on the profile, this is not supported for clusters of version ${clusterVersion}. -- To view, visit http://gerrit.ovirt.org/35467 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10acfe04f2089708de7212b179d5e3d71edb4a12 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Idan Shaby <ish...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches