[node-patches] Change in ovirt-node[master]: Sometimes BridgedNIC gets called with a bridge. Be smarter

fabiand at redhat.com fabiand at redhat.com
Mon Jan 11 15:58:31 UTC 2016


Fabian Deutsch has posted comments on this change.

Change subject: Sometimes BridgedNIC gets called with a bridge. Be smarter
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/51560/1/src/ovirt/node/utils/network.py
File src/ovirt/node/utils/network.py:

Line 357:     slave_nic = None
Line 358: 
Line 359:     def __init__(self, snic, master=False):
Line 360:         super(BridgedNIC, self).__init__(snic.ifname)
Line 361:         if master:
Please move this logic out of the constructor, at best before the instantiation in line 601+
Line 362:             try:
Line 363:                 slave = os.listdir("/sys/class/net/%s/brif" % snic.ifname)[0]
Line 364:                 snic = NIC(slave)
Line 365:             except IndexError:


Line 358: 
Line 359:     def __init__(self, snic, master=False):
Line 360:         super(BridgedNIC, self).__init__(snic.ifname)
Line 361:         if master:
Line 362:             try:
This block should go into the ovirt.node.utils.network.Bridges class
Line 363:                 slave = os.listdir("/sys/class/net/%s/brif" % snic.ifname)[0]
Line 364:                 snic = NIC(slave)
Line 365:             except IndexError:
Line 366:                 # No slaves. ;vdsmdummy; ?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e99a015ff5904bfccd4c0d1655d5489776a28dd
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes



More information about the node-patches mailing list