← Back to team overview

cloud-init team mailing list archive

Re: use of network utilities


On 12/19/2017 10:14 AM, Scott Moser wrote:
> The goal is to get off of net-tools (ifconfig and route) and over to 'ip'.
> For freebsd and other things that do not have that, we'll have to keep
> working.
> Ini python3, 'ipaddress'  is built in and we may be able to utilize it, but
> I'm not interested in adding the python2 dependency.

Does that imply that as long we support python2 we should shell out,
i.e. use

if util.which('netstat'):
    return _route_info_from_netstat()
elif util.which('ip'):
    return _route_info_from_ip()

which is the direction I am working on now. I have the device
information collection under control, working on the route information now.

This direction would:
  - avoid adding any new dependency for python2
  - having to differentiate dependencies based on python version
  - handle the freebsd case transparently


Robert Schweikert                   MAY THE SOURCE BE WITH YOU
Distinguished Architect                       LINUX
Team Lead Public Cloud
IRC: robjo

Attachment: signature.asc
Description: OpenPGP digital signature

Follow ups