Mike Kolesnik has posted comments on this change.
Change subject: engine: Added sorting to host NICs query
......................................................................
Patch Set 1: (2 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/GetVdsInterfacesByVdsIdQuery.java
Line 68:
Line 69: Collections.sort(interfaces, new
Comparator<VdsNetworkInterface>() {
Line 70:
Line 71: private boolean isBond(VdsNetworkInterface nic) {
Line 72: return (nic.getBonded() != null && nic.getBonded());
You can check if it's an instance of Bond
Line 73: }
Line 74:
Line 75: private String extractBondName(VdsNetworkInterface nic) {
Line 76: if (isBond(nic)) {
Line 103: return -1;
Line 104: }
Line 105: return compRes;
Line 106: }
Line 107: if (isBond(nic1) != isBond(nic2)) {
How will this condition be true?
Seems to me that the previos code already covers this case.
Line 108: return isBond(nic1) ? -1 : 1;
Line 109: }
Line 110: return LexoNumericComparator.comp(nic1.getName(),
nic2.getName());
Line 111: }
--
To view, visit http://gerrit.ovirt.org/11997
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2cb5b00230d7957dd3375b093e73d2a4a51d72b9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches