Greg Padgett has uploaded a new change for review.

Change subject: broker: check status of network bridge
......................................................................

broker: check status of network bridge

The bridge status submonitor used to only check for the existence of a
network bridge.  Now, it will also check to see if there are any ports
associated with the bridge.

Change-Id: I24a18e729df30440411fbfeeb8cfbdb564dec29e
Bug-Url: https://bugzilla.redhat.com/??????
Signed-off-by: Greg Padgett <[email protected]>
---
M ovirt_hosted_engine_ha/broker/submonitors/mgmt_bridge.py
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-ha 
refs/changes/02/20602/1

diff --git a/ovirt_hosted_engine_ha/broker/submonitors/mgmt_bridge.py 
b/ovirt_hosted_engine_ha/broker/submonitors/mgmt_bridge.py
index 7490dc2..be8a4c0 100644
--- a/ovirt_hosted_engine_ha/broker/submonitors/mgmt_bridge.py
+++ b/ovirt_hosted_engine_ha/broker/submonitors/mgmt_bridge.py
@@ -52,9 +52,12 @@
 
         if ('bridges' in response['info']
                 and self._bridge in response['info']['bridges']):
-            # FIXME check status of bridge?
-            self._log.info("Found bridge %s", self._bridge)
-            self.update_result(True)
+            if response['info']['bridges'][self._bridge]['ports']:
+                self._log.info("Found bridge %s with ports", self._bridge)
+                self.update_result(True)
+            else:
+                self._log.info("Found bridge %s with no ports", self._bridge)
+                self.update_result(False)
         else:
             self._log.info("Bridge %s not found", self._bridge)
             self.update_result(False)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24a18e729df30440411fbfeeb8cfbdb564dec29e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-hosted-engine-ha
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to