Change in vdsm[master]: Use 'ip link' to get different kinds of interfaces

asegurap at redhat.com asegurap at redhat.com
Fri Apr 12 07:51:08 UTC 2013


Antoni Segura Puimedon has posted comments on this change.

Change subject: Use 'ip link' to get different kinds of interfaces
......................................................................


Patch Set 9: (2 inline comments)

Minor comments.

....................................................
File lib/vdsm/netinfo.py
Line 64:         name = match.group('name')
Line 65:         ifaceType = match.group('type')
Line 66:         link = match.group('link')
Line 67:         if ifaceType:
Line 68:             if ifaceType == 'tun' or ifaceType == 'dummy':
This is nitpicking, but I would prefer the check to be more succinct like:
if ifaceType in ('tun', 'dummy')
Line 69:                 ifaceType = 'fake'
Line 70:             interfaces[ifaceType].append(name)
Line 71:         elif link == 'ether':
Line 72:             interfaces['nic'].append(name)


....................................................
File vdsm/neterrors.py
Line 32: 
Line 33: ERR_FAILED_IPLINK = 50
Line 34: 
Line 35: 
Line 36: class FetchNetworkError(Exception):
I think that it could potentially be used for more things in NetInfo. Maybe we could use a more general name for this Error. Something like:
NetInfoFetchingError or NetInfoError.

But I'm not too adamant on this.
Line 37:     def __init__(self, errCode, message):
Line 38:         self.errCode = errCode
Line 39:         self.message = message


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iecc2300963fe1834defb99f5be92b25c0218cf00
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list