Alona Kaplan has posted comments on this change.
Change subject: core: add NetworkLinking support to RunVm command.
......................................................................
Patch Set 17: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsSelector.java
Line 426: if (vmIf.getNetworkName() == null) {
Line 427: found = true;
Line 428: } else {
Line 429: for (final VdsNetworkInterface vdsIf :
allInterfacesForVds) {
Line 430: if (!networkRequiredOnVds(vmIf, networksByName,
onlyRequiredNetworks)
networkRequiredOnVds shouldn't be called in the for loop. The result can be
stored in a variable and reused in the loop.
Line 431: ||
StringUtils.equals(vmIf.getNetworkName(), vdsIf.getNetworkName())) {
Line 432: found = true;
Line 433: break;
Line 434: }
Line 448: private boolean networkRequiredOnVds(VmNetworkInterface vmIface,
Line 449: Map<String, Network> networksByName,
Line 450: boolean onlyRequiredNetworks) {
Line 451: boolean networkRequiredOnVds = true;
Line 452: if (!vmIface.isActive() || vmIface.getNetworkName() == null) {
In this case it is not possible. But I want to keep the method safe in case
that in the future somebody will call it without checking the network name.
Line 453: networkRequiredOnVds = false;
Line 454: } else if (onlyRequiredNetworks) {
Line 455: networkRequiredOnVds =
networksByName.get(vmIface.getNetworkName()).getCluster().isRequired();
Line 456: }
....................................................
File
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java
Line 43: private final static String FIRST_MASTER_MODEL = "ich9-ehci1";
Line 44:
Line 45: private final List<XmlRpcStruct> devices = new
ArrayList<XmlRpcStruct>();
Line 46: private List<VmDevice> managedDevices = null;
Line 47: private final boolean hasNonDefaultBootOrder;
This line was automatically updated by the formatter.
I (you:)) will remove the final. Your proposal is beyond the scope of the patch.
Line 48:
Line 49: public VmInfoBuilder(VM vm, XmlRpcStruct createInfo) {
Line 50: this.vm = vm;
Line 51: this.createInfo = createInfo;
--
To view, visit http://gerrit.ovirt.org/9518
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib9805b18c364685a6533b89cfa31ae0575a00ea5
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Muli Salem <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches