Mike Kolesnik has posted comments on this change. Change subject: core+webadmin: reordering VM NICs ......................................................................
Patch Set 7: (3 comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/RemoveVmInterfaceCommand.java Line 71: return false; Line 72: } Line 73: Line 74: VmDynamic vm = getVmDynamicDao().get(getParameters().getVmId()); Line 75: if (vm.getStatus() != VMStatus.Down && vm.getStatus() != VMStatus.ImageLocked Not sure how is this related.. Line 76: && getDbFacade().getVmDeviceDao() Line 77: .get(new VmDeviceId(getParameters().getInterfaceId(), getParameters().getVmId())) Line 78: .getIsPlugged()) { Line 79: addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_ACTIVE_DEVICE); .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/ReorderVmNicsCommand.java Line 16: import java.util.HashMap; Line 17: import java.util.List; Line 18: import java.util.Map; Line 19: Line 20: public class ReorderVmNicsCommand<T extends VmOperationParameterBase> extends VmCommand<T> { You should probably grab a lock on the VM to prevent it from being snapshot at this time. Line 21: Line 22: public ReorderVmNicsCommand(T parameters) { Line 23: super(parameters); Line 24: } Line 66: nicsToReorder.add(nic); Line 67: // We know that all the NICs have a MAC address Line 68: macsToReorder.add(nic.getMacAddress()); Line 69: } Line 70: } Please add newline Line 71: // Sorting the NICs to reorder by name Line 72: Collections.sort(nicsToReorder, new Comparator<VmNic>() { Line 73: @Override Line 74: public int compare(VmNic nic1, VmNic nic2) { -- To view, visit http://gerrit.ovirt.org/22512 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d02e3eff9466d9094bc16cd489503d25c9f4bef Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Livnat Peer <lp...@redhat.com> Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> 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