[node-patches] Change in ovirt-node[master]: Catch already selected disks in "Other Devices" in installation

rbarry at redhat.com rbarry at redhat.com
Thu Jun 26 15:49:24 UTC 2014


Ryan Barry has uploaded a new change for review.

Change subject: Catch already selected disks in "Other Devices" in installation
......................................................................

Catch already selected disks in "Other Devices" in installation

Check whether or not the entered device has already been selected
in the table on the installation page, so we cannot end up in a
state where the same disk is present in the list of devices to
install to multiple times.

Change-Id: Iee4d32c94f5906c33b353aef45180fcc3eb594de
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1113026
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/installer/core/installation_device_page.py
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/97/29297/1

diff --git a/src/ovirt/node/installer/core/installation_device_page.py b/src/ovirt/node/installer/core/installation_device_page.py
index 191ab0b..0e5e24b 100644
--- a/src/ovirt/node/installer/core/installation_device_page.py
+++ b/src/ovirt/node/installer/core/installation_device_page.py
@@ -141,6 +141,12 @@
                         changes["installation.device.custom"]):
                 raise exceptions.InvalidData("Can't be the same as " +
                                              "the live device")
+            elif self.storage_discovery.devices.translate_device_name(
+                    changes["installation.device.custom"]) in \
+                    self.widgets["installation.device.current"].selection():
+                raise exceptions.InvalidData("%s is already selected" %
+                                             changes[
+                                                 "installation.device.custom"])
             else:
                 self._model.update(changes)
 


-- 
To view, visit http://gerrit.ovirt.org/29297
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee4d32c94f5906c33b353aef45180fcc3eb594de
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list