Muli Salem has posted comments on this change. Change subject: core: Block Hotplug Nic in Certain Vm States (#826931) ......................................................................
Patch Set 1: (3 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugUnplugVmNicCommand.java Line 32: if (isVmUpDownOrPoweringUp(getVm().getstatus())) { Line 33: setVdsId(getVm().getrun_on_vds().getValue()); Line 34: returnValue = isHotPlugSupported() && isOSSupportingHotPlug(); Line 35: } else { Line 36: addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL); Done Line 37: returnValue = false; Line 38: } Line 39: Line 40: if (returnValue) { Line 78: VdcBllMessages.VAR__ACTION__ACTIVATE : VdcBllMessages.VAR__ACTION__DEACTIVATE); Line 79: addCanDoActionMessage(VdcBllMessages.VAR__TYPE__INTERFACE); Line 80: } Line 81: Line 82: private boolean isVmUpDownOrPoweringUp(VMStatus vmStatus) { Done Line 83: return vmStatus == VMStatus.Up || vmStatus == VMStatus.Down || vmStatus == VMStatus.PoweringUp; Line 84: } Line 79: addCanDoActionMessage(VdcBllMessages.VAR__TYPE__INTERFACE); Line 80: } Line 81: Line 82: private boolean isVmUpDownOrPoweringUp(VMStatus vmStatus) { Line 83: return vmStatus == VMStatus.Up || vmStatus == VMStatus.Down || vmStatus == VMStatus.PoweringUp; When user presses activate/deactivate on a nic, HotPlug...Command is called (We should consider renaming the command). This is allowed when Vm is down. The difference is that the interface itself will be activated only when the Vm will be started. Line 84: } -- To view, visit http://gerrit.ovirt.org/7176 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id759ca8152b455047c9c83447f526aaccdd77d6c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Muli Salem <msa...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Muli Salem <msa...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches