Alon Bar-Lev has posted comments on this change.
Change subject: HostGeneralModel: improve "node has upgrade" logic
......................................................................
Patch Set 8: (3 inline comments)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
Line 670: boolean alert = false;
Line 671:
Line 672: for (RpmVersion iso: isos) {
Line 673: if (iso.getMajor() == hostOs.getMajor() &&
Line 674: iso.compareTo(hostOs) != 0) {
why have you changed the > to != ?
Line 675: alert = true;
Line 676: break;
Line 677: }
Line 678: }
Line 1092: ArrayList<RpmVersion> isos =
(ArrayList<RpmVersion>) returnValue;
Line 1093: if (isos.size() > 0)
Line 1094: {
Line 1095: VDS vds =
hostGeneralModel.getEntity();
Line 1096: String [] host =
vds.getHostOs().split("-"); //$NON-NLS-1$ //$NON-NLS-2$
I still think we should fix the RpmVersion, drop the regexp, and make it usable.
Line 1097: StringBuilder NodeRPMVersion = new
StringBuilder();
Line 1098: hostGeneralModel.setHasUpgradeAlert(
Line 1099: shouldAlertUpgrade(
Line 1100: isos,
Line 1098: hostGeneralModel.setHasUpgradeAlert(
Line 1099: shouldAlertUpgrade(
Line 1100: isos,
Line 1101: new Version(
Line 1102: new
StringBuilder(NodeRPMVersion).append(
why another string builder?
can be new StringBuilder().append("x").append("y"), but why not using
String.format() ?
Line 1103: host[1].trim()
Line 1104: ).append(".").append(
//$NON-NLS-1$ //$NON-NLS-2$
Line 1105:
host[2].split("\\.")[0].trim() //$NON-NLS-1$ //$NON-NLS-2$
Line 1106: ).toString()
--
To view, visit http://gerrit.ovirt.org/16089
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I49c74d3d0d92c74848e0c175095610b6e6b5a88e
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches