Alon Bar-Lev has posted comments on this change. Change subject: engine: Add conditional execution to host deploy ......................................................................
Patch Set 2: (4 inline comments) I can officially be stated as obsolete... I hate this runtime modifications and such... but I do understand the new generation that is using these. .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsDeploy.java Line 217 Line 218 Line 219 Line 220 Line 221 Can we do something with annotations to reduce this code? Something as: private final Callable<?>[] _customizationDialog = new Callable<?>[] { @DialogEntry({ code }, condition, condition, }, @DialogEntry({ code }, condition, condition, }, } Line 225: private @interface CallWhen { Line 226: /** Line 227: * @return A condition that determines if the customization should run. Line 228: */ Line 229: CustomizationCondition value(); I think we should enable multiple conditions. Line 230: } Line 231: /** Line 232: * A set of conditions under which the conditional customizations should run. Line 233: */ Line 302: }}, Line 303: new Callable<Object>() { public Object call() throws Exception { Line 304: _parser.cliEnvironmentSet( Line 305: NetEnv.IPTABLES_ENABLE, Line 306: _customizationConditions.contains(CustomizationCondition.IPTABLES_OVERRIDE) Add here True and use annotation? Line 307: ); Line 308: return null; Line 309: }}, Line 310: new Callable<Object>() {@CallWhen(CustomizationCondition.IPTABLES_OVERRIDE) Line 412 Line 413 Line 414 Line 415 Line 416 If we do this for customization we should do the same for termination. -- To view, visit http://gerrit.ovirt.org/16849 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I98b4fe7d11cdb267664113ac7312a0cd12268f94 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Mike Kolesnik <mkole...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches