From Dan Kenigsberg <[email protected]>:

Dan Kenigsberg has posted comments on this change.

Change subject: net: Expose an existing bug in network restoration
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/72313/2/lib/vdsm/network/libvirt.py
File lib/vdsm/network/libvirt.py:

Line 133: def is_libvirt_network(netname):
Line 134:     conn = libvirtconnection.get()
Line 135:     libvirt_nets = conn.listAllNetworks()
Line 136:     netname = LIBVIRT_NET_PREFIX + netname
Line 137:     return bool(next((n for n in libvirt_nets if n.name() == 
netname), None))
Isn't it a bit too complex? why not

  conn.networkLookupByName()

or

  any(n.name() == netname for n in libvirt_nets)
Line 138: 
Line 139: 
Line 140: def is_libvirt_device(device):
Line 141:     try:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifad0c04df9a36fba43ee678bbec4f3500b6a98ec
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Edward Haas <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to