From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: network: isolate libnl bindings, link functions
......................................................................
Patch Set 21: Code-Review-1
(1 comment)
https://gerrit.ovirt.org/#/c/77193/21/lib/vdsm/network/netlink/link.py
File lib/vdsm/network/netlink/link.py:
Line 90: info['address'] = libnl.nl_addr2str(address) if address else None
Line 91: info['flags'] = libnl.rtnl_link_get_flags(link)
Line 92: info['index'] = libnl.rtnl_link_get_ifindex(link)
Line 93: info['mtu'] = libnl.rtnl_link_get_mtu(link)
Line 94: info['name'] = libnl.rtnl_link_get_name(link)
now that info['name'] is a unicode string (rather than a byte string) we need to
encode it to utf8 when looking under /sys/class/net
15:22:46 File
"/home/jenkins/workspace/vdsm_master_check-patch-fc25-x86_64/vdsm/lib/vdsm/network/netinfo/bridges.py",
line 35, in ports
15:22:46 if os.path.isdir(brif_path):
15:22:46 File
"/home/jenkins/workspace/vdsm_master_check-patch-fc25-x86_64/vdsm/.tox/tests/lib64/python2.7/genericpath.py",
line 49, in isdir
15:22:46 st = os.stat(s)
15:22:46 UnicodeEncodeError: 'ascii' codec can't encode characters in position
15-17: ordinal not in range(128)
Line 95: info['qdisc'] = libnl.rtnl_link_get_qdisc(link)
Line 96: info['state'] = _link_state(link)
Line 97:
Line 98: link_type = libnl.rtnl_link_get_type(link)
--
To view, visit
https://gerrit.ovirt.org/77193
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I66e009d97b123602f047a17f283a8c776bda1dcc
Gerrit-PatchSet: 21
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horacek <phoracek(a)redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes