From Dan Kenigsberg <dan...@redhat.com>:

Dan Kenigsberg has uploaded a new change for review.

Change subject: move constants.EXT_BRCTL to its sole current user
......................................................................

move constants.EXT_BRCTL to its sole current user

EXT_BRCTL is not going to move anytime soon from /usr/sbin/brctl. This
patch defines this constant inside its sole current user, dummybr.

Change-Id: Icaaf576d5d3456935fa848c04bd65517d09b37ed
Signed-off-by: Dan Kenigsberg <dan...@redhat.com>
---
M configure.ac
M lib/vdsm/constants.py.in
M lib/vdsm/tool/dummybr.py
3 files changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/79717/1

diff --git a/configure.ac b/configure.ac
index 41c7c10..df28741 100644
--- a/configure.ac
+++ b/configure.ac
@@ -323,7 +323,6 @@
 AX_PYTHON_MODULE([six], [fatal], python2)
 
 # External programs (sorted, please keep in order)
-AC_PATH_PROG([BRCTL_PATH], [brctl], [/usr/sbin/brctl])
 AC_PATH_PROG([CAT_PATH], [cat], [/bin/cat])
 AC_PATH_PROG([CHCON_PATH], [chcon], [/bin/chcon])
 AC_PATH_PROG([CHMOD_PATH], [chmod], [/bin/chmod])
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index b6193f6..a0cbe86 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -90,8 +90,6 @@
 #
 # External programs (sorted, please keep in order).
 #
-EXT_BRCTL = '@BRCTL_PATH@'
-
 EXT_CHOWN = '@CHOWN_PATH@'
 
 EXT_DD = '@DD_PATH@'
diff --git a/lib/vdsm/tool/dummybr.py b/lib/vdsm/tool/dummybr.py
index 4356fe1..84a1af7 100644
--- a/lib/vdsm/tool/dummybr.py
+++ b/lib/vdsm/tool/dummybr.py
@@ -22,12 +22,14 @@
 import os
 
 from vdsm.network.api import DUMMY_BRIDGE
-from .. import libvirtconnection, commands, constants
+from .. import libvirtconnection, commands
 from . import expose, ExtraArgsError
+
+EXT_BRCTL = '/usr/sbin/brctl'
 
 
 def createEphemeralBridge(bridgeName):
-    rc, out, err = commands.execCmd([constants.EXT_BRCTL, 'addbr', bridgeName])
+    rc, out, err = commands.execCmd([EXT_BRCTL, 'addbr', bridgeName])
     if rc != 0:
         raise EnvironmentError(
             'Failed to create ephemeral dummy bridge. Err: %s' % err


-- 
To view, visit https://gerrit.ovirt.org/79717
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icaaf576d5d3456935fa848c04bd65517d09b37ed
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <dan...@redhat.com>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to