SlavePool: ignore non-xml files in pools

The controller would crash if there was a non-xml file in a pool
directory, for example hidden .swp files created by vim. This patch
fixes that by ignoring all non-xml files.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
SlavePool: allow matching of isolated machines

This patch makes it possible to match hosts that have connections not
connected to the rest of the hosts. This also allows for single machine
recipes and isolated (in the context of the recipe) machines.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
PacketAssert: do not process EOF line

When the tcpdump capture is empty and there are no grep_filters available
the processing of dump file will incorrectly report one captured packet.
The fix is to remove empty line that is returned by readline() on EOF
from the processing.

Signed-off-by: Jan Tluka <jtluka@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
RecipePath: Add exists and resolve methods

These two new methods, exists() and resolve() are needed for proper handling
of python tasks if a recipe is specified as URL.

The exists() method returns True if a file or URL exists, False
otherwise.

The resolve() method returns the filename containing the data. In case
of ordinary file nothing special needs to be done. In case of URL, the
file is downloaded and saved in temporary file.

Signed-off-by: Jan Tluka <jtluka@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
NetTestController: fix url handling for python tasks

The python task pathname was not handled properly if recipe was
specified as url, e.g.

lnst-ctl -d run http://example.net/recipe.xml

The fix is to use abstract class RecipePath for python task pathnames in the
recipe.

Signed-off-by: Jan Tluka <jtluka@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
NetTestController: store pcap based on machine id

Gathered pcap files were previously stored in directories named after
machine hostnames with logs. Since then we moved the log files to
directories named after machine ids used in the recipe. This patch moves
the pcap files to the same location.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>