Sandro Bonazzola has uploaded a new change for review.

Change subject: tools: engine-setup - fixed installation messages
......................................................................

tools: engine-setup - fixed installation messages

Display instructions for configuring iptables and firewalld
only if they're available on the system.
(cherry picked from commit 58a18304f56270a7c3bb31245319f6af2a8c9e38)

Change-Id: I89964bc30c275a29428abef06d07b7a8911ee211
Bug-Url: https://bugzilla.redhat.com/921079
Signed-off-by: Sandro Bonazzola <sbona...@redhat.com>
---
M packaging/fedora/setup/engine-setup.py
1 file changed, 19 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/21/13321/1

diff --git a/packaging/fedora/setup/engine-setup.py 
b/packaging/fedora/setup/engine-setup.py
index 19d6915..cf22d96 100755
--- a/packaging/fedora/setup/engine-setup.py
+++ b/packaging/fedora/setup/engine-setup.py
@@ -939,6 +939,7 @@
 
     return firewalls
 
+
 def _configFirewall():
     # Create Sample configuration files
     _createIptablesConfig()
@@ -951,9 +952,24 @@
         _configureIptables()
     else:
         # Inform user how he can configure firewall
-        controller.MESSAGES.append(output_messages.INFO_IPTABLES_PORTS % 
(controller.CONF["HTTP_PORT"], controller.CONF["HTTPS_PORT"]))
-        controller.MESSAGES.append(output_messages.INFO_IPTABLES_FILE % 
(basedefs.FILE_IPTABLES_EXAMPLE))
-        controller.MESSAGES.append(output_messages.INFO_FIREWALLD_INSTRUCTIONS)
+        firewalls = getFirewalls()
+        if 'iptables' in firewalls:
+            controller.MESSAGES.append(
+                output_messages.INFO_IPTABLES_PORTS % (
+                    controller.CONF["HTTP_PORT"],
+                    controller.CONF["HTTPS_PORT"],
+                )
+            )
+            controller.MESSAGES.append(
+                output_messages.INFO_IPTABLES_FILE % (
+                    basedefs.FILE_IPTABLES_EXAMPLE,
+                )
+            )
+        if 'Firewalld' in firewalls:
+            controller.MESSAGES.append(
+                output_messages.INFO_FIREWALLD_INSTRUCTIONS
+            )
+
 
 def _createFirewalldConfig():
     logging.debug("Creating firewalld configuration")


--
To view, visit http://gerrit.ovirt.org/13321
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I89964bc30c275a29428abef06d07b7a8911ee211
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: engine_3.2
Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to