Liron Ar has posted comments on this change. Change subject: engine: Check for conflicting address when hotplugging a disk ......................................................................
Patch Set 9: (1 comment) http://gerrit.ovirt.org/#/c/26598/9/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java: Line 147: * Clear the device address if a device is being hot plugged and its stored address is already in use by another Line 148: * plugged device Line 149: **/ Line 150: private void clearAddressAlreadyInUse() { Line 151: if (oldVmDevice.getIsPlugged() || StringUtils.isBlank(oldVmDevice.getAddress())) { won't we always get ""? so there's no reason to add dependency on string utils but we can compare ourselves. regardless, isEmpty would be better than isBlank as we don't suppose to have space there. Line 152: return; Line 153: } Line 154: List<VmDevice> devices = getVmDeviceDao().getVmDeviceByVmIdAndAddress(getVmId(), oldVmDevice.getAddress()); Line 155: for (VmDevice device : devices) { -- To view, visit http://gerrit.ovirt.org/26598 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id5850fd4c15a230dbc27e8c22d47935083da21c2 Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Xavi Francisco <xfran...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Xavi Francisco <xfran...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches