cloud-init icon indicating copy to clipboard operation
cloud-init copied to clipboard

Net: add BSD ifconfig(8) parser

Open igalic opened this issue 3 years ago • 0 comments

Proposed Commit Message

Net: add BSD ifconfig(8) parser

This parser covers all 3 main BSDs ifconfig(8) output and will serve
as jumping off point to replicating the /sys reads on Linux.

Sponsored by: FreeBSD Foundation

Additional Context

Test Steps

So far, testing has bee in REPL:

>>> from cloudinit.distros import subp
>>> from cloudinit.distros.parsers import ifconfig
>>> ifc = ifconfig.Ifconfig()
>>> ifc_txt, _err = subp.subp(['ifconfig', '-a'])
>>> ifs =  ifc.parse(ifc_txt)

Checklist:

  • [x] My code follows the process laid out in the documentation
  • [ ] I have updated or added any unit tests accordingly
  • [ ] I have updated or added any documentation accordingly

igalic avatar Oct 10 '22 23:10 igalic