Change in vdsm[master]: bootstrap: node id: consider bonding MAC addresses as well

danken at redhat.com danken at redhat.com
Thu Aug 30 09:41:57 UTC 2012


Dan Kenigsberg has posted comments on this change.

Change subject: bootstrap: node id: consider bonding MAC addresses as well
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)

....................................................
File vdsm_reg/deployUtil.py.in
Line 307:             readline().replace("\n", "")
Line 308:         macs.append(mac)
Line 309: 
Line 310:     for b in glob.glob('/proc/net/bonding/*'):
Line 311:         lines = file(b).readlines()
I find this code a bit too complicated for our needs. how about

 for line in file(b)
    if line.startswith("Permanent HW addr: "):
       macs.append(line.split(": ")[1].replace("\n", ""))

 return set(macs) - set(["", "00:00:00:00:00:00"])
Line 312:         try:
Line 313:             line = (string for i, string in enumerate(lines) \
Line 314:                 if "Permanent HW addr: " in string).next()
Line 315:             macs.append(line.split(": ")[1].replace("\n", ""))


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iae0713f95c25e3e05b24bf8254499e4cd8e64d10
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list