Commit Graph

5 Commits

Author SHA1 Message Date
Miguel Angel Ajo 20645e4f9a Making sure we're ready for python3
Adds py37 to the env list and switches pep8 python to
python3, including necessary changes to make pylint
and pep8 checks happy in python3:

* Unpins pylint, as 1.4.5 explodes (exception) when trying
  to check our code.

* Unpins flake8-import-order from an old version.

* Stops making use of the builtin cmp function, and replaces
  it with the recommended (a > b) - (a < b).

* Disables one py3 specific warning, since it's still necessary
  for python2 (useless-object-inheritance)

* Removes a non existing argument in netprobe parser (version).

* Inserts an additional blank line between __future__ imports
  and stdlib imports.

Change-Id: If4a45108fe93080f9967e2ac26d681b8dd5c7fc2
2018-10-03 15:10:59 +02:00
Miguel Angel Ajo e518ac9bc7 Add Apache license headers to the .py files
The purpose of this change is to help the licensecheck tool
identifying the license of the sourcecode.

Change-Id: I3cc325e825fefe3c124329d8ab4b10821c9b1676
2018-09-27 10:15:53 +02:00
Miguel Angel Ajo 5193d0010e Setup tox.ini for unit and pep8 testing
This patch includes fixes to all the pep8 warnings.

Change-Id: I4f87e1428258824509d2d83879312a1f0dff0a8a
2018-02-28 23:19:52 +00:00
Miguel Angel Ajo e901627f16 Updated netprobe, and added netprobe.log to auto alias 2016-04-26 10:50:19 -05:00
Miguel Angel Ajo 7eb4f383db Added a new probe: netprobe
This is an standalone .py file that can be uploaded to remote
servers and used to log network packets over network interfaces.

It will discover new interfaces automatically, in the root or
inside network namespaces.

Interfaces and namespaces are filtered via regular expressions.

usage: netprobe [-h] [-v] [--netns-re NETNS_REGEX]
                [--netdev-re NETDEV_REGEX]
                [--tcpdump-filter TCPDUMP_FILTER]
                [--check-interval CHECK_INTERVAL]

This tool will track system network devices as they appear in a host,
and start tcpdump processes for each of them, while the output of all
the tcpdumps goes in a single openstack-like log.

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --netns-re NETNS_REGEX, -n NETNS_REGEX
  --netdev-re NETDEV_REGEX, -d NETDEV_REGEX
  --tcpdump-filter TCPDUMP_FILTER, -t TCPDUMP_FILTER
  --check-interval CHECK_INTERVAL, -i CHECK_INTERVAL
                        The interval between interface checks
2016-04-23 18:53:37 +02:00