Change in vdsm[master]: Don't down bonds and nics when adding vlan or resizing
asegurap at redhat.com
asegurap at redhat.com
Sat Aug 10 10:54:16 UTC 2013
Antoni Segura Puimedon has posted comments on this change.
Change subject: Don't down bonds and nics when adding vlan or resizing
......................................................................
Patch Set 7:
(1 comment)
....................................................
File lib/vdsm/netinfo.py
Line 223: with open(path) as optFile:
Line 224: optName = os.path.basename(path)
Line 225: for optValue in optFile.read().rstrip().split(' '):
Line 226: opts.append((optName, optValue))
Line 227: return frozenset(opts)
The alternative, I guess, would be to just use a dictionary <string, tuple> and do the
tuple matching like:
d = {'mode': ('broadcast', '3'), 'miimon': '150'}
client code:
bondOpts = [('mode', '3'), ('miimon', '150')]
all(opt[1] in d[opt[0] for opt in bondOpts)
which admittedly is not complicated.
Line 228:
Line 229:
Line 230: def ports(bridge):
Line 231: return os.listdir('/sys/class/net/' + bridge + '/brif')
--
To view, visit http://gerrit.ovirt.org/17491
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id3075a2e65f06416c840c6a98689b77555b22e5d
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Livnat Peer <lpeer at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Petr Ĺ ebek <psebek at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list