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 07:46: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)
Darn!!! I had written a big comment in response and it was swallowed by gerrit :'(
Basically, what we have is options='mode=3 miimon=1500' or 'mode=broadcast miimon=1500' but what is on the files is
mode:
broadcast 3
miimon:
1500
So the best way of checking for content on multivalued keys is a frozenset (if mutability is not needed), since you can have:
frozenset(('mode', '3'), ('mode', 'broadcast'), ('miimon', '1500'))
with a dictionary you'd have to either for some keys have a tuple and for some a string
(I don't like when the type of values is different per key), or string keys that you have to split.
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: 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