Mike Kolesnik has posted comments on this change. Change subject: engine: Extending migrate verb with an additional parameter- "dstqemu" ......................................................................
Patch Set 10: (4 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java Line 150: } Line 151: ExecutionHandler.setAsyncJob(getExecutionContext(), true); Line 152: } Line 153: Line 154: private String getMigrationNetworkIp() { You could have less levels of nesting if you invert the checks and return null in case the check is true, i.e if the migration network feature is not supported, return null. This way, you would have less nesting of control structures inside the code, and the flow will be easier to understand. Line 155: String migrationIp = null; Line 156: Line 157: if (FeatureSupported.migrationNetwork(getVm().getVdsGroupCompatibilityVersion())) { Line 158: Network migrationNetwork = null; Line 151: ExecutionHandler.setAsyncJob(getExecutionContext(), true); Line 152: } Line 153: Line 154: private String getMigrationNetworkIp() { Line 155: String migrationIp = null; This variable is not really necessary, please see the following comments Line 156: Line 157: if (FeatureSupported.migrationNetwork(getVm().getVdsGroupCompatibilityVersion())) { Line 158: Network migrationNetwork = null; Line 159: Line 174: DbFacade.getInstance().getInterfaceDao().getAllInterfacesForVds(getDestinationVds().getId()); Line 175: Line 176: for (VdsNetworkInterface nic : allInterfacesForDstVds) { Line 177: if (migrationNetwork.getName().equals(nic.getNetworkName())) { Line 178: migrationIp = nic.getAddress(); You could simply return the nic ip here. Line 179: break; Line 180: } Line 181: } Line 182: } Line 181: } Line 182: } Line 183: } Line 184: Line 185: return migrationIp; You could simply return null here. Line 186: } Line 187: Line 188: /** Line 189: * command succeeded and VM is up => migration done -- To view, visit http://gerrit.ovirt.org/13064 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic460c2b8ebfb870a610f5816643d9855495dc7b1 Gerrit-PatchSet: 10 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches