Yeela Kaplan has posted comments on this change.

Change subject: caps: raise if bridge has more than one port
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.ovirt.org/#/c/46321/2/vdsm/caps.py
File vdsm/caps.py:

Line 97:             host_ports = [port for port in attrs['ports'] if
Line 98:                           not port.startswith('vnet')]
Line 99:             if not host_ports:  # Port-less bridge
Line 100:                 continue
Line 101:             if len(host_ports) > 1:
> to keep the original meaning you should test for '== 1'
Done
Line 102:                 raise RuntimeError('bridge with more than one port')
Line 103:             iface, = host_ports
Line 104:         if iface in caps['vlans']:
Line 105:             vlan_id = caps['vlans'][iface]['vlanid']


Line 99:             if not host_ports:  # Port-less bridge
Line 100:                 continue
Line 101:             if len(host_ports) > 1:
Line 102:                 raise RuntimeError('bridge with more than one port')
Line 103:             iface, = host_ports
> now, this defense is not needed anymore so you can just extract hots_ports[
Done
Line 104:         if iface in caps['vlans']:
Line 105:             vlan_id = caps['vlans'][iface]['vlanid']
Line 106:             iface = caps['vlans'][iface]['iface']
Line 107:             iface_qdiscs = qdiscs.get(iface)


-- 
To view, visit https://gerrit.ovirt.org/46321
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I20d4b8b6e3147a29aebcbc7a68b9c92d23aa4307
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Ido Barkan <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Yaniv Bronhaim
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to