Yedidyah Bar David has posted comments on this change.
Change subject: packaging: setup: update firewall for all services
......................................................................
Patch Set 12:
(6 comments)
....................................................
File packaging/setup/plugins/ovirt-engine-setup/network/firewall_manager.py
Line 198: prompt=True,
Line 199: true=_('Yes'),
Line 200: false=_('No'),
Line 201: default=True,
Line 202: )
Done.
Only now I understand that if there are active managers we want to let the user
choose only among them.
Line 203:
Line 204: if (
Line 205: self.environment[osetupcons.ConfigEnv.FIREWALL_MANAGER]
is None and
Line 206: self.environment[osetupcons.ConfigEnv.UPDATE_FIREWALL]
Line 204: if (
Line 205: self.environment[osetupcons.ConfigEnv.FIREWALL_MANAGER]
is None and
Line 206: self.environment[osetupcons.ConfigEnv.UPDATE_FIREWALL]
Line 207: ):
Line 208: if len(available_managers) > 1:
Done
Line 209: self.dialog.note(
Line 210: text=_(
Line 211: 'The following firewall managers were
detected on '
Line 212: 'this system: {managers}\n'
Line 245: if response.lower() == manager.lower():
Line 246: self.environment[
Line 247: osetupcons.ConfigEnv.FIREWALL_MANAGER
Line 248: ] = manager
Line 249: break
The keys/constants we hold are service names, we do not control them. There
might be other managers in the future with upper case letters in their names.
Line 250: elif len(available_managers) == 1:
Line 251: self.environment[
Line 252: osetupcons.ConfigEnv.FIREWALL_MANAGER
Line 253: ] = available_managers[0]
Line 246: self.environment[
Line 247: osetupcons.ConfigEnv.FIREWALL_MANAGER
Line 248: ] = manager
Line 249: break
Line 250: elif len(available_managers) == 1:
Done
Line 251: self.environment[
Line 252: osetupcons.ConfigEnv.FIREWALL_MANAGER
Line 253: ] = available_managers[0]
Line 254: self.dialog.note(
Line 259: osetupcons.ConfigEnv.FIREWALL_MANAGER
Line 260: ],
Line 261: ),
Line 262: )
Line 263:
Unneeded anymore following your instructions above - if there are active
managers we only let the user select among them.
Line 264: if self.environment[osetupcons.ConfigEnv.UPDATE_FIREWALL]:
Line 265: self.environment[otopicons.NetEnv.IPTABLES_ENABLE] = (
Line 266: self.environment[
Line 267: osetupcons.ConfigEnv.FIREWALL_MANAGER
Line 270: self.environment[otopicons.NetEnv.FIREWALLD_ENABLE] = (
Line 271: self.environment[
Line 272: osetupcons.ConfigEnv.FIREWALL_MANAGER
Line 273: ] == osetupcons.Const.FIREWALL_MANAGER_FIREWALLD
Line 274: )
Following your instructions above, separated to two events, the later one runs
only if UPDATE.
Line 275:
Line 276: @plugin.event(
Line 277: stage=plugin.Stages.STAGE_VALIDATION,
Line 278: name=osetupcons.Stages.NET_FIREWALL_MANAGER_PROCESS_TEMPLATES,
--
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: 12
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