XmlProcessing: Renaming RecipeParser to LnstParser

The name RecipeParser is ambiguous, because the class is used as base
for both recipe parsers and also slave machine config files.

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
SlaveMachineParse: Moving from NetTestParse

This commit separates the SlaveMachineParser class to its separate
module as it is not related to parsing recipes.

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
NetTestParse: Renaming to RecipeParse

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
lnst-ctl: More XML format changes

This commit introduces (yet again) some more XML format changes. This
time, the <netdevice> and <interface> abstractions were merged together.

Now there is an only description of a machine that looks like this:

    <machine id="1">
        <params>
            <param name="os" value="rhel6.2"/>
        </params>
        <interfaces>
            <interface network="ttnet" id="t1" type="eth">
                <params>
                    <param name="hwaddr" value="52:54:00:2e:d5:a8"/>
                </params>
            </interface>
            <interface network="ttnet" id="t2" type="eth"/>
            <interface id="t3" type="bond">
                <slaves>
                    <slave id="t1"/>
                    <slave id="t2"/>
                </slaves>
                <addresses>
                    <address value="192.168.100.240/24"/>
                </addresses>
            </interface>
        </interfaces>
    </machine>

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
lnst-ctl: Refactoring logging initialisation

This commit contain some cosmetic changes in the interface between the
LoggingCtl class and the NetTestController.

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
NetTestCommand: Adding get_type() method

This commit adds the method get_type() to the NetTestCommand class for
accessing the type of the command in question.

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
NetTestCommandSystemConfig: Modifying result

The results of NetTestCommandSystemConfig to include the information
about the persistence of the values set. This is later used to determine
whether to clean them up or not.

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
Logs: Adding get_recipe_log_path()

This commit adds a new method for accessing the current logging
directory. This is required when copying packet capture files from the
slaves to the controller.

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
Logs: Adding missing 'self'

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
NetTestSlave: Adding system config handling

This commit moves system config handling that used to be done at the
controller to the slaves.

It makes much more sense here, as it can be cleaned up automatically in
case the controller stops responding.

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
lnst-slave: Fixing bug with packet capture

There was a problem with the packet capture feature. The files were
deleted, but not removed from the list, so when you executed a different
test, the slave tried to delete the files again which resulted in an
exception.

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
VirtDomainCtl: Adding TODO Comment

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
NetTestController: Major Refactoring

This big commit contains major refactoring of the internals of the
NetTestController class.

Multiple changes have been done here including the changes in the XML
format. All these changes are very tightly connected so I am sending
them in a single patch.

Much of the code from the NetTestController related to handling slave
machines has been moved to two new classes Machine and Interface.

Another big change was done to the recipe variable within the
NetTestController class that used to contain a variety of values related
to the recipe execution. Right now, it only contains values that have
been parsed out from the recipe file nothing more. The other things were
moved elsewhere.

There were some changes in the system config handling as well. Most of
the functionality was moved to the slaves, so they can now better
control their own configuration (and clean it up in case the controller
becomes irresponsive).

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
smoke-tests: Changing the XML format

The XML format has changed (again) recently. This patch fixes the smoke
tests so they are usable with the new XMLs.

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
SlavePool: libvirt_domain attribute bugfix

I forgot to add a condition while reading the libvirt_domain argument
from the SlavePool XML and therefore an exception was raised in case
the argument was missing.

This should fix the problem

Reported-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
Machine: Fixing copy-paste error

This patch fixes a copy-paste error in the factory method of Machine
for unused interfaces. The parameters were swapped.

Reported-by: Ondrej Lichtner <olichtne@redhat.com>
Signed-off-by: Radek Pazdera <rpazdera@redhat.com>
lnst-ctl: Allow only eth interfaces in pool

This patch restricts putting any other interfaces than eth to the pool
configuration files.

These change required some changes in the error handling. The exceptions
are now logged in the lnst-ctl file directly, so all exceptions comming
from the NetTestController class will be caught.

Signed-off-by: Radek Pazdera <rpazdera@redhat.com>