Mike Kolesnik has posted comments on this change. Change subject: engine: Import VM configure the vnic profile ......................................................................
Patch Set 15: Code-Review+2 (2 comments) Basically the code should be working, but the loop design is weird and can be simplified IMHO so please look and tell me what you think. This can be fixed in later patch, not necessarily this one.. .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java Line 1089: iface.setVnicProfileId(vnicProfile.getId()); Line 1090: } Line 1091: Line 1092: addVnic(vmInterfaceManager, iface); Line 1093: continue; Basically you can still have addVnic call in the end, just set the profile ID if the profile is not null.. Then no need for all these continues, if you encounter an invalid situation just "mark invalid" later don't go further if previous step failed (can have some sort of marker variable for this, if you don't want to use "else" clause) Line 1094: } Line 1095: Line 1096: iface.setVnicProfileId(vnicProfile.getId()); Line 1097: addVnic(vmInterfaceManager, iface); Line 1094: } Line 1095: Line 1096: iface.setVnicProfileId(vnicProfile.getId()); Line 1097: addVnic(vmInterfaceManager, iface); Line 1098: continue; Either way, this continue is redundant Line 1099: } Line 1100: Line 1101: auditInvalidInterfaces(invalidNetworkNames, invalidIfaceNames); Line 1102: } -- To view, visit http://gerrit.ovirt.org/17440 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I890a214e879c740dd1dbdebca25529786231cbd6 Gerrit-PatchSet: 15 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Mike Kolesnik <mkole...@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