Skip to content

Slave Description XML Format

Ondrej Lichtner edited this page Nov 6, 2016 · 7 revisions

Test machine configuration, i.e., <slavemachine> tag, contains all the information the LNST controller needs to know about the individual slave machines in order to perform the test.

At the moment this includes things such as a hostname, list of interfaces, libvirt_domain etc. These information describe a single machine that you have available for testing. Additionally you can specify any information you view as important using the <param> tags that accept any name: value combination, with a few exceptions that are recognized by LNST.

The convention is to create a machine pool that contains files each containing one machine configuration. LNST will then be able to use this machine pool to automatically match machines specified in a recipe.

1. Slavemachine

This is the parent tag of the entire machine configuration.

The difference of this tag compared to the <host> tag in <lnstrecipe> is that here the children elements are required so that LNST can use the machine properly.

ELEMENT: <slavemachine>
Parent tag of the machine configuration
Attributes Required: None
Optional: None
Children Required: <params>
<interfaces>
Optional: <security>

1.1 Machine parameters

This tag is very similar to the host <params> tag in the <lnstrecipe>, but it's mandatory to provide one parameter with name hostname. The value of this parameter is an IP address or a hostname that will be used to connect to the test machine.

There are more predefined parameters described below. LNST framework allows you to use your own parameters that match your needs. This way you can save the information about operating system, architecture, available memory, etc. See an example below.

ELEMENT: <params>
Machine parameter list
Attributes Required: None
Optional: None
Children Required: None
Optional: <param>
ELEMENT: <param>
Machine parameter definition
Attributes Required: [string] name: parameter name
[string] value: parameter value
Optional: None
Children Required: None
Optional: None

LNST provides following parameters that modify the framework behaviour.

[string] libvirt_domain: specifies that this host is actually a virtual guest
[int] rpc_port: specifies the RPC port that's used for controller-slave xmlrpc communication
Example

Following snippet is the minimum you need to provide.

<params>
    <param name="hostname" value="192.168.100.2"/>
</params>

In case you are using different port for RPC, e.g. 12121 you have to add this inoformation as shown in the next example.

<params>
    <param name="hostname" value="192.168.100.2"/>
    <param name="rpc_port" value="12121"/>
</params>

Following is an example of a virtual test machine.

<params>
    <param name="hostname" value="192.168.100.2"/>
    <param name="libvirt_domain" value="fedora19_guest1"/>
</params>

The last one shows you that you can define your own parameters that you can match later in your <lnstrecipe>

<params>
    <param name="hostname" value="192.168.100.2"/>
    <param name="os" value="Fedora19"/>
    <param name="memory" value="4000"/>
    <param name="system_group" value="testing"/>
</params>

1.2 Interfaces

ELEMENT: <interfaces>
List of available test interfaces
Attributes: Required: None
Optional: None
Children: Required: <eth>
Optional: None
ELEMENT: <eth>
Test interface description
Attributes: Required: [string] id: unique identifier of the interface
[string] label: an interface label indicating which interfaces can talk to each other
Optional: None
Children: Required: <params>
Optional: None
ELEMENT: <params>
The parameters of an interface.
Attributes: Required: None
Optional: None
Children: Required: <param>; Note: only hwaddr parameter is required others are user defined and optional
Optional: None
ELEMENT: <param>
A single parameter of an interface.
Attributes: Required: [string] name: The name of the parameter
[string] value: The required value
Optional: None
Children: Required: None
Optional: None

Example

<slavemachine>
    <params>
        <param name="hostname" value="192.168.100.2"/>
    </params>
    <interfaces>
        <eth id="nic1" label="testnet">
            <params>
                <param name="hwaddr" value="52:54:00:12:ad:01"/>
            </params>
        </eth>
        <eth id="nic2" label="testnet">
            <params>
                <param name="hwaddr" value="52:54:00:12:ad:02"/>
            </params>
        </eth>
        <eth id="nic3" label="testnet">
            <params>
                <param name="hwaddr" value="52:54:00:12:ad:03"/>
            </params>
        </eth>
    </interfaces>
</slavemachine>

1.3 Security

LNST now supports basic forms of authentication and secure channel communication between the controller and slave processes. Security information for a specific slave can be described in the <security> element of the Slave Machine description XML. For further information look at the Security page.