[node-patches] Change in ovirt-node[ovirt-3.6]: Revert Sometimes BridgedNIC gets called with a bridge Be sma...
dougsland at redhat.com
dougsland at redhat.com
Tue Jan 12 20:00:28 UTC 2016
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: Revert Sometimes BridgedNIC gets called with a bridge Be smarter
......................................................................
Revert Sometimes BridgedNIC gets called with a bridge Be smarter
This reverts commit 053b216d788964875c73bd8430a74f9742d17bfa.
Let's use the the patchset #4.
Change-Id: I22563235a2f45be0241cfd146a9d298e0f3b2ced
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
(cherry picked from commit f4648a107729877ea98a3b30a4267685bdae098c)
---
M src/ovirt/node/utils/network.py
1 file changed, 2 insertions(+), 21 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/57/51757/1
diff --git a/src/ovirt/node/utils/network.py b/src/ovirt/node/utils/network.py
index 0cde2fe..fa742d0 100755
--- a/src/ovirt/node/utils/network.py
+++ b/src/ovirt/node/utils/network.py
@@ -584,19 +584,12 @@
self.logger.debug(" Has tag")
nic = TaggedNIC(nic, vlanid)
- if layout == "bridged" and not nic.typ == "bridge":
+ if layout == "bridged":
self.logger.debug(" Is bridged")
nic = BridgedNIC(nic)
if nic.typ == "bridge":
- try:
- sifname = Bridges().first_slave_for_bridge(nic.ifname)
- except IndexError:
- # There are no slaves. ;vdsmdummy; ?
- # Leave it with the old behavior so we don't introduce
- # any regressions
- sifname = nic.ifname
- nic = BridgedNIC(sifname)
+ nic = BridgedNIC(nic)
if nic.is_configured() and filter_configured:
# Don not return configured NICs
@@ -876,18 +869,6 @@
raise RuntimeError("Can no delete '%s', is no bridge" % ifname)
process.call(["ip", "link", "set", "dev", ifname, "down"])
process.call(["brctl", "delbr", ifname])
-
- def first_slave_for_bridge(self, ifname):
- try:
- slaves = sorted(os.listdir("/sys/class/net/%s/brif" % ifname))
- slave = slaves[0]
- except IndexError:
- # No slaves. ;vdsmdummy; ?
- # leave snic as it is with the old behavior
- self.logger.info("Couldn't find a slave for BridgedNIC %s" %
- ifname)
- raise
- return slave
class Bonds(base.Base):
--
To view, visit https://gerrit.ovirt.org/51757
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I22563235a2f45be0241cfd146a9d298e0f3b2ced
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
More information about the node-patches
mailing list