Mark Wu has posted comments on this change.
Change subject: vdsm: error when creating a bond with more than one network attached
......................................................................
Patch Set 3:
Dan,
Please check the following code snippets
nics = defaultdict(lambda: {'networks':[], 'bonding':None})
'networks' is defined as a list
...
else:
assert 'nic' in networkAttrs
nics[networkAttrs['nic']]['networks'].append( network )
Append an item to the list.
...
for nic, nicAttrs in nics.iteritems():
networks = nicAttrs['networks']
if networks and nicAttrs['bonding']:
raise ConfigNetworkError(ne.ERR_USED_NIC, "Setup attached both network
and bonding to nic %s"%(nic))
if len(networks) > 1:
for network, networkAttrs in networks.iteritems():
^^^^ 'networks' is used as dictionary.
That's why I said it's the same problem existing for one nic attached to one more
networks.
--
To view, visit
http://gerrit.ovirt.org/3010
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ice52835a3a73d48233bd1022f6a8d9d0f381e854
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Danny Rankevich <danny.ran(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Danny Rankevich <danny.ran(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Shahar Havivi <shavivi(a)redhat.com>