Skip to content

Slave Description XML Format

jtluka edited this page Sep 10, 2013 · 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. We are working on adding more options that you can specify to make these machine configuration files as descriptive as possible, such as hardware information or operating system version.

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 <machine> 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: None

1.1 Machine parameters

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

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] rpcport: 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 xmlrpc, 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="rpcport" 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] network: the network segment this network device is connected to
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" network="testnet">                                       
            <params>                                                            
                <param name="hwaddr" value="52:54:00:12:ad:01"/>                
            </params>                                                           
        </eth>                                                                  
        <eth id="nic2" network="testnet">                                       
            <params>                                                            
                <param name="hwaddr" value="52:54:00:12:ad:02"/>                
            </params>                                                           
        </eth>                                                                  
        <eth id="nic3" network="testnet">                                       
            <params>                                                            
                <param name="hwaddr" value="52:54:00:12:ad:03"/>                
            </params>                                                           
        </eth>                                                                  
    </interfaces>
</slavemachine>