Change in vdsm[master]: netinfo: improve which ipv4 addr is reported.
danken at redhat.com
danken at redhat.com
Mon Jul 27 11:21:27 UTC 2015
Dan Kenigsberg has posted comments on this change.
Change subject: netinfo: improve which ipv4 addr is reported.
......................................................................
Patch Set 8: Code-Review-1
(1 comment)
nit
https://gerrit.ovirt.org/#/c/33375/8/lib/vdsm/netlink/addr.py
File lib/vdsm/netlink/addr.py:
Line 63: return addr['address'].split('/')[0], addr['prefixlen']
Line 64:
Line 65:
Line 66: def cidr_form(addr):
Line 67: return '/'.join(str(part) for part in split(addr))
I find
return '%s/%s' % split(addr)
more readable.
Line 68:
Line 69:
Line 70: def is_primary(addr):
Line 71: return 'secondary' not in addr['flags']
--
To view, visit https://gerrit.ovirt.org/33375
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8666cfef5bd8ea63edf8979e501d4785db5f4893
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <toni+ovirt at midokura.com>
Gerrit-Reviewer: Antoni Segura Puimedon <toni+ovirt at midokura.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list