Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: engine_page: display url/port only on availble
......................................................................

engine_page: display url/port only on availble

Do not show URL and PORT on status page if we don't have
these data available.

Change-Id: If2d64a3d0c3530432544afbf3fe8a8155a2698d2
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1057453
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
---
M src/engine_page.py
1 file changed, 8 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node-plugin-vdsm 
refs/changes/21/24421/1

diff --git a/src/engine_page.py b/src/engine_page.py
index 1157289..5d791f0 100644
--- a/src/engine_page.py
+++ b/src/engine_page.py
@@ -54,13 +54,15 @@
         mgmtIface = [nets['ovirtmgmt'].get('iface',
                                            nets['ovirtmgmt']['bridge'])]
 
+
+    if cfg["server"] is None or cfg["port"] is None:
+        engine_data = None
+    else:
+        engine_data = "oVirt Engine http://%s:%s"; % (cfg["server"],
+                                                     cfg["port"])
+
     mgmt = Management()
-    mgmt.update(
-        "oVirt Engine http://%s:%s"; % (cfg["server"],
-                                       cfg["port"]),
-        mgmtIface,
-        None
-    )
+    mgmt.update(engine_data, mgmtIface, None)
 
 
 class Plugin(plugins.NodePlugin):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2d64a3d0c3530432544afbf3fe8a8155a2698d2
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node-plugin-vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to