Alon Bar-Lev has uploaded a new change for review.

Change subject: vdsm: bridge: remove unused true always enabled
......................................................................

vdsm: bridge: remove unused true always enabled

Change-Id: I0784d0fdcc89f4774fdc883512d7ee2dafe0b49c
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M src/plugins/ovirt-host-deploy/vdsm/bridge.py
1 file changed, 4 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-host-deploy 
refs/changes/27/10327/1

diff --git a/src/plugins/ovirt-host-deploy/vdsm/bridge.py 
b/src/plugins/ovirt-host-deploy/vdsm/bridge.py
index 224492c..76903ea 100644
--- a/src/plugins/ovirt-host-deploy/vdsm/bridge.py
+++ b/src/plugins/ovirt-host-deploy/vdsm/bridge.py
@@ -505,7 +505,6 @@
     def __init__(self, context):
         super(Plugin, self).__init__(context=context)
         self._enabled = False
-        self._active = False
 
     @plugin.event(
         stage=plugin.Stages.STAGE_INIT,
@@ -524,14 +523,7 @@
         self.command.detect('nmcli')
 
     @plugin.event(
-        stage=plugin.Stages.STAGE_SETUP,
-    )
-    def _setup(self):
-        self._enabled = True
-
-    @plugin.event(
         stage=plugin.Stages.STAGE_INTERNAL_PACKAGES,
-        condition=lambda self: self._enabled,
     )
     def _internal_packages(self):
         self.packager.install(packages=['iproute'])
@@ -540,7 +532,6 @@
         stage=plugin.Stages.STAGE_VALIDATION,
         condition=(
             lambda self: (
-                self._enabled and
                 self.environment[
                     odeploycons.VdsmEnv.MANAGEMENT_BRIDGE_NAME
                 ] is not None
@@ -690,11 +681,11 @@
                 # if any error we stop before performing change
                 self._getVlanMasterDevice(name=interface)
 
-                self._active = True
+                self._enabled = True
 
     @plugin.event(
         stage=plugin.Stages.STAGE_MISC,
-        condition=lambda self: self._active,
+        condition=lambda self: self._enabled,
     )
     def _misc(self):
         if self.services.exists('libvirtd'):
@@ -747,7 +738,7 @@
 
     @plugin.event(
         stage=plugin.Stages.STAGE_TRANSACTION_END,
-        condition=lambda self: self._active,
+        condition=lambda self: self._enabled,
     )
     def _transaction_end(self):
         self.execute(
@@ -761,7 +752,7 @@
 
     @plugin.event(
         stage=plugin.Stages.STAGE_CLOSEUP,
-        condition=lambda self: self._active,
+        condition=lambda self: self._enabled,
     )
     def _closeup(self):
         self.services.startup('network', True)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0784d0fdcc89f4774fdc883512d7ee2dafe0b49c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-host-deploy
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to