Hi,
When I was working on the parser, it occured to me, that in LNST recipes
there are two slightly different things called by the same name. But I'm
not sure if it's a problem or not. I just thought, that while we need to
change our older recipes because recipe_eval was dropped, I should bring
this up, so in case we'd agree on this we don't need to change existing
recipes again.
I'm talking about
<netdev />
Netdev tags are used in two different contexts. First to assign phys_id
to a device identified by a mac address in <netmachineconfig>. And secondly
in <netconfig> to specify the configuration of the devices that will be
used. New devices can be created during configuration on top of the existing
ones (e.g. bonds, teams, vlans).
On top of that, the physical netdevs have phys_id, while the 'logical'
configured devices have id and some of them also phys_id in case they
corespond directly to the underlying physical devices.
It makes sense, they are both netdevices from the kernel's point of view,
but from LNST's point of view the first is a set of "physical" source
devices, while the second group are configured interfaces that can be
used in the test.
I think this could be a little confusing to people learning to use LNST
at first. I think, that we could somehow emphasize the difference
between these two. But I'm not sure what are the right names. What do you
think?
Maybe keep the physical devices in netmachineconfig called <netdev> and
change those in <netconfig> to <interface> to emphasize that those are
the "communication channels" used later in recipe? Or the other way?
Here's an example:
<machine id="1">
<netmachineconfig>
<info hostname="10.34.1.171" rootpass="redhat" />
<netdevice type="eth" phys_id="1"
hwaddr="52:54:00:e4:75:16"/>
<netdevice type="eth" phys_id="2"
hwaddr="52:54:00:91:01:9c"/>
<netdevice type="eth" phys_id="3"
hwaddr="52:54:00:94:b7:32"/>
<netdevice type="eth" phys_id="4"
hwaddr="52:54:00:f3:a1:b4"/>
</netmachineconfig>
<netconfig>
<interface id="1" type="eth" phys_id="1" />
<interface id="2" type="eth" phys_id="2" />
<interface id="5" type="team">
<options>
<option name="teamd_config">
{
"runner": {"name": "roundrobin"},
"ports": {"{devname(1,1)}": {},
"{devname(1,2)}": {}}
}
</option>
</options>
<slaves>
<slave id="1" />
<slave id="2" />
</slaves>
<addresses>
<address value="192.168.122.100/24" />
</addresses>
</interface>
</netconfig>
</machine>
Radek :)