Yedidyah Bar David has posted comments on this change.

Change subject: packaging: setup: update firewall for all services
......................................................................


Patch Set 15:

(7 comments)

....................................................
File packaging/setup/ovirt_engine_setup/firewall_manager_base.py
Line 19: from otopi import util
Line 20: 
Line 21: 
Line 22: @util.export
Line 23: class FirewallManagerBase(object):
One of the reasons to do this was to allow adding more managers by external 
plugins. Doesn't this require exposing it?
Line 24: 
Line 25:     def __init__(self, plugin):
Line 26:         self._plugin = plugin
Line 27: 


Line 23: class FirewallManagerBase(object):
Line 24: 
Line 25:     def __init__(self, plugin):
Line 26:         self._plugin = plugin
Line 27: 
Done
Line 28:     @property
Line 29:     def name(self):
Line 30:         raise RuntimeError('Unset')
Line 31: 


....................................................
File packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py
Line 38: from ovirt_engine_setup import util as osetuputil
Line 39: from ovirt_engine_setup import firewall_manager_base
Line 40: 
Line 41: 
Line 42: class IpTablesManager(firewall_manager_base.FirewallManagerBase):
Done
Line 43: 
Line 44:     _SERVICE = 'iptables'
Line 45: 
Line 46:     def __init__(self, plugin):


Line 161:             )
Line 162:         )
Line 163:         self.environment[osetupcons.ConfigEnv.FIREWALL_MANAGERS] = [
Line 164:             FirewalldManager(self),
Line 165:             IpTablesManager(self),
Done
Line 166:         ]
Line 167:         self.environment.setdefault(
Line 168:             osetupcons.NetEnv.FIREWALLD_SERVICES,
Line 169:             []


Line 192:             osetupcons.Stages.DIALOG_TITLES_S_NETWORK,
Line 193:         ),
Line 194:     )
Line 195:     def _customization_is_enabled(self):
Line 196:         self._supported_managers = [
I agree it's somewhat confusing, still not sure how to solve this.

We wanted the SUPPORTED_FIREWALL_MANAGERS also to let downstream have only 
iptables. If you do not want it a string, I understand this means that we'll 
need there not an answer file but a plugin that overwrites FIREWALL_MANAGERS. 
Is that what you want? If so, I think we can drop all the duplication and have 
only the list.
Line 197:             x.strip()
Line 198:             for x in self.environment[
Line 199:                 osetupcons.ConfigEnv.SUPPORTED_FIREWALL_MANAGERS
Line 200:             ].split(',')


Line 208:                     manager.name,
Line 209:                     manager.detect(),
Line 210:                     manager.name in self._supported_managers,
Line 211:                 ),
Line 212:             )
Done
Line 213:             if (
Line 214:                 manager.name in self._supported_managers and
Line 215:                 manager.detect()
Line 216:             ):


Line 459:                     
example=osetupcons.FileLocations.OVIRT_IPTABLES_EXAMPLE
Line 460:                 )
Line 461:             )
Line 462: 
Line 463:         if (
Perhaps, but this becomes larger than I want now. We should probably abstract 
away all of the firewall management, including 
osetupcons.NetEnv.FIREWALLD_SERVICES and stuff, auto-generating the services 
files etc.
Line 464:             osetupcons.Const.FIREWALL_MANAGER_FIREWALLD in
Line 465:             self._supported_managers
Line 466:         ):
Line 467:             commands = []


-- 
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: 15
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yedidyah Bar David <d...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to