Change in vdsm[master]: netinfo: get an interface using one of IP addresses assgined...

mhuntxu at gmail.com mhuntxu at gmail.com
Mon Jun 3 14:48:12 UTC 2013


Hunt Xu has posted comments on this change.

Change subject: netinfo: get an interface using one of IP addresses assgined to it
......................................................................


Patch Set 3: (2 inline comments)

....................................................
File tests/capsTests.py
Line 85
Line 86
Line 87
Line 88
Line 89
I dropped route_info*.out and move the getIfaceByIP test into netinfoTests.py. The new test is implemented by getting the ip addresses of the active devices on the machine then using netinfo.getIfaceByIP() to check whether the corresponding device returned for each IP in the list.


....................................................
File vdsm/netinfo.py
Line 447:     return mapped
Line 448: 
Line 449: 
Line 450: def getIfaceByIP(ip):
Line 451:     for iface in ethtool.get_active_devices():
Done

It seems that the python-ethtool package in the Fedora 18's official repository doesn't contain this patch, though its version(0.7-4) satisfies the version requirement(>=0.6-3) specified in the spec file.

I (not Fedora expert) am kind of afraid that using the new methods requires newer version of python-ethtool package on Fedora 18. So should Fedora 18 support still be taken into consideration? Because AFAIK F19 is not yet released. If so, we can only change to the new methods when python-ethtool gets updated in F18.

And the IPv4toMapped() function is not redundant. Because when server is listening on '::', socket.getsockname() would return a IPv6 IPv4-mapped address which is not in the list we obtain using the API of ethtool module.
Line 452:         ipaddrs = map(lambda addr: addr.split('/')[0], getipv6addrs(iface))
Line 453:         ipaddrs.append(getaddr(iface))
Line 454:         # also match a IPv4-mapped IPv6 address
Line 455:         ipaddrs.append(IPv4toMapped(ipaddrs[-1]))


--
To view, visit http://gerrit.ovirt.org/11519
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I239f92c527524e5651f51712841c3eafcf659e53
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Hunt Xu <mhuntxu at gmail.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Hunt Xu <mhuntxu at gmail.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky at redhat.com>
Gerrit-Reviewer: Livnat Peer <lpeer at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list