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 <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Fabian Deutsch <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ryan Barry <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
node-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/node-patches

Reply via email to