Yedidyah Bar David has posted comments on this change. Change subject: packaging: setup: update firewall for all services ......................................................................
Patch Set 22: (3 comments) .................................................... File packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py Line 96: if ( Line 97: manager.name in valid_managers or Line 98: not manager.selectable() Line 99: ): Line 100: filtered_managers.append(manager) In a previous patchset I did here .remove directly on the list while looping over it. This caused a bug - 'for' skipped the item after the one that was removed. So I now create a new list and replace. This has the added advantage that otopi logs the new list - current otopi's code checks equality in a shallow way, and if an environment item is itself a list, whose contents change in some method, otopi won't notice, because the list object itself didn't change. I noted myself to solve this, not urgent... Line 101: self.environment[ Line 102: osetupcons.ConfigEnv.FIREWALL_MANAGERS Line 103: ] = filtered_managers Line 104: Line 230: def _process_templates(self): Line 231: for manager in self.environment[ Line 232: osetupcons.ConfigEnv.FIREWALL_MANAGERS Line 233: ]: Line 234: manager.prepare() .prepare currently prepares examples and content for .print_manual_configuration_instructions . We might need a better name Line 235: Line 236: if self._enabled: Line 237: if self.environment[ Line 238: osetupcons.ConfigEnv.FIREWALL_MANAGER Line 250: m for m in self._available_managers Line 251: if m.name == self.environment[ Line 252: osetupcons.ConfigEnv.FIREWALL_MANAGER Line 253: ] Line 254: ).enable() Note that this runs right after verifying that it's indeed found in _available_managers, so no need for ', None' or checking that it worked. Line 255: Line 256: @plugin.event( Line 257: stage=plugin.Stages.STAGE_CLOSEUP, Line 258: before=( -- To view, visit http://gerrit.ovirt.org/20737 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If3c1a634b2e8539ebd604205b5487290c8d8a1a9 Gerrit-PatchSet: 22 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yedidyah Bar David <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Ofer Schreiber <[email protected]> Gerrit-Reviewer: Sandro Bonazzola <[email protected]> Gerrit-Reviewer: Yedidyah Bar David <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
